Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions com/alipay/ams/api/model/billing_subscription_price_item.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from com.alipay.ams.api.model.amount import Amount
from com.alipay.ams.api.model.tier import Tier
from com.alipay.ams.api.model.amount import Amount


Expand All @@ -16,13 +17,17 @@ def __init__(self):
self.__price_id = None # type: str
self.__price_type = None # type: str
self.__pricing_model = None # type: str
self.__tiers_mode = None # type: str
self.__tiers = None # type: [Tier]
self.__product_id = None # type: str
self.__product_name = None # type: str
self.__product_description = None # type: str
self.__quantity = None # type: int
self.__recurring_interval = None # type: str
self.__recurring_interval_count = None # type: int
self.__unit_amount = None # type: Amount
self.__usage_type = None # type: str
self.__meter_id = None # type: str


@property
Expand Down Expand Up @@ -106,6 +111,26 @@ def pricing_model(self):
def pricing_model(self, value):
self.__pricing_model = value
@property
def tiers_mode(self):
"""
The tiered pricing mode. Valid values are GRADUATED and VOLUME.
"""
return self.__tiers_mode

@tiers_mode.setter
def tiers_mode(self, value):
self.__tiers_mode = value
@property
def tiers(self):
"""
The tiered pricing details.
"""
return self.__tiers

@tiers.setter
def tiers(self, value):
self.__tiers = value
@property
def product_id(self):
"""
The associated product ID. Maximum length: 64 characters.
Expand All @@ -126,6 +151,16 @@ def product_name(self):
def product_name(self, value):
self.__product_name = value
@property
def product_description(self):
"""
The product description resolved from the product ID of this price item.
"""
return self.__product_description

@product_description.setter
def product_description(self, value):
self.__product_description = value
@property
def quantity(self):
"""
The quantity of this subscription item.
Expand Down Expand Up @@ -175,6 +210,16 @@ def usage_type(self):
@usage_type.setter
def usage_type(self, value):
self.__usage_type = value
@property
def meter_id(self):
"""
The external meter reference ID.
"""
return self.__meter_id

@meter_id.setter
def meter_id(self, value):
self.__meter_id = value



Expand All @@ -197,10 +242,16 @@ def to_ams_dict(self):
params['priceType'] = self.price_type
if hasattr(self, "pricing_model") and self.pricing_model is not None:
params['pricingModel'] = self.pricing_model
if hasattr(self, "tiers_mode") and self.tiers_mode is not None:
params['tiersMode'] = self.tiers_mode
if hasattr(self, "tiers") and self.tiers is not None:
params['tiers'] = self.tiers
if hasattr(self, "product_id") and self.product_id is not None:
params['productId'] = self.product_id
if hasattr(self, "product_name") and self.product_name is not None:
params['productName'] = self.product_name
if hasattr(self, "product_description") and self.product_description is not None:
params['productDescription'] = self.product_description
if hasattr(self, "quantity") and self.quantity is not None:
params['quantity'] = self.quantity
if hasattr(self, "recurring_interval") and self.recurring_interval is not None:
Expand All @@ -211,6 +262,8 @@ def to_ams_dict(self):
params['unitAmount'] = self.unit_amount
if hasattr(self, "usage_type") and self.usage_type is not None:
params['usageType'] = self.usage_type
if hasattr(self, "meter_id") and self.meter_id is not None:
params['meterId'] = self.meter_id
return params


Expand All @@ -234,10 +287,20 @@ def parse_rsp_body(self, response_body):
self.__price_type = response_body['priceType']
if 'pricingModel' in response_body:
self.__pricing_model = response_body['pricingModel']
if 'tiersMode' in response_body:
self.__tiers_mode = response_body['tiersMode']
if 'tiers' in response_body:
self.__tiers = []
for item in response_body['tiers']:
obj = Tier()
obj.parse_rsp_body(item)
self.__tiers.append(obj)
if 'productId' in response_body:
self.__product_id = response_body['productId']
if 'productName' in response_body:
self.__product_name = response_body['productName']
if 'productDescription' in response_body:
self.__product_description = response_body['productDescription']
if 'quantity' in response_body:
self.__quantity = response_body['quantity']
if 'recurringInterval' in response_body:
Expand All @@ -249,3 +312,5 @@ def parse_rsp_body(self, response_body):
self.__unit_amount.parse_rsp_body(response_body['unitAmount'])
if 'usageType' in response_body:
self.__usage_type = response_body['usageType']
if 'meterId' in response_body:
self.__meter_id = response_body['meterId']
24 changes: 14 additions & 10 deletions com/alipay/ams/api/model/tax_breakdown.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import json
from com.alipay.ams.api.model.amount import Amount
from com.alipay.ams.api.model.amount import Amount



Expand All @@ -9,16 +11,16 @@ def __init__(self):
self.__tax_type = None # type: str
self.__authority_name = None # type: str
self.__tax_rate = None # type: str
self.__tax_amount = None # type: str
self.__taxable_amount = None # type: str
self.__tax_amount = None # type: Amount
self.__taxable_amount = None # type: Amount
self.__taxability_reason = None # type: str
self.__inclusive = None # type: bool


@property
def tax_type(self):
"""
The tax type. Supported values include CUIT, GST, VAT, CBS, IBS, HST, PST, RST, QST, JCT, SERVICE_TAX, IGV, SALES_TAX, and PERSONAL_PROPERTY_LEASE_TRANSACTION_TAX.
The tax type. Supported values are SALES_TAX, VAT, GST, and OTHER.
"""
return self.__tax_type

Expand Down Expand Up @@ -47,8 +49,8 @@ def tax_rate(self, value):
self.__tax_rate = value
@property
def tax_amount(self):
"""
The tax amount. Maximum length: 19 characters.
"""Gets the tax_amount of this TaxBreakdown.

"""
return self.__tax_amount

Expand All @@ -57,8 +59,8 @@ def tax_amount(self, value):
self.__tax_amount = value
@property
def taxable_amount(self):
"""
The taxable amount. Maximum length: 19 characters.
"""Gets the taxable_amount of this TaxBreakdown.

"""
return self.__taxable_amount

Expand All @@ -68,7 +70,7 @@ def taxable_amount(self, value):
@property
def taxability_reason(self):
"""
The taxability reason. Maximum length: 32 characters.
The taxability reason. Supported values are NOT_COLLECTING, PRODUCT_EXEMPT, REVERSE_CHARGE, CUSTOMER_EXEMPT, NOT_SUPPORTED, NOT_SUBJECT_TO_TAX, PRODUCT_EXEMPT_HOLIDAY, PORTION_PRODUCT_EXEMPT, ZERO_RATED, STANDARD_RATED, and UNKNOWN_ZERO_TAX.
"""
return self.__taxability_reason

Expand Down Expand Up @@ -118,9 +120,11 @@ def parse_rsp_body(self, response_body):
if 'taxRate' in response_body:
self.__tax_rate = response_body['taxRate']
if 'taxAmount' in response_body:
self.__tax_amount = response_body['taxAmount']
self.__tax_amount = Amount()
self.__tax_amount.parse_rsp_body(response_body['taxAmount'])
if 'taxableAmount' in response_body:
self.__taxable_amount = response_body['taxableAmount']
self.__taxable_amount = Amount()
self.__taxable_amount.parse_rsp_body(response_body['taxableAmount'])
if 'taxabilityReason' in response_body:
self.__taxability_reason = response_body['taxabilityReason']
if 'inclusive' in response_body:
Expand Down
15 changes: 15 additions & 0 deletions com/alipay/ams/api/model/tax_calculated_customer_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class TaxCalculatedCustomerDetails:
def __init__(self):

self.__business_details = None # type: TaxCalculatedBusinessDetails
self.__name = None # type: str
self.__shipping_address = None # type: TaxCalculatedAddress
self.__billing_address = None # type: TaxCalculatedAddress
self.__tax_ids = None # type: [TaxCalculatedTaxId]
Expand All @@ -29,6 +30,16 @@ def business_details(self):
def business_details(self, value):
self.__business_details = value
@property
def name(self):
"""
The customer name recorded for tax purposes. Maximum length: 256 characters.
"""
return self.__name

@name.setter
def name(self, value):
self.__name = value
@property
def shipping_address(self):
"""Gets the shipping_address of this TaxCalculatedCustomerDetails.

Expand Down Expand Up @@ -76,6 +87,8 @@ def to_ams_dict(self):
params = dict()
if hasattr(self, "business_details") and self.business_details is not None:
params['businessDetails'] = self.business_details
if hasattr(self, "name") and self.name is not None:
params['name'] = self.name
if hasattr(self, "shipping_address") and self.shipping_address is not None:
params['shippingAddress'] = self.shipping_address
if hasattr(self, "billing_address") and self.billing_address is not None:
Expand All @@ -93,6 +106,8 @@ def parse_rsp_body(self, response_body):
if 'businessDetails' in response_body:
self.__business_details = TaxCalculatedBusinessDetails()
self.__business_details.parse_rsp_body(response_body['businessDetails'])
if 'name' in response_body:
self.__name = response_body['name']
if 'shippingAddress' in response_body:
self.__shipping_address = TaxCalculatedAddress()
self.__shipping_address.parse_rsp_body(response_body['shippingAddress'])
Expand Down
15 changes: 15 additions & 0 deletions com/alipay/ams/api/model/tax_calculated_exemption.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def __init__(self):
self.__certificate_number = None # type: str
self.__exemption_type = None # type: str
self.__jurisdiction = None # type: TaxCalculatedExemptionJurisdiction
self.__effective_from = None # type: str


@property
Expand Down Expand Up @@ -42,6 +43,16 @@ def jurisdiction(self):
@jurisdiction.setter
def jurisdiction(self, value):
self.__jurisdiction = value
@property
def effective_from(self):
"""
The ISO 8601 time with a timezone when the tax exemption becomes effective. Maximum length: 32 characters.
"""
return self.__effective_from

@effective_from.setter
def effective_from(self, value):
self.__effective_from = value



Expand All @@ -54,6 +65,8 @@ def to_ams_dict(self):
params['exemptionType'] = self.exemption_type
if hasattr(self, "jurisdiction") and self.jurisdiction is not None:
params['jurisdiction'] = self.jurisdiction
if hasattr(self, "effective_from") and self.effective_from is not None:
params['effectiveFrom'] = self.effective_from
return params


Expand All @@ -67,3 +80,5 @@ def parse_rsp_body(self, response_body):
if 'jurisdiction' in response_body:
self.__jurisdiction = TaxCalculatedExemptionJurisdiction()
self.__jurisdiction.parse_rsp_body(response_body['jurisdiction'])
if 'effectiveFrom' in response_body:
self.__effective_from = response_body['effectiveFrom']
15 changes: 0 additions & 15 deletions com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def __init__(self):
self.__country = None # type: str
self.__region = None # type: str
self.__city = None # type: str
self.__effective_from = None # type: str


@property
Expand Down Expand Up @@ -42,16 +41,6 @@ def city(self):
@city.setter
def city(self, value):
self.__city = value
@property
def effective_from(self):
"""
The time when the tax exemption becomes effective. Maximum length: 32 characters.
"""
return self.__effective_from

@effective_from.setter
def effective_from(self, value):
self.__effective_from = value



Expand All @@ -64,8 +53,6 @@ def to_ams_dict(self):
params['region'] = self.region
if hasattr(self, "city") and self.city is not None:
params['city'] = self.city
if hasattr(self, "effective_from") and self.effective_from is not None:
params['effectiveFrom'] = self.effective_from
return params


Expand All @@ -78,5 +65,3 @@ def parse_rsp_body(self, response_body):
self.__region = response_body['region']
if 'city' in response_body:
self.__city = response_body['city']
if 'effectiveFrom' in response_body:
self.__effective_from = response_body['effectiveFrom']
20 changes: 12 additions & 8 deletions com/alipay/ams/api/model/tax_calculated_line_item.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import json
from com.alipay.ams.api.model.amount import Amount
from com.alipay.ams.api.model.amount import Amount
from com.alipay.ams.api.model.tax_breakdown import TaxBreakdown


Expand All @@ -8,11 +10,11 @@ class TaxCalculatedLineItem:
def __init__(self):

self.__goods_reference_id = None # type: str
self.__amount = None # type: str
self.__amount = None # type: Amount
self.__quantity = None # type: int
self.__tax_code = None # type: str
self.__tax_behavior = None # type: str
self.__tax_amount = None # type: str
self.__tax_amount = None # type: Amount
self.__tax_breakdown = None # type: [TaxBreakdown]


Expand All @@ -28,8 +30,8 @@ def goods_reference_id(self, value):
self.__goods_reference_id = value
@property
def amount(self):
"""
The amount. Maximum length: 19 characters.
"""Gets the amount of this TaxCalculatedLineItem.

"""
return self.__amount

Expand Down Expand Up @@ -68,8 +70,8 @@ def tax_behavior(self, value):
self.__tax_behavior = value
@property
def tax_amount(self):
"""
The tax amount. Maximum length: 19 characters.
"""Gets the tax_amount of this TaxCalculatedLineItem.

"""
return self.__tax_amount

Expand Down Expand Up @@ -115,15 +117,17 @@ def parse_rsp_body(self, response_body):
if 'goodsReferenceId' in response_body:
self.__goods_reference_id = response_body['goodsReferenceId']
if 'amount' in response_body:
self.__amount = response_body['amount']
self.__amount = Amount()
self.__amount.parse_rsp_body(response_body['amount'])
if 'quantity' in response_body:
self.__quantity = response_body['quantity']
if 'taxCode' in response_body:
self.__tax_code = response_body['taxCode']
if 'taxBehavior' in response_body:
self.__tax_behavior = response_body['taxBehavior']
if 'taxAmount' in response_body:
self.__tax_amount = response_body['taxAmount']
self.__tax_amount = Amount()
self.__tax_amount.parse_rsp_body(response_body['taxAmount'])
if 'taxBreakdown' in response_body:
self.__tax_breakdown = []
for item in response_body['taxBreakdown']:
Expand Down
Loading