Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #906 from stripe/latest-codegen-beta
API Updates for beta branch
- Loading branch information
Showing
7 changed files
with
259 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v212 | ||
v214 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- 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 CreateableAPIResource | ||
|
||
|
||
class TaxCalculation(CreateableAPIResource): | ||
""" | ||
A Tax `Calculation` allows you to calculate the tax to collect from your customer. | ||
""" | ||
|
||
OBJECT_NAME = "tax.calculation" | ||
|
||
@classmethod | ||
def _cls_list_line_items( | ||
cls, | ||
calculation, | ||
api_key=None, | ||
stripe_version=None, | ||
stripe_account=None, | ||
**params | ||
): | ||
return cls._static_request( | ||
"get", | ||
"/v1/tax/calculations/{calculation}/line_items".format( | ||
calculation=util.sanitize_id(calculation) | ||
), | ||
api_key=api_key, | ||
stripe_version=stripe_version, | ||
stripe_account=stripe_account, | ||
params=params, | ||
) | ||
|
||
@util.class_method_variant("_cls_list_line_items") | ||
def list_line_items(self, idempotency_key=None, **params): | ||
return self._request( | ||
"get", | ||
"/v1/tax/calculations/{calculation}/line_items".format( | ||
calculation=util.sanitize_id(self.get("id")) | ||
), | ||
idempotency_key=idempotency_key, | ||
params=params, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# File generated from our OpenAPI spec | ||
from __future__ import absolute_import, division, print_function | ||
|
||
from stripe.api_resources.abstract import CreateableAPIResource | ||
|
||
|
||
class TaxTransaction(CreateableAPIResource): | ||
""" | ||
A Tax `Transaction` records the tax collected from or refunded to your customer. | ||
""" | ||
|
||
OBJECT_NAME = "tax.transaction" | ||
|
||
@classmethod | ||
def create_reversal( | ||
cls, api_key=None, stripe_version=None, stripe_account=None, **params | ||
): | ||
return cls._static_request( | ||
"post", | ||
"/v1/tax/transactions/create_reversal", | ||
api_key=api_key, | ||
stripe_version=stripe_version, | ||
stripe_account=stripe_account, | ||
params=params, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters