-
Notifications
You must be signed in to change notification settings - Fork 28
/
model_account_update_notification_data.go
209 lines (173 loc) · 7.35 KB
/
model_account_update_notification_data.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/*
Management Webhooks
API version: 3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package managementwebhook
import (
"encoding/json"
"github.com/adyen/adyen-go-api-library/v8/src/common"
)
// checks if the AccountUpdateNotificationData type satisfies the MappedNullable interface at compile time
var _ common.MappedNullable = &AccountUpdateNotificationData{}
// AccountUpdateNotificationData struct for AccountUpdateNotificationData
type AccountUpdateNotificationData struct {
// Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability.
Capabilities map[string]AccountCapabilityData `json:"capabilities"`
// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).
LegalEntityId *string `json:"legalEntityId,omitempty"`
// The unique identifier of the merchant account.
MerchantId string `json:"merchantId"`
// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled.
Status string `json:"status"`
}
// NewAccountUpdateNotificationData instantiates a new AccountUpdateNotificationData object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAccountUpdateNotificationData(capabilities map[string]AccountCapabilityData, merchantId string, status string) *AccountUpdateNotificationData {
this := AccountUpdateNotificationData{}
this.Capabilities = capabilities
this.MerchantId = merchantId
this.Status = status
return &this
}
// NewAccountUpdateNotificationDataWithDefaults instantiates a new AccountUpdateNotificationData object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAccountUpdateNotificationDataWithDefaults() *AccountUpdateNotificationData {
this := AccountUpdateNotificationData{}
return &this
}
// GetCapabilities returns the Capabilities field value
func (o *AccountUpdateNotificationData) GetCapabilities() map[string]AccountCapabilityData {
if o == nil {
var ret map[string]AccountCapabilityData
return ret
}
return o.Capabilities
}
// GetCapabilitiesOk returns a tuple with the Capabilities field value
// and a boolean to check if the value has been set.
func (o *AccountUpdateNotificationData) GetCapabilitiesOk() (*map[string]AccountCapabilityData, bool) {
if o == nil {
return nil, false
}
return &o.Capabilities, true
}
// SetCapabilities sets field value
func (o *AccountUpdateNotificationData) SetCapabilities(v map[string]AccountCapabilityData) {
o.Capabilities = v
}
// GetLegalEntityId returns the LegalEntityId field value if set, zero value otherwise.
func (o *AccountUpdateNotificationData) GetLegalEntityId() string {
if o == nil || common.IsNil(o.LegalEntityId) {
var ret string
return ret
}
return *o.LegalEntityId
}
// GetLegalEntityIdOk returns a tuple with the LegalEntityId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AccountUpdateNotificationData) GetLegalEntityIdOk() (*string, bool) {
if o == nil || common.IsNil(o.LegalEntityId) {
return nil, false
}
return o.LegalEntityId, true
}
// HasLegalEntityId returns a boolean if a field has been set.
func (o *AccountUpdateNotificationData) HasLegalEntityId() bool {
if o != nil && !common.IsNil(o.LegalEntityId) {
return true
}
return false
}
// SetLegalEntityId gets a reference to the given string and assigns it to the LegalEntityId field.
func (o *AccountUpdateNotificationData) SetLegalEntityId(v string) {
o.LegalEntityId = &v
}
// GetMerchantId returns the MerchantId field value
func (o *AccountUpdateNotificationData) GetMerchantId() string {
if o == nil {
var ret string
return ret
}
return o.MerchantId
}
// GetMerchantIdOk returns a tuple with the MerchantId field value
// and a boolean to check if the value has been set.
func (o *AccountUpdateNotificationData) GetMerchantIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MerchantId, true
}
// SetMerchantId sets field value
func (o *AccountUpdateNotificationData) SetMerchantId(v string) {
o.MerchantId = v
}
// GetStatus returns the Status field value
func (o *AccountUpdateNotificationData) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *AccountUpdateNotificationData) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *AccountUpdateNotificationData) SetStatus(v string) {
o.Status = v
}
func (o AccountUpdateNotificationData) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AccountUpdateNotificationData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["capabilities"] = o.Capabilities
if !common.IsNil(o.LegalEntityId) {
toSerialize["legalEntityId"] = o.LegalEntityId
}
toSerialize["merchantId"] = o.MerchantId
toSerialize["status"] = o.Status
return toSerialize, nil
}
type NullableAccountUpdateNotificationData struct {
value *AccountUpdateNotificationData
isSet bool
}
func (v NullableAccountUpdateNotificationData) Get() *AccountUpdateNotificationData {
return v.value
}
func (v *NullableAccountUpdateNotificationData) Set(val *AccountUpdateNotificationData) {
v.value = val
v.isSet = true
}
func (v NullableAccountUpdateNotificationData) IsSet() bool {
return v.isSet
}
func (v *NullableAccountUpdateNotificationData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAccountUpdateNotificationData(val *AccountUpdateNotificationData) *NullableAccountUpdateNotificationData {
return &NullableAccountUpdateNotificationData{value: val, isSet: true}
}
func (v NullableAccountUpdateNotificationData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAccountUpdateNotificationData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}