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..be96789 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. If currentPage exceeds totalPage, transactions is returned as an empty array. """ 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. The value must be a positive integer; otherwise, PARAM_ILLEGAL is returned. """ 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 in the query result. """ 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 tax transactions that match the query criteria. """ return self.__total_count 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_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/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']