-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodel_create_vendor_request.go
85 lines (72 loc) · 3.37 KB
/
model_create_vendor_request.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
/*
Cashfree Payment Gateway APIs
Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.
API version: 2023-08-01
Contact: developers@cashfree.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
"strings"
)
// checks if the CreateVendorRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateVendorRequest{}
// CreateVendorRequest Create Vendor Request
type CreateVendorRequest struct {
// Specify the unique Vendor ID to identify the beneficiary. Alphanumeric and underscore (_) allowed.
VendorId string `json:"vendor_id"`
// Specify the status of vendor that should be updated. Possible values: ACTIVE,BLOCKED, DELETED
Status string `json:"status"`
// Specify the name of the vendor to be updated. Name should not have any special character except . / - &
Name string `json:"name"`
// Specify the vendor email ID that should be updated. String in email ID format (Ex:johndoe_1@cashfree.com) should contain @ and dot (.)
Email string `json:"email"`
// Specify the beneficiaries phone number to be updated. Phone number registered in India (only digits, 8 - 12 characters after excluding +91).
Phone string `json:"phone"`
// Specify if the vendor bank account details should be verified. Possible values: true or false
VerifyAccount *bool `json:"verify_account,omitempty"`
// Update if the vendor will have dashboard access or not. Possible values are: true or false
DashboardAccess *bool `json:"dashboard_access,omitempty"`
// Specify the settlement cycle to be updated. View the settlement cycle details from the \"Settlement Cycles Supported\" table. If no schedule option is configured, the settlement cycle ID \"1\" will be in effect. Select \"8\" or \"9\" if you want to schedule instant vendor settlements.
ScheduleOption *float32 `json:"schedule_option,omitempty"`
// Specify the vendor bank account details to be updated.
Bank []BankDetails `json:"bank,omitempty"`
// Updated beneficiary upi vpa. Alphanumeric, dot (.), hyphen (-), at sign (@), and underscore allowed (100 character limit). Note: underscore and dot (.) gets accepted before and after @, but hyphen (-) is only accepted before @ sign.
Upi []UpiDetails `json:"upi,omitempty"`
// Specify the kyc details that should be updated.
KycDetails []KycDetails `json:"kyc_details"`
}
func (o CreateVendorRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateVendorRequest) ToMap() (map[string]interface{}, error) {
strings.HasPrefix("cf", "cf")
toSerialize := map[string]interface{}{}
toSerialize["vendor_id"] = o.VendorId
toSerialize["status"] = o.Status
toSerialize["name"] = o.Name
toSerialize["email"] = o.Email
toSerialize["phone"] = o.Phone
if !IsNil(o.VerifyAccount) {
toSerialize["verify_account"] = o.VerifyAccount
}
if !IsNil(o.DashboardAccess) {
toSerialize["dashboard_access"] = o.DashboardAccess
}
if !IsNil(o.ScheduleOption) {
toSerialize["schedule_option"] = o.ScheduleOption
}
if !IsNil(o.Bank) {
toSerialize["bank"] = o.Bank
}
if !IsNil(o.Upi) {
toSerialize["upi"] = o.Upi
}
toSerialize["kyc_details"] = o.KycDetails
return toSerialize, nil
}