-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_billing_payment.go
331 lines (277 loc) · 10.6 KB
/
model_billing_payment.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
// Code based on the AtlasAPI V2 OpenAPI file
package admin
import (
"encoding/json"
"time"
)
// BillingPayment Funds transferred to MongoDB to cover the specified service in this invoice.
type BillingPayment struct {
// Sum of services that the specified organization consumed in the period covered in this invoice. This parameter expresses its value in cents (100ths of one US Dollar) and calculates its value as **subtotalCents** + **salesTaxCents** - **startingBalanceCents**.
// Read only field.
AmountBilledCents *int64 `json:"amountBilledCents,omitempty"`
// Sum that the specified organization paid toward the associated invoice. This parameter expresses its value in cents (100ths of one US Dollar).
// Read only field.
AmountPaidCents *int64 `json:"amountPaidCents,omitempty"`
// Date and time when the customer made this payment attempt. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
Created *time.Time `json:"created,omitempty"`
// Unique 24-hexadecimal digit string that identifies this payment toward the associated invoice.
// Read only field.
Id *string `json:"id,omitempty"`
// Sum of sales tax applied to this invoice. This parameter expresses its value in cents (100ths of one US Dollar).
// Read only field.
SalesTaxCents *int64 `json:"salesTaxCents,omitempty"`
// Phase of payment processing for the associated invoice when you made this request. These phases include: | Phase Value | Reason | |---|---| | `CANCELLED` | Customer or MongoDB cancelled the payment. | | `ERROR` | Issue arose when attempting to complete payment. | | `FAILED` | MongoDB tried to charge the credit card without success. | | `FAILED_AUTHENTICATION` | Strong Customer Authentication has failed. Confirm that your payment method is authenticated. | | `FORGIVEN` | Customer initiated payment which MongoDB later forgave. | | `INVOICED` | MongoDB issued an invoice that included this line item. | | `NEW` | Customer provided a method of payment, but MongoDB hasn't tried to charge the credit card. | | `PAID` | Customer submitted a successful payment. | | `PARTIAL_PAID` | Customer paid for part of this line item. |
StatusName *string `json:"statusName,omitempty"`
// Sum of all positive invoice line items contained in this invoice. This parameter expresses its value in cents (100ths of one US Dollar).
// Read only field.
SubtotalCents *int64 `json:"subtotalCents,omitempty"`
// Date and time when the customer made an update to this payment attempt. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
Updated *time.Time `json:"updated,omitempty"`
}
// NewBillingPayment instantiates a new BillingPayment 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 NewBillingPayment() *BillingPayment {
this := BillingPayment{}
return &this
}
// NewBillingPaymentWithDefaults instantiates a new BillingPayment 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 NewBillingPaymentWithDefaults() *BillingPayment {
this := BillingPayment{}
return &this
}
// GetAmountBilledCents returns the AmountBilledCents field value if set, zero value otherwise
func (o *BillingPayment) GetAmountBilledCents() int64 {
if o == nil || IsNil(o.AmountBilledCents) {
var ret int64
return ret
}
return *o.AmountBilledCents
}
// GetAmountBilledCentsOk returns a tuple with the AmountBilledCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetAmountBilledCentsOk() (*int64, bool) {
if o == nil || IsNil(o.AmountBilledCents) {
return nil, false
}
return o.AmountBilledCents, true
}
// HasAmountBilledCents returns a boolean if a field has been set.
func (o *BillingPayment) HasAmountBilledCents() bool {
if o != nil && !IsNil(o.AmountBilledCents) {
return true
}
return false
}
// SetAmountBilledCents gets a reference to the given int64 and assigns it to the AmountBilledCents field.
func (o *BillingPayment) SetAmountBilledCents(v int64) {
o.AmountBilledCents = &v
}
// GetAmountPaidCents returns the AmountPaidCents field value if set, zero value otherwise
func (o *BillingPayment) GetAmountPaidCents() int64 {
if o == nil || IsNil(o.AmountPaidCents) {
var ret int64
return ret
}
return *o.AmountPaidCents
}
// GetAmountPaidCentsOk returns a tuple with the AmountPaidCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetAmountPaidCentsOk() (*int64, bool) {
if o == nil || IsNil(o.AmountPaidCents) {
return nil, false
}
return o.AmountPaidCents, true
}
// HasAmountPaidCents returns a boolean if a field has been set.
func (o *BillingPayment) HasAmountPaidCents() bool {
if o != nil && !IsNil(o.AmountPaidCents) {
return true
}
return false
}
// SetAmountPaidCents gets a reference to the given int64 and assigns it to the AmountPaidCents field.
func (o *BillingPayment) SetAmountPaidCents(v int64) {
o.AmountPaidCents = &v
}
// GetCreated returns the Created field value if set, zero value otherwise
func (o *BillingPayment) GetCreated() time.Time {
if o == nil || IsNil(o.Created) {
var ret time.Time
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetCreatedOk() (*time.Time, bool) {
if o == nil || IsNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *BillingPayment) HasCreated() bool {
if o != nil && !IsNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given time.Time and assigns it to the Created field.
func (o *BillingPayment) SetCreated(v time.Time) {
o.Created = &v
}
// GetId returns the Id field value if set, zero value otherwise
func (o *BillingPayment) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *BillingPayment) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *BillingPayment) SetId(v string) {
o.Id = &v
}
// GetSalesTaxCents returns the SalesTaxCents field value if set, zero value otherwise
func (o *BillingPayment) GetSalesTaxCents() int64 {
if o == nil || IsNil(o.SalesTaxCents) {
var ret int64
return ret
}
return *o.SalesTaxCents
}
// GetSalesTaxCentsOk returns a tuple with the SalesTaxCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetSalesTaxCentsOk() (*int64, bool) {
if o == nil || IsNil(o.SalesTaxCents) {
return nil, false
}
return o.SalesTaxCents, true
}
// HasSalesTaxCents returns a boolean if a field has been set.
func (o *BillingPayment) HasSalesTaxCents() bool {
if o != nil && !IsNil(o.SalesTaxCents) {
return true
}
return false
}
// SetSalesTaxCents gets a reference to the given int64 and assigns it to the SalesTaxCents field.
func (o *BillingPayment) SetSalesTaxCents(v int64) {
o.SalesTaxCents = &v
}
// GetStatusName returns the StatusName field value if set, zero value otherwise
func (o *BillingPayment) GetStatusName() string {
if o == nil || IsNil(o.StatusName) {
var ret string
return ret
}
return *o.StatusName
}
// GetStatusNameOk returns a tuple with the StatusName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetStatusNameOk() (*string, bool) {
if o == nil || IsNil(o.StatusName) {
return nil, false
}
return o.StatusName, true
}
// HasStatusName returns a boolean if a field has been set.
func (o *BillingPayment) HasStatusName() bool {
if o != nil && !IsNil(o.StatusName) {
return true
}
return false
}
// SetStatusName gets a reference to the given string and assigns it to the StatusName field.
func (o *BillingPayment) SetStatusName(v string) {
o.StatusName = &v
}
// GetSubtotalCents returns the SubtotalCents field value if set, zero value otherwise
func (o *BillingPayment) GetSubtotalCents() int64 {
if o == nil || IsNil(o.SubtotalCents) {
var ret int64
return ret
}
return *o.SubtotalCents
}
// GetSubtotalCentsOk returns a tuple with the SubtotalCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetSubtotalCentsOk() (*int64, bool) {
if o == nil || IsNil(o.SubtotalCents) {
return nil, false
}
return o.SubtotalCents, true
}
// HasSubtotalCents returns a boolean if a field has been set.
func (o *BillingPayment) HasSubtotalCents() bool {
if o != nil && !IsNil(o.SubtotalCents) {
return true
}
return false
}
// SetSubtotalCents gets a reference to the given int64 and assigns it to the SubtotalCents field.
func (o *BillingPayment) SetSubtotalCents(v int64) {
o.SubtotalCents = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise
func (o *BillingPayment) GetUpdated() time.Time {
if o == nil || IsNil(o.Updated) {
var ret time.Time
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BillingPayment) GetUpdatedOk() (*time.Time, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *BillingPayment) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given time.Time and assigns it to the Updated field.
func (o *BillingPayment) SetUpdated(v time.Time) {
o.Updated = &v
}
func (o BillingPayment) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BillingPayment) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.StatusName) {
toSerialize["statusName"] = o.StatusName
}
return toSerialize, nil
}