global-open-sdk-python 1.7.2__py3-none-any.whl → 1.7.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. com/alipay/ams/api/_version.py +1 -1
  2. com/alipay/ams/api/model/account_balance.py +15 -0
  3. com/alipay/ams/api/model/authorization_control.py +14 -27
  4. com/alipay/ams/api/model/card_transaction_event.py +1 -1
  5. com/alipay/ams/api/model/credit_pay_plan.py +15 -0
  6. com/alipay/ams/api/model/excluded_payment_method.py +42 -0
  7. com/alipay/ams/api/model/inquire_payment_method_card.py +176 -0
  8. com/alipay/ams/api/model/inquire_payment_method_detail.py +54 -0
  9. com/alipay/ams/api/model/payment_method.py +15 -0
  10. com/alipay/ams/api/model/payment_method_meta_data.py +37 -0
  11. com/alipay/ams/api/model/payment_preference.py +37 -0
  12. com/alipay/ams/api/model/vaulting_request_payment_method_detail.py +184 -0
  13. com/alipay/ams/api/request/notify/alipay_card_transaction_event_notify.py +287 -0
  14. com/alipay/ams/api/request/pay/alipay_inquire_payment_method_request.py +42 -0
  15. com/alipay/ams/api/request/pay/alipay_payment_session_request.py +17 -0
  16. com/alipay/ams/api/request/pay/alipay_vaulting_payment_method_request.py +3 -3
  17. com/alipay/ams/api/request/pay/alipay_vaulting_session_request.py +15 -0
  18. com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py +17 -2
  19. com/alipay/ams/api/response/pay/alipay_inquire_payment_method_response.py +61 -0
  20. {global_open_sdk_python-1.7.2.dist-info → global_open_sdk_python-1.7.4.dist-info}/METADATA +1 -1
  21. {global_open_sdk_python-1.7.2.dist-info → global_open_sdk_python-1.7.4.dist-info}/RECORD +24 -15
  22. {global_open_sdk_python-1.7.2.dist-info → global_open_sdk_python-1.7.4.dist-info}/WHEEL +1 -1
  23. {global_open_sdk_python-1.7.2.dist-info → global_open_sdk_python-1.7.4.dist-info}/licenses/LICENSE +0 -0
  24. {global_open_sdk_python-1.7.2.dist-info → global_open_sdk_python-1.7.4.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- VERSION = "1.7.2"
1
+ VERSION = "1.7.4"
2
2
  USER_AGENT = "global-open-sdk-python/" + VERSION
@@ -13,6 +13,7 @@ class AccountBalance:
13
13
  self.__available_balance = None # type: Amount
14
14
  self.__frozen_balance = None # type: Amount
15
15
  self.__total_balance = None # type: Amount
16
+ self.__account_no = None # type: str
16
17
 
17
18
 
18
19
  @property
@@ -55,6 +56,16 @@ class AccountBalance:
55
56
  @total_balance.setter
56
57
  def total_balance(self, value):
57
58
  self.__total_balance = value
59
+ @property
60
+ def account_no(self):
61
+ """
62
+ The balance account number. More information: Maximum length: 32 characters
63
+ """
64
+ return self.__account_no
65
+
66
+ @account_no.setter
67
+ def account_no(self, value):
68
+ self.__account_no = value
58
69
 
59
70
 
60
71
 
@@ -69,6 +80,8 @@ class AccountBalance:
69
80
  params['frozenBalance'] = self.frozen_balance
70
81
  if hasattr(self, "total_balance") and self.total_balance is not None:
71
82
  params['totalBalance'] = self.total_balance
83
+ if hasattr(self, "account_no") and self.account_no is not None:
84
+ params['accountNo'] = self.account_no
72
85
  return params
73
86
 
74
87
 
@@ -86,3 +99,5 @@ class AccountBalance:
86
99
  if 'totalBalance' in response_body:
87
100
  self.__total_balance = Amount()
88
101
  self.__total_balance.parse_rsp_body(response_body['totalBalance'])
102
+ if 'accountNo' in response_body:
103
+ self.__account_no = response_body['accountNo']
@@ -1,4 +1,5 @@
1
1
  import json
2
+ from com.alipay.ams.api.model.payment_preference import PaymentPreference
2
3
  from com.alipay.ams.api.model.card_limit_detail import CardLimitDetail
3
4
  from com.alipay.ams.api.model.card_limit_info import CardLimitInfo
4
5
  from com.alipay.ams.api.model.refund_preference import RefundPreference
@@ -14,8 +15,7 @@ class AuthorizationControl:
14
15
  self.__allowed_merchant_category_list = None # type: [str]
15
16
  self.__allowed_auth_times = None # type: int
16
17
  self.__allowed_currencies = None # type: [str]
17
- self.__payment_preference_currencies = None # type: [str]
18
- self.__same_currency_preference = None # type: bool
18
+ self.__payment_preference = None # type: PaymentPreference
19
19
  self.__three_ds_mode = None # type: str
20
20
  self.__phone_no = None # type: str
21
21
  self.__email = None # type: str
@@ -75,25 +75,15 @@ class AuthorizationControl:
75
75
  def allowed_currencies(self, value):
76
76
  self.__allowed_currencies = value
77
77
  @property
78
- def payment_preference_currencies(self):
79
- """
80
- 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, the current contract exposes authorizationControl at the response top level for whitelisted merchants. The legacy cardDetail property remains in the SDK for compatibility, without automatic copying between the two locations. The order field is subject to its existing capability and visibility rules; an absent order field must not be interpreted as proof that no stored order exists. 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.
81
- """
82
- return self.__payment_preference_currencies
83
-
84
- @payment_preference_currencies.setter
85
- def payment_preference_currencies(self, value):
86
- self.__payment_preference_currencies = value
87
- @property
88
- def same_currency_preference(self):
89
- """
90
- Whether to prioritize the transaction currency balance. Accepted only by applyCard and immutable after creation; do not send to updateCard. True enables same-currency-first deduction; false skips it and follows paymentPreferenceCurrencies when configured, otherwise the account-level setting. Omission preserves the server default behavior (same-currency-first); SDKs must not supply a default and must preserve explicit false. An omitted, null, or empty currency order is accepted. Returned by inquireCardDetail and the top-level authorizationControl of inquireCardSensitiveInfo when a standing is stored; otherwise omitted. Sensitive-info enrichment requires the existing merchant whitelist. Availability is controlled by WorldFirst; an ignored preference is not stored. Applicable to eligible Z18 merchants in CN/HK. Each payment is funded in full from one currency; balances are never split across currencies. A configured card-level currency order is exclusive: the account-level order is not consulted, and the payment fails if no eligible currency can fund it in full. On inquiry, an absent paymentPreferenceCurrencies field can mean the order is hidden or unavailable; it must not be interpreted as proof that no order is configured. Retain endpoint and capability context when interpreting returned fields.
78
+ def payment_preference(self):
79
+ """Gets the payment_preference of this AuthorizationControl.
80
+
91
81
  """
92
- return self.__same_currency_preference
82
+ return self.__payment_preference
93
83
 
94
- @same_currency_preference.setter
95
- def same_currency_preference(self, value):
96
- self.__same_currency_preference = value
84
+ @payment_preference.setter
85
+ def payment_preference(self, value):
86
+ self.__payment_preference = value
97
87
  @property
98
88
  def three_ds_mode(self):
99
89
  """
@@ -170,10 +160,8 @@ class AuthorizationControl:
170
160
  params['allowedAuthTimes'] = self.allowed_auth_times
171
161
  if hasattr(self, "allowed_currencies") and self.allowed_currencies is not None:
172
162
  params['allowedCurrencies'] = self.allowed_currencies
173
- if hasattr(self, "payment_preference_currencies") and self.payment_preference_currencies is not None:
174
- params['paymentPreferenceCurrencies'] = self.payment_preference_currencies
175
- if hasattr(self, "same_currency_preference") and self.same_currency_preference is not None:
176
- params['sameCurrencyPreference'] = self.same_currency_preference
163
+ if hasattr(self, "payment_preference") and self.payment_preference is not None:
164
+ params['paymentPreference'] = self.payment_preference
177
165
  if hasattr(self, "three_ds_mode") and self.three_ds_mode is not None:
178
166
  params['threeDSMode'] = self.three_ds_mode
179
167
  if hasattr(self, "phone_no") and self.phone_no is not None:
@@ -202,10 +190,9 @@ class AuthorizationControl:
202
190
  self.__allowed_auth_times = response_body['allowedAuthTimes']
203
191
  if 'allowedCurrencies' in response_body:
204
192
  self.__allowed_currencies = response_body['allowedCurrencies']
205
- if 'paymentPreferenceCurrencies' in response_body:
206
- self.__payment_preference_currencies = response_body['paymentPreferenceCurrencies']
207
- if 'sameCurrencyPreference' in response_body:
208
- self.__same_currency_preference = response_body['sameCurrencyPreference']
193
+ if 'paymentPreference' in response_body:
194
+ self.__payment_preference = PaymentPreference()
195
+ self.__payment_preference.parse_rsp_body(response_body['paymentPreference'])
209
196
  if 'threeDSMode' in response_body:
210
197
  self.__three_ds_mode = response_body['threeDSMode']
211
198
  if 'phoneNo' in response_body:
@@ -217,7 +217,7 @@ class CardTransactionEvent:
217
217
  @property
218
218
  def card_product(self):
219
219
  """
220
- The product category of the card used for the transaction, such as Mastercard MTA or MTB. Returned when available; the value is passed through as provided and has no fixed code pattern.
220
+ The card network product code for the original transaction, such as MTA or MTB. Returned as stored only when the mapped route is enabled, the merchant is configured to receive this field, and the code is a non-blank string of up to 16 characters. Otherwise, the field is omitted.
221
221
  """
222
222
  return self.__card_product
223
223
 
@@ -11,6 +11,7 @@ class CreditPayPlan:
11
11
  self.__interval = None # type: str
12
12
  self.__credit_pay_fee_type = None # type: CreditPayFeeType
13
13
  self.__fee_percentage = None # type: int
14
+ self.__filtered_installment_periods = None # type: [int]
14
15
  self.__interest_rate = None # type: str
15
16
 
16
17
 
@@ -55,6 +56,16 @@ class CreditPayPlan:
55
56
  def fee_percentage(self, value):
56
57
  self.__fee_percentage = value
57
58
  @property
59
+ def filtered_installment_periods(self):
60
+ """
61
+ Select Installment Payment Plan Period that the merchant wants to offer. Example: Available periods are 3,6,12,24 months, but if the merchant wants to restrict to 3 & 6 months only, enter the value as [3,6] Note: This field is mutually exclusive with installmentNum. When both fields are provided, installmentNum takes priority. More information: Maximum length: 100 elements Value range: 2 - 36
62
+ """
63
+ return self.__filtered_installment_periods
64
+
65
+ @filtered_installment_periods.setter
66
+ def filtered_installment_periods(self, value):
67
+ self.__filtered_installment_periods = value
68
+ @property
58
69
  def interest_rate(self):
59
70
  """
60
71
  The installment interest rate in percentage. For example, interestRate = 0.1 indicates that the installment interest rate is 0.1%. Note: This field is returned when the payment method is CARD, the payment is paid in installments, and the channel provides the interest rate information. More information: Maximum length: 16 characters The value must be a decimal. Field attributes: - Idempotency: Not applicable for notification fields - Nullable: Yes - Invalid input restrictions: Must be a decimal number - Return condition: Returned when the payment method is CARD, the payment is paid in installments, and the channel provides the interest rate information
@@ -78,6 +89,8 @@ class CreditPayPlan:
78
89
  params['creditPayFeeType'] = self.credit_pay_fee_type
79
90
  if hasattr(self, "fee_percentage") and self.fee_percentage is not None:
80
91
  params['feePercentage'] = self.fee_percentage
92
+ if hasattr(self, "filtered_installment_periods") and self.filtered_installment_periods is not None:
93
+ params['filteredInstallmentPeriods'] = self.filtered_installment_periods
81
94
  if hasattr(self, "interest_rate") and self.interest_rate is not None:
82
95
  params['interestRate'] = self.interest_rate
83
96
  return params
@@ -95,5 +108,7 @@ class CreditPayPlan:
95
108
  self.__credit_pay_fee_type = credit_pay_fee_type_temp
96
109
  if 'feePercentage' in response_body:
97
110
  self.__fee_percentage = response_body['feePercentage']
111
+ if 'filteredInstallmentPeriods' in response_body:
112
+ self.__filtered_installment_periods = response_body['filteredInstallmentPeriods']
98
113
  if 'interestRate' in response_body:
99
114
  self.__interest_rate = response_body['interestRate']
@@ -0,0 +1,42 @@
1
+ import json
2
+ from com.alipay.ams.api.model.payment_method_type_item import PaymentMethodTypeItem
3
+
4
+
5
+
6
+
7
+ class ExcludedPaymentMethod:
8
+ def __init__(self):
9
+
10
+ self.__payment_method_type_list = None # type: [PaymentMethodTypeItem]
11
+
12
+
13
+ @property
14
+ def payment_method_type_list(self):
15
+ """Gets the payment_method_type_list of this ExcludedPaymentMethod.
16
+
17
+ """
18
+ return self.__payment_method_type_list
19
+
20
+ @payment_method_type_list.setter
21
+ def payment_method_type_list(self, value):
22
+ self.__payment_method_type_list = value
23
+
24
+
25
+
26
+
27
+ def to_ams_dict(self):
28
+ params = dict()
29
+ if hasattr(self, "payment_method_type_list") and self.payment_method_type_list is not None:
30
+ params['paymentMethodTypeList'] = self.payment_method_type_list
31
+ return params
32
+
33
+
34
+ def parse_rsp_body(self, response_body):
35
+ if isinstance(response_body, str):
36
+ response_body = json.loads(response_body)
37
+ if 'paymentMethodTypeList' in response_body:
38
+ self.__payment_method_type_list = []
39
+ for item in response_body['paymentMethodTypeList']:
40
+ obj = PaymentMethodTypeItem()
41
+ obj.parse_rsp_body(item)
42
+ self.__payment_method_type_list.append(obj)
@@ -0,0 +1,176 @@
1
+ import json
2
+ from com.alipay.ams.api.model.user_name import UserName
3
+ from com.alipay.ams.api.model.address import Address
4
+
5
+
6
+
7
+
8
+ class InquirePaymentMethodCard:
9
+ def __init__(self):
10
+
11
+ self.__card_token = None # type: str
12
+ self.__card_no = None # type: str
13
+ self.__mask = None # type: str
14
+ self.__brand = None # type: str
15
+ self.__country_issue = None # type: str
16
+ self.__card_issuer = None # type: str
17
+ self.__expiry_month = None # type: str
18
+ self.__expiry_year = None # type: str
19
+ self.__inst_user_name = None # type: UserName
20
+ self.__billing_address = None # type: Address
21
+
22
+
23
+ @property
24
+ def card_token(self):
25
+ """
26
+ The card token, consistent with the request.
27
+ """
28
+ return self.__card_token
29
+
30
+ @card_token.setter
31
+ def card_token(self, value):
32
+ self.__card_token = value
33
+ @property
34
+ def card_no(self):
35
+ """
36
+ The full bank card number (PAN). This is the core capability of this API.
37
+ """
38
+ return self.__card_no
39
+
40
+ @card_no.setter
41
+ def card_no(self, value):
42
+ self.__card_no = value
43
+ @property
44
+ def mask(self):
45
+ """
46
+ The masked card number, for example 411734******7890.
47
+ """
48
+ return self.__mask
49
+
50
+ @mask.setter
51
+ def mask(self, value):
52
+ self.__mask = value
53
+ @property
54
+ def brand(self):
55
+ """
56
+ The card brand, for example VISA or MASTER. Queried in real time from the card BIN.
57
+ """
58
+ return self.__brand
59
+
60
+ @brand.setter
61
+ def brand(self, value):
62
+ self.__brand = value
63
+ @property
64
+ def country_issue(self):
65
+ """
66
+ The issuing country or region as a two-letter country code. Queried in real time from the card BIN.
67
+ """
68
+ return self.__country_issue
69
+
70
+ @country_issue.setter
71
+ def country_issue(self, value):
72
+ self.__country_issue = value
73
+ @property
74
+ def card_issuer(self):
75
+ """
76
+ The card issuer name from the stored card binding. Returned only when a value exists; the field is absent when no value is available.
77
+ """
78
+ return self.__card_issuer
79
+
80
+ @card_issuer.setter
81
+ def card_issuer(self, value):
82
+ self.__card_issuer = value
83
+ @property
84
+ def expiry_month(self):
85
+ """
86
+ The card expiry month as two digits, from the stored card binding.
87
+ """
88
+ return self.__expiry_month
89
+
90
+ @expiry_month.setter
91
+ def expiry_month(self, value):
92
+ self.__expiry_month = value
93
+ @property
94
+ def expiry_year(self):
95
+ """
96
+ The card expiry year as two digits, from the stored card binding.
97
+ """
98
+ return self.__expiry_year
99
+
100
+ @expiry_year.setter
101
+ def expiry_year(self, value):
102
+ self.__expiry_year = value
103
+ @property
104
+ def inst_user_name(self):
105
+ """Gets the inst_user_name of this InquirePaymentMethodCard.
106
+
107
+ """
108
+ return self.__inst_user_name
109
+
110
+ @inst_user_name.setter
111
+ def inst_user_name(self, value):
112
+ self.__inst_user_name = value
113
+ @property
114
+ def billing_address(self):
115
+ """Gets the billing_address of this InquirePaymentMethodCard.
116
+
117
+ """
118
+ return self.__billing_address
119
+
120
+ @billing_address.setter
121
+ def billing_address(self, value):
122
+ self.__billing_address = value
123
+
124
+
125
+
126
+
127
+ def to_ams_dict(self):
128
+ params = dict()
129
+ if hasattr(self, "card_token") and self.card_token is not None:
130
+ params['cardToken'] = self.card_token
131
+ if hasattr(self, "card_no") and self.card_no is not None:
132
+ params['cardNo'] = self.card_no
133
+ if hasattr(self, "mask") and self.mask is not None:
134
+ params['mask'] = self.mask
135
+ if hasattr(self, "brand") and self.brand is not None:
136
+ params['brand'] = self.brand
137
+ if hasattr(self, "country_issue") and self.country_issue is not None:
138
+ params['countryIssue'] = self.country_issue
139
+ if hasattr(self, "card_issuer") and self.card_issuer is not None:
140
+ params['cardIssuer'] = self.card_issuer
141
+ if hasattr(self, "expiry_month") and self.expiry_month is not None:
142
+ params['expiryMonth'] = self.expiry_month
143
+ if hasattr(self, "expiry_year") and self.expiry_year is not None:
144
+ params['expiryYear'] = self.expiry_year
145
+ if hasattr(self, "inst_user_name") and self.inst_user_name is not None:
146
+ params['instUserName'] = self.inst_user_name
147
+ if hasattr(self, "billing_address") and self.billing_address is not None:
148
+ params['billingAddress'] = self.billing_address
149
+ return params
150
+
151
+
152
+ def parse_rsp_body(self, response_body):
153
+ if isinstance(response_body, str):
154
+ response_body = json.loads(response_body)
155
+ if 'cardToken' in response_body:
156
+ self.__card_token = response_body['cardToken']
157
+ if 'cardNo' in response_body:
158
+ self.__card_no = response_body['cardNo']
159
+ if 'mask' in response_body:
160
+ self.__mask = response_body['mask']
161
+ if 'brand' in response_body:
162
+ self.__brand = response_body['brand']
163
+ if 'countryIssue' in response_body:
164
+ self.__country_issue = response_body['countryIssue']
165
+ if 'cardIssuer' in response_body:
166
+ self.__card_issuer = response_body['cardIssuer']
167
+ if 'expiryMonth' in response_body:
168
+ self.__expiry_month = response_body['expiryMonth']
169
+ if 'expiryYear' in response_body:
170
+ self.__expiry_year = response_body['expiryYear']
171
+ if 'instUserName' in response_body:
172
+ self.__inst_user_name = UserName()
173
+ self.__inst_user_name.parse_rsp_body(response_body['instUserName'])
174
+ if 'billingAddress' in response_body:
175
+ self.__billing_address = Address()
176
+ self.__billing_address.parse_rsp_body(response_body['billingAddress'])
@@ -0,0 +1,54 @@
1
+ import json
2
+ from com.alipay.ams.api.model.inquire_payment_method_card import InquirePaymentMethodCard
3
+
4
+
5
+
6
+
7
+ class InquirePaymentMethodDetail:
8
+ def __init__(self):
9
+
10
+ self.__payment_method_detail_type = None # type: str
11
+ self.__card = None # type: InquirePaymentMethodCard
12
+
13
+
14
+ @property
15
+ def payment_method_detail_type(self):
16
+ """
17
+ The payment method detail type. The value is CARD; only credit card assets are supported.
18
+ """
19
+ return self.__payment_method_detail_type
20
+
21
+ @payment_method_detail_type.setter
22
+ def payment_method_detail_type(self, value):
23
+ self.__payment_method_detail_type = value
24
+ @property
25
+ def card(self):
26
+ """Gets the card of this InquirePaymentMethodDetail.
27
+
28
+ """
29
+ return self.__card
30
+
31
+ @card.setter
32
+ def card(self, value):
33
+ self.__card = value
34
+
35
+
36
+
37
+
38
+ def to_ams_dict(self):
39
+ params = dict()
40
+ if hasattr(self, "payment_method_detail_type") and self.payment_method_detail_type is not None:
41
+ params['paymentMethodDetailType'] = self.payment_method_detail_type
42
+ if hasattr(self, "card") and self.card is not None:
43
+ params['card'] = self.card
44
+ return params
45
+
46
+
47
+ def parse_rsp_body(self, response_body):
48
+ if isinstance(response_body, str):
49
+ response_body = json.loads(response_body)
50
+ if 'paymentMethodDetailType' in response_body:
51
+ self.__payment_method_detail_type = response_body['paymentMethodDetailType']
52
+ if 'card' in response_body:
53
+ self.__card = InquirePaymentMethodCard()
54
+ self.__card.parse_rsp_body(response_body['card'])
@@ -14,6 +14,7 @@ class PaymentMethod:
14
14
  self.__extend_info = None # type: str
15
15
  self.__require_issuer_authentication = None # type: bool
16
16
  self.__payment_method_meta_data = None # type: {str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}
17
+ self.__card_brand = None # type: str
17
18
 
18
19
 
19
20
  @property
@@ -86,6 +87,16 @@ class PaymentMethod:
86
87
  @payment_method_meta_data.setter
87
88
  def payment_method_meta_data(self, value):
88
89
  self.__payment_method_meta_data = value
90
+ @property
91
+ def card_brand(self):
92
+ """
93
+ The card brand returned for card subscription payments, or UNKNOWN if it cannot be determined.
94
+ """
95
+ return self.__card_brand
96
+
97
+ @card_brand.setter
98
+ def card_brand(self, value):
99
+ self.__card_brand = value
89
100
 
90
101
 
91
102
 
@@ -106,6 +117,8 @@ class PaymentMethod:
106
117
  params['requireIssuerAuthentication'] = self.require_issuer_authentication
107
118
  if hasattr(self, "payment_method_meta_data") and self.payment_method_meta_data is not None:
108
119
  params['paymentMethodMetaData'] = self.payment_method_meta_data
120
+ if hasattr(self, "card_brand") and self.card_brand is not None:
121
+ params['cardBrand'] = self.card_brand
109
122
  return params
110
123
 
111
124
 
@@ -127,3 +140,5 @@ class PaymentMethod:
127
140
  self.__require_issuer_authentication = response_body['requireIssuerAuthentication']
128
141
  if 'paymentMethodMetaData' in response_body:
129
142
  self.__payment_method_meta_data = response_body['paymentMethodMetaData']
143
+ if 'cardBrand' in response_body:
144
+ self.__card_brand = response_body['cardBrand']
@@ -0,0 +1,37 @@
1
+ import json
2
+
3
+
4
+
5
+
6
+ class PaymentMethodMetaData:
7
+ def __init__(self):
8
+
9
+ self.__recurring_type = None # type: str
10
+
11
+
12
+ @property
13
+ def recurring_type(self):
14
+ """
15
+ The recurring type of subsequent deductions on the vaulted card: SCHEDULED for fixed-schedule deductions or UNSCHEDULED for on-demand deductions. Optional; if omitted, no recurring type is declared, and any other value returns PARAM_ILLEGAL.
16
+ """
17
+ return self.__recurring_type
18
+
19
+ @recurring_type.setter
20
+ def recurring_type(self, value):
21
+ self.__recurring_type = value
22
+
23
+
24
+
25
+
26
+ def to_ams_dict(self):
27
+ params = dict()
28
+ if hasattr(self, "recurring_type") and self.recurring_type is not None:
29
+ params['recurringType'] = self.recurring_type
30
+ return params
31
+
32
+
33
+ def parse_rsp_body(self, response_body):
34
+ if isinstance(response_body, str):
35
+ response_body = json.loads(response_body)
36
+ if 'recurringType' in response_body:
37
+ self.__recurring_type = response_body['recurringType']
@@ -0,0 +1,37 @@
1
+ import json
2
+
3
+
4
+
5
+
6
+ class PaymentPreference:
7
+ def __init__(self):
8
+
9
+ self.__currency_order = None # type: [str]
10
+
11
+
12
+ @property
13
+ def currency_order(self):
14
+ """
15
+ Funding currencies in priority order: USD, EUR, GBP, HKD, AUD, CAD, CNH, JPY, or NZD. An explicitly supplied order must not be null, empty, or contain duplicates. Insufficient balances are skipped, and funding fails after exhaustion without falling back to the account order.
16
+ """
17
+ return self.__currency_order
18
+
19
+ @currency_order.setter
20
+ def currency_order(self, value):
21
+ self.__currency_order = value
22
+
23
+
24
+
25
+
26
+ def to_ams_dict(self):
27
+ params = dict()
28
+ if hasattr(self, "currency_order") and self.currency_order is not None:
29
+ params['currencyOrder'] = self.currency_order
30
+ return params
31
+
32
+
33
+ def parse_rsp_body(self, response_body):
34
+ if isinstance(response_body, str):
35
+ response_body = json.loads(response_body)
36
+ if 'currencyOrder' in response_body:
37
+ self.__currency_order = response_body['currencyOrder']