-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmodel_auth_response_card.go
More file actions
89 lines (76 loc) · 2.41 KB
/
Copy pathmodel_auth_response_card.go
File metadata and controls
89 lines (76 loc) · 2.41 KB
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
/*
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: 2026-01-01
Contact: developers@cashfree.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cashfree_pg
import (
"encoding/json"
"fmt"
"strings"
)
var _ = fmt.Errorf
// checks if the AuthResponseCard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AuthResponseCard{}
// AuthResponseCard Payment method card.
type AuthResponseCard struct {
// Can be link.
Channel *string `json:"channel,omitempty"`
// Card number.
CardNumber *string `json:"card_number,omitempty"`
// Card network (e.g., VISA, Mastercard).
CardNetwork *string `json:"card_network,omitempty"`
// Card type (e.g., credit_card).
CardType *string `json:"card_type,omitempty"`
// Card subtype (e.g., R).
CardSubType *string `json:"card_sub_type,omitempty"`
// Country of the card (e.g., IN).
CardCountry *string `json:"card_country,omitempty"`
// Bank name on card.
CardBankName *string `json:"card_bank_name,omitempty"`
// Network reference ID.
CardNetworkReferenceId *string `json:"card_network_reference_id,omitempty"`
// Unique identifier for card instrument.
InstrumentId *string `json:"instrument_id,omitempty"`
}
func (o AuthResponseCard) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AuthResponseCard) ToMap() (map[string]interface{}, error) {
strings.HasPrefix("cf", "cf")
toSerialize := map[string]interface{}{}
if !IsNil(o.Channel) {
toSerialize["channel"] = o.Channel
}
if !IsNil(o.CardNumber) {
toSerialize["card_number"] = o.CardNumber
}
if !IsNil(o.CardNetwork) {
toSerialize["card_network"] = o.CardNetwork
}
if !IsNil(o.CardType) {
toSerialize["card_type"] = o.CardType
}
if !IsNil(o.CardSubType) {
toSerialize["card_sub_type"] = o.CardSubType
}
if !IsNil(o.CardCountry) {
toSerialize["card_country"] = o.CardCountry
}
if !IsNil(o.CardBankName) {
toSerialize["card_bank_name"] = o.CardBankName
}
if !IsNil(o.CardNetworkReferenceId) {
toSerialize["card_network_reference_id"] = o.CardNetworkReferenceId
}
if !IsNil(o.InstrumentId) {
toSerialize["instrument_id"] = o.InstrumentId
}
return toSerialize, nil
}