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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions com/alipay/ams/api/model/billing_subscription_status_change.py
Original file line number Diff line number Diff line change
@@ -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']
8 changes: 4 additions & 4 deletions com/alipay/ams/api/model/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion com/alipay/ams/api/model/tax_breakdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
142 changes: 142 additions & 0 deletions com/alipay/ams/api/model/tax_calculated_address.py
Original file line number Diff line number Diff line change
@@ -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']
39 changes: 39 additions & 0 deletions com/alipay/ams/api/model/tax_calculated_business_details.py
Original file line number Diff line number Diff line change
@@ -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'])
113 changes: 113 additions & 0 deletions com/alipay/ams/api/model/tax_calculated_customer_details.py
Original file line number Diff line number Diff line change
@@ -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)
Loading