From 5a03637571c72213530fc99ff2d760f06ba9e253 Mon Sep 17 00:00:00 2001 From: Wang Zunjiao Date: Mon, 27 Apr 2026 06:22:09 +0000 Subject: [PATCH] false[antom-sdk-automation] automated change --- .../ams/api/model/authorization_control.py | 17 ++ .../api/model/card_payment_method_detail.py | 12 +- .../ams/api/model/customer_belongs_to.py | 84 ++++--- .../api/model/payment_method_category_type.py | 3 + .../ams/api/model/payment_result_info.py | 19 +- com/alipay/ams/api/model/refund_preference.py | 37 +++ com/alipay/ams/api/model/statement.py | 2 - com/alipay/ams/api/model/subscription_info.py | 215 +++++++++++++++++- .../ams/api/model/transfer_to_detail.py | 24 +- .../aba/alipay_inquiry_statement_request.py | 15 ++ 10 files changed, 357 insertions(+), 71 deletions(-) create mode 100644 com/alipay/ams/api/model/refund_preference.py diff --git a/com/alipay/ams/api/model/authorization_control.py b/com/alipay/ams/api/model/authorization_control.py index 1c0cd72..f8c1494 100644 --- a/com/alipay/ams/api/model/authorization_control.py +++ b/com/alipay/ams/api/model/authorization_control.py @@ -1,6 +1,7 @@ import json from com.alipay.ams.api.model.card_limit_detail import CardLimitDetail from com.alipay.ams.api.model.card_limit_info import CardLimitInfo +from com.alipay.ams.api.model.refund_preference import RefundPreference @@ -15,6 +16,7 @@ def __init__(self): self.__allowed_currencies = None # type: [str] self.__card_limit_detail = None # type: CardLimitDetail self.__card_limit_info = None # type: CardLimitInfo + self.__refund_preference = None # type: RefundPreference @property @@ -87,6 +89,16 @@ def card_limit_info(self): @card_limit_info.setter def card_limit_info(self, value): self.__card_limit_info = value + @property + def refund_preference(self): + """Gets the refund_preference of this AuthorizationControl. + + """ + return self.__refund_preference + + @refund_preference.setter + def refund_preference(self, value): + self.__refund_preference = value @@ -107,6 +119,8 @@ def to_ams_dict(self): params['cardLimitDetail'] = self.card_limit_detail if hasattr(self, "card_limit_info") and self.card_limit_info is not None: params['cardLimitInfo'] = self.card_limit_info + if hasattr(self, "refund_preference") and self.refund_preference is not None: + params['refundPreference'] = self.refund_preference return params @@ -129,3 +143,6 @@ def parse_rsp_body(self, response_body): if 'cardLimitInfo' in response_body: self.__card_limit_info = CardLimitInfo() self.__card_limit_info.parse_rsp_body(response_body['cardLimitInfo']) + if 'refundPreference' in response_body: + self.__refund_preference = RefundPreference() + self.__refund_preference.parse_rsp_body(response_body['refundPreference']) diff --git a/com/alipay/ams/api/model/card_payment_method_detail.py b/com/alipay/ams/api/model/card_payment_method_detail.py index 990762b..1395d68 100644 --- a/com/alipay/ams/api/model/card_payment_method_detail.py +++ b/com/alipay/ams/api/model/card_payment_method_detail.py @@ -223,8 +223,8 @@ def authentication_flow(self, value): self.__authentication_flow = value @property def funding(self): - """Gets the funding of this CardPaymentMethodDetail. - + """ + The funding type of the card. Valid values are: CREDIT: indicates a credit card. DEBIT: indicates a debit card. PREPAID: indicates a prepaid card. CHARGE: indicates a charge card. DEFERRED_DEBIT: indicates a deferred debit card. This parameter is returned when the value of paymentMethodType is CARD and the information is available from the channel. """ return self.__funding @@ -263,8 +263,8 @@ def bin(self, value): self.__bin = value @property def issuer_name(self): - """Gets the issuer_name of this CardPaymentMethodDetail. - + """ + The issuer name of the card. This parameter is returned when the value of paymentMethodType is CARD and the information is available from the channel. """ return self.__issuer_name @@ -273,8 +273,8 @@ def issuer_name(self, value): self.__issuer_name = value @property def issuing_country(self): - """Gets the issuing_country of this CardPaymentMethodDetail. - + """ + The issuing country of the card. The value of this parameter is a 2-letter country code that follows ISO 3166 Country Codes standard. This parameter is returned when the value of paymentMethodType is CARD and the information is available from the channel. """ return self.__issuing_country diff --git a/com/alipay/ams/api/model/customer_belongs_to.py b/com/alipay/ams/api/model/customer_belongs_to.py index a761902..2794894 100644 --- a/com/alipay/ams/api/model/customer_belongs_to.py +++ b/com/alipay/ams/api/model/customer_belongs_to.py @@ -3,32 +3,36 @@ class CustomerBelongsTo(Enum): """CustomerBelongsTo枚举类""" - RABBIT_LINE_PAY = "RABBIT_LINE_PAY" - TRUEMONEY = "TRUEMONEY" - ALIPAY_HK = "ALIPAY_HK" - TNG = "TNG" ALIPAY_CN = "ALIPAY_CN" - GCASH = "GCASH" + ALIPAY_HK = "ALIPAY_HK" + MPAY = "MPAY" DANA = "DANA" - KAKAOPAY = "KAKAOPAY" - BKASH = "BKASH" - EASYPAISA = "EASYPAISA" PAYPAY = "PAYPAY" BOOST = "BOOST" + TNG = "TNG" GRABPAY_MY = "GRABPAY_MY" + HIPAY = "HIPAY" + GCASH = "GCASH" MAYA = "MAYA" GRABPAY_PH = "GRABPAY_PH" GRABPAY_SG = "GRABPAY_SG" + KAKAOPAY = "KAKAOPAY" NAVERPAY = "NAVERPAY" - JKOPAY = "JKOPAY" + TOSSPAY = "TOSSPAY" + RABBIT_LINE_PAY = "RABBIT_LINE_PAY" + TRUEMONEY = "TRUEMONEY" KPLUS = "KPLUS" DIRECT_DEBIT_SIAMCOMMERCIALBANK = "DIRECT_DEBIT_SIAMCOMMERCIALBANK" DIRECT_DEBIT_KRUNGTHAIBANK = "DIRECT_DEBIT_KRUNGTHAIBANK" + ACH_DIRECT_DEBIT = "ACH_DIRECT_DEBIT" ZALOPAY = "ZALOPAY" - DIRECTDEBIT_YAPILY = "DIRECTDEBIT_YAPILY" - TOSSPAY = "TOSSPAY" MOMO = "MOMO" - ANTOM_BIZ_ACCOUNT = "ANTOM_BIZ_ACCOUNT" + VIETTELMONEY = "VIETTELMONEY" + JKOPAY = "JKOPAY" + BKASH = "BKASH" + EASYPAISA = "EASYPAISA" + DIRECTDEBIT_YAPILY = "DIRECTDEBIT_YAPILY" + ANTIM_BIZ_ACCOUNT = "ANTIM_BIZ_ACCOUNT" def to_ams_dict(self) -> str: return self.name @@ -38,56 +42,64 @@ def value_of(value): if not value: return None - if CustomerBelongsTo.RABBIT_LINE_PAY.value == value: - return CustomerBelongsTo.RABBIT_LINE_PAY - if CustomerBelongsTo.TRUEMONEY.value == value: - return CustomerBelongsTo.TRUEMONEY - if CustomerBelongsTo.ALIPAY_HK.value == value: - return CustomerBelongsTo.ALIPAY_HK - if CustomerBelongsTo.TNG.value == value: - return CustomerBelongsTo.TNG if CustomerBelongsTo.ALIPAY_CN.value == value: return CustomerBelongsTo.ALIPAY_CN - if CustomerBelongsTo.GCASH.value == value: - return CustomerBelongsTo.GCASH + if CustomerBelongsTo.ALIPAY_HK.value == value: + return CustomerBelongsTo.ALIPAY_HK + if CustomerBelongsTo.MPAY.value == value: + return CustomerBelongsTo.MPAY if CustomerBelongsTo.DANA.value == value: return CustomerBelongsTo.DANA - if CustomerBelongsTo.KAKAOPAY.value == value: - return CustomerBelongsTo.KAKAOPAY - if CustomerBelongsTo.BKASH.value == value: - return CustomerBelongsTo.BKASH - if CustomerBelongsTo.EASYPAISA.value == value: - return CustomerBelongsTo.EASYPAISA if CustomerBelongsTo.PAYPAY.value == value: return CustomerBelongsTo.PAYPAY if CustomerBelongsTo.BOOST.value == value: return CustomerBelongsTo.BOOST + if CustomerBelongsTo.TNG.value == value: + return CustomerBelongsTo.TNG if CustomerBelongsTo.GRABPAY_MY.value == value: return CustomerBelongsTo.GRABPAY_MY + if CustomerBelongsTo.HIPAY.value == value: + return CustomerBelongsTo.HIPAY + if CustomerBelongsTo.GCASH.value == value: + return CustomerBelongsTo.GCASH if CustomerBelongsTo.MAYA.value == value: return CustomerBelongsTo.MAYA if CustomerBelongsTo.GRABPAY_PH.value == value: return CustomerBelongsTo.GRABPAY_PH if CustomerBelongsTo.GRABPAY_SG.value == value: return CustomerBelongsTo.GRABPAY_SG + if CustomerBelongsTo.KAKAOPAY.value == value: + return CustomerBelongsTo.KAKAOPAY if CustomerBelongsTo.NAVERPAY.value == value: return CustomerBelongsTo.NAVERPAY - if CustomerBelongsTo.JKOPAY.value == value: - return CustomerBelongsTo.JKOPAY + if CustomerBelongsTo.TOSSPAY.value == value: + return CustomerBelongsTo.TOSSPAY + if CustomerBelongsTo.RABBIT_LINE_PAY.value == value: + return CustomerBelongsTo.RABBIT_LINE_PAY + if CustomerBelongsTo.TRUEMONEY.value == value: + return CustomerBelongsTo.TRUEMONEY if CustomerBelongsTo.KPLUS.value == value: return CustomerBelongsTo.KPLUS if CustomerBelongsTo.DIRECT_DEBIT_SIAMCOMMERCIALBANK.value == value: return CustomerBelongsTo.DIRECT_DEBIT_SIAMCOMMERCIALBANK if CustomerBelongsTo.DIRECT_DEBIT_KRUNGTHAIBANK.value == value: return CustomerBelongsTo.DIRECT_DEBIT_KRUNGTHAIBANK + if CustomerBelongsTo.ACH_DIRECT_DEBIT.value == value: + return CustomerBelongsTo.ACH_DIRECT_DEBIT if CustomerBelongsTo.ZALOPAY.value == value: return CustomerBelongsTo.ZALOPAY - if CustomerBelongsTo.DIRECTDEBIT_YAPILY.value == value: - return CustomerBelongsTo.DIRECTDEBIT_YAPILY - if CustomerBelongsTo.TOSSPAY.value == value: - return CustomerBelongsTo.TOSSPAY if CustomerBelongsTo.MOMO.value == value: return CustomerBelongsTo.MOMO - if CustomerBelongsTo.ANTOM_BIZ_ACCOUNT.value == value: - return CustomerBelongsTo.ANTOM_BIZ_ACCOUNT + if CustomerBelongsTo.VIETTELMONEY.value == value: + return CustomerBelongsTo.VIETTELMONEY + if CustomerBelongsTo.JKOPAY.value == value: + return CustomerBelongsTo.JKOPAY + if CustomerBelongsTo.BKASH.value == value: + return CustomerBelongsTo.BKASH + if CustomerBelongsTo.EASYPAISA.value == value: + return CustomerBelongsTo.EASYPAISA + if CustomerBelongsTo.DIRECTDEBIT_YAPILY.value == value: + return CustomerBelongsTo.DIRECTDEBIT_YAPILY + if CustomerBelongsTo.ANTIM_BIZ_ACCOUNT.value == value: + return CustomerBelongsTo.ANTIM_BIZ_ACCOUNT return None diff --git a/com/alipay/ams/api/model/payment_method_category_type.py b/com/alipay/ams/api/model/payment_method_category_type.py index 52337c8..7263682 100644 --- a/com/alipay/ams/api/model/payment_method_category_type.py +++ b/com/alipay/ams/api/model/payment_method_category_type.py @@ -10,6 +10,7 @@ class PaymentMethodCategoryType(Enum): ONLINE_BANKING = "ONLINE_BANKING" CARD = "CARD" OTC = "OTC" + VA = "VA" def to_ams_dict(self) -> str: return self.name @@ -33,4 +34,6 @@ def value_of(value): return PaymentMethodCategoryType.CARD if PaymentMethodCategoryType.OTC.value == value: return PaymentMethodCategoryType.OTC + if PaymentMethodCategoryType.VA.value == value: + return PaymentMethodCategoryType.VA return None diff --git a/com/alipay/ams/api/model/payment_result_info.py b/com/alipay/ams/api/model/payment_result_info.py index fb22100..245ec51 100644 --- a/com/alipay/ams/api/model/payment_result_info.py +++ b/com/alipay/ams/api/model/payment_result_info.py @@ -36,6 +36,7 @@ def __init__(self): self.__credential_type_used = None # type: str self.__rrn = None # type: str self.__user_authorization_status = None # type: str + self.__authorization_code = None # type: str @property @@ -231,7 +232,7 @@ def last_four(self, value): @property def expiry_month(self): """ - The month the card expires. Pass in two digits representing the month. For example, if the expiry month is February, the value of this parameter is 02. Note: This parameter is returned when the value of paymentMethodType in the pay (Checkout Payment) API is CARD for specific merchants in specific regions. More information: Maximum length: 2 characters + The month the card expires. Pass in two digits representing the month. For example, if the expiry month is February, the value of this parameter is 02. Note: This parameter is returned when the value of paymentMethodType in the pay (One-time Payments) API is CARD. """ return self.__expiry_month @@ -241,7 +242,7 @@ def expiry_month(self, value): @property def expiry_year(self): """ - The year the card expires. Pass in the last two digits of the year number. For example, if the expiry year is 2025, the value of this parameter is 25. Note: This parameter is returned when the value of paymentMethodType in the pay (Checkout Payment) API is CARD for specific merchants in specific regions. More information: Maximum length: 2 characters + The year the card expires. Pass in the last two digits of the year number. For example, if the expiry year is 2025, the value of this parameter is 25. Note: This parameter is returned when the value of paymentMethodType in the pay (One-time Payments) API is CARD. """ return self.__expiry_year @@ -308,6 +309,16 @@ def user_authorization_status(self): @user_authorization_status.setter def user_authorization_status(self, value): self.__user_authorization_status = value + @property + def authorization_code(self): + """ + The authorization code returned by the payment channel upon successful authorization. + """ + return self.__authorization_code + + @authorization_code.setter + def authorization_code(self, value): + self.__authorization_code = value @@ -368,6 +379,8 @@ def to_ams_dict(self): params['rrn'] = self.rrn if hasattr(self, "user_authorization_status") and self.user_authorization_status is not None: params['userAuthorizationStatus'] = self.user_authorization_status + if hasattr(self, "authorization_code") and self.authorization_code is not None: + params['authorizationCode'] = self.authorization_code return params @@ -431,3 +444,5 @@ def parse_rsp_body(self, response_body): self.__rrn = response_body['rrn'] if 'userAuthorizationStatus' in response_body: self.__user_authorization_status = response_body['userAuthorizationStatus'] + if 'authorizationCode' in response_body: + self.__authorization_code = response_body['authorizationCode'] diff --git a/com/alipay/ams/api/model/refund_preference.py b/com/alipay/ams/api/model/refund_preference.py new file mode 100644 index 0000000..3421830 --- /dev/null +++ b/com/alipay/ams/api/model/refund_preference.py @@ -0,0 +1,37 @@ +import json + + + + +class RefundPreference: + def __init__(self): + + self.__preference_type = None # type: str + + + @property + def preference_type(self): + """ + The type of refund preference. NO_PREFERENCE: No preferred currency to receive the refund amount. This currency will be the transaction outflow currency. ORIGINAL_CURRENCY: refund amount will be converted and added to the original balance, which was deducted during the payment. + """ + return self.__preference_type + + @preference_type.setter + def preference_type(self, value): + self.__preference_type = value + + + + + def to_ams_dict(self): + params = dict() + if hasattr(self, "preference_type") and self.preference_type is not None: + params['preferenceType'] = self.preference_type + return params + + + def parse_rsp_body(self, response_body): + if isinstance(response_body, str): + response_body = json.loads(response_body) + if 'preferenceType' in response_body: + self.__preference_type = response_body['preferenceType'] diff --git a/com/alipay/ams/api/model/statement.py b/com/alipay/ams/api/model/statement.py index fd2af25..9b21907 100644 --- a/com/alipay/ams/api/model/statement.py +++ b/com/alipay/ams/api/model/statement.py @@ -213,8 +213,6 @@ def parse_rsp_body(self, response_body): self.__fund_move_detail = FundMoveDetail() self.__fund_move_detail.parse_rsp_body(response_body['fundMoveDetail']) if 'foreignExchangeQuote' in response_body: - self.__foreign_exchange_quote = ForeignExchangeQuote() - self.__foreign_exchange_quote.parse_rsp_body(response_body['foreignExchangeQuote']) if 'statementId' in response_body: self.__statement_id = response_body['statementId'] if 'transactionTime' in response_body: diff --git a/com/alipay/ams/api/model/subscription_info.py b/com/alipay/ams/api/model/subscription_info.py index cfc3e8b..a6423fd 100644 --- a/com/alipay/ams/api/model/subscription_info.py +++ b/com/alipay/ams/api/model/subscription_info.py @@ -1,5 +1,10 @@ import json +from com.alipay.ams.api.model.subscription_status import SubscriptionStatus +from com.alipay.ams.api.model.period_type import PeriodType from com.alipay.ams.api.model.period_rule import PeriodRule +from com.alipay.ams.api.model.payment_method import PaymentMethod +from com.alipay.ams.api.model.amount import Amount +from com.alipay.ams.api.model.trial_plan import TrialPlan from com.alipay.ams.api.model.trial import Trial from com.alipay.ams.api.model.amount import Amount @@ -9,10 +14,23 @@ class SubscriptionInfo: def __init__(self): + self.__subscription_id = None # type: str + self.__description = None # type: str self.__subscription_description = None # type: str + self.__status = None # type: SubscriptionStatus self.__subscription_start_time = None # type: str self.__subscription_end_time = None # type: str + self.__period_type = None # type: PeriodType + self.__period_count = None # type: int self.__period_rule = None # type: PeriodRule + self.__current_period_start = None # type: str + self.__current_period_end = None # type: str + self.__current_phase_no = None # type: int + self.__payment_method = None # type: PaymentMethod + self.__payment_amount = None # type: Amount + self.__last_update_time = None # type: str + self.__related_subscription_id = None # type: str + self.__trial_plan = None # type: TrialPlan self.__trials = None # type: [Trial] self.__subscription_notify_url = None # type: str self.__subscription_expiry_time = None # type: str @@ -20,6 +38,26 @@ def __init__(self): self.__max_amount_floor = None # type: Amount + @property + def subscription_id(self): + """ + The unique ID assigned by Antom to identify a subscription. + """ + return self.__subscription_id + + @subscription_id.setter + def subscription_id(self, value): + self.__subscription_id = value + @property + def description(self): + """ + The description of the subscription, used for displaying user consumption records and other actions. + """ + return self.__description + + @description.setter + def description(self, value): + self.__description = value @property def subscription_description(self): """ @@ -31,9 +69,19 @@ def subscription_description(self): def subscription_description(self, value): self.__subscription_description = value @property + def status(self): + """Gets the status of this SubscriptionInfo. + + """ + return self.__status + + @status.setter + def status(self, value): + self.__status = value + @property def subscription_start_time(self): """ - Start time of the subscription in ISO 8601 format + The date and time when the subscription becomes active. The value follows the ISO 8601 standard format. """ return self.__subscription_start_time @@ -43,7 +91,7 @@ def subscription_start_time(self, value): @property def subscription_end_time(self): """ - End time of the subscription in ISO 8601 format + The date and time when the subscription ends. The value follows the ISO 8601 standard format. The subscriptionEndTime can be NULL. """ return self.__subscription_end_time @@ -51,6 +99,26 @@ def subscription_end_time(self): def subscription_end_time(self, value): self.__subscription_end_time = value @property + def period_type(self): + """Gets the period_type of this SubscriptionInfo. + + """ + return self.__period_type + + @period_type.setter + def period_type(self, value): + self.__period_type = value + @property + def period_count(self): + """ + The number of times the period type repeats in one subscription cycle. For example, a periodCount of 2 with periodType MONTH means the subscription period is 2 months. + """ + return self.__period_count + + @period_count.setter + def period_count(self, value): + self.__period_count = value + @property def period_rule(self): """Gets the period_rule of this SubscriptionInfo. @@ -61,6 +129,86 @@ def period_rule(self): def period_rule(self, value): self.__period_rule = value @property + def current_period_start(self): + """ + Start time of current period. + """ + return self.__current_period_start + + @current_period_start.setter + def current_period_start(self, value): + self.__current_period_start = value + @property + def current_period_end(self): + """ + End time of current period. + """ + return self.__current_period_end + + @current_period_end.setter + def current_period_end(self, value): + self.__current_period_end = value + @property + def current_phase_no(self): + """ + Indicates current phase of subscription period, start from 1. + """ + return self.__current_phase_no + + @current_phase_no.setter + def current_phase_no(self, value): + self.__current_phase_no = value + @property + def payment_method(self): + """Gets the payment_method of this SubscriptionInfo. + + """ + return self.__payment_method + + @payment_method.setter + def payment_method(self, value): + self.__payment_method = value + @property + def payment_amount(self): + """Gets the payment_amount of this SubscriptionInfo. + + """ + return self.__payment_amount + + @payment_amount.setter + def payment_amount(self, value): + self.__payment_amount = value + @property + def last_update_time(self): + """ + DateTime when the subscription is changed using the Change/Update API. + """ + return self.__last_update_time + + @last_update_time.setter + def last_update_time(self, value): + self.__last_update_time = value + @property + def related_subscription_id(self): + """ + When merchants use Change API, a new subscription is created base on the current one. This field stores the ID of the original subscription and represents the relationship between the old and new subscription. + """ + return self.__related_subscription_id + + @related_subscription_id.setter + def related_subscription_id(self, value): + self.__related_subscription_id = value + @property + def trial_plan(self): + """Gets the trial_plan of this SubscriptionInfo. + + """ + return self.__trial_plan + + @trial_plan.setter + def trial_plan(self, value): + self.__trial_plan = value + @property def trials(self): """ List of trial periods for the subscription @@ -93,7 +241,7 @@ def subscription_expiry_time(self, value): @property def allow_retry(self): """ - Field is used only in the PIX recurrence scenario. Whether to allow a retry in the event that a recurring payment fails due to insufficient balance. + Field is used only in the PIX recurrence scenario. Whether to allow a retry in the event that a recurring payment fails due to insufficient balance. """ return self.__allow_retry @@ -116,14 +264,40 @@ def max_amount_floor(self, value): def to_ams_dict(self): params = dict() + if hasattr(self, "subscription_id") and self.subscription_id is not None: + params['subscriptionId'] = self.subscription_id + if hasattr(self, "description") and self.description is not None: + params['description'] = self.description if hasattr(self, "subscription_description") and self.subscription_description is not None: params['subscriptionDescription'] = self.subscription_description + if hasattr(self, "status") and self.status is not None: + params['status'] = self.status if hasattr(self, "subscription_start_time") and self.subscription_start_time is not None: params['subscriptionStartTime'] = self.subscription_start_time if hasattr(self, "subscription_end_time") and self.subscription_end_time is not None: params['subscriptionEndTime'] = self.subscription_end_time + if hasattr(self, "period_type") and self.period_type is not None: + params['periodType'] = self.period_type + if hasattr(self, "period_count") and self.period_count is not None: + params['periodCount'] = self.period_count if hasattr(self, "period_rule") and self.period_rule is not None: params['periodRule'] = self.period_rule + if hasattr(self, "current_period_start") and self.current_period_start is not None: + params['currentPeriodStart'] = self.current_period_start + if hasattr(self, "current_period_end") and self.current_period_end is not None: + params['currentPeriodEnd'] = self.current_period_end + if hasattr(self, "current_phase_no") and self.current_phase_no is not None: + params['currentPhaseNo'] = self.current_phase_no + if hasattr(self, "payment_method") and self.payment_method is not None: + params['paymentMethod'] = self.payment_method + if hasattr(self, "payment_amount") and self.payment_amount is not None: + params['paymentAmount'] = self.payment_amount + if hasattr(self, "last_update_time") and self.last_update_time is not None: + params['lastUpdateTime'] = self.last_update_time + if hasattr(self, "related_subscription_id") and self.related_subscription_id is not None: + params['relatedSubscriptionId'] = self.related_subscription_id + if hasattr(self, "trial_plan") and self.trial_plan is not None: + params['trialPlan'] = self.trial_plan if hasattr(self, "trials") and self.trials is not None: params['trials'] = self.trials if hasattr(self, "subscription_notify_url") and self.subscription_notify_url is not None: @@ -140,19 +314,52 @@ def to_ams_dict(self): def parse_rsp_body(self, response_body): if isinstance(response_body, str): response_body = json.loads(response_body) + if 'subscriptionId' in response_body: + self.__subscription_id = response_body['subscriptionId'] + if 'description' in response_body: + self.__description = response_body['description'] if 'subscriptionDescription' in response_body: self.__subscription_description = response_body['subscriptionDescription'] + if 'status' in response_body: + status_temp = SubscriptionStatus.value_of(response_body['status']) + self.__status = status_temp if 'subscriptionStartTime' in response_body: self.__subscription_start_time = response_body['subscriptionStartTime'] if 'subscriptionEndTime' in response_body: self.__subscription_end_time = response_body['subscriptionEndTime'] + if 'periodType' in response_body: + period_type_temp = PeriodType.value_of(response_body['periodType']) + self.__period_type = period_type_temp + if 'periodCount' in response_body: + self.__period_count = response_body['periodCount'] if 'periodRule' in response_body: self.__period_rule = PeriodRule() self.__period_rule.parse_rsp_body(response_body['periodRule']) + if 'currentPeriodStart' in response_body: + self.__current_period_start = response_body['currentPeriodStart'] + if 'currentPeriodEnd' in response_body: + self.__current_period_end = response_body['currentPeriodEnd'] + if 'currentPhaseNo' in response_body: + self.__current_phase_no = response_body['currentPhaseNo'] + if 'paymentMethod' in response_body: + self.__payment_method = PaymentMethod() + self.__payment_method.parse_rsp_body(response_body['paymentMethod']) + if 'paymentAmount' in response_body: + self.__payment_amount = Amount() + self.__payment_amount.parse_rsp_body(response_body['paymentAmount']) + if 'lastUpdateTime' in response_body: + self.__last_update_time = response_body['lastUpdateTime'] + if 'relatedSubscriptionId' in response_body: + self.__related_subscription_id = response_body['relatedSubscriptionId'] + if 'trialPlan' in response_body: + self.__trial_plan = TrialPlan() + self.__trial_plan.parse_rsp_body(response_body['trialPlan']) if 'trials' in response_body: self.__trials = [] for item in response_body['trials']: - self.__trials.append(item) + obj = Trial() + obj.parse_rsp_body(item) + self.__trials.append(obj) if 'subscriptionNotifyUrl' in response_body: self.__subscription_notify_url = response_body['subscriptionNotifyUrl'] if 'subscriptionExpiryTime' in response_body: diff --git a/com/alipay/ams/api/model/transfer_to_detail.py b/com/alipay/ams/api/model/transfer_to_detail.py index 57ae3ba..4391514 100644 --- a/com/alipay/ams/api/model/transfer_to_detail.py +++ b/com/alipay/ams/api/model/transfer_to_detail.py @@ -8,9 +8,8 @@ class TransferToDetail: def __init__(self): - + self.__transfer_to_method = None # type: PaymentMethod - self.__transfer_to_amount = None # type: Amount self.__transfer_to_currency = None # type: str self.__fee_amount = None # type: Amount self.__actual_transfer_to_amount = None # type: Amount @@ -22,25 +21,13 @@ def __init__(self): @property def transfer_to_method(self): """Gets the transfer_to_method of this TransferToDetail. - + """ return self.__transfer_to_method @transfer_to_method.setter def transfer_to_method(self, value): self.__transfer_to_method = value - - @property - def transfer_to_amount(self): - """Gets the transfer_to_amount of this TransferToDetail. - - """ - return self.__transfer_to_amount - - @transfer_to_amount.setter - def transfer_to_amount(self, value): - self.__transfer_to_amount = value - @property def transfer_to_currency(self): """ @@ -109,8 +96,6 @@ def to_ams_dict(self): params = dict() if hasattr(self, "transfer_to_method") and self.transfer_to_method is not None: params['transferToMethod'] = self.transfer_to_method - if hasattr(self, "transfer_to_amount") and self.transfer_to_amount is not None: - params['transferToAmount'] = self.transfer_to_amount if hasattr(self, "transfer_to_currency") and self.transfer_to_currency is not None: params['transferToCurrency'] = self.transfer_to_currency if hasattr(self, "fee_amount") and self.fee_amount is not None: @@ -127,14 +112,11 @@ def to_ams_dict(self): def parse_rsp_body(self, response_body): - if isinstance(response_body, str): + if isinstance(response_body, str): response_body = json.loads(response_body) if 'transferToMethod' in response_body: self.__transfer_to_method = PaymentMethod() self.__transfer_to_method.parse_rsp_body(response_body['transferToMethod']) - if 'transferToAmount' in response_body: - self.__transfer_to_amount = Amount() - self.__transfer_to_amount.parse_rsp_body(response_body['transferToAmount']) if 'transferToCurrency' in response_body: self.__transfer_to_currency = response_body['transferToCurrency'] if 'feeAmount' in response_body: diff --git a/com/alipay/ams/api/request/aba/alipay_inquiry_statement_request.py b/com/alipay/ams/api/request/aba/alipay_inquiry_statement_request.py index 1401224..d04ef03 100644 --- a/com/alipay/ams/api/request/aba/alipay_inquiry_statement_request.py +++ b/com/alipay/ams/api/request/aba/alipay_inquiry_statement_request.py @@ -16,6 +16,7 @@ def __init__(self): self.__currency_list = None # type: [str] self.__page_size = None # type: int self.__page_number = None # type: int + self.__asset_id = None # type: str @property @@ -98,6 +99,16 @@ def page_number(self): @page_number.setter def page_number(self, value): self.__page_number = value + @property + def asset_id(self): + """ + The card's assetId that merchants want to query. Only available if they want to filter by. + """ + return self.__asset_id + + @asset_id.setter + def asset_id(self, value): + self.__asset_id = value def to_ams_json(self): @@ -123,6 +134,8 @@ def to_ams_dict(self): params['pageSize'] = self.page_size if hasattr(self, "page_number") and self.page_number is not None: params['pageNumber'] = self.page_number + if hasattr(self, "asset_id") and self.asset_id is not None: + params['assetId'] = self.asset_id return params @@ -144,3 +157,5 @@ def parse_rsp_body(self, response_body): self.__page_size = response_body['pageSize'] if 'pageNumber' in response_body: self.__page_number = response_body['pageNumber'] + if 'assetId' in response_body: + self.__asset_id = response_body['assetId']