-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodel_authorization_in_payments_entity.go
82 lines (69 loc) · 2.4 KB
/
model_authorization_in_payments_entity.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
/*
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 AuthorizationInPaymentsEntity type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthorizationInPaymentsEntity{}
// AuthorizationInPaymentsEntity If preauth enabled for account you will get this body
type AuthorizationInPaymentsEntity struct {
// One of CAPTURE or VOID
Action *string `json:"action,omitempty"`
// One of SUCCESS or PENDING
Status *string `json:"status,omitempty"`
// The captured amount for this authorization request
CapturedAmount *float32 `json:"captured_amount,omitempty"`
// Start time of this authorization hold (only for UPI)
StartTime *string `json:"start_time,omitempty"`
// End time of this authorization hold (only for UPI)
EndTime *string `json:"end_time,omitempty"`
// Approve by time as passed in the authorization request (only for UPI)
ApproveBy *string `json:"approve_by,omitempty"`
// CAPTURE or VOID reference number based on action
ActionReference *string `json:"action_reference,omitempty"`
// Time of action (CAPTURE or VOID)
ActionTime *string `json:"action_time,omitempty"`
}
func (o AuthorizationInPaymentsEntity) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthorizationInPaymentsEntity) ToMap() (map[string]interface{}, error) {
strings.HasPrefix("cf", "cf")
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.CapturedAmount) {
toSerialize["captured_amount"] = o.CapturedAmount
}
if !IsNil(o.StartTime) {
toSerialize["start_time"] = o.StartTime
}
if !IsNil(o.EndTime) {
toSerialize["end_time"] = o.EndTime
}
if !IsNil(o.ApproveBy) {
toSerialize["approve_by"] = o.ApproveBy
}
if !IsNil(o.ActionReference) {
toSerialize["action_reference"] = o.ActionReference
}
if !IsNil(o.ActionTime) {
toSerialize["action_time"] = o.ActionTime
}
return toSerialize, nil
}