-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_adjust_vendor_balance_request.go
61 lines (48 loc) · 1.8 KB
/
model_adjust_vendor_balance_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
/*
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: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
"strings"
)
// checks if the AdjustVendorBalanceRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdjustVendorBalanceRequest{}
// AdjustVendorBalanceRequest Adjust Vendor Balance Request
type AdjustVendorBalanceRequest struct {
// Mention to whom you want to transfer the on demand balance. Possible values - MERCHANT, VENDOR.
TransferFrom string `json:"transfer_from"`
// Mention the type of transfer. Possible values: ON_DEMAND.
TransferType string `json:"transfer_type"`
// Mention the on demand transfer amount.
TransferAmount float32 `json:"transfer_amount"`
// Mention remarks if any for the on demand transfer.
Remark *string `json:"remark,omitempty"`
// Provide additional data fields using tags.
Tags map[string]interface{} `json:"tags,omitempty"`
}
func (o AdjustVendorBalanceRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdjustVendorBalanceRequest) ToMap() (map[string]interface{}, error) {
strings.HasPrefix("cf", "cf")
toSerialize := map[string]interface{}{}
toSerialize["transfer_from"] = o.TransferFrom
toSerialize["transfer_type"] = o.TransferType
toSerialize["transfer_amount"] = o.TransferAmount
if !IsNil(o.Remark) {
toSerialize["remark"] = o.Remark
}
if !IsNil(o.Tags) {
toSerialize["tags"] = o.Tags
}
return toSerialize, nil
}