diff --git a/com/alipay/ams/api/model/billing_subscription_price_item.py b/com/alipay/ams/api/model/billing_subscription_price_item.py index 2bd0ce2..1e60f46 100644 --- a/com/alipay/ams/api/model/billing_subscription_price_item.py +++ b/com/alipay/ams/api/model/billing_subscription_price_item.py @@ -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 @@ -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 @@ -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. @@ -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. @@ -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 @@ -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: @@ -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 @@ -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: @@ -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'] diff --git a/com/alipay/ams/api/model/tax_breakdown.py b/com/alipay/ams/api/model/tax_breakdown.py index bb244a1..e094329 100644 --- a/com/alipay/ams/api/model/tax_breakdown.py +++ b/com/alipay/ams/api/model/tax_breakdown.py @@ -1,4 +1,6 @@ import json +from com.alipay.ams.api.model.amount import Amount +from com.alipay.ams.api.model.amount import Amount @@ -9,8 +11,8 @@ 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 @@ -18,7 +20,7 @@ def __init__(self): @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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/com/alipay/ams/api/model/tax_calculated_customer_details.py b/com/alipay/ams/api/model/tax_calculated_customer_details.py index 0f5f5ed..4808b40 100644 --- a/com/alipay/ams/api/model/tax_calculated_customer_details.py +++ b/com/alipay/ams/api/model/tax_calculated_customer_details.py @@ -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] @@ -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. @@ -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: @@ -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']) diff --git a/com/alipay/ams/api/model/tax_calculated_exemption.py b/com/alipay/ams/api/model/tax_calculated_exemption.py index 7e85b8c..a1a2e4d 100644 --- a/com/alipay/ams/api/model/tax_calculated_exemption.py +++ b/com/alipay/ams/api/model/tax_calculated_exemption.py @@ -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 @@ -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 @@ -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 @@ -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'] diff --git a/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py b/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py index fc115e8..ccf6bc0 100644 --- a/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py +++ b/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py @@ -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 @@ -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 @@ -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 @@ -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'] diff --git a/com/alipay/ams/api/model/tax_calculated_line_item.py b/com/alipay/ams/api/model/tax_calculated_line_item.py index b05dd8b..983dfab 100644 --- a/com/alipay/ams/api/model/tax_calculated_line_item.py +++ b/com/alipay/ams/api/model/tax_calculated_line_item.py @@ -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 @@ -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] @@ -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 @@ -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 @@ -115,7 +117,8 @@ 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: @@ -123,7 +126,8 @@ def parse_rsp_body(self, response_body): 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']: diff --git a/com/alipay/ams/api/model/tax_calculated_shipping_cost.py b/com/alipay/ams/api/model/tax_calculated_shipping_cost.py index ccfc7f9..d11678c 100644 --- a/com/alipay/ams/api/model/tax_calculated_shipping_cost.py +++ b/com/alipay/ams/api/model/tax_calculated_shipping_cost.py @@ -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 @@ -7,15 +9,15 @@ class TaxCalculatedShippingCost: def __init__(self): - self.__amount = None # type: str - self.__tax_amount = None # type: str + self.__amount = None # type: Amount + self.__tax_amount = None # type: Amount self.__tax_breakdown = None # type: [TaxBreakdown] @property def amount(self): - """ - The amount. Maximum length: 19 characters. + """Gets the amount of this TaxCalculatedShippingCost. + """ return self.__amount @@ -24,8 +26,8 @@ def amount(self, value): self.__amount = value @property def tax_amount(self): - """ - The tax amount. Maximum length: 19 characters. + """Gets the tax_amount of this TaxCalculatedShippingCost. + """ return self.__tax_amount @@ -61,9 +63,11 @@ def parse_rsp_body(self, response_body): if isinstance(response_body, str): response_body = json.loads(response_body) if 'amount' in response_body: - self.__amount = response_body['amount'] + self.__amount = Amount() + self.__amount.parse_rsp_body(response_body['amount']) 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']: diff --git a/com/alipay/ams/api/model/tax_calculated_tax_id.py b/com/alipay/ams/api/model/tax_calculated_tax_id.py index 07cca8b..39dc429 100644 --- a/com/alipay/ams/api/model/tax_calculated_tax_id.py +++ b/com/alipay/ams/api/model/tax_calculated_tax_id.py @@ -9,7 +9,6 @@ def __init__(self): self.__value = None # type: str self.__country = None # type: str self.__region = None # type: str - self.__name = None # type: str @property @@ -42,16 +41,6 @@ def region(self): @region.setter def region(self, value): self.__region = 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 @@ -64,8 +53,6 @@ def to_ams_dict(self): params['country'] = self.country if hasattr(self, "region") and self.region is not None: params['region'] = self.region - if hasattr(self, "name") and self.name is not None: - params['name'] = self.name return params @@ -78,5 +65,3 @@ def parse_rsp_body(self, response_body): self.__country = response_body['country'] if 'region' in response_body: self.__region = response_body['region'] - if 'name' in response_body: - self.__name = response_body['name'] diff --git a/com/alipay/ams/api/model/tax_calculation_line_item.py b/com/alipay/ams/api/model/tax_calculation_line_item.py index 8751ba6..8cb3321 100644 --- a/com/alipay/ams/api/model/tax_calculation_line_item.py +++ b/com/alipay/ams/api/model/tax_calculation_line_item.py @@ -1,4 +1,5 @@ import json +from com.alipay.ams.api.model.amount import Amount @@ -7,7 +8,7 @@ class TaxCalculationLineItem: 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.__product_id = None # type: str @@ -26,8 +27,8 @@ def goods_reference_id(self, value): self.__goods_reference_id = value @property def amount(self): - """ - The total amount of the line item in the smallest currency unit. Maximum length: 19 characters. + """Gets the amount of this TaxCalculationLineItem. + """ return self.__amount @@ -101,7 +102,8 @@ 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: diff --git a/com/alipay/ams/api/model/tax_customer_details.py b/com/alipay/ams/api/model/tax_customer_details.py index 3f372b1..0acb08a 100644 --- a/com/alipay/ams/api/model/tax_customer_details.py +++ b/com/alipay/ams/api/model/tax_customer_details.py @@ -12,6 +12,7 @@ class TaxCustomerDetails: def __init__(self): self.__business_details = None # type: TaxBusinessDetails + self.__name = None # type: str self.__shipping_address = None # type: TaxAddress self.__billing_address = None # type: TaxAddress self.__tax_ids = None # type: [TaxId] @@ -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 TaxCustomerDetails. @@ -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: @@ -93,6 +106,8 @@ def parse_rsp_body(self, response_body): if 'businessDetails' in response_body: self.__business_details = TaxBusinessDetails() 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 = TaxAddress() self.__shipping_address.parse_rsp_body(response_body['shippingAddress']) diff --git a/com/alipay/ams/api/model/tax_exemption.py b/com/alipay/ams/api/model/tax_exemption.py index 930d53e..09f5dd9 100644 --- a/com/alipay/ams/api/model/tax_exemption.py +++ b/com/alipay/ams/api/model/tax_exemption.py @@ -10,6 +10,7 @@ def __init__(self): self.__certificate_number = None # type: str self.__exemption_type = None # type: str self.__jurisdiction = None # type: TaxExemptionJurisdiction + self.__effective_from = None # type: str @property @@ -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 @@ -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 @@ -67,3 +80,5 @@ def parse_rsp_body(self, response_body): if 'jurisdiction' in response_body: self.__jurisdiction = TaxExemptionJurisdiction() self.__jurisdiction.parse_rsp_body(response_body['jurisdiction']) + if 'effectiveFrom' in response_body: + self.__effective_from = response_body['effectiveFrom'] diff --git a/com/alipay/ams/api/model/tax_exemption_jurisdiction.py b/com/alipay/ams/api/model/tax_exemption_jurisdiction.py index 7ec8be7..6262fc6 100644 --- a/com/alipay/ams/api/model/tax_exemption_jurisdiction.py +++ b/com/alipay/ams/api/model/tax_exemption_jurisdiction.py @@ -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 @@ -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 @@ -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 @@ -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'] diff --git a/com/alipay/ams/api/model/tax_id.py b/com/alipay/ams/api/model/tax_id.py index d731a62..43022cd 100644 --- a/com/alipay/ams/api/model/tax_id.py +++ b/com/alipay/ams/api/model/tax_id.py @@ -9,7 +9,6 @@ def __init__(self): self.__value = None # type: str self.__country = None # type: str self.__region = None # type: str - self.__name = None # type: str @property @@ -42,16 +41,6 @@ def region(self): @region.setter def region(self, value): self.__region = value - @property - def name(self): - """ - The customer name recorded for tax purposes. Maximum length: 128 characters. - """ - return self.__name - - @name.setter - def name(self, value): - self.__name = value @@ -64,8 +53,6 @@ def to_ams_dict(self): params['country'] = self.country if hasattr(self, "region") and self.region is not None: params['region'] = self.region - if hasattr(self, "name") and self.name is not None: - params['name'] = self.name return params @@ -78,5 +65,3 @@ def parse_rsp_body(self, response_body): self.__country = response_body['country'] if 'region' in response_body: self.__region = response_body['region'] - if 'name' in response_body: - self.__name = response_body['name'] diff --git a/com/alipay/ams/api/model/tax_shipping_cost.py b/com/alipay/ams/api/model/tax_shipping_cost.py index 53fd57c..1a58b90 100644 --- a/com/alipay/ams/api/model/tax_shipping_cost.py +++ b/com/alipay/ams/api/model/tax_shipping_cost.py @@ -1,4 +1,5 @@ import json +from com.alipay.ams.api.model.amount import Amount @@ -6,13 +7,13 @@ class TaxShippingCost: def __init__(self): - self.__amount = None # type: str + self.__amount = None # type: Amount @property def amount(self): - """ - The amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the amount of this TaxShippingCost. + """ return self.__amount @@ -34,4 +35,5 @@ def parse_rsp_body(self, response_body): if isinstance(response_body, str): response_body = json.loads(response_body) if 'amount' in response_body: - self.__amount = response_body['amount'] + self.__amount = Amount() + self.__amount.parse_rsp_body(response_body['amount']) diff --git a/com/alipay/ams/api/model/tax_transaction.py b/com/alipay/ams/api/model/tax_transaction.py index a6efe2d..22ae07d 100644 --- a/com/alipay/ams/api/model/tax_transaction.py +++ b/com/alipay/ams/api/model/tax_transaction.py @@ -1,4 +1,5 @@ import json +from com.alipay.ams.api.model.amount import Amount @@ -9,8 +10,7 @@ def __init__(self): self.__tax_transaction_id = None # type: str self.__tax_calculation_id = None # type: str self.__type = None # type: str - self.__tax_amount = None # type: str - self.__currency = None # type: str + self.__tax_amount = None # type: Amount self.__status = None # type: str self.__failure_reason = None # type: str self.__tax_date = None # type: str @@ -51,8 +51,8 @@ def type(self, value): self.__type = value @property def tax_amount(self): - """ - The non-negative tax amount in the smallest currency unit, without leading zeros. For TRANSACTION and REVERSAL records, this value is always a positive absolute amount. Reconcile a business scope by subtracting the sum of REVERSAL amounts from the sum of TRANSACTION amounts. Maximum length: 19 characters. + """Gets the tax_amount of this TaxTransaction. + """ return self.__tax_amount @@ -60,16 +60,6 @@ def tax_amount(self): def tax_amount(self, value): self.__tax_amount = value @property - def currency(self): - """ - The 3-letter currency code that follows the ISO 4217 standard. This field is returned together with taxAmount. Maximum length: 3 characters. - """ - return self.__currency - - @currency.setter - def currency(self, value): - self.__currency = value - @property def status(self): """ The current status. Maximum length: 16 characters. Note: See documentation for details. @@ -143,8 +133,6 @@ def to_ams_dict(self): params['type'] = self.type if hasattr(self, "tax_amount") and self.tax_amount is not None: params['taxAmount'] = self.tax_amount - if hasattr(self, "currency") and self.currency is not None: - params['currency'] = self.currency if hasattr(self, "status") and self.status is not None: params['status'] = self.status if hasattr(self, "failure_reason") and self.failure_reason is not None: @@ -170,9 +158,8 @@ def parse_rsp_body(self, response_body): if 'type' in response_body: self.__type = response_body['type'] if 'taxAmount' in response_body: - self.__tax_amount = response_body['taxAmount'] - if 'currency' in response_body: - self.__currency = response_body['currency'] + self.__tax_amount = Amount() + self.__tax_amount.parse_rsp_body(response_body['taxAmount']) if 'status' in response_body: self.__status = response_body['status'] if 'failureReason' in response_body: diff --git a/com/alipay/ams/api/request/billing/alipay_billing_subscription_cancel_request.py b/com/alipay/ams/api/request/billing/alipay_billing_subscription_cancel_request.py index d09ab67..15e6702 100644 --- a/com/alipay/ams/api/request/billing/alipay_billing_subscription_cancel_request.py +++ b/com/alipay/ams/api/request/billing/alipay_billing_subscription_cancel_request.py @@ -59,7 +59,7 @@ def cancellation_details(self, value): @property def proration_behavior(self): """ - The proration behavior for immediate termination. Valid values are CREATE_PRORATIONS, NONE, and ALWAYS_INVOICE. Maximum length: 18 characters. + The proration behavior for immediate termination. Valid values are ALWAYS_INVOICE and NONE. The default value is NONE. Maximum length: 18 characters. """ return self.__proration_behavior diff --git a/com/alipay/ams/api/request/billing/alipay_customer_create_request.py b/com/alipay/ams/api/request/billing/alipay_customer_create_request.py index 71eb2ce..53cf1cf 100644 --- a/com/alipay/ams/api/request/billing/alipay_customer_create_request.py +++ b/com/alipay/ams/api/request/billing/alipay_customer_create_request.py @@ -20,7 +20,6 @@ def __init__(self): self.__address = None # type: str self.__address_detail = None # type: str self.__zipcode = None # type: str - self.__shipping_phone = None # type: str self.__shipping_country = None # type: str self.__shipping_state = None # type: str self.__shipping_city = None # type: str @@ -32,12 +31,9 @@ def __init__(self): self.__preferred_locales = None # type: [str] self.__default_payment_method = None # type: str self.__metadata = None # type: str - self.__phone_no = None # type: str - self.__country_code = None # type: str self.__billing_email = None # type: str self.__shipping_first_name = None # type: str self.__shipping_last_name = None # type: str - self.__shipping_country_code = None # type: str @property @@ -161,16 +157,6 @@ def zipcode(self): def zipcode(self, value): self.__zipcode = value @property - def shipping_phone(self): - """ - Recipient phone number for shipping. Maximum length: 32 characters. - """ - return self.__shipping_phone - - @shipping_phone.setter - def shipping_phone(self, value): - self.__shipping_phone = value - @property def shipping_country(self): """ Shipping address country code. Format: ISO 3166-1 alpha-2. Maximum length: 2 characters. @@ -281,26 +267,6 @@ def metadata(self): def metadata(self, value): self.__metadata = value @property - def phone_no(self): - """ - Customer's phone number (digits only). Maximum length: 32 characters. Cross-field constraint: when `phoneNo` is provided, `countryCode` is required; omitting it returns `PARAM_ILLEGAL`. - """ - return self.__phone_no - - @phone_no.setter - def phone_no(self, value): - self.__phone_no = value - @property - def country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo` (NOT a numeric dial prefix). Required when `phoneNo` is provided. Maximum length: 2 characters. - """ - return self.__country_code - - @country_code.setter - def country_code(self, value): - self.__country_code = value - @property def billing_email(self): """ Email address used to receive bills and invoices. It can differ from the account `email`. If omitted during customer creation, it defaults to `email`. Maximum length: 256 characters. @@ -330,16 +296,6 @@ def shipping_last_name(self): @shipping_last_name.setter def shipping_last_name(self, value): self.__shipping_last_name = value - @property - def shipping_country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo`. Required when `shippingPhone` is provided. Maximum length: 2 characters. - """ - return self.__shipping_country_code - - @shipping_country_code.setter - def shipping_country_code(self, value): - self.__shipping_country_code = value def to_ams_json(self): @@ -373,8 +329,6 @@ def to_ams_dict(self): params['addressDetail'] = self.address_detail if hasattr(self, "zipcode") and self.zipcode is not None: params['zipcode'] = self.zipcode - if hasattr(self, "shipping_phone") and self.shipping_phone is not None: - params['shippingPhone'] = self.shipping_phone if hasattr(self, "shipping_country") and self.shipping_country is not None: params['shippingCountry'] = self.shipping_country if hasattr(self, "shipping_state") and self.shipping_state is not None: @@ -397,18 +351,12 @@ def to_ams_dict(self): params['defaultPaymentMethod'] = self.default_payment_method if hasattr(self, "metadata") and self.metadata is not None: params['metadata'] = self.metadata - if hasattr(self, "phone_no") and self.phone_no is not None: - params['phoneNo'] = self.phone_no - if hasattr(self, "country_code") and self.country_code is not None: - params['countryCode'] = self.country_code if hasattr(self, "billing_email") and self.billing_email is not None: params['billingEmail'] = self.billing_email if hasattr(self, "shipping_first_name") and self.shipping_first_name is not None: params['shippingFirstName'] = self.shipping_first_name if hasattr(self, "shipping_last_name") and self.shipping_last_name is not None: params['shippingLastName'] = self.shipping_last_name - if hasattr(self, "shipping_country_code") and self.shipping_country_code is not None: - params['shippingCountryCode'] = self.shipping_country_code return params @@ -439,8 +387,6 @@ def parse_rsp_body(self, response_body): self.__address_detail = response_body['addressDetail'] if 'zipcode' in response_body: self.__zipcode = response_body['zipcode'] - if 'shippingPhone' in response_body: - self.__shipping_phone = response_body['shippingPhone'] if 'shippingCountry' in response_body: self.__shipping_country = response_body['shippingCountry'] if 'shippingState' in response_body: @@ -463,15 +409,9 @@ def parse_rsp_body(self, response_body): self.__default_payment_method = response_body['defaultPaymentMethod'] if 'metadata' in response_body: self.__metadata = response_body['metadata'] - if 'phoneNo' in response_body: - self.__phone_no = response_body['phoneNo'] - if 'countryCode' in response_body: - self.__country_code = response_body['countryCode'] if 'billingEmail' in response_body: self.__billing_email = response_body['billingEmail'] if 'shippingFirstName' in response_body: self.__shipping_first_name = response_body['shippingFirstName'] if 'shippingLastName' in response_body: self.__shipping_last_name = response_body['shippingLastName'] - if 'shippingCountryCode' in response_body: - self.__shipping_country_code = response_body['shippingCountryCode'] diff --git a/com/alipay/ams/api/request/billing/alipay_customer_inquire_list_request.py b/com/alipay/ams/api/request/billing/alipay_customer_inquire_list_request.py index f9e5991..7c33bdb 100644 --- a/com/alipay/ams/api/request/billing/alipay_customer_inquire_list_request.py +++ b/com/alipay/ams/api/request/billing/alipay_customer_inquire_list_request.py @@ -14,8 +14,6 @@ def __init__(self): self.__include_total = None # type: bool self.__status = None # type: str self.__email = None # type: str - self.__phone_no = None # type: str - self.__country_code = None # type: str self.__gmt_create_end = None # type: str self.__customer_id = None # type: str self.__country = None # type: [str] @@ -84,26 +82,6 @@ def email(self): def email(self, value): self.__email = value @property - def phone_no(self): - """ - Filter by phone number (canonical). Cross-field constraint: when `phoneNo` is provided, `countryCode` is REQUIRED - omitting it returns `PARAM_ILLEGAL`. - """ - return self.__phone_no - - @phone_no.setter - def phone_no(self, value): - self.__phone_no = value - @property - def country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo`. Required when `phoneNo` is provided. - """ - return self.__country_code - - @country_code.setter - def country_code(self, value): - self.__country_code = value - @property def gmt_create_end(self): """ Inclusive end of the creation-timestamp range. Closed interval with `gmtCreateStart`. @@ -174,10 +152,6 @@ def to_ams_dict(self): params['status'] = self.status if hasattr(self, "email") and self.email is not None: params['email'] = self.email - if hasattr(self, "phone_no") and self.phone_no is not None: - params['phoneNo'] = self.phone_no - if hasattr(self, "country_code") and self.country_code is not None: - params['countryCode'] = self.country_code if hasattr(self, "gmt_create_end") and self.gmt_create_end is not None: params['gmtCreateEnd'] = self.gmt_create_end if hasattr(self, "customer_id") and self.customer_id is not None: @@ -206,10 +180,6 @@ def parse_rsp_body(self, response_body): self.__status = response_body['status'] if 'email' in response_body: self.__email = response_body['email'] - if 'phoneNo' in response_body: - self.__phone_no = response_body['phoneNo'] - if 'countryCode' in response_body: - self.__country_code = response_body['countryCode'] if 'gmtCreateEnd' in response_body: self.__gmt_create_end = response_body['gmtCreateEnd'] if 'customerId' in response_body: diff --git a/com/alipay/ams/api/request/billing/alipay_customer_update_request.py b/com/alipay/ams/api/request/billing/alipay_customer_update_request.py index 4a0d7ab..fe6bced 100644 --- a/com/alipay/ams/api/request/billing/alipay_customer_update_request.py +++ b/com/alipay/ams/api/request/billing/alipay_customer_update_request.py @@ -20,7 +20,6 @@ def __init__(self): self.__address = None # type: str self.__address_detail = None # type: str self.__zipcode = None # type: str - self.__shipping_phone = None # type: str self.__shipping_country = None # type: str self.__shipping_state = None # type: str self.__shipping_city = None # type: str @@ -32,12 +31,9 @@ def __init__(self): self.__preferred_locales = None # type: [str] self.__default_payment_method = None # type: str self.__metadata = None # type: str - self.__phone_no = None # type: str - self.__country_code = None # type: str self.__billing_email = None # type: str self.__shipping_first_name = None # type: str self.__shipping_last_name = None # type: str - self.__shipping_country_code = None # type: str @property @@ -161,16 +157,6 @@ def zipcode(self): def zipcode(self, value): self.__zipcode = value @property - def shipping_phone(self): - """ - Updated shipping phone. Maximum length: 32 characters. - """ - return self.__shipping_phone - - @shipping_phone.setter - def shipping_phone(self, value): - self.__shipping_phone = value - @property def shipping_country(self): """ Updated shipping country. Format: ISO 3166-1 alpha-2. Maximum length: 2 characters. @@ -281,26 +267,6 @@ def metadata(self): def metadata(self, value): self.__metadata = value @property - def phone_no(self): - """ - Updated phone number (digits only). Cross-field constraint: when `phoneNo` is provided, `countryCode` is required; omitting it returns `PARAM_ILLEGAL`. Maximum length: 32 characters. - """ - return self.__phone_no - - @phone_no.setter - def phone_no(self, value): - self.__phone_no = value - @property - def country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo`. Required when `phoneNo` is provided. Maximum length: 2 characters. - """ - return self.__country_code - - @country_code.setter - def country_code(self, value): - self.__country_code = value - @property def billing_email(self): """ Updated email address used to receive bills and invoices. Send this field explicitly when the invoice-recipient email must change; updating `email` alone does not change it. Maximum length: 256 characters. @@ -330,16 +296,6 @@ def shipping_last_name(self): @shipping_last_name.setter def shipping_last_name(self, value): self.__shipping_last_name = value - @property - def shipping_country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo`. Required when `shippingPhone` is provided. Maximum length: 2 characters. - """ - return self.__shipping_country_code - - @shipping_country_code.setter - def shipping_country_code(self, value): - self.__shipping_country_code = value def to_ams_json(self): @@ -373,8 +329,6 @@ def to_ams_dict(self): params['addressDetail'] = self.address_detail if hasattr(self, "zipcode") and self.zipcode is not None: params['zipcode'] = self.zipcode - if hasattr(self, "shipping_phone") and self.shipping_phone is not None: - params['shippingPhone'] = self.shipping_phone if hasattr(self, "shipping_country") and self.shipping_country is not None: params['shippingCountry'] = self.shipping_country if hasattr(self, "shipping_state") and self.shipping_state is not None: @@ -397,18 +351,12 @@ def to_ams_dict(self): params['defaultPaymentMethod'] = self.default_payment_method if hasattr(self, "metadata") and self.metadata is not None: params['metadata'] = self.metadata - if hasattr(self, "phone_no") and self.phone_no is not None: - params['phoneNo'] = self.phone_no - if hasattr(self, "country_code") and self.country_code is not None: - params['countryCode'] = self.country_code if hasattr(self, "billing_email") and self.billing_email is not None: params['billingEmail'] = self.billing_email if hasattr(self, "shipping_first_name") and self.shipping_first_name is not None: params['shippingFirstName'] = self.shipping_first_name if hasattr(self, "shipping_last_name") and self.shipping_last_name is not None: params['shippingLastName'] = self.shipping_last_name - if hasattr(self, "shipping_country_code") and self.shipping_country_code is not None: - params['shippingCountryCode'] = self.shipping_country_code return params @@ -439,8 +387,6 @@ def parse_rsp_body(self, response_body): self.__address_detail = response_body['addressDetail'] if 'zipcode' in response_body: self.__zipcode = response_body['zipcode'] - if 'shippingPhone' in response_body: - self.__shipping_phone = response_body['shippingPhone'] if 'shippingCountry' in response_body: self.__shipping_country = response_body['shippingCountry'] if 'shippingState' in response_body: @@ -463,15 +409,9 @@ def parse_rsp_body(self, response_body): self.__default_payment_method = response_body['defaultPaymentMethod'] if 'metadata' in response_body: self.__metadata = response_body['metadata'] - if 'phoneNo' in response_body: - self.__phone_no = response_body['phoneNo'] - if 'countryCode' in response_body: - self.__country_code = response_body['countryCode'] if 'billingEmail' in response_body: self.__billing_email = response_body['billingEmail'] if 'shippingFirstName' in response_body: self.__shipping_first_name = response_body['shippingFirstName'] if 'shippingLastName' in response_body: self.__shipping_last_name = response_body['shippingLastName'] - if 'shippingCountryCode' in response_body: - self.__shipping_country_code = response_body['shippingCountryCode'] diff --git a/com/alipay/ams/api/request/billing/alipay_tax_calculate_request.py b/com/alipay/ams/api/request/billing/alipay_tax_calculate_request.py index 24fe1da..e1e377a 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_calculate_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_calculate_request.py @@ -13,7 +13,6 @@ def __init__(self): super(AlipayTaxCalculateRequest, self).__init__("/ams/api/v1/tax/calculate") self.__tax_calculation_request_id = None # type: str - self.__currency = None # type: str self.__line_items = None # type: [TaxCalculationLineItem] self.__customer_id = None # type: str self.__customer_details = None # type: TaxCustomerDetails @@ -33,16 +32,6 @@ def tax_calculation_request_id(self): def tax_calculation_request_id(self, value): self.__tax_calculation_request_id = value @property - def currency(self): - """ - The 3-letter currency code that follows the ISO 4217 standard. Maximum length: 3 characters. - """ - return self.__currency - - @currency.setter - def currency(self, value): - self.__currency = value - @property def line_items(self): """ The line item list. @@ -113,8 +102,6 @@ def to_ams_dict(self): params = dict() if hasattr(self, "tax_calculation_request_id") and self.tax_calculation_request_id is not None: params['taxCalculationRequestId'] = self.tax_calculation_request_id - if hasattr(self, "currency") and self.currency is not None: - params['currency'] = self.currency if hasattr(self, "line_items") and self.line_items is not None: params['lineItems'] = self.line_items if hasattr(self, "customer_id") and self.customer_id is not None: @@ -135,8 +122,6 @@ def parse_rsp_body(self, response_body): response_body = json.loads(response_body) if 'taxCalculationRequestId' in response_body: self.__tax_calculation_request_id = response_body['taxCalculationRequestId'] - if 'currency' in response_body: - self.__currency = response_body['currency'] if 'lineItems' in response_body: self.__line_items = [] for item in response_body['lineItems']: diff --git a/com/alipay/ams/api/request/billing/alipay_tax_inquire_transaction_list_request.py b/com/alipay/ams/api/request/billing/alipay_tax_inquire_transaction_list_request.py index 555b3f4..bd35934 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_inquire_transaction_list_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_inquire_transaction_list_request.py @@ -48,7 +48,7 @@ def refund_id(self, value): @property def current_page(self): """ - The current page number. + The current page number, starting from 1. The default value is 1. """ return self.__current_page @@ -58,7 +58,7 @@ def current_page(self, value): @property def page_size(self): """ - The number of records per page. + The number of records returned per page. The default value is 20. """ return self.__page_size diff --git a/com/alipay/ams/api/response/billing/alipay_billing_subscription_inquire_details_response.py b/com/alipay/ams/api/response/billing/alipay_billing_subscription_inquire_details_response.py index a773201..20d335d 100644 --- a/com/alipay/ams/api/response/billing/alipay_billing_subscription_inquire_details_response.py +++ b/com/alipay/ams/api/response/billing/alipay_billing_subscription_inquire_details_response.py @@ -1,6 +1,5 @@ import json from com.alipay.ams.api.model.result_info import ResultInfo -from com.alipay.ams.api.model.billing_subscription_trial_settings import BillingSubscriptionTrialSettings from com.alipay.ams.api.model.billing_subscription_inquire_details_cancellation_details import BillingSubscriptionInquireDetailsCancellationDetails from com.alipay.ams.api.model.amount import Amount from com.alipay.ams.api.model.amount import Amount @@ -30,7 +29,6 @@ def __init__(self, rsp_body): self.__canceled_at = None # type: str self.__trial_start = None # type: str self.__trial_end = None # type: str - self.__trial_settings = None # type: BillingSubscriptionTrialSettings self.__cancel_at = None # type: str self.__collection_method = None # type: str self.__days_until_due = None # type: int @@ -188,16 +186,6 @@ def trial_end(self): def trial_end(self, value): self.__trial_end = value @property - def trial_settings(self): - """Gets the trial_settings of this AlipayBillingSubscriptionInquireDetailsResponse. - - """ - return self.__trial_settings - - @trial_settings.setter - def trial_settings(self, value): - self.__trial_settings = value - @property def cancel_at(self): """ The cancel at. Note: See documentation for details. @@ -361,8 +349,6 @@ def to_ams_dict(self): params['trialStart'] = self.trial_start if hasattr(self, "trial_end") and self.trial_end is not None: params['trialEnd'] = self.trial_end - if hasattr(self, "trial_settings") and self.trial_settings is not None: - params['trialSettings'] = self.trial_settings if hasattr(self, "cancel_at") and self.cancel_at is not None: params['cancelAt'] = self.cancel_at if hasattr(self, "collection_method") and self.collection_method is not None: @@ -423,9 +409,6 @@ def parse_rsp_body(self, response_body): self.__trial_start = response_body['trialStart'] if 'trialEnd' in response_body: self.__trial_end = response_body['trialEnd'] - if 'trialSettings' in response_body: - self.__trial_settings = BillingSubscriptionTrialSettings() - self.__trial_settings.parse_rsp_body(response_body['trialSettings']) if 'cancelAt' in response_body: self.__cancel_at = response_body['cancelAt'] if 'collectionMethod' in response_body: diff --git a/com/alipay/ams/api/response/billing/alipay_customer_inquire_details_response.py b/com/alipay/ams/api/response/billing/alipay_customer_inquire_details_response.py index 2667a06..3e115e7 100644 --- a/com/alipay/ams/api/response/billing/alipay_customer_inquire_details_response.py +++ b/com/alipay/ams/api/response/billing/alipay_customer_inquire_details_response.py @@ -22,7 +22,6 @@ def __init__(self, rsp_body): self.__address = None # type: str self.__address_detail = None # type: str self.__zipcode = None # type: str - self.__shipping_phone = None # type: str self.__shipping_country = None # type: str self.__shipping_state = None # type: str self.__shipping_city = None # type: str @@ -35,12 +34,9 @@ def __init__(self, rsp_body): self.__status = None # type: str self.__reference_customer_id = None # type: str self.__metadata = None # type: str - self.__phone_no = None # type: str - self.__country_code = None # type: str self.__billing_email = None # type: str self.__shipping_first_name = None # type: str self.__shipping_last_name = None # type: str - self.__shipping_country_code = None # type: str self.__shipping_zipcode = None # type: str self.__gmt_create = None # type: str self.parse_rsp_body(rsp_body) @@ -177,16 +173,6 @@ def zipcode(self): def zipcode(self, value): self.__zipcode = value @property - def shipping_phone(self): - """ - Shipping phone. Returned when resultCode is `SUCCESS` and the field was set. - """ - return self.__shipping_phone - - @shipping_phone.setter - def shipping_phone(self, value): - self.__shipping_phone = value - @property def shipping_country(self): """ Shipping country (ISO 3166-1 alpha-2). Returned when resultCode is `SUCCESS` and the field was set. @@ -307,26 +293,6 @@ def metadata(self): def metadata(self, value): self.__metadata = value @property - def phone_no(self): - """ - Customer phone number (digits only). Returned when resultCode is `SUCCESS` and the field was set. - """ - return self.__phone_no - - @phone_no.setter - def phone_no(self, value): - self.__phone_no = value - @property - def country_code(self): - """ - ISO 3166-1 alpha-2 country code paired with `phoneNo`. Returned when resultCode is `SUCCESS` and the field was set. - """ - return self.__country_code - - @country_code.setter - def country_code(self, value): - self.__country_code = value - @property def billing_email(self): """ Invoice recipient email (independent of account `email`). Returned when resultCode is `SUCCESS` and the field was set. @@ -357,16 +323,6 @@ def shipping_last_name(self): def shipping_last_name(self, value): self.__shipping_last_name = value @property - def shipping_country_code(self): - """ - Shipping address numeric calling code. Returned when resultCode is `SUCCESS` and the field was set. - """ - return self.__shipping_country_code - - @shipping_country_code.setter - def shipping_country_code(self, value): - self.__shipping_country_code = value - @property def shipping_zipcode(self): """ Shipping postal code. Wire name: `shippingZipcode`. Returned when resultCode is `SUCCESS` and the field was set. @@ -418,8 +374,6 @@ def to_ams_dict(self): params['addressDetail'] = self.address_detail if hasattr(self, "zipcode") and self.zipcode is not None: params['zipcode'] = self.zipcode - if hasattr(self, "shipping_phone") and self.shipping_phone is not None: - params['shippingPhone'] = self.shipping_phone if hasattr(self, "shipping_country") and self.shipping_country is not None: params['shippingCountry'] = self.shipping_country if hasattr(self, "shipping_state") and self.shipping_state is not None: @@ -444,18 +398,12 @@ def to_ams_dict(self): params['referenceCustomerId'] = self.reference_customer_id if hasattr(self, "metadata") and self.metadata is not None: params['metadata'] = self.metadata - if hasattr(self, "phone_no") and self.phone_no is not None: - params['phoneNo'] = self.phone_no - if hasattr(self, "country_code") and self.country_code is not None: - params['countryCode'] = self.country_code if hasattr(self, "billing_email") and self.billing_email is not None: params['billingEmail'] = self.billing_email if hasattr(self, "shipping_first_name") and self.shipping_first_name is not None: params['shippingFirstName'] = self.shipping_first_name if hasattr(self, "shipping_last_name") and self.shipping_last_name is not None: params['shippingLastName'] = self.shipping_last_name - if hasattr(self, "shipping_country_code") and self.shipping_country_code is not None: - params['shippingCountryCode'] = self.shipping_country_code if hasattr(self, "shipping_zipcode") and self.shipping_zipcode is not None: params['shippingZipcode'] = self.shipping_zipcode if hasattr(self, "gmt_create") and self.gmt_create is not None: @@ -492,8 +440,6 @@ def parse_rsp_body(self, response_body): self.__address_detail = response_body['addressDetail'] if 'zipcode' in response_body: self.__zipcode = response_body['zipcode'] - if 'shippingPhone' in response_body: - self.__shipping_phone = response_body['shippingPhone'] if 'shippingCountry' in response_body: self.__shipping_country = response_body['shippingCountry'] if 'shippingState' in response_body: @@ -518,18 +464,12 @@ def parse_rsp_body(self, response_body): self.__reference_customer_id = response_body['referenceCustomerId'] if 'metadata' in response_body: self.__metadata = response_body['metadata'] - if 'phoneNo' in response_body: - self.__phone_no = response_body['phoneNo'] - if 'countryCode' in response_body: - self.__country_code = response_body['countryCode'] if 'billingEmail' in response_body: self.__billing_email = response_body['billingEmail'] if 'shippingFirstName' in response_body: self.__shipping_first_name = response_body['shippingFirstName'] if 'shippingLastName' in response_body: self.__shipping_last_name = response_body['shippingLastName'] - if 'shippingCountryCode' in response_body: - self.__shipping_country_code = response_body['shippingCountryCode'] if 'shippingZipcode' in response_body: self.__shipping_zipcode = response_body['shippingZipcode'] if 'gmtCreate' in response_body: diff --git a/com/alipay/ams/api/response/billing/alipay_tax_calculate_response.py b/com/alipay/ams/api/response/billing/alipay_tax_calculate_response.py index 0d4c36c..1b35b0b 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_calculate_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_calculate_response.py @@ -1,5 +1,8 @@ import json from com.alipay.ams.api.model.result import Result +from com.alipay.ams.api.model.amount import Amount +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_calculated_line_item import TaxCalculatedLineItem from com.alipay.ams.api.model.tax_breakdown import TaxBreakdown from com.alipay.ams.api.model.tax_calculated_shipping_cost import TaxCalculatedShippingCost @@ -15,10 +18,9 @@ def __init__(self, rsp_body): self.__result = None # type: Result self.__tax_calculation_id = None # type: str - self.__currency = None # type: str - self.__total_amount = None # type: str - self.__exclusive_tax_amount = None # type: str - self.__inclusive_tax_amount = None # type: str + self.__total_amount = None # type: Amount + self.__exclusive_tax_amount = None # type: Amount + self.__inclusive_tax_amount = None # type: Amount self.__line_items = None # type: [TaxCalculatedLineItem] self.__tax_breakdown = None # type: [TaxBreakdown] self.__expire_at = None # type: str @@ -49,19 +51,9 @@ def tax_calculation_id(self): def tax_calculation_id(self, value): self.__tax_calculation_id = value @property - def currency(self): - """ - The 3-letter currency code that follows the ISO 4217 standard. Maximum length: 3 characters. - """ - return self.__currency - - @currency.setter - def currency(self, value): - self.__currency = value - @property def total_amount(self): - """ - The total amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the total_amount of this AlipayTaxCalculateResponse. + """ return self.__total_amount @@ -70,8 +62,8 @@ def total_amount(self, value): self.__total_amount = value @property def exclusive_tax_amount(self): - """ - The exclusive tax amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the exclusive_tax_amount of this AlipayTaxCalculateResponse. + """ return self.__exclusive_tax_amount @@ -80,8 +72,8 @@ def exclusive_tax_amount(self, value): self.__exclusive_tax_amount = value @property def inclusive_tax_amount(self): - """ - The inclusive tax amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the inclusive_tax_amount of this AlipayTaxCalculateResponse. + """ return self.__inclusive_tax_amount @@ -158,8 +150,6 @@ def to_ams_dict(self): params['result'] = self.result if hasattr(self, "tax_calculation_id") and self.tax_calculation_id is not None: params['taxCalculationId'] = self.tax_calculation_id - if hasattr(self, "currency") and self.currency is not None: - params['currency'] = self.currency if hasattr(self, "total_amount") and self.total_amount is not None: params['totalAmount'] = self.total_amount if hasattr(self, "exclusive_tax_amount") and self.exclusive_tax_amount is not None: @@ -188,14 +178,15 @@ def parse_rsp_body(self, response_body): self.__result.parse_rsp_body(response_body['result']) if 'taxCalculationId' in response_body: self.__tax_calculation_id = response_body['taxCalculationId'] - if 'currency' in response_body: - self.__currency = response_body['currency'] if 'totalAmount' in response_body: - self.__total_amount = response_body['totalAmount'] + self.__total_amount = Amount() + self.__total_amount.parse_rsp_body(response_body['totalAmount']) if 'exclusiveTaxAmount' in response_body: - self.__exclusive_tax_amount = response_body['exclusiveTaxAmount'] + self.__exclusive_tax_amount = Amount() + self.__exclusive_tax_amount.parse_rsp_body(response_body['exclusiveTaxAmount']) if 'inclusiveTaxAmount' in response_body: - self.__inclusive_tax_amount = response_body['inclusiveTaxAmount'] + self.__inclusive_tax_amount = Amount() + self.__inclusive_tax_amount.parse_rsp_body(response_body['inclusiveTaxAmount']) if 'lineItems' in response_body: self.__line_items = [] for item in response_body['lineItems']: diff --git a/com/alipay/ams/api/response/billing/alipay_tax_inquire_calculation_response.py b/com/alipay/ams/api/response/billing/alipay_tax_inquire_calculation_response.py index 9e190c9..50400b0 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_inquire_calculation_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_inquire_calculation_response.py @@ -2,6 +2,9 @@ from com.alipay.ams.api.model.result import Result from com.alipay.ams.api.model.tax_calculated_customer_details import TaxCalculatedCustomerDetails from com.alipay.ams.api.model.tax_calculated_ship_from_details import TaxCalculatedShipFromDetails +from com.alipay.ams.api.model.amount import Amount +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_calculated_line_item import TaxCalculatedLineItem from com.alipay.ams.api.model.tax_breakdown import TaxBreakdown from com.alipay.ams.api.model.tax_calculated_shipping_cost import TaxCalculatedShippingCost @@ -16,12 +19,11 @@ def __init__(self, rsp_body): self.__result = None # type: Result self.__tax_calculation_id = None # type: str - self.__currency = None # type: str self.__customer_details = None # type: TaxCalculatedCustomerDetails self.__ship_from_details = None # type: TaxCalculatedShipFromDetails - self.__total_amount = None # type: str - self.__exclusive_tax_amount = None # type: str - self.__inclusive_tax_amount = None # type: str + self.__total_amount = None # type: Amount + self.__exclusive_tax_amount = None # type: Amount + self.__inclusive_tax_amount = None # type: Amount self.__line_items = None # type: [TaxCalculatedLineItem] self.__tax_breakdown = None # type: [TaxBreakdown] self.__expire_at = None # type: str @@ -51,16 +53,6 @@ def tax_calculation_id(self): def tax_calculation_id(self, value): self.__tax_calculation_id = value @property - def currency(self): - """ - The 3-letter currency code that follows the ISO 4217 standard. Maximum length: 3 characters. - """ - return self.__currency - - @currency.setter - def currency(self, value): - self.__currency = value - @property def customer_details(self): """Gets the customer_details of this AlipayTaxInquireCalculationResponse. @@ -82,8 +74,8 @@ def ship_from_details(self, value): self.__ship_from_details = value @property def total_amount(self): - """ - The total amount. Maximum length: 19 characters. + """Gets the total_amount of this AlipayTaxInquireCalculationResponse. + """ return self.__total_amount @@ -92,8 +84,8 @@ def total_amount(self, value): self.__total_amount = value @property def exclusive_tax_amount(self): - """ - The exclusive tax amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the exclusive_tax_amount of this AlipayTaxInquireCalculationResponse. + """ return self.__exclusive_tax_amount @@ -102,8 +94,8 @@ def exclusive_tax_amount(self, value): self.__exclusive_tax_amount = value @property def inclusive_tax_amount(self): - """ - The inclusive tax amount. Maximum length: 19 characters. Note: See documentation for details. + """Gets the inclusive_tax_amount of this AlipayTaxInquireCalculationResponse. + """ return self.__inclusive_tax_amount @@ -170,8 +162,6 @@ def to_ams_dict(self): params['result'] = self.result if hasattr(self, "tax_calculation_id") and self.tax_calculation_id is not None: params['taxCalculationId'] = self.tax_calculation_id - if hasattr(self, "currency") and self.currency is not None: - params['currency'] = self.currency if hasattr(self, "customer_details") and self.customer_details is not None: params['customerDetails'] = self.customer_details if hasattr(self, "ship_from_details") and self.ship_from_details is not None: @@ -202,8 +192,6 @@ def parse_rsp_body(self, response_body): self.__result.parse_rsp_body(response_body['result']) if 'taxCalculationId' in response_body: self.__tax_calculation_id = response_body['taxCalculationId'] - if 'currency' in response_body: - self.__currency = response_body['currency'] if 'customerDetails' in response_body: self.__customer_details = TaxCalculatedCustomerDetails() self.__customer_details.parse_rsp_body(response_body['customerDetails']) @@ -211,11 +199,14 @@ def parse_rsp_body(self, response_body): self.__ship_from_details = TaxCalculatedShipFromDetails() self.__ship_from_details.parse_rsp_body(response_body['shipFromDetails']) if 'totalAmount' in response_body: - self.__total_amount = response_body['totalAmount'] + self.__total_amount = Amount() + self.__total_amount.parse_rsp_body(response_body['totalAmount']) if 'exclusiveTaxAmount' in response_body: - self.__exclusive_tax_amount = response_body['exclusiveTaxAmount'] + self.__exclusive_tax_amount = Amount() + self.__exclusive_tax_amount.parse_rsp_body(response_body['exclusiveTaxAmount']) if 'inclusiveTaxAmount' in response_body: - self.__inclusive_tax_amount = response_body['inclusiveTaxAmount'] + self.__inclusive_tax_amount = Amount() + self.__inclusive_tax_amount.parse_rsp_body(response_body['inclusiveTaxAmount']) if 'lineItems' in response_body: self.__line_items = [] for item in response_body['lineItems']: diff --git a/com/alipay/ams/api/response/billing/alipay_tax_inquire_transaction_list_response.py b/com/alipay/ams/api/response/billing/alipay_tax_inquire_transaction_list_response.py index ccf0487..fc2fe69 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_inquire_transaction_list_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_inquire_transaction_list_response.py @@ -30,7 +30,7 @@ def result(self, value): @property def transactions(self): """ - The transactions. Note: See documentation for details. + The tax transaction list returned for a successful query. The list is empty or omitted when no matching transaction exists. Maximum size: 100. """ return self.__transactions