-
Notifications
You must be signed in to change notification settings - Fork 5
/
model_application.go
668 lines (567 loc) · 20.6 KB
/
model_application.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
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
/*
* Talon.One API
*
* Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
*
* API version:
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package talon
import (
"bytes"
"encoding/json"
"time"
)
// Application
type Application struct {
// Internal ID of this entity.
Id int32 `json:"id"`
// The time this entity was created.
Created time.Time `json:"created"`
// The time this entity was last modified.
Modified time.Time `json:"modified"`
// The ID of the account that owns this entity.
AccountId int32 `json:"accountId"`
// The name of this application.
Name string `json:"name"`
// A longer description of the application.
Description *string `json:"description,omitempty"`
// A string containing an IANA timezone descriptor.
Timezone string `json:"timezone"`
// The default currency for new customer sessions.
Currency string `json:"currency"`
// The case sensitivity behavior to check coupon codes in the campaigns of this Application.
CaseSensitivity *string `json:"caseSensitivity,omitempty"`
// Arbitrary properties associated with this campaign.
Attributes *map[string]interface{} `json:"attributes,omitempty"`
// Default limits for campaigns created in this application.
Limits *[]LimitConfig `json:"limits,omitempty"`
// The default scope to apply `setDiscount` effects on if no scope was provided with the effect.
DefaultDiscountScope *string `json:"defaultDiscountScope,omitempty"`
// Indicates if discounts should cascade for this Application.
EnableCascadingDiscounts *bool `json:"enableCascadingDiscounts,omitempty"`
// Indicates if cart items of quantity larger than one should be separated into different items of quantity one.
EnableFlattenedCartItems *bool `json:"enableFlattenedCartItems,omitempty"`
AttributesSettings *AttributesSettings `json:"attributesSettings,omitempty"`
// Indicates if this is a live or sandbox Application.
Sandbox *bool `json:"sandbox,omitempty"`
// Indicates if this Application supports partial discounts.
EnablePartialDiscounts *bool `json:"enablePartialDiscounts,omitempty"`
// The default scope to apply `setDiscountPerItem` effects on if no scope was provided with the effect.
DefaultDiscountAdditionalCostPerItemScope *string `json:"defaultDiscountAdditionalCostPerItemScope,omitempty"`
// The ID of the default campaign evaluation group to which new campaigns will be added unless a different group is selected when creating the campaign.
DefaultEvaluationGroupId *int32 `json:"defaultEvaluationGroupId,omitempty"`
// The ID of the default Cart-Item-Filter for this application.
DefaultCartItemFilterId *int32 `json:"defaultCartItemFilterId,omitempty"`
// Indicates whether the campaign staging and revisions feature is enabled for the Application. **Important:** After this feature is enabled, it cannot be disabled.
EnableCampaignStateManagement *bool `json:"enableCampaignStateManagement,omitempty"`
// An array containing all the loyalty programs to which this application is subscribed.
LoyaltyPrograms []LoyaltyProgram `json:"loyaltyPrograms"`
}
// GetId returns the Id field value
func (o *Application) GetId() int32 {
if o == nil {
var ret int32
return ret
}
return o.Id
}
// SetId sets field value
func (o *Application) SetId(v int32) {
o.Id = v
}
// GetCreated returns the Created field value
func (o *Application) GetCreated() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.Created
}
// SetCreated sets field value
func (o *Application) SetCreated(v time.Time) {
o.Created = v
}
// GetModified returns the Modified field value
func (o *Application) GetModified() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.Modified
}
// SetModified sets field value
func (o *Application) SetModified(v time.Time) {
o.Modified = v
}
// GetAccountId returns the AccountId field value
func (o *Application) GetAccountId() int32 {
if o == nil {
var ret int32
return ret
}
return o.AccountId
}
// SetAccountId sets field value
func (o *Application) SetAccountId(v int32) {
o.AccountId = v
}
// GetName returns the Name field value
func (o *Application) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// SetName sets field value
func (o *Application) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Application) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDescriptionOk() (string, bool) {
if o == nil || o.Description == nil {
var ret string
return ret, false
}
return *o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Application) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Application) SetDescription(v string) {
o.Description = &v
}
// GetTimezone returns the Timezone field value
func (o *Application) GetTimezone() string {
if o == nil {
var ret string
return ret
}
return o.Timezone
}
// SetTimezone sets field value
func (o *Application) SetTimezone(v string) {
o.Timezone = v
}
// GetCurrency returns the Currency field value
func (o *Application) GetCurrency() string {
if o == nil {
var ret string
return ret
}
return o.Currency
}
// SetCurrency sets field value
func (o *Application) SetCurrency(v string) {
o.Currency = v
}
// GetCaseSensitivity returns the CaseSensitivity field value if set, zero value otherwise.
func (o *Application) GetCaseSensitivity() string {
if o == nil || o.CaseSensitivity == nil {
var ret string
return ret
}
return *o.CaseSensitivity
}
// GetCaseSensitivityOk returns a tuple with the CaseSensitivity field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetCaseSensitivityOk() (string, bool) {
if o == nil || o.CaseSensitivity == nil {
var ret string
return ret, false
}
return *o.CaseSensitivity, true
}
// HasCaseSensitivity returns a boolean if a field has been set.
func (o *Application) HasCaseSensitivity() bool {
if o != nil && o.CaseSensitivity != nil {
return true
}
return false
}
// SetCaseSensitivity gets a reference to the given string and assigns it to the CaseSensitivity field.
func (o *Application) SetCaseSensitivity(v string) {
o.CaseSensitivity = &v
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *Application) GetAttributes() map[string]interface{} {
if o == nil || o.Attributes == nil {
var ret map[string]interface{}
return ret
}
return *o.Attributes
}
// GetAttributesOk returns a tuple with the Attributes field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetAttributesOk() (map[string]interface{}, bool) {
if o == nil || o.Attributes == nil {
var ret map[string]interface{}
return ret, false
}
return *o.Attributes, true
}
// HasAttributes returns a boolean if a field has been set.
func (o *Application) HasAttributes() bool {
if o != nil && o.Attributes != nil {
return true
}
return false
}
// SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field.
func (o *Application) SetAttributes(v map[string]interface{}) {
o.Attributes = &v
}
// GetLimits returns the Limits field value if set, zero value otherwise.
func (o *Application) GetLimits() []LimitConfig {
if o == nil || o.Limits == nil {
var ret []LimitConfig
return ret
}
return *o.Limits
}
// GetLimitsOk returns a tuple with the Limits field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetLimitsOk() ([]LimitConfig, bool) {
if o == nil || o.Limits == nil {
var ret []LimitConfig
return ret, false
}
return *o.Limits, true
}
// HasLimits returns a boolean if a field has been set.
func (o *Application) HasLimits() bool {
if o != nil && o.Limits != nil {
return true
}
return false
}
// SetLimits gets a reference to the given []LimitConfig and assigns it to the Limits field.
func (o *Application) SetLimits(v []LimitConfig) {
o.Limits = &v
}
// GetDefaultDiscountScope returns the DefaultDiscountScope field value if set, zero value otherwise.
func (o *Application) GetDefaultDiscountScope() string {
if o == nil || o.DefaultDiscountScope == nil {
var ret string
return ret
}
return *o.DefaultDiscountScope
}
// GetDefaultDiscountScopeOk returns a tuple with the DefaultDiscountScope field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDefaultDiscountScopeOk() (string, bool) {
if o == nil || o.DefaultDiscountScope == nil {
var ret string
return ret, false
}
return *o.DefaultDiscountScope, true
}
// HasDefaultDiscountScope returns a boolean if a field has been set.
func (o *Application) HasDefaultDiscountScope() bool {
if o != nil && o.DefaultDiscountScope != nil {
return true
}
return false
}
// SetDefaultDiscountScope gets a reference to the given string and assigns it to the DefaultDiscountScope field.
func (o *Application) SetDefaultDiscountScope(v string) {
o.DefaultDiscountScope = &v
}
// GetEnableCascadingDiscounts returns the EnableCascadingDiscounts field value if set, zero value otherwise.
func (o *Application) GetEnableCascadingDiscounts() bool {
if o == nil || o.EnableCascadingDiscounts == nil {
var ret bool
return ret
}
return *o.EnableCascadingDiscounts
}
// GetEnableCascadingDiscountsOk returns a tuple with the EnableCascadingDiscounts field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetEnableCascadingDiscountsOk() (bool, bool) {
if o == nil || o.EnableCascadingDiscounts == nil {
var ret bool
return ret, false
}
return *o.EnableCascadingDiscounts, true
}
// HasEnableCascadingDiscounts returns a boolean if a field has been set.
func (o *Application) HasEnableCascadingDiscounts() bool {
if o != nil && o.EnableCascadingDiscounts != nil {
return true
}
return false
}
// SetEnableCascadingDiscounts gets a reference to the given bool and assigns it to the EnableCascadingDiscounts field.
func (o *Application) SetEnableCascadingDiscounts(v bool) {
o.EnableCascadingDiscounts = &v
}
// GetEnableFlattenedCartItems returns the EnableFlattenedCartItems field value if set, zero value otherwise.
func (o *Application) GetEnableFlattenedCartItems() bool {
if o == nil || o.EnableFlattenedCartItems == nil {
var ret bool
return ret
}
return *o.EnableFlattenedCartItems
}
// GetEnableFlattenedCartItemsOk returns a tuple with the EnableFlattenedCartItems field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetEnableFlattenedCartItemsOk() (bool, bool) {
if o == nil || o.EnableFlattenedCartItems == nil {
var ret bool
return ret, false
}
return *o.EnableFlattenedCartItems, true
}
// HasEnableFlattenedCartItems returns a boolean if a field has been set.
func (o *Application) HasEnableFlattenedCartItems() bool {
if o != nil && o.EnableFlattenedCartItems != nil {
return true
}
return false
}
// SetEnableFlattenedCartItems gets a reference to the given bool and assigns it to the EnableFlattenedCartItems field.
func (o *Application) SetEnableFlattenedCartItems(v bool) {
o.EnableFlattenedCartItems = &v
}
// GetAttributesSettings returns the AttributesSettings field value if set, zero value otherwise.
func (o *Application) GetAttributesSettings() AttributesSettings {
if o == nil || o.AttributesSettings == nil {
var ret AttributesSettings
return ret
}
return *o.AttributesSettings
}
// GetAttributesSettingsOk returns a tuple with the AttributesSettings field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetAttributesSettingsOk() (AttributesSettings, bool) {
if o == nil || o.AttributesSettings == nil {
var ret AttributesSettings
return ret, false
}
return *o.AttributesSettings, true
}
// HasAttributesSettings returns a boolean if a field has been set.
func (o *Application) HasAttributesSettings() bool {
if o != nil && o.AttributesSettings != nil {
return true
}
return false
}
// SetAttributesSettings gets a reference to the given AttributesSettings and assigns it to the AttributesSettings field.
func (o *Application) SetAttributesSettings(v AttributesSettings) {
o.AttributesSettings = &v
}
// GetSandbox returns the Sandbox field value if set, zero value otherwise.
func (o *Application) GetSandbox() bool {
if o == nil || o.Sandbox == nil {
var ret bool
return ret
}
return *o.Sandbox
}
// GetSandboxOk returns a tuple with the Sandbox field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetSandboxOk() (bool, bool) {
if o == nil || o.Sandbox == nil {
var ret bool
return ret, false
}
return *o.Sandbox, true
}
// HasSandbox returns a boolean if a field has been set.
func (o *Application) HasSandbox() bool {
if o != nil && o.Sandbox != nil {
return true
}
return false
}
// SetSandbox gets a reference to the given bool and assigns it to the Sandbox field.
func (o *Application) SetSandbox(v bool) {
o.Sandbox = &v
}
// GetEnablePartialDiscounts returns the EnablePartialDiscounts field value if set, zero value otherwise.
func (o *Application) GetEnablePartialDiscounts() bool {
if o == nil || o.EnablePartialDiscounts == nil {
var ret bool
return ret
}
return *o.EnablePartialDiscounts
}
// GetEnablePartialDiscountsOk returns a tuple with the EnablePartialDiscounts field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetEnablePartialDiscountsOk() (bool, bool) {
if o == nil || o.EnablePartialDiscounts == nil {
var ret bool
return ret, false
}
return *o.EnablePartialDiscounts, true
}
// HasEnablePartialDiscounts returns a boolean if a field has been set.
func (o *Application) HasEnablePartialDiscounts() bool {
if o != nil && o.EnablePartialDiscounts != nil {
return true
}
return false
}
// SetEnablePartialDiscounts gets a reference to the given bool and assigns it to the EnablePartialDiscounts field.
func (o *Application) SetEnablePartialDiscounts(v bool) {
o.EnablePartialDiscounts = &v
}
// GetDefaultDiscountAdditionalCostPerItemScope returns the DefaultDiscountAdditionalCostPerItemScope field value if set, zero value otherwise.
func (o *Application) GetDefaultDiscountAdditionalCostPerItemScope() string {
if o == nil || o.DefaultDiscountAdditionalCostPerItemScope == nil {
var ret string
return ret
}
return *o.DefaultDiscountAdditionalCostPerItemScope
}
// GetDefaultDiscountAdditionalCostPerItemScopeOk returns a tuple with the DefaultDiscountAdditionalCostPerItemScope field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDefaultDiscountAdditionalCostPerItemScopeOk() (string, bool) {
if o == nil || o.DefaultDiscountAdditionalCostPerItemScope == nil {
var ret string
return ret, false
}
return *o.DefaultDiscountAdditionalCostPerItemScope, true
}
// HasDefaultDiscountAdditionalCostPerItemScope returns a boolean if a field has been set.
func (o *Application) HasDefaultDiscountAdditionalCostPerItemScope() bool {
if o != nil && o.DefaultDiscountAdditionalCostPerItemScope != nil {
return true
}
return false
}
// SetDefaultDiscountAdditionalCostPerItemScope gets a reference to the given string and assigns it to the DefaultDiscountAdditionalCostPerItemScope field.
func (o *Application) SetDefaultDiscountAdditionalCostPerItemScope(v string) {
o.DefaultDiscountAdditionalCostPerItemScope = &v
}
// GetDefaultEvaluationGroupId returns the DefaultEvaluationGroupId field value if set, zero value otherwise.
func (o *Application) GetDefaultEvaluationGroupId() int32 {
if o == nil || o.DefaultEvaluationGroupId == nil {
var ret int32
return ret
}
return *o.DefaultEvaluationGroupId
}
// GetDefaultEvaluationGroupIdOk returns a tuple with the DefaultEvaluationGroupId field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDefaultEvaluationGroupIdOk() (int32, bool) {
if o == nil || o.DefaultEvaluationGroupId == nil {
var ret int32
return ret, false
}
return *o.DefaultEvaluationGroupId, true
}
// HasDefaultEvaluationGroupId returns a boolean if a field has been set.
func (o *Application) HasDefaultEvaluationGroupId() bool {
if o != nil && o.DefaultEvaluationGroupId != nil {
return true
}
return false
}
// SetDefaultEvaluationGroupId gets a reference to the given int32 and assigns it to the DefaultEvaluationGroupId field.
func (o *Application) SetDefaultEvaluationGroupId(v int32) {
o.DefaultEvaluationGroupId = &v
}
// GetDefaultCartItemFilterId returns the DefaultCartItemFilterId field value if set, zero value otherwise.
func (o *Application) GetDefaultCartItemFilterId() int32 {
if o == nil || o.DefaultCartItemFilterId == nil {
var ret int32
return ret
}
return *o.DefaultCartItemFilterId
}
// GetDefaultCartItemFilterIdOk returns a tuple with the DefaultCartItemFilterId field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDefaultCartItemFilterIdOk() (int32, bool) {
if o == nil || o.DefaultCartItemFilterId == nil {
var ret int32
return ret, false
}
return *o.DefaultCartItemFilterId, true
}
// HasDefaultCartItemFilterId returns a boolean if a field has been set.
func (o *Application) HasDefaultCartItemFilterId() bool {
if o != nil && o.DefaultCartItemFilterId != nil {
return true
}
return false
}
// SetDefaultCartItemFilterId gets a reference to the given int32 and assigns it to the DefaultCartItemFilterId field.
func (o *Application) SetDefaultCartItemFilterId(v int32) {
o.DefaultCartItemFilterId = &v
}
// GetEnableCampaignStateManagement returns the EnableCampaignStateManagement field value if set, zero value otherwise.
func (o *Application) GetEnableCampaignStateManagement() bool {
if o == nil || o.EnableCampaignStateManagement == nil {
var ret bool
return ret
}
return *o.EnableCampaignStateManagement
}
// GetEnableCampaignStateManagementOk returns a tuple with the EnableCampaignStateManagement field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetEnableCampaignStateManagementOk() (bool, bool) {
if o == nil || o.EnableCampaignStateManagement == nil {
var ret bool
return ret, false
}
return *o.EnableCampaignStateManagement, true
}
// HasEnableCampaignStateManagement returns a boolean if a field has been set.
func (o *Application) HasEnableCampaignStateManagement() bool {
if o != nil && o.EnableCampaignStateManagement != nil {
return true
}
return false
}
// SetEnableCampaignStateManagement gets a reference to the given bool and assigns it to the EnableCampaignStateManagement field.
func (o *Application) SetEnableCampaignStateManagement(v bool) {
o.EnableCampaignStateManagement = &v
}
// GetLoyaltyPrograms returns the LoyaltyPrograms field value
func (o *Application) GetLoyaltyPrograms() []LoyaltyProgram {
if o == nil {
var ret []LoyaltyProgram
return ret
}
return o.LoyaltyPrograms
}
// SetLoyaltyPrograms sets field value
func (o *Application) SetLoyaltyPrograms(v []LoyaltyProgram) {
o.LoyaltyPrograms = v
}
type NullableApplication struct {
Value Application
ExplicitNull bool
}
func (v NullableApplication) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
return json.Marshal(v.Value)
}
}
func (v *NullableApplication) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}