Skip to content

Commit bc58fe1

Browse files
author
xufangjie.xfj
committed
[feature aot and registration]
1 parent f9c2f7f commit bc58fe1

22 files changed

+845
-1
lines changed

com/alipay/ams/api/model/address.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def __init__(self):
1212
self.__address1 = None
1313
self.__address2 = None
1414
self.__zip_code = None
15+
self.__label = None
1516

1617
@property
1718
def region(self):
@@ -61,6 +62,14 @@ def zip_code(self):
6162
def zip_code(self, value):
6263
self.__zip_code = value
6364

65+
@property
66+
def label(self):
67+
return self.__label
68+
69+
@label.setter
70+
def label(self, value):
71+
self.__label = value
72+
6473
def to_ams_dict(self):
6574
params = dict()
6675
if hasattr(self, "region") and self.region:
@@ -81,7 +90,10 @@ def to_ams_dict(self):
8190
if hasattr(self, "zip_code") and self.zip_code:
8291
params['zipCode'] = self.zip_code
8392

84-
return
93+
if hasattr(self, "label") and self.label:
94+
params['label'] = self.label
95+
96+
return params
8597

8698
def parse_rsp_body(self, address_body):
8799
if type(address_body) == str:
@@ -104,3 +116,6 @@ def parse_rsp_body(self, address_body):
104116

105117
if 'zipCode' in address_body:
106118
self.__zip_code = address_body['zipCode']
119+
120+
if 'label' in address_body:
121+
self.__label = address_body['label']
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
class Attachment(object):
2+
def __init__(self):
3+
self.__attachment_type = None
4+
self.__file = None
5+
self.__attachment_name = None
6+
7+
@property
8+
def attachment_type(self):
9+
return self.__attachment_type
10+
11+
@attachment_type.setter
12+
def attachment_type(self, value):
13+
self.__attachment_type = value
14+
15+
@property
16+
def file(self):
17+
return self.__file
18+
19+
@file.setter
20+
def file(self, value):
21+
self.__file = value
22+
23+
@property
24+
def attachment_name(self):
25+
return self.__attachment_name
26+
27+
@attachment_name.setter
28+
def attachment_name(self, value):
29+
self.__attachment_name = value
30+
31+
def to_ams_dict(self):
32+
params = dict()
33+
if hasattr(self, "attachment_type") and self.attachment_type:
34+
params['attachmentType'] = self.attachment_type
35+
36+
if hasattr(self, "file") and self.file:
37+
params['file'] = self.file
38+
39+
if hasattr(self, "attachment_name") and self.attachment_name:
40+
params['attachmentName'] = self.attachment_name
41+
42+
return params
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class ContactInfo(object):
2+
def __init__(self):
3+
self.__contact_no = None
4+
self.__contact_type = None
5+
6+
@property
7+
def contact_no(self):
8+
return self.__contact_no
9+
10+
@contact_no.setter
11+
def contact_no(self, value):
12+
self.__contact_no = value
13+
14+
@property
15+
def contact_type(self):
16+
return self.__contact_type
17+
18+
@contact_type.setter
19+
def contact_type(self, value):
20+
self.__contact_type = value
21+
22+
def to_ams_dict(self):
23+
params = dict()
24+
if hasattr(self, "contact_no") and self.contact_no:
25+
params['contactNo'] = self.contact_no
26+
27+
if hasattr(self, "contact_type") and self.contact_type:
28+
params['contactType'] = self.contact_type
29+
30+
return params

com/alipay/ams/api/model/logo.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
class Logo(object):
2+
3+
def __init__(self):
4+
self.__logo_name = None
5+
self.__logo_url = None
6+
7+
@property
8+
def logo_name(self):
9+
return self.__logo_name
10+
11+
@logo_name.setter
12+
def logo_name(self, value):
13+
self.__logo_name = value
14+
15+
@property
16+
def logo_url(self):
17+
return self.__logo_url
18+
19+
@logo_url.setter
20+
def logo_url(self, value):
21+
self.__logo_url = value
22+
23+
def to_ams_dict(self):
24+
params = dict()
25+
if hasattr(self, "logo_name") and self.logo_name:
26+
params['logoName'] = self.logo_name
27+
28+
if hasattr(self, "logo_url") and self.logo_url:
29+
params['logoUrl'] = self.logo_url
30+
31+
return params

com/alipay/ams/api/model/merchant.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def __init__(self):
1010
self.__merchant_display_name = None
1111
self.__merchant_address = None
1212
self.__merchant_register_date = None
13+
self.__merchant_type = None
1314
self.__store = None
1415

1516
@property
@@ -60,6 +61,14 @@ def merchant_register_date(self):
6061
def merchant_register_date(self, value):
6162
self.__merchant_register_date = value
6263

64+
@property
65+
def merchant_type(self):
66+
return self.__merchant_type
67+
68+
@merchant_type.setter
69+
def merchant_type(self, value):
70+
self.__merchant_type = value
71+
6372
@property
6473
def store(self):
6574
return self.__store
@@ -88,6 +97,9 @@ def to_ams_dict(self):
8897
if hasattr(self, "merchant_register_date") and self.merchant_register_date:
8998
params['merchantRegisterDate'] = self.merchant_register_date
9099

100+
if hasattr(self, "merchant_type") and self.merchant_type:
101+
params['merchantType'] = self.merchant_type
102+
91103
if hasattr(self, "store") and self.store:
92104
params['store'] = self.store
93105

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
class MerchantRegistrationInfo(object):
2+
def __init__(self):
3+
self.__reference_merchant_id = None
4+
self.__merchant_display_name = None
5+
self.__merchant_mcc = None
6+
self.__logo = None
7+
self.__websites = None
8+
self.__merchant_address = None
9+
self.__registration_detail = None
10+
11+
@property
12+
def reference_merchant_id(self):
13+
return self.__reference_merchant_id
14+
15+
@reference_merchant_id.setter
16+
def reference_merchant_id(self, value):
17+
self.__reference_merchant_id = value
18+
19+
@property
20+
def merchant_display_name(self):
21+
return self.__merchant_display_name
22+
23+
@merchant_display_name.setter
24+
def merchant_display_name(self, value):
25+
self.__merchant_display_name = value
26+
27+
@property
28+
def merchant_mcc(self):
29+
return self.__merchant_mcc
30+
31+
@merchant_mcc.setter
32+
def merchant_mcc(self, value):
33+
self.__merchant_mcc = value
34+
35+
@property
36+
def logo(self):
37+
return self.__logo
38+
39+
@logo.setter
40+
def logo(self, value):
41+
self.__logo = value
42+
43+
@property
44+
def websites(self):
45+
return self.__websites
46+
47+
@websites.setter
48+
def websites(self, value):
49+
self.__websites = value
50+
51+
@property
52+
def merchant_address(self):
53+
return self.__merchant_address
54+
55+
@merchant_address.setter
56+
def merchant_address(self, value):
57+
self.__merchant_address = value
58+
59+
@property
60+
def registration_detail(self):
61+
return self.__registration_detail
62+
63+
@registration_detail.setter
64+
def registration_detail(self, value):
65+
self.__registration_detail = value
66+
67+
def to_ams_dict(self):
68+
params = dict()
69+
if hasattr(self, "reference_merchant_id") and self.reference_merchant_id:
70+
params['referenceMerchantId'] = self.reference_merchant_id
71+
72+
if hasattr(self, "merchant_display_name") and self.merchant_display_name:
73+
params['merchantDisplayName'] = self.merchant_display_name
74+
75+
if hasattr(self, "merchant_mcc") and self.merchant_mcc:
76+
params['merchantMCC'] = self.merchant_mcc
77+
78+
if hasattr(self, "logo") and self.logo:
79+
params['logo'] = self.logo
80+
81+
if hasattr(self, "websites") and self.websites:
82+
params['websites'] = self.websites
83+
84+
if hasattr(self, "merchant_address") and self.merchant_address:
85+
params['merchantAddress'] = self.merchant_address
86+
87+
if hasattr(self, "registration_detail") and self.registration_detail:
88+
params['registrationDetail'] = self.registration_detail
89+
90+
return params
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from enum import Enum, unique
2+
3+
@unique
4+
class MerchantType(Enum):
5+
INDIVIDUAL = "INDIVIDUAL"
6+
ENTERPRISE = "ENTERPRISE"
7+
8+
def to_ams_dict(self):
9+
return self.name

com/alipay/ams/api/model/payment_factor.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class PaymentFactor(object):
66
def __init__(self):
77
self.__is_payment_evaluation = None
88
self.__in_store_payment_scenario = None
9+
self.__presentment_mode = None
910

1011
@property
1112
def is_payment_evaluation(self):
@@ -23,6 +24,14 @@ def in_store_payment_scenario(self):
2324
def in_store_payment_scenario(self, value):
2425
self.__in_store_payment_scenario = value
2526

27+
@property
28+
def presentment_mode(self):
29+
return self.__presentment_mode
30+
31+
@presentment_mode.setter
32+
def presentment_mode(self, value):
33+
self.__presentment_mode = value
34+
2635
def to_ams_dict(self):
2736
params = dict()
2837
if hasattr(self, "is_payment_evaluation") and self.__is_payment_evaluation:
@@ -31,4 +40,7 @@ def to_ams_dict(self):
3140
if hasattr(self, "in_store_payment_scenario") and self.in_store_payment_scenario:
3241
params['inStorePaymentScenario'] = self.in_store_payment_scenario
3342

43+
if hasattr(self, "presentment_mode") and self.presentment_mode:
44+
params['presentmentMode'] = self.presentment_mode
45+
3446
return params
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from enum import Enum, unique
2+
3+
@unique
4+
class PresentmentMode(Enum):
5+
BUNDLE = "BUNDLE"
6+
7+
def to_ams_dict(self):
8+
return self.name

0 commit comments

Comments
 (0)