-
Notifications
You must be signed in to change notification settings - Fork 3
/
partner_applyment.go
136 lines (124 loc) · 5.56 KB
/
partner_applyment.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
// Copyright 2022 YBCZ, Inc. All rights reserved.
//
// Use of this source code is governed by a MIT license
// that can be found in the LICENSE file in the root of the source
// tree.
package mch_api_v3
// PartnerApplymentSubjectType 主体类型
type PartnerApplymentSubjectType string
const (
// PartnerApplymentSubjectTypePerson 个体户
PartnerApplymentSubjectTypePerson = "SUBJECT_TYPE_INDIVIDUAL"
// PartnerApplymentSubjectTypeEnterprise 企业
PartnerApplymentSubjectTypeEnterprise = "SUBJECT_TYPE_ENTERPRISE"
)
// PartnerApplymentIDType 证件类型
type PartnerApplymentIDType string
// PartnerApplymentIDCard 银行账户类型
const PartnerApplymentIDCard = "IDENTIFICATION_TYPE_IDCARD"
// PartnerApplymentBankAccountType 银行账户类型
type PartnerApplymentBankAccountType string
const (
// PartnerApplymentBankAccountTypeCorporate 对公银行账户
PartnerApplymentBankAccountTypeCorporate = "BANK_ACCOUNT_TYPE_CORPORATE"
// PartnerApplymentBankAccountTypePersonal 经营者个人银行卡
PartnerApplymentBankAccountTypePersonal = "BANK_ACCOUNT_TYPE_PERSONAL"
)
// PartnerApplymentReq 进件申请单
type PartnerApplymentReq struct {
BusinessCode string `json:"business_code"`
ContactInfo struct {
ContactType string `json:"contact_type"`
ContactName string `json:"contact_name"`
ContactIdNumber string `json:"contact_id_number,omitempty"`
OpenId string `json:"open_id,omitempty"`
MobilePhone string `json:"mobile_phone"`
ContactEmail string `json:"contact_email"`
} `json:"contact_info"`
SubjectInfo struct {
SubjectType PartnerApplymentSubjectType `json:"subject_type"`
BusinessLicenseInfo struct {
LicenseCopy string `json:"license_copy"`
LicenseNumber string `json:"license_number"`
MerchantName string `json:"merchant_name"`
LegalPerson string `json:"legal_person"`
PeriodBegin *string `json:"period_begin,omitempty"`
PeriodEnd *string `json:"period_end,omitempty"`
} `json:"business_license_info,omitempty"`
IdentityInfo struct {
IdDocType PartnerApplymentIDType `json:"id_doc_type"`
IdCardInfo struct {
IdCardCopy string `json:"id_card_copy"`
IdCardNational string `json:"id_card_national"`
IdCardName string `json:"id_card_name"`
IdCardNumber string `json:"id_card_number"`
IdCardAddress string `json:"id_card_address"`
CardPeriodBegin string `json:"card_period_begin"`
CardPeriodEnd string `json:"card_period_end"`
} `json:"id_card_info"`
Owner *bool `json:"owner,omitempty"`
} `json:"identity_info"`
} `json:"subject_info"`
BusinessInfo struct {
MerchantShortname string `json:"merchant_shortname"`
ServicePhone string `json:"service_phone"`
SalesInfo struct {
SalesScenesType []string `json:"sales_scenes_type"`
BizStoreInfo struct {
BizStoreName string `json:"biz_store_name"`
BizAddressCode string `json:"biz_address_code"`
BizStoreAddress string `json:"biz_store_address"`
StoreEntrancePic []string `json:"store_entrance_pic"`
IndoorPic []string `json:"indoor_pic"`
BizSubAppid string `json:"biz_sub_appid,omitempty"`
} `json:"biz_store_info"`
} `json:"sales_info"`
} `json:"business_info"`
SettlementInfo struct {
SettlementId string `json:"settlement_id"`
QualificationType string `json:"qualification_type"`
Qualifications []string `json:"qualifications,omitempty"`
ActivitiesId string `json:"activities_id,omitempty"`
ActivitiesRate string `json:"activities_rate,omitempty"`
ActivitiesAdditions []string `json:"activities_additions,omitempty"`
} `json:"settlement_info"`
BankAccountInfo struct {
BankAccountType PartnerApplymentBankAccountType `json:"bank_account_type"`
AccountName string `json:"account_name"`
AccountBank string `json:"account_bank"`
BankAddressCode string `json:"bank_address_code"`
BankBranchId string `json:"bank_branch_id,omitempty"`
BankName string `json:"bank_name,omitempty"`
AccountNumber string `json:"account_number"`
} `json:"bank_account_info"`
AdditionInfo struct {
BusinessAdditionPics []string `json:"business_addition_pics,omitempty"`
} `json:"addition_info,omitempty"`
}
type PartnerApplymentResp struct {
ApplymentId int64 `json:"applyment_id"`
}
type PartnerApplymentState string
const (
PartnerApplymentStateEditing = "APPLYMENT_STATE_EDITTING"
PartnerApplymentStateAuditing = "APPLYMENT_STATE_AUDITING"
PartnerApplymentStateRejected = "APPLYMENT_STATE_REJECTED"
PartnerApplymentStateBeConfirm = "APPLYMENT_STATE_TO_BE_CONFIRMED"
PartnerApplymentStateBeSigned = "APPLYMENT_STATE_TO_BE_SIGNED"
PartnerApplymentStateSigning = "APPLYMENT_STATE_SIGNING"
PartnerApplymentStateFinished = "APPLYMENT_STATE_FINISHED"
PartnerApplymentStateCanceled = "APPLYMENT_STATE_CANCELED"
)
type PartnerApplymentQueryResp struct {
BusinessCode string `json:"business_code"`
ApplymentId int64 `json:"applyment_id"`
SubMchid *string `json:"sub_mchid,omitempty"`
SignUrl *string `json:"sign_url,omitempty"`
ApplymentState PartnerApplymentState `json:"applyment_state"`
ApplymentStateMsg string `json:"applyment_state_msg"`
AuditDetail []struct {
Field string `json:"field"`
FieldName string `json:"field_name"`
RejectReason string `json:"reject_reason"`
} `json:"audit_detail,omitempty"`
}