diff --git a/com/alipay/ams/api/model/authorization_control.py b/com/alipay/ams/api/model/authorization_control.py index f8c1494..2bf882c 100644 --- a/com/alipay/ams/api/model/authorization_control.py +++ b/com/alipay/ams/api/model/authorization_control.py @@ -14,6 +14,7 @@ def __init__(self): self.__allowed_merchant_category_list = None # type: [str] self.__allowed_auth_times = None # type: int self.__allowed_currencies = None # type: [str] + self.__payment_preference_currencies = None # type: [str] self.__card_limit_detail = None # type: CardLimitDetail self.__card_limit_info = None # type: CardLimitInfo self.__refund_preference = None # type: RefundPreference @@ -70,6 +71,16 @@ def allowed_currencies(self): def allowed_currencies(self, value): self.__allowed_currencies = value @property + def payment_preference_currencies(self): + """ + An ordered list of ISO 4217 currency codes that defines the card-level balance-consumption priority. Only applyCard accepts this field in a request; do not send it to updateCard. For applyCard, the list must not contain duplicates and every currency must be supported by Antom. Omission, null, or an empty list configures no card-level preference. The field participates in requestId idempotency, and invalid values, more than 9 entries, duplicates, or capability-disabled use return PARAM_ILLEGAL. For inquireCardDetail, a configured list is returned in stored order; an enabled merchant without a card-level preference receives null, and a disabled merchant does not receive the field. For inquireCardSensitiveInfo, a whitelisted merchant receives the configured list, the child field is omitted when no card-level preference exists, and a non-whitelisted merchant does not receive the parent cardDetail object. The initially supported currencies are USD, EUR, GBP, HKD, AUD, CAD, CNH, JPY, and NZD; the supported set is configuration-driven and can change without an API contract change. + """ + return self.__payment_preference_currencies + + @payment_preference_currencies.setter + def payment_preference_currencies(self, value): + self.__payment_preference_currencies = value + @property def card_limit_detail(self): """Gets the card_limit_detail of this AuthorizationControl. @@ -115,6 +126,8 @@ def to_ams_dict(self): params['allowedAuthTimes'] = self.allowed_auth_times if hasattr(self, "allowed_currencies") and self.allowed_currencies is not None: params['allowedCurrencies'] = self.allowed_currencies + if hasattr(self, "payment_preference_currencies") and self.payment_preference_currencies is not None: + params['paymentPreferenceCurrencies'] = self.payment_preference_currencies if hasattr(self, "card_limit_detail") and self.card_limit_detail is not None: params['cardLimitDetail'] = self.card_limit_detail if hasattr(self, "card_limit_info") and self.card_limit_info is not None: @@ -137,6 +150,8 @@ def parse_rsp_body(self, response_body): self.__allowed_auth_times = response_body['allowedAuthTimes'] if 'allowedCurrencies' in response_body: self.__allowed_currencies = response_body['allowedCurrencies'] + if 'paymentPreferenceCurrencies' in response_body: + self.__payment_preference_currencies = response_body['paymentPreferenceCurrencies'] if 'cardLimitDetail' in response_body: self.__card_limit_detail = CardLimitDetail() self.__card_limit_detail.parse_rsp_body(response_body['cardLimitDetail']) diff --git a/com/alipay/ams/api/model/billing_subscription_status_change.py b/com/alipay/ams/api/model/billing_subscription_status_change.py new file mode 100644 index 0000000..d0e6dbe --- /dev/null +++ b/com/alipay/ams/api/model/billing_subscription_status_change.py @@ -0,0 +1,37 @@ +import json + + + + +class BillingSubscriptionStatusChange: + def __init__(self): + + self.__action = None # type: str + + + @property + def action(self): + """ + The subscription status change action. The currently supported value is PAUSE, which pauses payment collection and changes the subscription status from ACTIVE to PAUSED. To reactivate a paused subscription, call the resume subscription API. Maximum length: 10 characters. + """ + return self.__action + + @action.setter + def action(self, value): + self.__action = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "action") and self.action is not None: + params['action'] = self.action + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'action' in response_body: + self.__action = response_body['action'] diff --git a/com/alipay/ams/api/model/paginator.py b/com/alipay/ams/api/model/paginator.py index 384ce11..909bd2f 100644 --- a/com/alipay/ams/api/model/paginator.py +++ b/com/alipay/ams/api/model/paginator.py @@ -15,7 +15,7 @@ def __init__(self): @property def current_page(self): """ - The current page number, start from 1. + The current page number, starting from 1. """ return self.__current_page @@ -25,7 +25,7 @@ def current_page(self, value): @property def page_size(self): """ - The maximum records returned per page. + The number of records returned per page. """ return self.__page_size @@ -35,7 +35,7 @@ def page_size(self, value): @property def total_page(self): """ - Total number of pages. + The total number of pages. """ return self.__total_page @@ -45,7 +45,7 @@ def total_page(self, value): @property def total_count(self): """ - Total items that match the criteria. + The total number of records that match the query criteria. """ return self.__total_count diff --git a/com/alipay/ams/api/model/tax_breakdown.py b/com/alipay/ams/api/model/tax_breakdown.py index 4f4e657..bb244a1 100644 --- a/com/alipay/ams/api/model/tax_breakdown.py +++ b/com/alipay/ams/api/model/tax_breakdown.py @@ -18,7 +18,7 @@ def __init__(self): @property def tax_type(self): """ - The tax type. Maximum length: 32 characters. + 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. """ return self.__tax_type diff --git a/com/alipay/ams/api/model/tax_calculated_address.py b/com/alipay/ams/api/model/tax_calculated_address.py new file mode 100644 index 0000000..02b4f1b --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_address.py @@ -0,0 +1,142 @@ +import json + + + + +class TaxCalculatedAddress: + def __init__(self): + + self.__country = None # type: str + self.__region = None # type: str + self.__county = None # type: str + self.__city = None # type: str + self.__district = None # type: str + self.__line1 = None # type: str + self.__line2 = None # type: str + self.__postal_code = None # type: str + + + @property + def country(self): + """ + The country or region code. Maximum length: 2 characters. + """ + return self.__country + + @country.setter + def country(self, value): + self.__country = value + @property + def region(self): + """ + The region. Maximum length: 10 characters. + """ + return self.__region + + @region.setter + def region(self, value): + self.__region = value + @property + def county(self): + """ + The county. Maximum length: 64 characters. + """ + return self.__county + + @county.setter + def county(self, value): + self.__county = value + @property + def city(self): + """ + The city. Maximum length: 64 characters. + """ + return self.__city + + @city.setter + def city(self, value): + self.__city = value + @property + def district(self): + """ + The district. Maximum length: 64 characters. + """ + return self.__district + + @district.setter + def district(self, value): + self.__district = value + @property + def line1(self): + """ + The first address line. Maximum length: 256 characters. + """ + return self.__line1 + + @line1.setter + def line1(self, value): + self.__line1 = value + @property + def line2(self): + """ + The second address line. Maximum length: 256 characters. + """ + return self.__line2 + + @line2.setter + def line2(self, value): + self.__line2 = value + @property + def postal_code(self): + """ + The postal code. Maximum length: 16 characters. + """ + return self.__postal_code + + @postal_code.setter + def postal_code(self, value): + self.__postal_code = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "country") and self.country is not None: + params['country'] = self.country + if hasattr(self, "region") and self.region is not None: + params['region'] = self.region + if hasattr(self, "county") and self.county is not None: + params['county'] = self.county + if hasattr(self, "city") and self.city is not None: + params['city'] = self.city + if hasattr(self, "district") and self.district is not None: + params['district'] = self.district + if hasattr(self, "line1") and self.line1 is not None: + params['line1'] = self.line1 + if hasattr(self, "line2") and self.line2 is not None: + params['line2'] = self.line2 + if hasattr(self, "postal_code") and self.postal_code is not None: + params['postalCode'] = self.postal_code + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'country' in response_body: + self.__country = response_body['country'] + if 'region' in response_body: + self.__region = response_body['region'] + if 'county' in response_body: + self.__county = response_body['county'] + if 'city' in response_body: + self.__city = response_body['city'] + if 'district' in response_body: + self.__district = response_body['district'] + if 'line1' in response_body: + self.__line1 = response_body['line1'] + if 'line2' in response_body: + self.__line2 = response_body['line2'] + if 'postalCode' in response_body: + self.__postal_code = response_body['postalCode'] diff --git a/com/alipay/ams/api/model/tax_calculated_business_details.py b/com/alipay/ams/api/model/tax_calculated_business_details.py new file mode 100644 index 0000000..5ca7920 --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_business_details.py @@ -0,0 +1,39 @@ +import json +from com.alipay.ams.api.model.tax_calculated_address import TaxCalculatedAddress + + + + +class TaxCalculatedBusinessDetails: + def __init__(self): + + self.__address = None # type: TaxCalculatedAddress + + + @property + def address(self): + """Gets the address of this TaxCalculatedBusinessDetails. + + """ + return self.__address + + @address.setter + def address(self, value): + self.__address = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "address") and self.address is not None: + params['address'] = self.address + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'address' in response_body: + self.__address = TaxCalculatedAddress() + self.__address.parse_rsp_body(response_body['address']) diff --git a/com/alipay/ams/api/model/tax_calculated_customer_details.py b/com/alipay/ams/api/model/tax_calculated_customer_details.py new file mode 100644 index 0000000..0f5f5ed --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_customer_details.py @@ -0,0 +1,113 @@ +import json +from com.alipay.ams.api.model.tax_calculated_business_details import TaxCalculatedBusinessDetails +from com.alipay.ams.api.model.tax_calculated_address import TaxCalculatedAddress +from com.alipay.ams.api.model.tax_calculated_address import TaxCalculatedAddress +from com.alipay.ams.api.model.tax_calculated_tax_id import TaxCalculatedTaxId +from com.alipay.ams.api.model.tax_calculated_exemption import TaxCalculatedExemption + + + + +class TaxCalculatedCustomerDetails: + def __init__(self): + + self.__business_details = None # type: TaxCalculatedBusinessDetails + self.__shipping_address = None # type: TaxCalculatedAddress + self.__billing_address = None # type: TaxCalculatedAddress + self.__tax_ids = None # type: [TaxCalculatedTaxId] + self.__tax_exemptions = None # type: [TaxCalculatedExemption] + + + @property + def business_details(self): + """Gets the business_details of this TaxCalculatedCustomerDetails. + + """ + return self.__business_details + + @business_details.setter + def business_details(self, value): + self.__business_details = value + @property + def shipping_address(self): + """Gets the shipping_address of this TaxCalculatedCustomerDetails. + + """ + return self.__shipping_address + + @shipping_address.setter + def shipping_address(self, value): + self.__shipping_address = value + @property + def billing_address(self): + """Gets the billing_address of this TaxCalculatedCustomerDetails. + + """ + return self.__billing_address + + @billing_address.setter + def billing_address(self, value): + self.__billing_address = value + @property + def tax_ids(self): + """ + The effective customer tax ID list. Maximum size: 10. + """ + return self.__tax_ids + + @tax_ids.setter + def tax_ids(self, value): + self.__tax_ids = value + @property + def tax_exemptions(self): + """ + The effective customer tax exemption list. Maximum size: 10. + """ + return self.__tax_exemptions + + @tax_exemptions.setter + def tax_exemptions(self, value): + self.__tax_exemptions = value + + + + + 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, "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: + params['billingAddress'] = self.billing_address + if hasattr(self, "tax_ids") and self.tax_ids is not None: + params['taxIds'] = self.tax_ids + if hasattr(self, "tax_exemptions") and self.tax_exemptions is not None: + params['taxExemptions'] = self.tax_exemptions + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'businessDetails' in response_body: + self.__business_details = TaxCalculatedBusinessDetails() + self.__business_details.parse_rsp_body(response_body['businessDetails']) + if 'shippingAddress' in response_body: + self.__shipping_address = TaxCalculatedAddress() + self.__shipping_address.parse_rsp_body(response_body['shippingAddress']) + if 'billingAddress' in response_body: + self.__billing_address = TaxCalculatedAddress() + self.__billing_address.parse_rsp_body(response_body['billingAddress']) + if 'taxIds' in response_body: + self.__tax_ids = [] + for item in response_body['taxIds']: + obj = TaxCalculatedTaxId() + obj.parse_rsp_body(item) + self.__tax_ids.append(obj) + if 'taxExemptions' in response_body: + self.__tax_exemptions = [] + for item in response_body['taxExemptions']: + obj = TaxCalculatedExemption() + obj.parse_rsp_body(item) + self.__tax_exemptions.append(obj) diff --git a/com/alipay/ams/api/model/tax_calculated_exemption.py b/com/alipay/ams/api/model/tax_calculated_exemption.py new file mode 100644 index 0000000..7e85b8c --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_exemption.py @@ -0,0 +1,69 @@ +import json +from com.alipay.ams.api.model.tax_calculated_exemption_jurisdiction import TaxCalculatedExemptionJurisdiction + + + + +class TaxCalculatedExemption: + def __init__(self): + + self.__certificate_number = None # type: str + self.__exemption_type = None # type: str + self.__jurisdiction = None # type: TaxCalculatedExemptionJurisdiction + + + @property + def certificate_number(self): + """ + The tax exemption certificate number. Maximum length: 64 characters. + """ + return self.__certificate_number + + @certificate_number.setter + def certificate_number(self, value): + self.__certificate_number = value + @property + def exemption_type(self): + """ + The tax exemption type. Maximum length: 32 characters. + """ + return self.__exemption_type + + @exemption_type.setter + def exemption_type(self, value): + self.__exemption_type = value + @property + def jurisdiction(self): + """Gets the jurisdiction of this TaxCalculatedExemption. + + """ + return self.__jurisdiction + + @jurisdiction.setter + def jurisdiction(self, value): + self.__jurisdiction = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "certificate_number") and self.certificate_number is not None: + params['certificateNumber'] = self.certificate_number + if hasattr(self, "exemption_type") and self.exemption_type is not None: + params['exemptionType'] = self.exemption_type + if hasattr(self, "jurisdiction") and self.jurisdiction is not None: + params['jurisdiction'] = self.jurisdiction + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'certificateNumber' in response_body: + self.__certificate_number = response_body['certificateNumber'] + if 'exemptionType' in response_body: + self.__exemption_type = response_body['exemptionType'] + if 'jurisdiction' in response_body: + self.__jurisdiction = TaxCalculatedExemptionJurisdiction() + self.__jurisdiction.parse_rsp_body(response_body['jurisdiction']) diff --git a/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py b/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py new file mode 100644 index 0000000..fc115e8 --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_exemption_jurisdiction.py @@ -0,0 +1,82 @@ +import json + + + + +class TaxCalculatedExemptionJurisdiction: + 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 + def country(self): + """ + The country or region code. Maximum length: 2 characters. + """ + return self.__country + + @country.setter + def country(self, value): + self.__country = value + @property + def region(self): + """ + The region. Maximum length: 10 characters. + """ + return self.__region + + @region.setter + def region(self, value): + self.__region = value + @property + def city(self): + """ + The city. Maximum length: 64 characters. + """ + return self.__city + + @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 + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "country") and self.country is not None: + params['country'] = self.country + if hasattr(self, "region") and self.region is not None: + 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 + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'country' in response_body: + self.__country = response_body['country'] + if 'region' in 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 1cddae5..b05dd8b 100644 --- a/com/alipay/ams/api/model/tax_calculated_line_item.py +++ b/com/alipay/ams/api/model/tax_calculated_line_item.py @@ -8,7 +8,6 @@ class TaxCalculatedLineItem: def __init__(self): self.__goods_reference_id = None # type: str - self.__unit_amount = None # type: str self.__amount = None # type: str self.__quantity = None # type: int self.__tax_code = None # type: str @@ -28,16 +27,6 @@ def goods_reference_id(self): def goods_reference_id(self, value): self.__goods_reference_id = value @property - def unit_amount(self): - """ - The unit amount. Maximum length: 19 characters. - """ - return self.__unit_amount - - @unit_amount.setter - def unit_amount(self, value): - self.__unit_amount = value - @property def amount(self): """ The amount. Maximum length: 19 characters. @@ -105,8 +94,6 @@ def to_ams_dict(self): params = dict() if hasattr(self, "goods_reference_id") and self.goods_reference_id is not None: params['goodsReferenceId'] = self.goods_reference_id - if hasattr(self, "unit_amount") and self.unit_amount is not None: - params['unitAmount'] = self.unit_amount if hasattr(self, "amount") and self.amount is not None: params['amount'] = self.amount if hasattr(self, "quantity") and self.quantity is not None: @@ -127,8 +114,6 @@ def parse_rsp_body(self, response_body): response_body = json.loads(response_body) if 'goodsReferenceId' in response_body: self.__goods_reference_id = response_body['goodsReferenceId'] - if 'unitAmount' in response_body: - self.__unit_amount = response_body['unitAmount'] if 'amount' in response_body: self.__amount = response_body['amount'] if 'quantity' in response_body: diff --git a/com/alipay/ams/api/model/tax_calculated_ship_from_details.py b/com/alipay/ams/api/model/tax_calculated_ship_from_details.py new file mode 100644 index 0000000..4a70ef6 --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_ship_from_details.py @@ -0,0 +1,39 @@ +import json +from com.alipay.ams.api.model.tax_calculated_address import TaxCalculatedAddress + + + + +class TaxCalculatedShipFromDetails: + def __init__(self): + + self.__address = None # type: TaxCalculatedAddress + + + @property + def address(self): + """Gets the address of this TaxCalculatedShipFromDetails. + + """ + return self.__address + + @address.setter + def address(self, value): + self.__address = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "address") and self.address is not None: + params['address'] = self.address + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'address' in response_body: + self.__address = TaxCalculatedAddress() + self.__address.parse_rsp_body(response_body['address']) diff --git a/com/alipay/ams/api/model/tax_calculated_tax_id.py b/com/alipay/ams/api/model/tax_calculated_tax_id.py new file mode 100644 index 0000000..07cca8b --- /dev/null +++ b/com/alipay/ams/api/model/tax_calculated_tax_id.py @@ -0,0 +1,82 @@ +import json + + + + +class TaxCalculatedTaxId: + def __init__(self): + + self.__value = None # type: str + self.__country = None # type: str + self.__region = None # type: str + self.__name = None # type: str + + + @property + def value(self): + """ + The customer tax ID value. Maximum length: 64 characters. + """ + return self.__value + + @value.setter + def value(self, value): + self.__value = value + @property + def country(self): + """ + The country or region code. Maximum length: 2 characters. + """ + return self.__country + + @country.setter + def country(self, value): + self.__country = value + @property + def region(self): + """ + The region. Maximum length: 10 characters. + """ + return self.__region + + @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 + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "value") and self.value is not None: + params['value'] = self.value + if hasattr(self, "country") and self.country is not None: + 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 + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'value' in response_body: + self.__value = response_body['value'] + if 'country' in 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 6916a5e..8751ba6 100644 --- a/com/alipay/ams/api/model/tax_calculation_line_item.py +++ b/com/alipay/ams/api/model/tax_calculation_line_item.py @@ -7,7 +7,7 @@ class TaxCalculationLineItem: def __init__(self): self.__goods_reference_id = None # type: str - self.__unit_amount = None # type: str + self.__amount = None # type: str self.__quantity = None # type: int self.__tax_code = None # type: str self.__product_id = None # type: str @@ -25,19 +25,19 @@ def goods_reference_id(self): def goods_reference_id(self, value): self.__goods_reference_id = value @property - def unit_amount(self): + def amount(self): """ - The unit amount. Maximum length: 19 characters. + The total amount of the line item in the smallest currency unit. Maximum length: 19 characters. """ - return self.__unit_amount + return self.__amount - @unit_amount.setter - def unit_amount(self, value): - self.__unit_amount = value + @amount.setter + def amount(self, value): + self.__amount = value @property def quantity(self): """ - The quantity. + The quantity. Valid range: 1 to 10000. """ return self.__quantity @@ -82,8 +82,8 @@ def to_ams_dict(self): params = dict() if hasattr(self, "goods_reference_id") and self.goods_reference_id is not None: params['goodsReferenceId'] = self.goods_reference_id - if hasattr(self, "unit_amount") and self.unit_amount is not None: - params['unitAmount'] = self.unit_amount + if hasattr(self, "amount") and self.amount is not None: + params['amount'] = self.amount if hasattr(self, "quantity") and self.quantity is not None: params['quantity'] = self.quantity if hasattr(self, "tax_code") and self.tax_code is not None: @@ -100,8 +100,8 @@ def parse_rsp_body(self, response_body): response_body = json.loads(response_body) if 'goodsReferenceId' in response_body: self.__goods_reference_id = response_body['goodsReferenceId'] - if 'unitAmount' in response_body: - self.__unit_amount = response_body['unitAmount'] + if 'amount' in response_body: + self.__amount = 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 1dd056b..3f372b1 100644 --- a/com/alipay/ams/api/model/tax_customer_details.py +++ b/com/alipay/ams/api/model/tax_customer_details.py @@ -3,6 +3,7 @@ from com.alipay.ams.api.model.tax_address import TaxAddress from com.alipay.ams.api.model.tax_address import TaxAddress from com.alipay.ams.api.model.tax_id import TaxId +from com.alipay.ams.api.model.tax_exemption import TaxExemption @@ -10,23 +11,13 @@ class TaxCustomerDetails: def __init__(self): - self.__name = None # type: str self.__business_details = None # type: TaxBusinessDetails self.__shipping_address = None # type: TaxAddress self.__billing_address = None # type: TaxAddress self.__tax_ids = None # type: [TaxId] + self.__tax_exemptions = None # type: [TaxExemption] - @property - def name(self): - """ - The name. Maximum length: 128 characters. Note: See documentation for details. - """ - return self.__name - - @name.setter - def name(self, value): - self.__name = value @property def business_details(self): """Gets the business_details of this TaxCustomerDetails. @@ -60,21 +51,29 @@ def billing_address(self, value): @property def tax_ids(self): """ - The tax ID list. Note: See documentation for details. + The customer tax ID list. Maximum size: 10. """ return self.__tax_ids @tax_ids.setter def tax_ids(self, value): self.__tax_ids = value + @property + def tax_exemptions(self): + """ + The customer tax exemption list. Maximum size: 10. + """ + return self.__tax_exemptions + + @tax_exemptions.setter + def tax_exemptions(self, value): + self.__tax_exemptions = value def to_ams_dict(self): params = dict() - if hasattr(self, "name") and self.name is not None: - params['name'] = self.name if hasattr(self, "business_details") and self.business_details is not None: params['businessDetails'] = self.business_details if hasattr(self, "shipping_address") and self.shipping_address is not None: @@ -83,14 +82,14 @@ def to_ams_dict(self): params['billingAddress'] = self.billing_address if hasattr(self, "tax_ids") and self.tax_ids is not None: params['taxIds'] = self.tax_ids + if hasattr(self, "tax_exemptions") and self.tax_exemptions is not None: + params['taxExemptions'] = self.tax_exemptions return params def parse_rsp_body(self, response_body): if isinstance(response_body, str): response_body = json.loads(response_body) - if 'name' in response_body: - self.__name = response_body['name'] if 'businessDetails' in response_body: self.__business_details = TaxBusinessDetails() self.__business_details.parse_rsp_body(response_body['businessDetails']) @@ -106,3 +105,9 @@ def parse_rsp_body(self, response_body): obj = TaxId() obj.parse_rsp_body(item) self.__tax_ids.append(obj) + if 'taxExemptions' in response_body: + self.__tax_exemptions = [] + for item in response_body['taxExemptions']: + obj = TaxExemption() + obj.parse_rsp_body(item) + self.__tax_exemptions.append(obj) diff --git a/com/alipay/ams/api/model/tax_exemption.py b/com/alipay/ams/api/model/tax_exemption.py new file mode 100644 index 0000000..930d53e --- /dev/null +++ b/com/alipay/ams/api/model/tax_exemption.py @@ -0,0 +1,69 @@ +import json +from com.alipay.ams.api.model.tax_exemption_jurisdiction import TaxExemptionJurisdiction + + + + +class TaxExemption: + def __init__(self): + + self.__certificate_number = None # type: str + self.__exemption_type = None # type: str + self.__jurisdiction = None # type: TaxExemptionJurisdiction + + + @property + def certificate_number(self): + """ + The tax exemption certificate number. Maximum length: 64 characters. + """ + return self.__certificate_number + + @certificate_number.setter + def certificate_number(self, value): + self.__certificate_number = value + @property + def exemption_type(self): + """ + The tax exemption type. Currently supported value: RESALE. Maximum length: 32 characters. + """ + return self.__exemption_type + + @exemption_type.setter + def exemption_type(self, value): + self.__exemption_type = value + @property + def jurisdiction(self): + """Gets the jurisdiction of this TaxExemption. + + """ + return self.__jurisdiction + + @jurisdiction.setter + def jurisdiction(self, value): + self.__jurisdiction = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "certificate_number") and self.certificate_number is not None: + params['certificateNumber'] = self.certificate_number + if hasattr(self, "exemption_type") and self.exemption_type is not None: + params['exemptionType'] = self.exemption_type + if hasattr(self, "jurisdiction") and self.jurisdiction is not None: + params['jurisdiction'] = self.jurisdiction + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'certificateNumber' in response_body: + self.__certificate_number = response_body['certificateNumber'] + if 'exemptionType' in response_body: + self.__exemption_type = response_body['exemptionType'] + if 'jurisdiction' in response_body: + self.__jurisdiction = TaxExemptionJurisdiction() + self.__jurisdiction.parse_rsp_body(response_body['jurisdiction']) diff --git a/com/alipay/ams/api/model/tax_exemption_jurisdiction.py b/com/alipay/ams/api/model/tax_exemption_jurisdiction.py new file mode 100644 index 0000000..7ec8be7 --- /dev/null +++ b/com/alipay/ams/api/model/tax_exemption_jurisdiction.py @@ -0,0 +1,82 @@ +import json + + + + +class TaxExemptionJurisdiction: + 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 + def country(self): + """ + The country or region code. Maximum length: 2 characters. + """ + return self.__country + + @country.setter + def country(self, value): + self.__country = value + @property + def region(self): + """ + The region. Maximum length: 10 characters. + """ + return self.__region + + @region.setter + def region(self, value): + self.__region = value + @property + def city(self): + """ + The city. Maximum length: 64 characters. + """ + return self.__city + + @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 + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "country") and self.country is not None: + params['country'] = self.country + if hasattr(self, "region") and self.region is not None: + 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 + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'country' in response_body: + self.__country = response_body['country'] + if 'region' in 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 43022cd..d731a62 100644 --- a/com/alipay/ams/api/model/tax_id.py +++ b/com/alipay/ams/api/model/tax_id.py @@ -9,6 +9,7 @@ def __init__(self): self.__value = None # type: str self.__country = None # type: str self.__region = None # type: str + self.__name = None # type: str @property @@ -41,6 +42,16 @@ 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 @@ -53,6 +64,8 @@ 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 @@ -65,3 +78,5 @@ 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_registration.py b/com/alipay/ams/api/model/tax_registration.py index 958e648..1d739f1 100644 --- a/com/alipay/ams/api/model/tax_registration.py +++ b/com/alipay/ams/api/model/tax_registration.py @@ -30,7 +30,7 @@ def tax_registration_id(self, value): @property def tax_type(self): """ - The tax type. Maximum length: 16 characters. + 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. """ return self.__tax_type @@ -50,7 +50,7 @@ def jurisdiction(self, value): @property def registration_type(self): """ - The tax registration type. Maximum length: 32 characters. + The tax registration type. Supported values are OSS_NON_UNION, STANDARD_LOCAL_TAX, SINGLE_LOCAL_USE_TAX_RATE, SIMPLIFIED_SELLERS_USE_TAX, STANDARD_SALES_AND_USE_TAX, NORMAL_GST_HST, and SIMPLIFIED_GST_HST. Maximum length: 32 characters. """ return self.__registration_type diff --git a/com/alipay/ams/api/model/tax_transaction.py b/com/alipay/ams/api/model/tax_transaction.py index 5b03d10..a6efe2d 100644 --- a/com/alipay/ams/api/model/tax_transaction.py +++ b/com/alipay/ams/api/model/tax_transaction.py @@ -52,7 +52,7 @@ def type(self, value): @property def tax_amount(self): """ - The tax amount. Maximum length: 19 characters. + 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. """ return self.__tax_amount @@ -62,7 +62,7 @@ def tax_amount(self, value): @property def currency(self): """ - The 3-letter currency code that follows the ISO 4217 standard. Maximum length: 3 characters. + 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 diff --git a/com/alipay/ams/api/request/billing/alipay_billing_subscription_inquire_list_request.py b/com/alipay/ams/api/request/billing/alipay_billing_subscription_inquire_list_request.py index d6e4a63..38d5375 100644 --- a/com/alipay/ams/api/request/billing/alipay_billing_subscription_inquire_list_request.py +++ b/com/alipay/ams/api/request/billing/alipay_billing_subscription_inquire_list_request.py @@ -22,7 +22,7 @@ def __init__(self): @property def status(self): """ - The current status. Maximum length: 20 characters. + Filters subscriptions by status. To provide multiple values, use a comma-separated string such as ACTIVE,PAUSED. Up to eight values are supported. Valid values are INCOMPLETE, TRIALING, ACTIVE, PAST_DUE, PAUSED, CANCELLED, TERMINATED, and UNPAID. Each status value has a maximum length of 20 characters. """ return self.__status diff --git a/com/alipay/ams/api/request/billing/alipay_billing_subscription_update_request.py b/com/alipay/ams/api/request/billing/alipay_billing_subscription_update_request.py index 2fe8d37..3f5d934 100644 --- a/com/alipay/ams/api/request/billing/alipay_billing_subscription_update_request.py +++ b/com/alipay/ams/api/request/billing/alipay_billing_subscription_update_request.py @@ -1,6 +1,7 @@ import json from com.alipay.ams.api.model.price_item_change import PriceItemChange from com.alipay.ams.api.model.billing_trial_settings import BillingTrialSettings +from com.alipay.ams.api.model.billing_subscription_status_change import BillingSubscriptionStatusChange from com.alipay.ams.api.model.billing_subscription_cancellation_details import BillingSubscriptionCancellationDetails @@ -16,6 +17,7 @@ def __init__(self): self.__proration_behavior = None # type: str self.__reset_billing_cycle_anchor = None # type: bool self.__trial_settings = None # type: BillingTrialSettings + self.__status_change = None # type: BillingSubscriptionStatusChange self.__cancel_at_period_end = None # type: bool self.__cancel_at = None # type: str self.__cancellation_details = None # type: BillingSubscriptionCancellationDetails @@ -76,6 +78,16 @@ def trial_settings(self): def trial_settings(self, value): self.__trial_settings = value @property + def status_change(self): + """Gets the status_change of this AlipayBillingSubscriptionUpdateRequest. + + """ + return self.__status_change + + @status_change.setter + def status_change(self, value): + self.__status_change = value + @property def cancel_at_period_end(self): """ The cancel at period end. Note: See documentation for details. @@ -164,6 +176,8 @@ def to_ams_dict(self): params['resetBillingCycleAnchor'] = self.reset_billing_cycle_anchor if hasattr(self, "trial_settings") and self.trial_settings is not None: params['trialSettings'] = self.trial_settings + if hasattr(self, "status_change") and self.status_change is not None: + params['statusChange'] = self.status_change if hasattr(self, "cancel_at_period_end") and self.cancel_at_period_end is not None: params['cancelAtPeriodEnd'] = self.cancel_at_period_end if hasattr(self, "cancel_at") and self.cancel_at is not None: @@ -199,6 +213,9 @@ def parse_rsp_body(self, response_body): if 'trialSettings' in response_body: self.__trial_settings = BillingTrialSettings() self.__trial_settings.parse_rsp_body(response_body['trialSettings']) + if 'statusChange' in response_body: + self.__status_change = BillingSubscriptionStatusChange() + self.__status_change.parse_rsp_body(response_body['statusChange']) if 'cancelAtPeriodEnd' in response_body: self.__cancel_at_period_end = response_body['cancelAtPeriodEnd'] if 'cancelAt' in response_body: diff --git a/com/alipay/ams/api/request/billing/alipay_customer_create_portal_link_request.py b/com/alipay/ams/api/request/billing/alipay_customer_create_portal_link_request.py index fbb24d1..b16ca44 100644 --- a/com/alipay/ams/api/request/billing/alipay_customer_create_portal_link_request.py +++ b/com/alipay/ams/api/request/billing/alipay_customer_create_portal_link_request.py @@ -18,7 +18,7 @@ def __init__(self): @property def customer_id(self): """ - Customer ID to target. When both `customerId` and `email` are supplied, `customerId` takes precedence. + Customer ID to target. Either `customerId` or `email` must be provided. When both are provided, `email` must match the registered account email of this customer; otherwise, the API returns `PARAM_ILLEGAL`. Maximum length: 64 characters. """ return self.__customer_id @@ -28,7 +28,7 @@ def customer_id(self, value): @property def email(self): """ - Customer email for lookup. When multiple customers share the email, the most recently created (by `gmtCreate DESC`) is selected. Maximum length: 254 characters (RFC 5322). + Customer email for lookup. Either `customerId` or `email` must be provided. When multiple customers share the email, the most recently created customer by `gmtCreate` descending is selected. When both fields are provided, this value must match the registered account email of the specified customer; otherwise, the API returns `PARAM_ILLEGAL`. Maximum length: 254 characters (RFC 5322). """ return self.__email @@ -38,7 +38,7 @@ def email(self, value): @property def features(self): """ - Feature set enabled for this portal session. Allowed values: `SUBSCRIPTION`, `INVOICE`, `PAYMENT_METHOD`. Empty/absent list -> ALL features enabled by default (NOT an intersection with settingId features, as previously documented). The portal settings referenced by `settingId` may further restrict which features are shown at render time. + Feature set enabled for this portal session. Allowed values: `SUBSCRIPTION`, `INVOICE`, `PAYMENT_METHOD`. An empty or absent list enables all features by default. The portal settings referenced by `settingId` may further restrict which features are shown at render time. Maximum size: 3 elements. """ return self.__features @@ -58,7 +58,7 @@ def auto_send(self, value): @property def setting_id(self): """ - Portal setting configuration ID. Passed through token payload, parsed by iexpfront. + Portal setting configuration ID passed through the token payload. Maximum length: 64 characters. """ return self.__setting_id 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 7c7a82a..71eb2ce 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 @@ -303,7 +303,7 @@ def country_code(self, value): @property def billing_email(self): """ - Invoice recipient email address (independent of account `email`). Maximum length: 256 characters. + 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. """ return self.__billing_email 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 6943a5f..4a0d7ab 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 @@ -73,7 +73,7 @@ def alipay_user_id(self, value): @property def email(self): """ - Updated email address. Optional - `null`/omitted means no change (PATCH semantics). No email-format validation is applied. Maximum length: 256 characters. + Updated account email address. Optional - `null` or omitted means no change (PATCH semantics). Updating this field does not change `billingEmail`, including when `billingEmail` originally defaulted from `email` during customer creation. No email-format validation is applied. Maximum length: 256 characters. """ return self.__email @@ -303,7 +303,7 @@ def country_code(self, value): @property def billing_email(self): """ - Updated invoice recipient email. Maximum length: 256 characters. + 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. """ return self.__billing_email diff --git a/com/alipay/ams/api/request/billing/alipay_price_create_request.py b/com/alipay/ams/api/request/billing/alipay_price_create_request.py index 0711ce5..7844ccd 100644 --- a/com/alipay/ams/api/request/billing/alipay_price_create_request.py +++ b/com/alipay/ams/api/request/billing/alipay_price_create_request.py @@ -70,7 +70,7 @@ def pricing_model(self, value): @property def usage_type(self): """ - Usage type. O - Optional. When provided, must be a valid enum value (LICENSED or METERED). Can be null; default null. Enum: LICENSED(fixed quantity billing - subscription item quantity is set at subscription creation and changed manually via update API; system bills unitAmount x quantity automatically each period), METERED(metered usage billing - quantity is tracked by external metering system iusage and reported via Usage Report API; system bills based on actual reported usage in arrears at end of billing period) + Usage type that identifies how subscription items are billed. Valid values are: `LICENSED` - fixed-quantity billing; the quantity is set when the subscription is created and can be changed through the update API, and `unitAmount` multiplied by `quantity` is billed each period. `METERED` - metered billing based on the actual usage quantity at the end of each billing period. Maximum length: 16 characters. """ return self.__usage_type @@ -100,7 +100,7 @@ def unit_label(self, value): @property def meter_id(self): """ - External meter reference. C - Required when usageType=METERED; otherwise forbidden. References external metering system contract. Format: alphanumeric + underscore, max 32 chars. Validated at price creation: format check (regex: ^[a-zA-Z0-9_]{1,32}$) AND existence check against iusage meter registry. Returns METER_NOT_FOUND if meter definition does not exist in iusage. This ensures fail-fast validation - merchants are alerted to invalid meter references immediately rather than discovering the error at subscription creation time + Meter ID. Required when `usageType` is `METERED`; otherwise, it must not be provided. The value must match `^[a-zA-Z0-9_]{1,32}$` and must exist in the meter registry. The API returns `METER_NOT_FOUND` when the meter does not exist. Maximum length: 32 characters. """ return self.__meter_id @@ -160,7 +160,7 @@ def metadata(self, value): @property def default_price(self): """ - Whether this price is the default price for the product. O - Optional. Only `true` is accepted; `false` or absent means the price is not the default. Only one price per product can be the default price - creating a new default price automatically un-defaults any previous default price of that product. Can be null; default null + Whether to set this price as the default price for the product. When provided, only `true` is accepted. The first price created for a product must be set as the default price; otherwise, the API returns `FIRST_PRICE_NOT_DEFAULT`. A product can have only one default price, and creating a new default price automatically removes the default status from the previous one. """ return self.__default_price diff --git a/com/alipay/ams/api/request/billing/alipay_price_update_request.py b/com/alipay/ams/api/request/billing/alipay_price_update_request.py index 036b685..7c5ab1e 100644 --- a/com/alipay/ams/api/request/billing/alipay_price_update_request.py +++ b/com/alipay/ams/api/request/billing/alipay_price_update_request.py @@ -58,7 +58,7 @@ def active(self, value): @property def default_price(self): """ - Whether this price is the default price for the product. O - Only `true` is accepted; `false` or absent means no change. When set to true, this price becomes the default price of the product and any previous default price of that product is automatically un-defaulted. Cannot be combined with active=false in the same request - a default price must remain active + Whether to set this price as the default price for the product. When provided, only `true` is accepted; `false` is rejected with `DEFAULT_PRICE_REMOVAL_FORBIDDEN`, while omission means no change. When set to `true`, this price becomes the product default and the previous default price is automatically unset. `defaultPrice=true` cannot be combined with `active=false` in the same request because the default price must remain active. A product must always retain a default price. """ return self.__default_price diff --git a/com/alipay/ams/api/request/billing/alipay_tax_cancel_registration_request.py b/com/alipay/ams/api/request/billing/alipay_tax_cancel_registration_request.py index 22884b8..3e8a5ff 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_cancel_registration_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_cancel_registration_request.py @@ -15,7 +15,7 @@ def __init__(self): @property def registration_cancel_request_id(self): """ - The unique ID assigned by a merchant to identify a tax registration cancellation request. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by a merchant to identify a tax registration cancellation request. Any repeated request using an accepted ID returns REPEATED_SUBMIT. Maximum length: 64 characters. """ return self.__registration_cancel_request_id diff --git a/com/alipay/ams/api/request/billing/alipay_tax_initialize_settings_request.py b/com/alipay/ams/api/request/billing/alipay_tax_initialize_settings_request.py index 68ff7cd..8c770a8 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_initialize_settings_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_initialize_settings_request.py @@ -18,7 +18,7 @@ def __init__(self): @property def settings_request_id(self): """ - The unique ID assigned by a merchant to identify a tax settings initialization request. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by a merchant to identify a tax settings initialization request. Reuse it only with the original request body when recovering an unknown result. Maximum length: 64 characters. """ return self.__settings_request_id diff --git a/com/alipay/ams/api/request/billing/alipay_tax_inquire_calculation_request.py b/com/alipay/ams/api/request/billing/alipay_tax_inquire_calculation_request.py index 368e872..c09c21f 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_inquire_calculation_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_inquire_calculation_request.py @@ -16,7 +16,7 @@ def __init__(self): @property def tax_calculation_id(self): """ - The unique ID assigned by Antom to identify a tax calculation. Maximum length: 64 characters. Note: See documentation for details. + The tax calculation ID returned by a successful calculate request. Specify exactly one of taxCalculationId, taxCalculationRequestId, and paymentRequestId. Maximum length: 64 characters. """ return self.__tax_calculation_id @@ -26,7 +26,7 @@ def tax_calculation_id(self, value): @property def tax_calculation_request_id(self): """ - The unique ID assigned by a merchant to identify a tax calculation request. Maximum length: 64 characters. Note: See documentation for details. + The original tax calculation request ID. Use this field to recover an unknown, timed-out, or lost calculate response. Specify exactly one query key. Maximum length: 64 characters. """ return self.__tax_calculation_request_id @@ -36,7 +36,7 @@ def tax_calculation_request_id(self, value): @property def payment_request_id(self): """ - The unique ID assigned by a merchant to identify a payment request. Maximum length: 64 characters. Note: See documentation for details. + The payment request ID associated with the tax calculation. Use this field only when the payment references the calculation. Specify exactly one query key. Maximum length: 64 characters. """ return self.__payment_request_id 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 1682d80..555b3f4 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 @@ -18,7 +18,7 @@ def __init__(self): @property def tax_calculation_id(self): """ - The unique ID assigned by Antom to identify a tax calculation. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by Antom to identify a tax calculation. Exactly one of taxCalculationId, paymentId, and refundId must be provided. Omit the unused query keys; do not send them with null values. Maximum length: 64 characters. """ return self.__tax_calculation_id @@ -28,7 +28,7 @@ def tax_calculation_id(self, value): @property def payment_id(self): """ - The unique ID assigned by Antom to identify a payment. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by Antom to identify a payment. Exactly one of taxCalculationId, paymentId, and refundId must be provided. Omit the unused query keys; do not send them with null values. Maximum length: 64 characters. """ return self.__payment_id @@ -38,7 +38,7 @@ def payment_id(self, value): @property def refund_id(self): """ - The refund ID. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by Antom to identify a refund. Exactly one of taxCalculationId, paymentId, and refundId must be provided. Omit the unused query keys; do not send them with null values. Maximum length: 64 characters. """ return self.__refund_id diff --git a/com/alipay/ams/api/request/billing/alipay_tax_register_request.py b/com/alipay/ams/api/request/billing/alipay_tax_register_request.py index 7552971..cf59299 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_register_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_register_request.py @@ -21,7 +21,7 @@ def __init__(self): @property def registration_request_id(self): """ - The unique ID assigned by a merchant to identify a tax registration request. Maximum length: 64 characters. Note: See documentation for details. + The unique ID assigned by a merchant to identify a tax registration request. Once accepted, the ID is permanently occupied and any subsequent request using it returns REPEATED_SUBMIT. Maximum length: 64 characters. """ return self.__registration_request_id @@ -31,7 +31,7 @@ def registration_request_id(self, value): @property def tax_type(self): """ - The tax type. Maximum length: 16 characters. + 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. """ return self.__tax_type @@ -51,7 +51,7 @@ def jurisdiction(self, value): @property def registration_type(self): """ - The tax registration type. Maximum length: 32 characters. + The tax registration type. Supported values are OSS_NON_UNION, STANDARD_LOCAL_TAX, SINGLE_LOCAL_USE_TAX_RATE, SIMPLIFIED_SELLERS_USE_TAX, STANDARD_SALES_AND_USE_TAX, NORMAL_GST_HST, and SIMPLIFIED_GST_HST. Maximum length: 32 characters. """ return self.__registration_type diff --git a/com/alipay/ams/api/request/billing/alipay_tax_update_registration_period_request.py b/com/alipay/ams/api/request/billing/alipay_tax_update_registration_period_request.py index c779480..06aa628 100644 --- a/com/alipay/ams/api/request/billing/alipay_tax_update_registration_period_request.py +++ b/com/alipay/ams/api/request/billing/alipay_tax_update_registration_period_request.py @@ -37,7 +37,7 @@ def tax_registration_id(self, value): @property def active_from(self): """ - The time from which the tax registration is active. Maximum length: 32 characters. Note: See documentation for details. + The new activation time for a SCHEDULED registration. The value must be later than the current time. Maximum length: 32 characters. """ return self.__active_from @@ -47,7 +47,7 @@ def active_from(self, value): @property def expire_at(self): """ - The expiration time. Maximum length: 32 characters. Note: See documentation for details. + The new expiration time for an ACTIVE or SCHEDULED registration. The value must be later than the current time and, for a scheduled registration, later than the effective activeFrom. Maximum length: 32 characters. """ return self.__expire_at diff --git a/com/alipay/ams/api/response/aba/alipay_inquire_card_detail_response.py b/com/alipay/ams/api/response/aba/alipay_inquire_card_detail_response.py index 2452a08..96dd2ad 100644 --- a/com/alipay/ams/api/response/aba/alipay_inquire_card_detail_response.py +++ b/com/alipay/ams/api/response/aba/alipay_inquire_card_detail_response.py @@ -40,7 +40,7 @@ def result(self, value): @property def asset_id(self): """ - 卡资产ID。 Card asset Id. + Card asset Id. """ return self.__asset_id @@ -50,7 +50,7 @@ def asset_id(self, value): @property def card_nick_name(self): """ - 由用户定义的卡昵称,可以帮助用户更方便地管理多张卡。 User-defined card nickname, designed to help users manage multiple cards more conveniently. + User-defined card nickname, designed to help users manage multiple cards more conveniently. """ return self.__card_nick_name @@ -60,7 +60,7 @@ def card_nick_name(self, value): @property def card_status(self): """ - 卡状态。可取值范围: ACTIVE:可正常使用 FROZEN:已冻结 CANCEL:已注销 Card Status: Represents the current state of the card. Possible values include: ACTIVE: The card is active and can be used normally. FROZEN: The card has been frozen and cannot be used temporarily. CANCEL: The card has been canceled and is no longer valid. + Card Status: Represents the current state of the card. Possible values include: ACTIVE: The card is active and can be used normally. FROZEN: The card has been frozen and cannot be used temporarily. CANCEL: The card has been canceled and is no longer valid. """ return self.__card_status @@ -70,7 +70,7 @@ def card_status(self, value): @property def masked_card_no(self): """ - 脱敏卡号。 Masked card number. + Masked card number. """ return self.__masked_card_no @@ -80,7 +80,7 @@ def masked_card_no(self, value): @property def card_brand(self): """ - 卡品牌。 可取值范围: MASTERCARD Card Brand: Indicates the brand or network of the card. Possible value: MASTERCARD: The card is part of the Mastercard network. + Card Brand: Indicates the brand or network of the card. Possible value: MASTERCARD: The card is part of the Mastercard network. """ return self.__card_brand diff --git a/com/alipay/ams/api/response/aba/alipay_inquire_card_sensitive_info_response.py b/com/alipay/ams/api/response/aba/alipay_inquire_card_sensitive_info_response.py index f00ed35..7c2971f 100644 --- a/com/alipay/ams/api/response/aba/alipay_inquire_card_sensitive_info_response.py +++ b/com/alipay/ams/api/response/aba/alipay_inquire_card_sensitive_info_response.py @@ -1,5 +1,6 @@ import json from com.alipay.ams.api.model.result import Result +from com.alipay.ams.api.model.alipay_inquire_card_detail_response import AlipayInquireCardDetailResponse @@ -15,6 +16,7 @@ def __init__(self, rsp_body): self.__card_no = None # type: str self.__expired_month = None # type: str self.__expired_year = None # type: str + self.__card_detail = None # type: AlipayInquireCardDetailResponse self.parse_rsp_body(rsp_body) @@ -78,6 +80,16 @@ def expired_year(self): @expired_year.setter def expired_year(self, value): self.__expired_year = value + @property + def card_detail(self): + """Gets the card_detail of this AlipayInquireCardSensitiveInfoResponse. + + """ + return self.__card_detail + + @card_detail.setter + def card_detail(self, value): + self.__card_detail = value @@ -96,6 +108,8 @@ def to_ams_dict(self): params['expiredMonth'] = self.expired_month if hasattr(self, "expired_year") and self.expired_year is not None: params['expiredYear'] = self.expired_year + if hasattr(self, "card_detail") and self.card_detail is not None: + params['cardDetail'] = self.card_detail return params @@ -114,3 +128,6 @@ def parse_rsp_body(self, response_body): self.__expired_month = response_body['expiredMonth'] if 'expiredYear' in response_body: self.__expired_year = response_body['expiredYear'] + if 'cardDetail' in response_body: + self.__card_detail = AlipayInquireCardDetailResponse() + self.__card_detail.parse_rsp_body(response_body['cardDetail']) 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 4147fd1..a773201 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 @@ -90,7 +90,7 @@ def create_time(self, value): @property def status(self): """ - The current status. Maximum length: 20 characters. + The current subscription status. Valid values are INCOMPLETE, TRIALING, ACTIVE, PAST_DUE, PAUSED, CANCELLED, TERMINATED, and UNPAID. PAST_DUE means the latest renewal payment failed and collection retry is in progress. PAUSED means payment collection is suspended and the subscription can be resumed. CANCELLED remains reversible before the current billing period ends. TERMINATED is a permanent final state. UNPAID means all collection retries have been exhausted and collection remains suspended until the outstanding invoice is paid. Clients must tolerate future unknown status values and should log and alert on them instead of failing response parsing. Maximum length: 20 characters. """ return self.__status diff --git a/com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py b/com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py index 8985a9f..2ad4744 100644 --- a/com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py +++ b/com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py @@ -47,7 +47,7 @@ def subscription_id(self, value): @property def status(self): """ - The current status. Maximum length: 20 characters. + The subscription status after the update. PAST_DUE means the latest renewal payment failed and collection retry is in progress. PAUSED means payment collection is suspended and can be entered by setting statusChange.action to PAUSE. CANCELLED means the subscription remains active until the current period ends and can be reverted before then by setting cancelAtPeriodEnd to false. TERMINATED is a permanent final state. Maximum length: 20 characters. """ return self.__status diff --git a/com/alipay/ams/api/response/billing/alipay_customer_create_portal_link_response.py b/com/alipay/ams/api/response/billing/alipay_customer_create_portal_link_response.py index 8639755..e514fbf 100644 --- a/com/alipay/ams/api/response/billing/alipay_customer_create_portal_link_response.py +++ b/com/alipay/ams/api/response/billing/alipay_customer_create_portal_link_response.py @@ -30,7 +30,7 @@ def result(self, value): @property def token(self): """ - Opaque URL-safe bearer token. Treat it as a credential: do not log, parse, or store its internal structure - the format may change without notice. Returned only when result.resultCode is SUCCESS. + Opaque URL-safe bearer token. Treat it as a credential: do not log, parse, or store its internal structure because the format may change without notice. Maximum length: 4096 characters. Returned only when result.resultCode is SUCCESS. """ return self.__token @@ -40,7 +40,7 @@ def token(self, value): @property def portal_url(self): """ - Fully-qualified portal URL. Null when the portal base URL is not configured for the merchant - in that case build the URL from `token`. Returned only when result.resultCode is SUCCESS. + Fully-qualified portal URL. Null when the portal base URL is not configured for the merchant; in that case, build the URL from `token`. Maximum length: 2048 characters. Returned only when result.resultCode is SUCCESS. """ return self.__portal_url @@ -50,7 +50,7 @@ def portal_url(self, value): @property def expires_at(self): """ - Token expiration timestamp. Format: `yyyy-MM-dd HH:mm:ss` (NOT ISO 8601). Returned only when result.resultCode is SUCCESS. + Expiration time of the portal link, returned as a string. Maximum length: 32 characters. Returned only when result.resultCode is SUCCESS. """ return self.__expires_at @@ -60,7 +60,7 @@ def expires_at(self, value): @property def send_status(self): """ - `SENT` / `FAILED`. Populated only when request `autoSend=true`. Best-effort: failure never blocks link creation. Null when `autoSend=false`. Returned only when result.resultCode is SUCCESS. + Email send status. Valid values are `SENT` and `FAILED`. Populated only when request `autoSend=true`; a send failure never blocks link creation. Null when `autoSend=false`. Maximum length: 16 characters. Returned only when result.resultCode is SUCCESS. """ return self.__send_status diff --git a/com/alipay/ams/api/response/billing/alipay_invoice_export_response.py b/com/alipay/ams/api/response/billing/alipay_invoice_export_response.py index a97ee84..8481e0e 100644 --- a/com/alipay/ams/api/response/billing/alipay_invoice_export_response.py +++ b/com/alipay/ams/api/response/billing/alipay_invoice_export_response.py @@ -15,6 +15,7 @@ def __init__(self, rsp_body): self.__file_url = None # type: str self.__file_size = None # type: int self.__file_name = None # type: str + self.__mode = None # type: str self.parse_rsp_body(rsp_body) @@ -78,6 +79,16 @@ def file_name(self): @file_name.setter def file_name(self, value): self.__file_name = value + @property + def mode(self): + """ + Execution mode of the export request. The returned value is `SYNC`, indicating synchronous export. Maximum length: 8 characters. Returned only when result.resultCode is SUCCESS. + """ + return self.__mode + + @mode.setter + def mode(self, value): + self.__mode = value @@ -96,6 +107,8 @@ def to_ams_dict(self): params['fileSize'] = self.file_size if hasattr(self, "file_name") and self.file_name is not None: params['fileName'] = self.file_name + if hasattr(self, "mode") and self.mode is not None: + params['mode'] = self.mode return params @@ -114,3 +127,5 @@ def parse_rsp_body(self, response_body): self.__file_size = response_body['fileSize'] if 'fileName' in response_body: self.__file_name = response_body['fileName'] + if 'mode' in response_body: + self.__mode = response_body['mode'] diff --git a/com/alipay/ams/api/response/billing/alipay_receipt_export_response.py b/com/alipay/ams/api/response/billing/alipay_receipt_export_response.py index 95b2121..e814f7c 100644 --- a/com/alipay/ams/api/response/billing/alipay_receipt_export_response.py +++ b/com/alipay/ams/api/response/billing/alipay_receipt_export_response.py @@ -15,6 +15,7 @@ def __init__(self, rsp_body): self.__file_url = None # type: str self.__file_size = None # type: int self.__file_name = None # type: str + self.__mode = None # type: str self.parse_rsp_body(rsp_body) @@ -31,7 +32,7 @@ def result(self, value): @property def file_format(self): """ - MIME type of the generated file. The response returns the MIME type corresponding to the requested format: `csv` -> `text/csv`, `xlsx` -> `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`. Note: the response `fileFormat` returns the MIME type, not the request format code. The request accepts `csv`/`xlsx`. Returned only when result.resultCode is SUCCESS. + MIME type of the generated file. The response returns the MIME type corresponding to the requested format: `csv` -> `text/csv`, `xlsx` -> `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`. Note: the response `fileFormat` returns the MIME type, not the request format code. The request accepts `csv`/`xlsx`. Maximum length: 128 characters. Returned only when result.resultCode is SUCCESS. """ return self.__file_format @@ -51,7 +52,7 @@ def expires_at(self, value): @property def file_url(self): """ - Signed OSS URL for file download. URL is time-limited; see `expiresAt`. After expiry, accessing the URL returns HTTP 403. Returned only when result.resultCode is SUCCESS. + Signed OSS URL for file download. URL is time-limited; see `expiresAt`. After expiry, accessing the URL returns HTTP 403. Maximum length: 2048 characters. Returned only when result.resultCode is SUCCESS. """ return self.__file_url @@ -71,13 +72,23 @@ def file_size(self, value): @property def file_name(self): """ - Generated file name (e.g., `receipts_20260401_20260430_1685000000.csv`). Returned only when result.resultCode is SUCCESS. + Generated file name (e.g., `receipts_20260401_20260430_1685000000.csv`). Maximum length: 256 characters. Returned only when result.resultCode is SUCCESS. """ return self.__file_name @file_name.setter def file_name(self, value): self.__file_name = value + @property + def mode(self): + """ + Execution mode of the export request. The returned value is `SYNC`, indicating synchronous export. Maximum length: 8 characters. Returned only when result.resultCode is SUCCESS. + """ + return self.__mode + + @mode.setter + def mode(self, value): + self.__mode = value @@ -96,6 +107,8 @@ def to_ams_dict(self): params['fileSize'] = self.file_size if hasattr(self, "file_name") and self.file_name is not None: params['fileName'] = self.file_name + if hasattr(self, "mode") and self.mode is not None: + params['mode'] = self.mode return params @@ -114,3 +127,5 @@ def parse_rsp_body(self, response_body): self.__file_size = response_body['fileSize'] if 'fileName' in response_body: self.__file_name = response_body['fileName'] + if 'mode' in response_body: + self.__mode = response_body['mode'] diff --git a/com/alipay/ams/api/response/billing/alipay_receipt_inquire_list_response.py b/com/alipay/ams/api/response/billing/alipay_receipt_inquire_list_response.py index 876db05..ad06db3 100644 --- a/com/alipay/ams/api/response/billing/alipay_receipt_inquire_list_response.py +++ b/com/alipay/ams/api/response/billing/alipay_receipt_inquire_list_response.py @@ -15,6 +15,7 @@ def __init__(self, rsp_body): self.__total = None # type: int self.__has_more = None # type: bool self.__next_cursor = None # type: str + self.__previous_cursor = None # type: str self.parse_rsp_body(rsp_body) @@ -68,6 +69,16 @@ def next_cursor(self): @next_cursor.setter def next_cursor(self, value): self.__next_cursor = value + @property + def previous_cursor(self): + """ + The `receiptId` of the first receipt in the current page. Use this value as `endingBefore` in the next request to continue paging backward to earlier data. Returned only when `endingBefore` is used. Maximum length: 64 characters. Returned only when result.resultCode is SUCCESS. + """ + return self.__previous_cursor + + @previous_cursor.setter + def previous_cursor(self, value): + self.__previous_cursor = value @@ -84,6 +95,8 @@ def to_ams_dict(self): params['hasMore'] = self.has_more if hasattr(self, "next_cursor") and self.next_cursor is not None: params['nextCursor'] = self.next_cursor + if hasattr(self, "previous_cursor") and self.previous_cursor is not None: + params['previousCursor'] = self.previous_cursor return params @@ -104,3 +117,5 @@ def parse_rsp_body(self, response_body): self.__has_more = response_body['hasMore'] if 'nextCursor' in response_body: self.__next_cursor = response_body['nextCursor'] + if 'previousCursor' in response_body: + self.__previous_cursor = response_body['previousCursor'] 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 7ce7876..0d4c36c 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 @@ -3,6 +3,7 @@ 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 +from com.alipay.ams.api.model.tax_calculated_customer_details import TaxCalculatedCustomerDetails @@ -23,6 +24,7 @@ def __init__(self, rsp_body): self.__expire_at = None # type: str self.__tax_date = None # type: str self.__shipping_cost = None # type: TaxCalculatedShippingCost + self.__customer_details = None # type: TaxCalculatedCustomerDetails self.parse_rsp_body(rsp_body) @@ -136,6 +138,16 @@ def shipping_cost(self): @shipping_cost.setter def shipping_cost(self, value): self.__shipping_cost = value + @property + def customer_details(self): + """Gets the customer_details of this AlipayTaxCalculateResponse. + + """ + return self.__customer_details + + @customer_details.setter + def customer_details(self, value): + self.__customer_details = value @@ -164,6 +176,8 @@ def to_ams_dict(self): params['taxDate'] = self.tax_date if hasattr(self, "shipping_cost") and self.shipping_cost is not None: params['shippingCost'] = self.shipping_cost + if hasattr(self, "customer_details") and self.customer_details is not None: + params['customerDetails'] = self.customer_details return params @@ -201,3 +215,6 @@ def parse_rsp_body(self, response_body): if 'shippingCost' in response_body: self.__shipping_cost = TaxCalculatedShippingCost() self.__shipping_cost.parse_rsp_body(response_body['shippingCost']) + if 'customerDetails' in response_body: + self.__customer_details = TaxCalculatedCustomerDetails() + self.__customer_details.parse_rsp_body(response_body['customerDetails']) diff --git a/com/alipay/ams/api/response/billing/alipay_tax_cancel_registration_response.py b/com/alipay/ams/api/response/billing/alipay_tax_cancel_registration_response.py index 52bb1ab..4a3de39 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_cancel_registration_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_cancel_registration_response.py @@ -45,7 +45,7 @@ def tax_registration_id(self, value): @property def tax_type(self): """ - The tax type. Maximum length: 16 characters. Note: See documentation for details. + 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. """ return self.__tax_type @@ -65,7 +65,7 @@ def jurisdiction(self, value): @property def registration_type(self): """ - The tax registration type. Maximum length: 32 characters. Note: See documentation for details. + The tax registration type. Supported values are OSS_NON_UNION, STANDARD_LOCAL_TAX, SINGLE_LOCAL_USE_TAX_RATE, SIMPLIFIED_SELLERS_USE_TAX, STANDARD_SALES_AND_USE_TAX, NORMAL_GST_HST, and SIMPLIFIED_GST_HST. Maximum length: 32 characters. """ return self.__registration_type diff --git a/com/alipay/ams/api/response/billing/alipay_tax_initialize_settings_response.py b/com/alipay/ams/api/response/billing/alipay_tax_initialize_settings_response.py index ec8a121..0931f8c 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_initialize_settings_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_initialize_settings_response.py @@ -61,7 +61,7 @@ def head_office(self, value): @property def status(self): """ - The current status. Maximum length: 16 characters. Note: See documentation for details. + The tax settings status. Valid values are ACTIVE and PENDING. Do not treat an unknown value as ACTIVE. Maximum length: 16 characters. """ return self.__status 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 06ac639..9e190c9 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 @@ -1,5 +1,7 @@ import json 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.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,6 +17,8 @@ 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 @@ -57,6 +61,26 @@ def currency(self): def currency(self, value): self.__currency = value @property + def customer_details(self): + """Gets the customer_details of this AlipayTaxInquireCalculationResponse. + + """ + return self.__customer_details + + @customer_details.setter + def customer_details(self, value): + self.__customer_details = value + @property + def ship_from_details(self): + """Gets the ship_from_details of this AlipayTaxInquireCalculationResponse. + + """ + return self.__ship_from_details + + @ship_from_details.setter + def ship_from_details(self, value): + self.__ship_from_details = value + @property def total_amount(self): """ The total amount. Maximum length: 19 characters. @@ -148,6 +172,10 @@ def to_ams_dict(self): 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: + params['shipFromDetails'] = self.ship_from_details 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: @@ -176,6 +204,12 @@ def parse_rsp_body(self, 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']) + if 'shipFromDetails' in 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'] if 'exclusiveTaxAmount' in response_body: diff --git a/com/alipay/ams/api/response/billing/alipay_tax_inquire_settings_response.py b/com/alipay/ams/api/response/billing/alipay_tax_inquire_settings_response.py index 227ad2c..17ea61e 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_inquire_settings_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_inquire_settings_response.py @@ -31,7 +31,7 @@ def result(self, value): @property def default_tax_code(self): """ - The default tax code. Maximum length: 32 characters. + The default tax code. Returned only when the API call succeeds. Maximum length: 32 characters. """ return self.__default_tax_code @@ -41,7 +41,7 @@ def default_tax_code(self, value): @property def default_tax_behavior(self): """ - The default tax behavior. Maximum length: 16 characters. + The default tax behavior. Returned only when the API call succeeds. Maximum length: 16 characters. """ return self.__default_tax_behavior @@ -61,7 +61,7 @@ def head_office(self, value): @property def status(self): """ - The current status. Maximum length: 16 characters. Note: See documentation for details. + The tax settings status. Valid values are ACTIVE and PENDING. Returned only when the API call succeeds. Maximum length: 16 characters. """ return self.__status diff --git a/com/alipay/ams/api/response/billing/alipay_tax_register_response.py b/com/alipay/ams/api/response/billing/alipay_tax_register_response.py index e3fd6b5..4677693 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_register_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_register_response.py @@ -45,7 +45,7 @@ def tax_registration_id(self, value): @property def tax_type(self): """ - The tax type. Maximum length: 16 characters. Note: See documentation for details. + 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. """ return self.__tax_type @@ -65,7 +65,7 @@ def jurisdiction(self, value): @property def registration_type(self): """ - The tax registration type. Maximum length: 32 characters. Note: See documentation for details. + The tax registration type. Supported values are OSS_NON_UNION, STANDARD_LOCAL_TAX, SINGLE_LOCAL_USE_TAX_RATE, SIMPLIFIED_SELLERS_USE_TAX, STANDARD_SALES_AND_USE_TAX, NORMAL_GST_HST, and SIMPLIFIED_GST_HST. Maximum length: 32 characters. """ return self.__registration_type diff --git a/com/alipay/ams/api/response/billing/alipay_tax_update_registration_period_response.py b/com/alipay/ams/api/response/billing/alipay_tax_update_registration_period_response.py index 53e4df8..62c9cce 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_update_registration_period_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_update_registration_period_response.py @@ -45,7 +45,7 @@ def tax_registration_id(self, value): @property def tax_type(self): """ - The tax type. Maximum length: 16 characters. Note: See documentation for details. + 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. """ return self.__tax_type @@ -65,7 +65,7 @@ def jurisdiction(self, value): @property def registration_type(self): """ - The tax registration type. Maximum length: 32 characters. Note: See documentation for details. + The tax registration type. Supported values are OSS_NON_UNION, STANDARD_LOCAL_TAX, SINGLE_LOCAL_USE_TAX_RATE, SIMPLIFIED_SELLERS_USE_TAX, STANDARD_SALES_AND_USE_TAX, NORMAL_GST_HST, and SIMPLIFIED_GST_HST. Maximum length: 32 characters. """ return self.__registration_type diff --git a/com/alipay/ams/api/response/billing/alipay_tax_update_settings_response.py b/com/alipay/ams/api/response/billing/alipay_tax_update_settings_response.py index 858f41a..3f03ab1 100644 --- a/com/alipay/ams/api/response/billing/alipay_tax_update_settings_response.py +++ b/com/alipay/ams/api/response/billing/alipay_tax_update_settings_response.py @@ -61,7 +61,7 @@ def head_office(self, value): @property def status(self): """ - The current status. Maximum length: 16 characters. Note: See documentation for details. + The tax settings status. Valid values are ACTIVE and PENDING. A valid update to ACTIVE settings keeps the status ACTIVE; do not treat an unknown value as ACTIVE. Maximum length: 16 characters. """ return self.__status