Skip to content

Commit

Permalink
Codegen for openapi v237
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Mar 2, 2023
1 parent 71a1e5a commit cb67e7f
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v232
v237
2 changes: 2 additions & 0 deletions stripe/api_resources/issuing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from stripe.api_resources.issuing.authorization import Authorization
from stripe.api_resources.issuing.card import Card
from stripe.api_resources.issuing.card_bundle import CardBundle
from stripe.api_resources.issuing.card_design import CardDesign
from stripe.api_resources.issuing.cardholder import Cardholder
from stripe.api_resources.issuing.dispute import Dispute
from stripe.api_resources.issuing.transaction import Transaction
13 changes: 13 additions & 0 deletions stripe/api_resources/issuing/card_bundle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from __future__ import absolute_import, division, print_function

from stripe.api_resources.abstract import ListableAPIResource


class CardBundle(ListableAPIResource):
"""
A Card Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
"""

OBJECT_NAME = "issuing.card_bundle"
81 changes: 81 additions & 0 deletions stripe/api_resources/issuing/card_design.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from __future__ import absolute_import, division, print_function

from stripe import util
from stripe.api_resources.abstract import APIResourceTestHelpers
from stripe.api_resources.abstract import ListableAPIResource
from stripe.api_resources.abstract import UpdateableAPIResource
from stripe.api_resources.abstract import test_helpers


@test_helpers
class CardDesign(ListableAPIResource, UpdateableAPIResource):
"""
A Card Design is a logical grouping of a Card Bundle, card logo, and carrier text that represents a product line.
"""

OBJECT_NAME = "issuing.card_design"

class TestHelpers(APIResourceTestHelpers):
@classmethod
def _cls_activate_testmode(
cls,
card_design,
api_key=None,
stripe_version=None,
stripe_account=None,
**params
):
return cls._static_request(
"post",
"/v1/test_helpers/issuing/card_designs/{card_design}/status/activate".format(
card_design=util.sanitize_id(card_design)
),
api_key=api_key,
stripe_version=stripe_version,
stripe_account=stripe_account,
params=params,
)

@util.class_method_variant("_cls_activate_testmode")
def activate_testmode(self, idempotency_key=None, **params):
return self.resource._request(
"post",
"/v1/test_helpers/issuing/card_designs/{card_design}/status/activate".format(
card_design=util.sanitize_id(self.resource.get("id"))
),
idempotency_key=idempotency_key,
params=params,
)

@classmethod
def _cls_deactivate_testmode(
cls,
card_design,
api_key=None,
stripe_version=None,
stripe_account=None,
**params
):
return cls._static_request(
"post",
"/v1/test_helpers/issuing/card_designs/{card_design}/status/deactivate".format(
card_design=util.sanitize_id(card_design)
),
api_key=api_key,
stripe_version=stripe_version,
stripe_account=stripe_account,
params=params,
)

@util.class_method_variant("_cls_deactivate_testmode")
def deactivate_testmode(self, idempotency_key=None, **params):
return self.resource._request(
"post",
"/v1/test_helpers/issuing/card_designs/{card_design}/status/deactivate".format(
card_design=util.sanitize_id(self.resource.get("id"))
),
idempotency_key=idempotency_key,
params=params,
)
2 changes: 2 additions & 0 deletions stripe/object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
api_resources.InvoiceLineItem.OBJECT_NAME: api_resources.InvoiceLineItem,
api_resources.issuing.Authorization.OBJECT_NAME: api_resources.issuing.Authorization,
api_resources.issuing.Card.OBJECT_NAME: api_resources.issuing.Card,
api_resources.issuing.CardBundle.OBJECT_NAME: api_resources.issuing.CardBundle,
api_resources.issuing.CardDesign.OBJECT_NAME: api_resources.issuing.CardDesign,
api_resources.issuing.Cardholder.OBJECT_NAME: api_resources.issuing.Cardholder,
api_resources.issuing.Dispute.OBJECT_NAME: api_resources.issuing.Dispute,
api_resources.issuing.Transaction.OBJECT_NAME: api_resources.issuing.Transaction,
Expand Down

0 comments on commit cb67e7f

Please sign in to comment.