Skip to content

Commit

Permalink
Add core issuing models
Browse files Browse the repository at this point in the history
  • Loading branch information
jleclanche committed Aug 10, 2024
1 parent 80e5192 commit 045bb75
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
10 changes: 10 additions & 0 deletions djstripe/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
SetupIntent,
)
from .identity import VerificationReport, VerificationSession
from .issuing import Authorization as IssuingAuthorization
from .issuing import Card as IssuingCard
from .issuing import Cardholder as IssuingCardholder
from .issuing import Dispute as IssuingDispute
from .issuing import Transaction as IssuingTransaction
from .payment_methods import BankAccount, Card, DjstripePaymentMethod, PaymentMethod
from .radar import EarlyFraudWarning
from .sigma import ScheduledQueryRun
Expand Down Expand Up @@ -67,6 +72,11 @@
"IdempotencyKey",
"Invoice",
"InvoiceItem",
"IssuingAuthorization",
"IssuingCard",
"IssuingCardholder",
"IssuingDispute",
"IssuingTransaction",
"LineItem",
"Mandate",
"PaymentIntent",
Expand Down
38 changes: 38 additions & 0 deletions djstripe/models/issuing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import stripe

from .base import StripeModel


class Authorization(StripeModel):
stripe_class = stripe.issuing.Authorization

class Meta:
db_table = "djstripe_issuing_authorization"


class Card(StripeModel):
stripe_class = stripe.issuing.Card

class Meta:
db_table = "djstripe_issuing_card"


class Cardholder(StripeModel):
stripe_class = stripe.issuing.Cardholder

class Meta:
db_table = "djstripe_issuing_cardholder"


class Dispute(StripeModel):
stripe_class = stripe.issuing.Dispute

class Meta:
db_table = "djstripe_issuing_dispute"


class Transaction(StripeModel):
stripe_class = stripe.issuing.Transaction

class Meta:
db_table = "djstripe_issuing_transaction"

0 comments on commit 045bb75

Please sign in to comment.