/
model_invoice_read_response.go
584 lines (499 loc) · 16.2 KB
/
model_invoice_read_response.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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
/*
Accounting Extension
These APIs allow you to interact with HubSpot's Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot
API version: v3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package accounting
import (
"encoding/json"
"time"
)
// InvoiceReadResponse The invoice data stored in HubSpot
type InvoiceReadResponse struct {
// The invoice number. Note that this is _not_ the ID of the invoice, but the number that the billed customer will see.
ExternalInvoiceNumber *string `json:"externalInvoiceNumber,omitempty"`
// The total amount that this invoice is for.
TotalAmountBilled float32 `json:"totalAmountBilled"`
// The remaining balance due for the invoice.
BalanceDue float32 `json:"balanceDue"`
// The ISO 4217 currency code that represents the currency of the invoice.
CurrencyCode string `json:"currencyCode"`
// The due date of the invoice
DueDate string `json:"dueDate"`
// The id of the customer in the external accounting system that the invoice was sent to.
ExternalRecipientId string `json:"externalRecipientId"`
// The datetime that that invoice was sent to the customer.
ReceivedByRecipientDate *int64 `json:"receivedByRecipientDate,omitempty"`
// The datetime that the invoice was created in the external accounting system.
ExternalCreateDateTime *int64 `json:"externalCreateDateTime,omitempty"`
// Indicated is the invoice has been voided or not.
IsVoided bool `json:"isVoided"`
// The datetime that the invoice was created in HubSpot.
CreatedAt time.Time `json:"createdAt"`
// The datetime that the invoice was last updated in HubSpot.
UpdatedAt time.Time `json:"updatedAt"`
ArchivedAt *time.Time `json:"archivedAt,omitempty"`
Archived bool `json:"archived"`
// The id of the account in the external accounting system that this invoice is related to.
ExternalAccountId string `json:"externalAccountId"`
// The status of the invoice
InvoiceStatus string `json:"invoiceStatus"`
// The id of this invoice in the external accounting system.
Id string `json:"id"`
}
// NewInvoiceReadResponse instantiates a new InvoiceReadResponse 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 NewInvoiceReadResponse(totalAmountBilled float32, balanceDue float32, currencyCode string, dueDate string, externalRecipientId string, isVoided bool, createdAt time.Time, updatedAt time.Time, archived bool, externalAccountId string, invoiceStatus string, id string) *InvoiceReadResponse {
this := InvoiceReadResponse{}
this.TotalAmountBilled = totalAmountBilled
this.BalanceDue = balanceDue
this.CurrencyCode = currencyCode
this.DueDate = dueDate
this.ExternalRecipientId = externalRecipientId
this.IsVoided = isVoided
this.CreatedAt = createdAt
this.UpdatedAt = updatedAt
this.Archived = archived
this.ExternalAccountId = externalAccountId
this.InvoiceStatus = invoiceStatus
this.Id = id
return &this
}
// NewInvoiceReadResponseWithDefaults instantiates a new InvoiceReadResponse 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 NewInvoiceReadResponseWithDefaults() *InvoiceReadResponse {
this := InvoiceReadResponse{}
return &this
}
// GetExternalInvoiceNumber returns the ExternalInvoiceNumber field value if set, zero value otherwise.
func (o *InvoiceReadResponse) GetExternalInvoiceNumber() string {
if o == nil || o.ExternalInvoiceNumber == nil {
var ret string
return ret
}
return *o.ExternalInvoiceNumber
}
// GetExternalInvoiceNumberOk returns a tuple with the ExternalInvoiceNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetExternalInvoiceNumberOk() (*string, bool) {
if o == nil || o.ExternalInvoiceNumber == nil {
return nil, false
}
return o.ExternalInvoiceNumber, true
}
// HasExternalInvoiceNumber returns a boolean if a field has been set.
func (o *InvoiceReadResponse) HasExternalInvoiceNumber() bool {
if o != nil && o.ExternalInvoiceNumber != nil {
return true
}
return false
}
// SetExternalInvoiceNumber gets a reference to the given string and assigns it to the ExternalInvoiceNumber field.
func (o *InvoiceReadResponse) SetExternalInvoiceNumber(v string) {
o.ExternalInvoiceNumber = &v
}
// GetTotalAmountBilled returns the TotalAmountBilled field value
func (o *InvoiceReadResponse) GetTotalAmountBilled() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalAmountBilled
}
// GetTotalAmountBilledOk returns a tuple with the TotalAmountBilled field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetTotalAmountBilledOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.TotalAmountBilled, true
}
// SetTotalAmountBilled sets field value
func (o *InvoiceReadResponse) SetTotalAmountBilled(v float32) {
o.TotalAmountBilled = v
}
// GetBalanceDue returns the BalanceDue field value
func (o *InvoiceReadResponse) GetBalanceDue() float32 {
if o == nil {
var ret float32
return ret
}
return o.BalanceDue
}
// GetBalanceDueOk returns a tuple with the BalanceDue field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetBalanceDueOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.BalanceDue, true
}
// SetBalanceDue sets field value
func (o *InvoiceReadResponse) SetBalanceDue(v float32) {
o.BalanceDue = v
}
// GetCurrencyCode returns the CurrencyCode field value
func (o *InvoiceReadResponse) GetCurrencyCode() string {
if o == nil {
var ret string
return ret
}
return o.CurrencyCode
}
// GetCurrencyCodeOk returns a tuple with the CurrencyCode field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetCurrencyCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CurrencyCode, true
}
// SetCurrencyCode sets field value
func (o *InvoiceReadResponse) SetCurrencyCode(v string) {
o.CurrencyCode = v
}
// GetDueDate returns the DueDate field value
func (o *InvoiceReadResponse) GetDueDate() string {
if o == nil {
var ret string
return ret
}
return o.DueDate
}
// GetDueDateOk returns a tuple with the DueDate field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetDueDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DueDate, true
}
// SetDueDate sets field value
func (o *InvoiceReadResponse) SetDueDate(v string) {
o.DueDate = v
}
// GetExternalRecipientId returns the ExternalRecipientId field value
func (o *InvoiceReadResponse) GetExternalRecipientId() string {
if o == nil {
var ret string
return ret
}
return o.ExternalRecipientId
}
// GetExternalRecipientIdOk returns a tuple with the ExternalRecipientId field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetExternalRecipientIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExternalRecipientId, true
}
// SetExternalRecipientId sets field value
func (o *InvoiceReadResponse) SetExternalRecipientId(v string) {
o.ExternalRecipientId = v
}
// GetReceivedByRecipientDate returns the ReceivedByRecipientDate field value if set, zero value otherwise.
func (o *InvoiceReadResponse) GetReceivedByRecipientDate() int64 {
if o == nil || o.ReceivedByRecipientDate == nil {
var ret int64
return ret
}
return *o.ReceivedByRecipientDate
}
// GetReceivedByRecipientDateOk returns a tuple with the ReceivedByRecipientDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetReceivedByRecipientDateOk() (*int64, bool) {
if o == nil || o.ReceivedByRecipientDate == nil {
return nil, false
}
return o.ReceivedByRecipientDate, true
}
// HasReceivedByRecipientDate returns a boolean if a field has been set.
func (o *InvoiceReadResponse) HasReceivedByRecipientDate() bool {
if o != nil && o.ReceivedByRecipientDate != nil {
return true
}
return false
}
// SetReceivedByRecipientDate gets a reference to the given int64 and assigns it to the ReceivedByRecipientDate field.
func (o *InvoiceReadResponse) SetReceivedByRecipientDate(v int64) {
o.ReceivedByRecipientDate = &v
}
// GetExternalCreateDateTime returns the ExternalCreateDateTime field value if set, zero value otherwise.
func (o *InvoiceReadResponse) GetExternalCreateDateTime() int64 {
if o == nil || o.ExternalCreateDateTime == nil {
var ret int64
return ret
}
return *o.ExternalCreateDateTime
}
// GetExternalCreateDateTimeOk returns a tuple with the ExternalCreateDateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetExternalCreateDateTimeOk() (*int64, bool) {
if o == nil || o.ExternalCreateDateTime == nil {
return nil, false
}
return o.ExternalCreateDateTime, true
}
// HasExternalCreateDateTime returns a boolean if a field has been set.
func (o *InvoiceReadResponse) HasExternalCreateDateTime() bool {
if o != nil && o.ExternalCreateDateTime != nil {
return true
}
return false
}
// SetExternalCreateDateTime gets a reference to the given int64 and assigns it to the ExternalCreateDateTime field.
func (o *InvoiceReadResponse) SetExternalCreateDateTime(v int64) {
o.ExternalCreateDateTime = &v
}
// GetIsVoided returns the IsVoided field value
func (o *InvoiceReadResponse) GetIsVoided() bool {
if o == nil {
var ret bool
return ret
}
return o.IsVoided
}
// GetIsVoidedOk returns a tuple with the IsVoided field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetIsVoidedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.IsVoided, true
}
// SetIsVoided sets field value
func (o *InvoiceReadResponse) SetIsVoided(v bool) {
o.IsVoided = v
}
// GetCreatedAt returns the CreatedAt field value
func (o *InvoiceReadResponse) GetCreatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *InvoiceReadResponse) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
// GetUpdatedAt returns the UpdatedAt field value
func (o *InvoiceReadResponse) GetUpdatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.UpdatedAt, true
}
// SetUpdatedAt sets field value
func (o *InvoiceReadResponse) SetUpdatedAt(v time.Time) {
o.UpdatedAt = v
}
// GetArchivedAt returns the ArchivedAt field value if set, zero value otherwise.
func (o *InvoiceReadResponse) GetArchivedAt() time.Time {
if o == nil || o.ArchivedAt == nil {
var ret time.Time
return ret
}
return *o.ArchivedAt
}
// GetArchivedAtOk returns a tuple with the ArchivedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetArchivedAtOk() (*time.Time, bool) {
if o == nil || o.ArchivedAt == nil {
return nil, false
}
return o.ArchivedAt, true
}
// HasArchivedAt returns a boolean if a field has been set.
func (o *InvoiceReadResponse) HasArchivedAt() bool {
if o != nil && o.ArchivedAt != nil {
return true
}
return false
}
// SetArchivedAt gets a reference to the given time.Time and assigns it to the ArchivedAt field.
func (o *InvoiceReadResponse) SetArchivedAt(v time.Time) {
o.ArchivedAt = &v
}
// GetArchived returns the Archived field value
func (o *InvoiceReadResponse) GetArchived() bool {
if o == nil {
var ret bool
return ret
}
return o.Archived
}
// GetArchivedOk returns a tuple with the Archived field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetArchivedOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Archived, true
}
// SetArchived sets field value
func (o *InvoiceReadResponse) SetArchived(v bool) {
o.Archived = v
}
// GetExternalAccountId returns the ExternalAccountId field value
func (o *InvoiceReadResponse) GetExternalAccountId() string {
if o == nil {
var ret string
return ret
}
return o.ExternalAccountId
}
// GetExternalAccountIdOk returns a tuple with the ExternalAccountId field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetExternalAccountIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExternalAccountId, true
}
// SetExternalAccountId sets field value
func (o *InvoiceReadResponse) SetExternalAccountId(v string) {
o.ExternalAccountId = v
}
// GetInvoiceStatus returns the InvoiceStatus field value
func (o *InvoiceReadResponse) GetInvoiceStatus() string {
if o == nil {
var ret string
return ret
}
return o.InvoiceStatus
}
// GetInvoiceStatusOk returns a tuple with the InvoiceStatus field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetInvoiceStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.InvoiceStatus, true
}
// SetInvoiceStatus sets field value
func (o *InvoiceReadResponse) SetInvoiceStatus(v string) {
o.InvoiceStatus = v
}
// GetId returns the Id field value
func (o *InvoiceReadResponse) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *InvoiceReadResponse) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *InvoiceReadResponse) SetId(v string) {
o.Id = v
}
func (o InvoiceReadResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.ExternalInvoiceNumber != nil {
toSerialize["externalInvoiceNumber"] = o.ExternalInvoiceNumber
}
if true {
toSerialize["totalAmountBilled"] = o.TotalAmountBilled
}
if true {
toSerialize["balanceDue"] = o.BalanceDue
}
if true {
toSerialize["currencyCode"] = o.CurrencyCode
}
if true {
toSerialize["dueDate"] = o.DueDate
}
if true {
toSerialize["externalRecipientId"] = o.ExternalRecipientId
}
if o.ReceivedByRecipientDate != nil {
toSerialize["receivedByRecipientDate"] = o.ReceivedByRecipientDate
}
if o.ExternalCreateDateTime != nil {
toSerialize["externalCreateDateTime"] = o.ExternalCreateDateTime
}
if true {
toSerialize["isVoided"] = o.IsVoided
}
if true {
toSerialize["createdAt"] = o.CreatedAt
}
if true {
toSerialize["updatedAt"] = o.UpdatedAt
}
if o.ArchivedAt != nil {
toSerialize["archivedAt"] = o.ArchivedAt
}
if true {
toSerialize["archived"] = o.Archived
}
if true {
toSerialize["externalAccountId"] = o.ExternalAccountId
}
if true {
toSerialize["invoiceStatus"] = o.InvoiceStatus
}
if true {
toSerialize["id"] = o.Id
}
return json.Marshal(toSerialize)
}
type NullableInvoiceReadResponse struct {
value *InvoiceReadResponse
isSet bool
}
func (v NullableInvoiceReadResponse) Get() *InvoiceReadResponse {
return v.value
}
func (v *NullableInvoiceReadResponse) Set(val *InvoiceReadResponse) {
v.value = val
v.isSet = true
}
func (v NullableInvoiceReadResponse) IsSet() bool {
return v.isSet
}
func (v *NullableInvoiceReadResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInvoiceReadResponse(val *InvoiceReadResponse) *NullableInvoiceReadResponse {
return &NullableInvoiceReadResponse{value: val, isSet: true}
}
func (v NullableInvoiceReadResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInvoiceReadResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}