-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_create_subscription_payment_request_card.go
82 lines (69 loc) · 2.2 KB
/
model_create_subscription_payment_request_card.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: 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 CreateSubscriptionPaymentRequestCard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateSubscriptionPaymentRequestCard{}
// CreateSubscriptionPaymentRequestCard payment method card.
type CreateSubscriptionPaymentRequestCard struct {
// Channel. can be link
Channel *string `json:"channel,omitempty"`
// Card number
CardNumber *string `json:"card_number,omitempty"`
// Card holder name
CardHolderName *string `json:"card_holder_name,omitempty"`
// Card expiry month
CardExpiryMm *string `json:"card_expiry_mm,omitempty"`
// Card expiry year
CardExpiryYy *string `json:"card_expiry_yy,omitempty"`
// Card CVV
CardCvv *string `json:"card_cvv,omitempty"`
// Card network
CardNetwork *string `json:"card_network,omitempty"`
// Card type
CardType *string `json:"card_type,omitempty"`
}
func (o CreateSubscriptionPaymentRequestCard) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateSubscriptionPaymentRequestCard) 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.CardHolderName) {
toSerialize["card_holder_name"] = o.CardHolderName
}
if !IsNil(o.CardExpiryMm) {
toSerialize["card_expiry_mm"] = o.CardExpiryMm
}
if !IsNil(o.CardExpiryYy) {
toSerialize["card_expiry_yy"] = o.CardExpiryYy
}
if !IsNil(o.CardCvv) {
toSerialize["card_cvv"] = o.CardCvv
}
if !IsNil(o.CardNetwork) {
toSerialize["card_network"] = o.CardNetwork
}
if !IsNil(o.CardType) {
toSerialize["card_type"] = o.CardType
}
return toSerialize, nil
}