global-open-sdk-python 1.7.3__py3-none-any.whl → 1.7.5__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.
- com/alipay/ams/api/_version.py +1 -1
- com/alipay/ams/api/model/account_balance.py +15 -0
- com/alipay/ams/api/model/authorization_control.py +14 -27
- com/alipay/ams/api/model/card_transaction_event.py +1 -1
- com/alipay/ams/api/model/credit_note_info.py +6 -6
- com/alipay/ams/api/model/credit_pay_plan.py +15 -0
- com/alipay/ams/api/model/excluded_payment_method.py +42 -0
- com/alipay/ams/api/model/line_item.py +16 -2
- com/alipay/ams/api/model/notify_invoice_info.py +2 -2
- com/alipay/ams/api/model/pay_invoice_creation.py +37 -0
- com/alipay/ams/api/model/payment_method_detail.py +1 -17
- com/alipay/ams/api/model/payment_preference.py +37 -0
- com/alipay/ams/api/model/payment_session_invoice_creation.py +37 -0
- com/alipay/ams/api/model/vaulting_request_payment_method_detail.py +184 -0
- com/alipay/ams/api/request/notify/alipay_credit_note_notify.py +10 -1
- com/alipay/ams/api/request/notify/alipay_refund_notify.py +16 -0
- com/alipay/ams/api/request/pay/alipay_pay_request.py +17 -0
- com/alipay/ams/api/request/pay/alipay_payment_session_request.py +34 -0
- com/alipay/ams/api/request/pay/alipay_vaulting_payment_method_request.py +3 -3
- com/alipay/ams/api/request/pay/alipay_vaulting_session_request.py +4 -6
- com/alipay/ams/api/response/billing/alipay_billing_subscription_update_response.py +17 -2
- com/alipay/ams/api/response/pay/alipay_inquiry_refund_response.py +30 -0
- com/alipay/ams/api/response/pay/ams_api_v1_payments_inquiry_refund_post200_response.py +30 -0
- {global_open_sdk_python-1.7.3.dist-info → global_open_sdk_python-1.7.5.dist-info}/METADATA +1 -1
- {global_open_sdk_python-1.7.3.dist-info → global_open_sdk_python-1.7.5.dist-info}/RECORD +28 -23
- {global_open_sdk_python-1.7.3.dist-info → global_open_sdk_python-1.7.5.dist-info}/WHEEL +1 -1
- {global_open_sdk_python-1.7.3.dist-info → global_open_sdk_python-1.7.5.dist-info}/licenses/LICENSE +0 -0
- {global_open_sdk_python-1.7.3.dist-info → global_open_sdk_python-1.7.5.dist-info}/top_level.txt +0 -0
com/alipay/ams/api/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
VERSION = "1.7.
|
|
1
|
+
VERSION = "1.7.5"
|
|
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.
|
|
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
|
|
79
|
-
"""
|
|
80
|
-
|
|
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.
|
|
82
|
+
return self.__payment_preference
|
|
93
83
|
|
|
94
|
-
@
|
|
95
|
-
def
|
|
96
|
-
self.
|
|
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, "
|
|
174
|
-
params['
|
|
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 '
|
|
206
|
-
self.
|
|
207
|
-
|
|
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
|
|
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
|
|
|
@@ -62,7 +62,7 @@ class CreditNoteInfo:
|
|
|
62
62
|
|
|
63
63
|
@property
|
|
64
64
|
def refund_amount(self):
|
|
65
|
-
"""
|
|
65
|
+
"""Saved planned original-method refund amount for refund-bearing POST_PAYMENT. Absent/null for note-only POST_PAYMENT and PRE_PAYMENT. Does not prove completion."""
|
|
66
66
|
return self.__refund_amount
|
|
67
67
|
|
|
68
68
|
@refund_amount.setter
|
|
@@ -71,7 +71,7 @@ class CreditNoteInfo:
|
|
|
71
71
|
|
|
72
72
|
@property
|
|
73
73
|
def refund_status(self):
|
|
74
|
-
"""
|
|
74
|
+
"""Saved progress: REFUND_INITIATED, REFUND_SUCCEEDED, or REFUND_FAILED. Absent/null before progress and for note-only notes. PRE_PAYMENT uses NOT_APPLICABLE where represented."""
|
|
75
75
|
return self.__refund_status
|
|
76
76
|
|
|
77
77
|
@refund_status.setter
|
|
@@ -80,7 +80,7 @@ class CreditNoteInfo:
|
|
|
80
80
|
|
|
81
81
|
@property
|
|
82
82
|
def refund_id(self):
|
|
83
|
-
"""
|
|
83
|
+
"""Saved payment-system reference when obtained. Absent/null beforehand, for note-only POST_PAYMENT and PRE_PAYMENT. Does not prove refund success."""
|
|
84
84
|
return self.__refund_id
|
|
85
85
|
|
|
86
86
|
@refund_id.setter
|
|
@@ -89,7 +89,7 @@ class CreditNoteInfo:
|
|
|
89
89
|
|
|
90
90
|
@property
|
|
91
91
|
def refund_destination(self):
|
|
92
|
-
"""
|
|
92
|
+
"""Original-method routing REFUND. Present when supplied at creation; absent/null otherwise."""
|
|
93
93
|
return self.__refund_destination
|
|
94
94
|
|
|
95
95
|
@refund_destination.setter
|
|
@@ -98,7 +98,7 @@ class CreditNoteInfo:
|
|
|
98
98
|
|
|
99
99
|
@property
|
|
100
100
|
def reason(self):
|
|
101
|
-
"""
|
|
101
|
+
"""Structured reason: DUPLICATE, FRAUDULENT, ORDER_CHANGE, PRODUCT_UNSATISFACTORY, PRICE_ADJUSTMENT, or OTHER."""
|
|
102
102
|
return self.__reason
|
|
103
103
|
|
|
104
104
|
@reason.setter
|
|
@@ -161,7 +161,7 @@ class CreditNoteInfo:
|
|
|
161
161
|
|
|
162
162
|
@property
|
|
163
163
|
def created_at(self):
|
|
164
|
-
"""
|
|
164
|
+
"""Creation timestamp in ISO 8601 text. Not a lifecycle event ordering key."""
|
|
165
165
|
return self.__created_at
|
|
166
166
|
|
|
167
167
|
@created_at.setter
|
|
@@ -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)
|
|
@@ -12,10 +12,11 @@ class LineItem:
|
|
|
12
12
|
self.__type = None # type: str
|
|
13
13
|
self.__invoice_item_id = None # type: str
|
|
14
14
|
self.__description = None # type: str
|
|
15
|
-
self.__quantity = None # type:
|
|
15
|
+
self.__quantity = None # type: int
|
|
16
16
|
self.__unit_amount = None # type: Amount
|
|
17
17
|
self.__item_amount = None # type: Amount
|
|
18
18
|
self.__metadata = None # type: {str: (str,)}
|
|
19
|
+
self.__direction = None # type: str
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
@property
|
|
@@ -61,7 +62,7 @@ class LineItem:
|
|
|
61
62
|
@property
|
|
62
63
|
def quantity(self):
|
|
63
64
|
"""
|
|
64
|
-
|
|
65
|
+
Quantity credited, from 1 to 999. Present only in quantity mode.
|
|
65
66
|
"""
|
|
66
67
|
return self.__quantity
|
|
67
68
|
|
|
@@ -69,6 +70,15 @@ class LineItem:
|
|
|
69
70
|
def quantity(self, value):
|
|
70
71
|
self.__quantity = value
|
|
71
72
|
@property
|
|
73
|
+
def direction(self):
|
|
74
|
+
"""Money flow: C credits the customer; D debits the customer and subtracts itemAmount from the total."""
|
|
75
|
+
return self.__direction
|
|
76
|
+
|
|
77
|
+
@direction.setter
|
|
78
|
+
def direction(self, value):
|
|
79
|
+
self.__direction = value
|
|
80
|
+
|
|
81
|
+
@property
|
|
72
82
|
def unit_amount(self):
|
|
73
83
|
"""Gets the unit_amount of this LineItem.
|
|
74
84
|
|
|
@@ -120,6 +130,8 @@ class LineItem:
|
|
|
120
130
|
params['itemAmount'] = self.item_amount
|
|
121
131
|
if hasattr(self, "metadata") and self.metadata is not None:
|
|
122
132
|
params['metadata'] = self.metadata
|
|
133
|
+
if hasattr(self, "direction") and self.direction is not None:
|
|
134
|
+
params['direction'] = self.direction
|
|
123
135
|
return params
|
|
124
136
|
|
|
125
137
|
|
|
@@ -144,3 +156,5 @@ class LineItem:
|
|
|
144
156
|
self.__item_amount.parse_rsp_body(response_body['itemAmount'])
|
|
145
157
|
if 'metadata' in response_body:
|
|
146
158
|
self.__metadata = response_body['metadata']
|
|
159
|
+
if 'direction' in response_body:
|
|
160
|
+
self.__direction = response_body['direction']
|
|
@@ -23,7 +23,7 @@ class NotifyInvoiceInfo:
|
|
|
23
23
|
|
|
24
24
|
@property
|
|
25
25
|
def invoice_status(self):
|
|
26
|
-
"""
|
|
26
|
+
"""Invoice lifecycle: DRAFT, OPEN, PAID, UNCOLLECTIBLE, or VOID. Typically OPEN for PRE_PAYMENT and PAID for POST_PAYMENT."""
|
|
27
27
|
return self.__invoice_status
|
|
28
28
|
|
|
29
29
|
@invoice_status.setter
|
|
@@ -50,7 +50,7 @@ class NotifyInvoiceInfo:
|
|
|
50
50
|
|
|
51
51
|
@property
|
|
52
52
|
def post_payment_credit_notes_amount(self):
|
|
53
|
-
"""
|
|
53
|
+
"""Cumulative non-voided POST_PAYMENT credit-note amount, including processing/failed refunds until voided. Not the successfully refunded total; does not alter invoice total."""
|
|
54
54
|
return self.__post_payment_credit_notes_amount
|
|
55
55
|
|
|
56
56
|
@post_payment_credit_notes_amount.setter
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PayInvoiceCreation:
|
|
7
|
+
def __init__(self):
|
|
8
|
+
|
|
9
|
+
self.__enabled = None # type: str
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def enabled(self):
|
|
14
|
+
"""
|
|
15
|
+
\"true\" requests an invoice after successful payment; \"false\" disables standalone creation. Omission uses existing whitelist eligibility.
|
|
16
|
+
"""
|
|
17
|
+
return self.__enabled
|
|
18
|
+
|
|
19
|
+
@enabled.setter
|
|
20
|
+
def enabled(self, value):
|
|
21
|
+
self.__enabled = value
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def to_ams_dict(self):
|
|
27
|
+
params = dict()
|
|
28
|
+
if hasattr(self, "enabled") and self.enabled is not None:
|
|
29
|
+
params['enabled'] = self.enabled
|
|
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 'enabled' in response_body:
|
|
37
|
+
self.__enabled = response_body['enabled']
|
|
@@ -5,7 +5,6 @@ from com.alipay.ams.api.model.external_payment_method_detail import ExternalPaym
|
|
|
5
5
|
from com.alipay.ams.api.model.discount_payment_method_detail import DiscountPaymentMethodDetail
|
|
6
6
|
from com.alipay.ams.api.model.coupon_payment_method_detail import CouponPaymentMethodDetail
|
|
7
7
|
from com.alipay.ams.api.model.wallet import Wallet
|
|
8
|
-
from com.alipay.ams.api.model.payment_method_meta_data import PaymentMethodMetaData
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
|
|
@@ -22,7 +21,6 @@ class PaymentMethodDetail:
|
|
|
22
21
|
self.__extend_info = None # type: str
|
|
23
22
|
self.__wallet = None # type: Wallet
|
|
24
23
|
self.__interaction_type = None # type: str
|
|
25
|
-
self.__payment_method_meta_data = None # type: PaymentMethodMetaData
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
@property
|
|
@@ -78,7 +76,7 @@ class PaymentMethodDetail:
|
|
|
78
76
|
@property
|
|
79
77
|
def payment_method_type(self):
|
|
80
78
|
"""
|
|
81
|
-
The type of payment method to be vaulted. The value of this parameter is fixed to CARD. More information: Maximum length: 64 characters
|
|
79
|
+
The type of payment method to be vaulted. The value of this parameter is fixed to CARD. More information: Maximum length: 64 characters
|
|
82
80
|
"""
|
|
83
81
|
return self.__payment_method_type
|
|
84
82
|
|
|
@@ -115,15 +113,6 @@ class PaymentMethodDetail:
|
|
|
115
113
|
@interaction_type.setter
|
|
116
114
|
def interaction_type(self, value):
|
|
117
115
|
self.__interaction_type = value
|
|
118
|
-
@property
|
|
119
|
-
def payment_method_meta_data(self):
|
|
120
|
-
"""Gets the payment_method_meta_data of this PaymentMethodDetail.
|
|
121
|
-
"""
|
|
122
|
-
return self.__payment_method_meta_data
|
|
123
|
-
|
|
124
|
-
@payment_method_meta_data.setter
|
|
125
|
-
def payment_method_meta_data(self, value):
|
|
126
|
-
self.__payment_method_meta_data = value
|
|
127
116
|
|
|
128
117
|
|
|
129
118
|
|
|
@@ -148,8 +137,6 @@ class PaymentMethodDetail:
|
|
|
148
137
|
params['wallet'] = self.wallet
|
|
149
138
|
if hasattr(self, "interaction_type") and self.interaction_type is not None:
|
|
150
139
|
params['interactionType'] = self.interaction_type
|
|
151
|
-
if hasattr(self, "payment_method_meta_data") and self.payment_method_meta_data is not None:
|
|
152
|
-
params['paymentMethodMetaData'] = self.payment_method_meta_data
|
|
153
140
|
return params
|
|
154
141
|
|
|
155
142
|
|
|
@@ -180,6 +167,3 @@ class PaymentMethodDetail:
|
|
|
180
167
|
self.__wallet.parse_rsp_body(response_body['wallet'])
|
|
181
168
|
if 'interactionType' in response_body:
|
|
182
169
|
self.__interaction_type = response_body['interactionType']
|
|
183
|
-
if 'paymentMethodMetaData' in response_body:
|
|
184
|
-
self.__payment_method_meta_data = PaymentMethodMetaData()
|
|
185
|
-
self.__payment_method_meta_data.parse_rsp_body(response_body['paymentMethodMetaData'])
|
|
@@ -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']
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PaymentSessionInvoiceCreation:
|
|
7
|
+
def __init__(self):
|
|
8
|
+
|
|
9
|
+
self.__enabled = None # type: str
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def enabled(self):
|
|
14
|
+
"""
|
|
15
|
+
\"true\" requests an invoice after successful payment; \"false\" disables standalone creation. Omission uses existing whitelist eligibility.
|
|
16
|
+
"""
|
|
17
|
+
return self.__enabled
|
|
18
|
+
|
|
19
|
+
@enabled.setter
|
|
20
|
+
def enabled(self, value):
|
|
21
|
+
self.__enabled = value
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def to_ams_dict(self):
|
|
27
|
+
params = dict()
|
|
28
|
+
if hasattr(self, "enabled") and self.enabled is not None:
|
|
29
|
+
params['enabled'] = self.enabled
|
|
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 'enabled' in response_body:
|
|
37
|
+
self.__enabled = response_body['enabled']
|