forked from talon-one/talon_go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_campaign_analytics.go
467 lines (385 loc) · 13.4 KB
/
model_campaign_analytics.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
/*
* 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"
)
// CampaignAnalytics
type CampaignAnalytics struct {
Date time.Time `json:"date"`
// Amount of revenue in this campaign (for coupon or discount sessions).
CampaignRevenue float32 `json:"campaignRevenue"`
// Amount of revenue in this campaign since it began (for coupon or discount sessions).
TotalCampaignRevenue float32 `json:"totalCampaignRevenue"`
// Amount of refunds in this campaign (for coupon or discount sessions).
CampaignRefund float32 `json:"campaignRefund"`
// Amount of refunds in this campaign since it began (for coupon or discount sessions).
TotalCampaignRefund float32 `json:"totalCampaignRefund"`
// Amount of cost caused by discounts given in the campaign.
CampaignDiscountCosts float32 `json:"campaignDiscountCosts"`
// Amount of cost caused by discounts given in the campaign since it began.
TotalCampaignDiscountCosts float32 `json:"totalCampaignDiscountCosts"`
// Amount of discounts rolledback due to refund in the campaign.
CampaignRefundedDiscounts float32 `json:"campaignRefundedDiscounts"`
// Amount of discounts rolledback due to refund in the campaign since it began.
TotalCampaignRefundedDiscounts float32 `json:"totalCampaignRefundedDiscounts"`
// Amount of free items given in the campaign.
CampaignFreeItems int32 `json:"campaignFreeItems"`
// Amount of free items given in the campaign since it began.
TotalCampaignFreeItems int32 `json:"totalCampaignFreeItems"`
// Number of coupon redemptions in the campaign.
CouponRedemptions int32 `json:"couponRedemptions"`
// Number of coupon redemptions in the campaign since it began.
TotalCouponRedemptions int32 `json:"totalCouponRedemptions"`
// Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign.
CouponRolledbackRedemptions int32 `json:"couponRolledbackRedemptions"`
// Number of coupon redemptions that have been rolled back (due to canceling closed session) in the campaign since it began.
TotalCouponRolledbackRedemptions int32 `json:"totalCouponRolledbackRedemptions"`
// Number of referral redemptions in the campaign.
ReferralRedemptions int32 `json:"referralRedemptions"`
// Number of referral redemptions in the campaign since it began.
TotalReferralRedemptions int32 `json:"totalReferralRedemptions"`
// Number of coupons created in the campaign by the rule engine.
CouponsCreated int32 `json:"couponsCreated"`
// Number of coupons created in the campaign by the rule engine since it began.
TotalCouponsCreated int32 `json:"totalCouponsCreated"`
// Number of referrals created in the campaign by the rule engine.
ReferralsCreated int32 `json:"referralsCreated"`
// Number of referrals created in the campaign by the rule engine since it began.
TotalReferralsCreated int32 `json:"totalReferralsCreated"`
// Number of added loyalty points in the campaign in a specific interval.
AddedLoyaltyPoints float32 `json:"addedLoyaltyPoints"`
// Number of added loyalty points in the campaign since it began.
TotalAddedLoyaltyPoints float32 `json:"totalAddedLoyaltyPoints"`
// Number of deducted loyalty points in the campaign in a specific interval.
DeductedLoyaltyPoints float32 `json:"deductedLoyaltyPoints"`
// Number of deducted loyalty points in the campaign since it began.
TotalDeductedLoyaltyPoints float32 `json:"totalDeductedLoyaltyPoints"`
}
// GetDate returns the Date field value
func (o *CampaignAnalytics) GetDate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.Date
}
// SetDate sets field value
func (o *CampaignAnalytics) SetDate(v time.Time) {
o.Date = v
}
// GetCampaignRevenue returns the CampaignRevenue field value
func (o *CampaignAnalytics) GetCampaignRevenue() float32 {
if o == nil {
var ret float32
return ret
}
return o.CampaignRevenue
}
// SetCampaignRevenue sets field value
func (o *CampaignAnalytics) SetCampaignRevenue(v float32) {
o.CampaignRevenue = v
}
// GetTotalCampaignRevenue returns the TotalCampaignRevenue field value
func (o *CampaignAnalytics) GetTotalCampaignRevenue() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalCampaignRevenue
}
// SetTotalCampaignRevenue sets field value
func (o *CampaignAnalytics) SetTotalCampaignRevenue(v float32) {
o.TotalCampaignRevenue = v
}
// GetCampaignRefund returns the CampaignRefund field value
func (o *CampaignAnalytics) GetCampaignRefund() float32 {
if o == nil {
var ret float32
return ret
}
return o.CampaignRefund
}
// SetCampaignRefund sets field value
func (o *CampaignAnalytics) SetCampaignRefund(v float32) {
o.CampaignRefund = v
}
// GetTotalCampaignRefund returns the TotalCampaignRefund field value
func (o *CampaignAnalytics) GetTotalCampaignRefund() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalCampaignRefund
}
// SetTotalCampaignRefund sets field value
func (o *CampaignAnalytics) SetTotalCampaignRefund(v float32) {
o.TotalCampaignRefund = v
}
// GetCampaignDiscountCosts returns the CampaignDiscountCosts field value
func (o *CampaignAnalytics) GetCampaignDiscountCosts() float32 {
if o == nil {
var ret float32
return ret
}
return o.CampaignDiscountCosts
}
// SetCampaignDiscountCosts sets field value
func (o *CampaignAnalytics) SetCampaignDiscountCosts(v float32) {
o.CampaignDiscountCosts = v
}
// GetTotalCampaignDiscountCosts returns the TotalCampaignDiscountCosts field value
func (o *CampaignAnalytics) GetTotalCampaignDiscountCosts() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalCampaignDiscountCosts
}
// SetTotalCampaignDiscountCosts sets field value
func (o *CampaignAnalytics) SetTotalCampaignDiscountCosts(v float32) {
o.TotalCampaignDiscountCosts = v
}
// GetCampaignRefundedDiscounts returns the CampaignRefundedDiscounts field value
func (o *CampaignAnalytics) GetCampaignRefundedDiscounts() float32 {
if o == nil {
var ret float32
return ret
}
return o.CampaignRefundedDiscounts
}
// SetCampaignRefundedDiscounts sets field value
func (o *CampaignAnalytics) SetCampaignRefundedDiscounts(v float32) {
o.CampaignRefundedDiscounts = v
}
// GetTotalCampaignRefundedDiscounts returns the TotalCampaignRefundedDiscounts field value
func (o *CampaignAnalytics) GetTotalCampaignRefundedDiscounts() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalCampaignRefundedDiscounts
}
// SetTotalCampaignRefundedDiscounts sets field value
func (o *CampaignAnalytics) SetTotalCampaignRefundedDiscounts(v float32) {
o.TotalCampaignRefundedDiscounts = v
}
// GetCampaignFreeItems returns the CampaignFreeItems field value
func (o *CampaignAnalytics) GetCampaignFreeItems() int32 {
if o == nil {
var ret int32
return ret
}
return o.CampaignFreeItems
}
// SetCampaignFreeItems sets field value
func (o *CampaignAnalytics) SetCampaignFreeItems(v int32) {
o.CampaignFreeItems = v
}
// GetTotalCampaignFreeItems returns the TotalCampaignFreeItems field value
func (o *CampaignAnalytics) GetTotalCampaignFreeItems() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalCampaignFreeItems
}
// SetTotalCampaignFreeItems sets field value
func (o *CampaignAnalytics) SetTotalCampaignFreeItems(v int32) {
o.TotalCampaignFreeItems = v
}
// GetCouponRedemptions returns the CouponRedemptions field value
func (o *CampaignAnalytics) GetCouponRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.CouponRedemptions
}
// SetCouponRedemptions sets field value
func (o *CampaignAnalytics) SetCouponRedemptions(v int32) {
o.CouponRedemptions = v
}
// GetTotalCouponRedemptions returns the TotalCouponRedemptions field value
func (o *CampaignAnalytics) GetTotalCouponRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalCouponRedemptions
}
// SetTotalCouponRedemptions sets field value
func (o *CampaignAnalytics) SetTotalCouponRedemptions(v int32) {
o.TotalCouponRedemptions = v
}
// GetCouponRolledbackRedemptions returns the CouponRolledbackRedemptions field value
func (o *CampaignAnalytics) GetCouponRolledbackRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.CouponRolledbackRedemptions
}
// SetCouponRolledbackRedemptions sets field value
func (o *CampaignAnalytics) SetCouponRolledbackRedemptions(v int32) {
o.CouponRolledbackRedemptions = v
}
// GetTotalCouponRolledbackRedemptions returns the TotalCouponRolledbackRedemptions field value
func (o *CampaignAnalytics) GetTotalCouponRolledbackRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalCouponRolledbackRedemptions
}
// SetTotalCouponRolledbackRedemptions sets field value
func (o *CampaignAnalytics) SetTotalCouponRolledbackRedemptions(v int32) {
o.TotalCouponRolledbackRedemptions = v
}
// GetReferralRedemptions returns the ReferralRedemptions field value
func (o *CampaignAnalytics) GetReferralRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.ReferralRedemptions
}
// SetReferralRedemptions sets field value
func (o *CampaignAnalytics) SetReferralRedemptions(v int32) {
o.ReferralRedemptions = v
}
// GetTotalReferralRedemptions returns the TotalReferralRedemptions field value
func (o *CampaignAnalytics) GetTotalReferralRedemptions() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalReferralRedemptions
}
// SetTotalReferralRedemptions sets field value
func (o *CampaignAnalytics) SetTotalReferralRedemptions(v int32) {
o.TotalReferralRedemptions = v
}
// GetCouponsCreated returns the CouponsCreated field value
func (o *CampaignAnalytics) GetCouponsCreated() int32 {
if o == nil {
var ret int32
return ret
}
return o.CouponsCreated
}
// SetCouponsCreated sets field value
func (o *CampaignAnalytics) SetCouponsCreated(v int32) {
o.CouponsCreated = v
}
// GetTotalCouponsCreated returns the TotalCouponsCreated field value
func (o *CampaignAnalytics) GetTotalCouponsCreated() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalCouponsCreated
}
// SetTotalCouponsCreated sets field value
func (o *CampaignAnalytics) SetTotalCouponsCreated(v int32) {
o.TotalCouponsCreated = v
}
// GetReferralsCreated returns the ReferralsCreated field value
func (o *CampaignAnalytics) GetReferralsCreated() int32 {
if o == nil {
var ret int32
return ret
}
return o.ReferralsCreated
}
// SetReferralsCreated sets field value
func (o *CampaignAnalytics) SetReferralsCreated(v int32) {
o.ReferralsCreated = v
}
// GetTotalReferralsCreated returns the TotalReferralsCreated field value
func (o *CampaignAnalytics) GetTotalReferralsCreated() int32 {
if o == nil {
var ret int32
return ret
}
return o.TotalReferralsCreated
}
// SetTotalReferralsCreated sets field value
func (o *CampaignAnalytics) SetTotalReferralsCreated(v int32) {
o.TotalReferralsCreated = v
}
// GetAddedLoyaltyPoints returns the AddedLoyaltyPoints field value
func (o *CampaignAnalytics) GetAddedLoyaltyPoints() float32 {
if o == nil {
var ret float32
return ret
}
return o.AddedLoyaltyPoints
}
// SetAddedLoyaltyPoints sets field value
func (o *CampaignAnalytics) SetAddedLoyaltyPoints(v float32) {
o.AddedLoyaltyPoints = v
}
// GetTotalAddedLoyaltyPoints returns the TotalAddedLoyaltyPoints field value
func (o *CampaignAnalytics) GetTotalAddedLoyaltyPoints() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalAddedLoyaltyPoints
}
// SetTotalAddedLoyaltyPoints sets field value
func (o *CampaignAnalytics) SetTotalAddedLoyaltyPoints(v float32) {
o.TotalAddedLoyaltyPoints = v
}
// GetDeductedLoyaltyPoints returns the DeductedLoyaltyPoints field value
func (o *CampaignAnalytics) GetDeductedLoyaltyPoints() float32 {
if o == nil {
var ret float32
return ret
}
return o.DeductedLoyaltyPoints
}
// SetDeductedLoyaltyPoints sets field value
func (o *CampaignAnalytics) SetDeductedLoyaltyPoints(v float32) {
o.DeductedLoyaltyPoints = v
}
// GetTotalDeductedLoyaltyPoints returns the TotalDeductedLoyaltyPoints field value
func (o *CampaignAnalytics) GetTotalDeductedLoyaltyPoints() float32 {
if o == nil {
var ret float32
return ret
}
return o.TotalDeductedLoyaltyPoints
}
// SetTotalDeductedLoyaltyPoints sets field value
func (o *CampaignAnalytics) SetTotalDeductedLoyaltyPoints(v float32) {
o.TotalDeductedLoyaltyPoints = v
}
type NullableCampaignAnalytics struct {
Value CampaignAnalytics
ExplicitNull bool
}
func (v NullableCampaignAnalytics) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
return json.Marshal(v.Value)
}
}
func (v *NullableCampaignAnalytics) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}