Skip to content

Commit 1e2f479

Browse files
committed
python p1
1 parent bd1b1e9 commit 1e2f479

33 files changed

+1349
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from enum import Enum, unique
2+
3+
4+
@unique
5+
class AccountHolderType(Enum):
6+
INDIVIDUAL = "INDIVIDUAL"
7+
ENTERPRISE = "ENTERPRISE"
8+
9+
def to_ams_dict(self):
10+
return self.name
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
from enum import Enum, unique
3+
4+
5+
@unique
6+
class AccountType(Enum):
7+
CHECKING = "CHECKING"
8+
FIXED_DEPOSIT = "FIXED_DEPOSIT"
9+
10+
def to_ams_dict(self):
11+
return self.name

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ def parse_rsp_body(self, amount_body):
3636

3737
if 'value' in amount_body:
3838
self.__value = amount_body['value']
39+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
from enum import Enum, unique
3+
4+
5+
@unique
6+
class AssociationType(Enum):
7+
LEGAL_REPRESENTATIVE = "LEGAL_REPRESENTATIVE"
8+
UBO = "UBO"
9+
CONTACT = "CONTACT"
10+
DIRECTOR = "DIRECTOR"
11+
AUTHORIZER = "AUTHORIZER"
12+
BOARD_MEMBER = "BOARD_MEMBER"
13+
14+
def to_ams_dict(self):
15+
return self.name

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ def __init__(self):
33
self.__attachment_type = None
44
self.__file = None
55
self.__attachment_name = None
6+
self.__file_key = None
67

78
@property
89
def attachment_type(self):
@@ -28,6 +29,14 @@ def attachment_name(self):
2829
def attachment_name(self, value):
2930
self.__attachment_name = value
3031

32+
@property
33+
def file_key(self):
34+
return self.__file_key
35+
36+
@file_key.setter
37+
def file_key(self, value):
38+
self.__file_key = value
39+
3140
def to_ams_dict(self):
3241
params = dict()
3342
if hasattr(self, "attachment_type") and self.attachment_type:
@@ -39,4 +48,7 @@ def to_ams_dict(self):
3948
if hasattr(self, "attachment_name") and self.attachment_name:
4049
params['attachmentName'] = self.attachment_name
4150

51+
if hasattr(self, "file_key") and self.file_key:
52+
params['fileKey'] = self.file_key
53+
4254
return params
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
3+
from enum import Enum, unique
4+
5+
6+
@unique
7+
class AttachmentType(Enum):
8+
SIGNATURE_AUTHORIZATION_LETTER = "SIGNATURE_AUTHORIZATION_LETTER"
9+
ARTICLES_OF_ASSOCIATION = "ARTICLES_OF_ASSOCIATION"
10+
LOGO = "LOGO"
11+
AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER = "AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER"
12+
ASSOCIATION_ARTICLE = "ASSOCIATION_ARTICLE"
13+
FINANCIAL_REPORT = "FINANCIAL_REPORT"
14+
OWNERSHIP_STRUCTURE_PIC = "OWNERSHIP_STRUCTURE_PIC"
15+
ADDRESS_PROOF = "ADDRESS_PROOF"
16+
UBO_PROVE = "UBO_PROVE"
17+
ENTERPRISE_REGISTRATION = "ENTERPRISE_REGISTRATION"
18+
LICENSE_INFO = "LICENSE_INFO"
19+
ID_CARD = "ID_CARD"
20+
PASSPORT = "PASSPORT"
21+
DRIVING_LICENSE = "DRIVING_LICENSE"
22+
CPF = "CPF"
23+
CNPJ = "CNPJ"
24+
25+
def to_ams_dict(self):
26+
return self.name
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
from com.alipay.ams.api.model.web_site import WebSite
2+
3+
4+
class BusinessInfo:
5+
def __int__(self):
6+
self.__mcc = None
7+
self.__websites = None #type: list[WebSite]
8+
self.__englishName = None
9+
self.__doingBusinessAs = None
10+
self.__mainSalesCountry = None
11+
self.__appName = None
12+
self.__serviceDescription = None
13+
14+
@property
15+
def mcc(self):
16+
return self.__mcc
17+
18+
@mcc.setter
19+
def mcc(self, value):
20+
self.__mcc = value
21+
22+
@property
23+
def websites(self):
24+
return self.__websites
25+
26+
@websites.setter
27+
def websites(self, value):
28+
self.__websites = value
29+
30+
@property
31+
def englishName(self):
32+
return self.__englishName
33+
34+
@englishName.setter
35+
def englishName(self, value):
36+
self.__englishName = value
37+
38+
@property
39+
def doingBusinessAs(self):
40+
return self.__doingBusinessAs
41+
42+
@doingBusinessAs.setter
43+
def doingBusinessAs(self, value):
44+
self.__doingBusinessAs = value
45+
46+
@property
47+
def mainSalesCountry(self):
48+
return self.__mainSalesCountry
49+
50+
@mainSalesCountry.setter
51+
def mainSalesCountry(self, value):
52+
self.__mainSalesCountry = value
53+
54+
@property
55+
def appName(self):
56+
return self.__appName
57+
58+
@appName.setter
59+
def appName(self, value):
60+
self.__appName = value
61+
62+
@property
63+
def serviceDescription(self):
64+
return self.__serviceDescription
65+
66+
@serviceDescription.setter
67+
def serviceDescription(self, value):
68+
self.__serviceDescription = value
69+
70+
def to_ams_dict(self):
71+
params = dict()
72+
if hasattr(self, 'mcc') and self.mcc:
73+
params['mcc'] = self.mcc
74+
if hasattr(self, 'websites') and self.websites:
75+
params['websites'] = []
76+
for i in self.websites:
77+
params['websites'].append(i.to_ams_dict())
78+
if hasattr(self, 'englishName') and self.englishName:
79+
params['englishName'] = self.englishName
80+
if hasattr(self, 'doingBusinessAs') and self.doingBusinessAs:
81+
params['doingBusinessAs'] = self.doingBusinessAs
82+
if hasattr(self, 'mainSalesCountry') and self.mainSalesCountry:
83+
params['mainSalesCountry'] = self.mainSalesCountry
84+
if hasattr(self, 'appName') and self.appName:
85+
params['appName'] = self.appName
86+
if hasattr(self, 'serviceDescription') and self.serviceDescription:
87+
params['serviceDescription'] = self.serviceDescription
88+
return params
89+

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

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
from com.alipay.ams.api.model.companyType import CompanyType
2+
from com.alipay.ams.api.model.address import Address
3+
from com.alipay.ams.api.model.attachment import Attachment
4+
from com.alipay.ams.api.model.certificate import Certificate
5+
from com.alipay.ams.api.model.company_unit_type import CompanyUnitType
6+
from com.alipay.ams.api.model.contact import Contact
7+
from com.alipay.ams.api.model.stock_info import StockInfo
8+
9+
10+
class Company:
11+
def __int__(self):
12+
self.__legal_name = None
13+
self.__company_type = None #type:CompanyType
14+
self.__registered_address = None #type:Address
15+
self.__operating_address = None #type:Address
16+
self.__incorporation_date = None
17+
self.__stock_info = None #type:StockInfo
18+
self.__certificates = None #type:Certificate
19+
self.__attachments = None #type: list[Attachment]
20+
self.__company_unit = None #type: CompanyUnitType
21+
self.__contacts = None #type: list[Contact]
22+
self.__vatNo = None
23+
24+
@property
25+
def legal_name(self):
26+
return self.__legal_name
27+
28+
@legal_name.setter
29+
def legal_name(self, value):
30+
self.__legal_name = value
31+
32+
@property
33+
def company_type(self):
34+
return self.__company_type
35+
36+
@company_type.setter
37+
def company_type(self, value):
38+
self.__company_type = value
39+
40+
@property
41+
def registered_address(self):
42+
return self.__registered_address
43+
44+
@registered_address.setter
45+
def registered_address(self, value):
46+
self.__registered_address = value
47+
48+
@property
49+
def operating_address(self):
50+
return self.__operating_address
51+
52+
@operating_address.setter
53+
def operating_address(self, value):
54+
self.__operating_address = value
55+
56+
@property
57+
def incorporation_date(self):
58+
return self.__incorporation_date
59+
60+
@incorporation_date.setter
61+
def incorporation_date(self, value):
62+
self.__incorporation_date = value
63+
64+
@property
65+
def stock_info(self):
66+
return self.__stock_info
67+
68+
@stock_info.setter
69+
def stock_info(self, value):
70+
self.__stock_info = value
71+
72+
@property
73+
def certificates(self):
74+
return self.__certificates
75+
76+
@certificates.setter
77+
def certificates(self, value):
78+
self.__certificates = value
79+
80+
@property
81+
def attachments(self):
82+
return self.__attachments
83+
84+
@attachments.setter
85+
def attachments(self, value):
86+
self.__attachments = value
87+
88+
@property
89+
def company_unit(self):
90+
return self.__company_unit
91+
92+
@company_unit.setter
93+
def company_unit(self, value):
94+
self.__company_unit = value
95+
96+
@property
97+
def contacts(self):
98+
return self.__contacts
99+
100+
@contacts.setter
101+
def contacts(self, value):
102+
self.__contacts = value
103+
104+
@property
105+
def vatNo(self):
106+
return self.__vatNo
107+
@vatNo.setter
108+
def vatNo(self, value):
109+
self.__vatNo = value
110+
111+
def to_ams_dict(self):
112+
params = dict()
113+
if hasattr(self, 'legal_name') and self.legal_name:
114+
params['legalName'] = self.legal_name
115+
if hasattr(self, 'company_type') and self.company_type:
116+
params['companyType'] = self.company_type.value
117+
if hasattr(self, 'registered_address') and self.registered_address:
118+
params['registeredAddress'] = self.registered_address.to_ams_dict()
119+
if hasattr(self, 'operating_address') and self.operating_address:
120+
params['operatingAddress'] = self.operating_address.to_ams_dict()
121+
if hasattr(self, 'incorporation_date') and self.incorporation_date:
122+
params['incorporationDate'] = self.incorporation_date
123+
if hasattr(self, 'stock_info') and self.stock_info:
124+
params['stockInfo'] = self.stock_info.to_ams_dict()
125+
if hasattr(self, 'certificates') and self.certificates:
126+
params['certificates'] = self.certificates
127+
if hasattr(self, 'attachments') and self.attachments:
128+
params['attachments'] = self.attachments
129+
for i in range(len(self.attachments)):
130+
params['attachments'][i] = self.attachments[i].to_ams_dict()
131+
params['attachments'] = params['attachments']
132+
if hasattr(self, 'company_unit') and self.company_unit:
133+
params['companyUnit'] = self.company_unit.value
134+
if hasattr(self, 'contacts') and self.contacts:
135+
params['contacts'] = self.contacts
136+
for i in range(len(self.contacts)):
137+
params['contacts'][i] = self.contacts[i].to_ams_dict()
138+
params['contacts'] = params['contacts']
139+
if hasattr(self, 'vatNo') and self.vatNo:
140+
params['vatNo'] = self.vatNo
141+
return params
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from enum import Enum, unique
2+
3+
4+
@unique
5+
class CompanyType(Enum):
6+
ENTERPRISE = "ENTERPRISE"
7+
PARTNERSHIP = "PARTNERSHIP"
8+
SOLE_PROPRIETORSHIP = "SOLE_PROPRIETORSHIP"
9+
STATE_OWNED_BUSINESS = "STATE_OWNED_BUSINESS"
10+
PRIVATELY_OWNED_BUSINESS = "PRIVATELY_OWNED_BUSINESS"
11+
PUBLICLY_LISTED_BUSINESS = "PUBLICLY_LISTED_BUSINESS"
12+
LTDA = "LTDA"
13+
SA = "SA"
14+
EIRELI = "EIRELI"
15+
BOFC = "BOFC"
16+
MEI = "MEI"
17+
EI = "EI"
18+
19+
def to_ams_dict(self):
20+
return self.name
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from enum import Enum, unique
2+
3+
4+
@unique
5+
class CompanyUnitType(Enum):
6+
HEADQUARTER = "HEADQUARTER"
7+
BRANCH = "BRANCH"
8+
9+
def to_ams_dict(self):
10+
return self.name

0 commit comments

Comments
 (0)