forked from checkout/checkout-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.go
142 lines (119 loc) · 5.14 KB
/
common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package accounts
import "github.com/PaddleHQ/checkout-sdk-go/common"
type BusinessType string
const (
GeneralPartnership BusinessType = "general_partnership"
LimitedPartnership BusinessType = "limited_partnership"
PublicLimitedCompany BusinessType = "public_limited_company"
LimitedCompany BusinessType = "limited_company"
ProfessionalAssociation BusinessType = "professional_association"
UnincorporatedAssociation BusinessType = "unincorporated_association"
AutoEntrepreneur BusinessType = "auto_entrepreneur"
)
type (
ContactDetails struct {
Phone *Phone `json:"phone,omitempty"`
EntityEmailAddresses *EntityEmailAddresses `json:"email_addresses,omitempty"`
}
EntityEmailAddresses struct {
Primary string `json:"primary,omitempty"`
}
Profile struct {
Urls []string `json:"urls,omitempty"`
Mccs []string `json:"mccs,omitempty"`
DefaultHoldingCurrency common.Currency `json:"default_holding_currency,omitempty"`
}
Company struct {
BusinessRegistrationNumber string `json:"business_registration_number,omitempty"`
BusinessType BusinessType `json:"business_type,omitempty"`
LegalName string `json:"legal_name,omitempty"`
TradingName string `json:"trading_name,omitempty"`
PrincipalAddress *common.Address `json:"principal_address,omitempty"`
RegisteredAddress *common.Address `json:"registered_address,omitempty"`
Document *EntityDocument `json:"document,omitempty"`
Representatives []Representative `json:"representatives,omitempty"`
FinancialDetails *EntityFinancialDetails `json:"financial_details,omitempty"`
}
EntityDocument struct {
Type string `json:"type,omitempty"`
FileId string `json:"file_id,omitempty"`
}
Representative struct {
FirstName string `json:"first_name,omitempty"`
MiddleName string `json:"middle_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Address *common.Address `json:"address,omitempty"`
Identification *Identification `json:"identification,omitempty"`
Phone *Phone `json:"phone,omitempty"`
DateOfBirth *DateOfBirth `json:"date_of_birth,omitempty"`
PlaceOfBirth *PlaceOfBirth `json:"place_of_birth,omitempty"`
Roles []string `json:"roles,omitempty"`
}
Identification struct {
NationalIdNumber string `json:"national_id_number,omitempty"`
Document *Document `json:"document,omitempty"`
}
Document struct {
Type common.DocumentType `json:"type,omitempty"`
Front string `json:"front,omitempty"`
Back string `json:"back,omitempty"`
}
Phone struct {
Number string `json:"number,omitempty"`
}
DateOfBirth struct {
Day int `json:"day,omitempty"`
Month int `json:"month,omitempty"`
Year int `json:"year,omitempty"`
}
PlaceOfBirth struct {
Country common.Country `json:"country,omitempty"`
}
Individual struct {
FirstName string `json:"first_name,omitempty"`
MiddleName string `json:"middle_name,omitempty"`
LastName string `json:"last_name,omitempty"`
TradingName string `json:"trading_name,omitempty"`
NationalTaxId string `json:"national_tax_id,omitempty"`
RegisteredAddress *common.Address `json:"registered_address,omitempty"`
DateOfBirth *DateOfBirth `json:"date_of_birth,omitempty"`
PlaceOfBirth *PlaceOfBirth `json:"place_of_birth,omitempty"`
Identification *Identification `json:"identification,omitempty"`
}
Capabilities struct {
Payments *Payments `json:"payments,omitempty"`
Payouts *Payouts `json:"payouts,omitempty"`
}
Payments struct {
Available bool `json:"available,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
Payouts struct {
Available bool `json:"available,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
RequirementsDue struct {
Field string `json:"field,omitempty"`
Reason string `json:"reason,omitempty"`
}
Instrument struct {
Id string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Status InstrumentStatus `json:"status,omitempty"`
Document *InstrumentDocument `json:"document,omitempty"`
}
InstrumentDocument struct {
Type string `json:"type,omitempty"`
FileId string `json:"file_id,omitempty"`
}
EntityFinancialDetails struct {
AnnualProcessingVolume int64 `json:"annual_processing_volume,omitempty"`
AverageTransactionValue int64 `json:"average_transaction_value,omitempty"`
HighestTransactionValue int64 `json:"highest_transaction_value,omitempty"`
Documents *EntityFinancialDocuments `json:"documents,omitempty"`
}
EntityFinancialDocuments struct {
BankStatement *EntityDocument `json:"bank_statement,omitempty"`
FinancialStatement *EntityDocument `json:"financial_statement,omitempty"`
}
)