forked from talon-one/talon_go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_add_loyalty_points_effect_props.go
425 lines (360 loc) · 12.8 KB
/
model_add_loyalty_points_effect_props.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
/*
* 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"
)
// AddLoyaltyPointsEffectProps The properties specific to the \"addLoyaltyPoints\" effect. This gets triggered whenever a validated rule contained an \"add loyalty\" effect. These points are automatically stored and managed inside Talon.One.
type AddLoyaltyPointsEffectProps struct {
// The name / description of this loyalty point addition.
Name string `json:"name"`
// The ID of the loyalty program where these points were added.
ProgramId int32 `json:"programId"`
// The ID of the subledger within the loyalty program where these points were added.
SubLedgerId string `json:"subLedgerId"`
// The amount of points that were added.
Value float32 `json:"value"`
// The original amount of loyalty points to be awarded.
DesiredValue *float32 `json:"desiredValue,omitempty"`
// The user for whom these points were added.
RecipientIntegrationId string `json:"recipientIntegrationId"`
// Date after which points will be valid.
StartDate *time.Time `json:"startDate,omitempty"`
// Date after which points will expire.
ExpiryDate *time.Time `json:"expiryDate,omitempty"`
// The identifier of this addition in the loyalty ledger.
TransactionUUID string `json:"transactionUUID"`
// The index of the item in the cart items list on which the loyal points addition should be applied.
CartItemPosition *float32 `json:"cartItemPosition,omitempty"`
// For cart items with `quantity` > 1, the sub position indicates to which item the loyalty points addition is applied.
CartItemSubPosition *float32 `json:"cartItemSubPosition,omitempty"`
// The alphanumeric identifier of the loyalty card.
CardIdentifier *string `json:"cardIdentifier,omitempty"`
// The position of the bundle in a list of item bundles created from the same bundle definition.
BundleIndex *int32 `json:"bundleIndex,omitempty"`
// The name of the bundle definition.
BundleName *string `json:"bundleName,omitempty"`
}
// GetName returns the Name field value
func (o *AddLoyaltyPointsEffectProps) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// SetName sets field value
func (o *AddLoyaltyPointsEffectProps) SetName(v string) {
o.Name = v
}
// GetProgramId returns the ProgramId field value
func (o *AddLoyaltyPointsEffectProps) GetProgramId() int32 {
if o == nil {
var ret int32
return ret
}
return o.ProgramId
}
// SetProgramId sets field value
func (o *AddLoyaltyPointsEffectProps) SetProgramId(v int32) {
o.ProgramId = v
}
// GetSubLedgerId returns the SubLedgerId field value
func (o *AddLoyaltyPointsEffectProps) GetSubLedgerId() string {
if o == nil {
var ret string
return ret
}
return o.SubLedgerId
}
// SetSubLedgerId sets field value
func (o *AddLoyaltyPointsEffectProps) SetSubLedgerId(v string) {
o.SubLedgerId = v
}
// GetValue returns the Value field value
func (o *AddLoyaltyPointsEffectProps) GetValue() float32 {
if o == nil {
var ret float32
return ret
}
return o.Value
}
// SetValue sets field value
func (o *AddLoyaltyPointsEffectProps) SetValue(v float32) {
o.Value = v
}
// GetDesiredValue returns the DesiredValue field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetDesiredValue() float32 {
if o == nil || o.DesiredValue == nil {
var ret float32
return ret
}
return *o.DesiredValue
}
// GetDesiredValueOk returns a tuple with the DesiredValue field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetDesiredValueOk() (float32, bool) {
if o == nil || o.DesiredValue == nil {
var ret float32
return ret, false
}
return *o.DesiredValue, true
}
// HasDesiredValue returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasDesiredValue() bool {
if o != nil && o.DesiredValue != nil {
return true
}
return false
}
// SetDesiredValue gets a reference to the given float32 and assigns it to the DesiredValue field.
func (o *AddLoyaltyPointsEffectProps) SetDesiredValue(v float32) {
o.DesiredValue = &v
}
// GetRecipientIntegrationId returns the RecipientIntegrationId field value
func (o *AddLoyaltyPointsEffectProps) GetRecipientIntegrationId() string {
if o == nil {
var ret string
return ret
}
return o.RecipientIntegrationId
}
// SetRecipientIntegrationId sets field value
func (o *AddLoyaltyPointsEffectProps) SetRecipientIntegrationId(v string) {
o.RecipientIntegrationId = v
}
// GetStartDate returns the StartDate field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetStartDate() time.Time {
if o == nil || o.StartDate == nil {
var ret time.Time
return ret
}
return *o.StartDate
}
// GetStartDateOk returns a tuple with the StartDate field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetStartDateOk() (time.Time, bool) {
if o == nil || o.StartDate == nil {
var ret time.Time
return ret, false
}
return *o.StartDate, true
}
// HasStartDate returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasStartDate() bool {
if o != nil && o.StartDate != nil {
return true
}
return false
}
// SetStartDate gets a reference to the given time.Time and assigns it to the StartDate field.
func (o *AddLoyaltyPointsEffectProps) SetStartDate(v time.Time) {
o.StartDate = &v
}
// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetExpiryDate() time.Time {
if o == nil || o.ExpiryDate == nil {
var ret time.Time
return ret
}
return *o.ExpiryDate
}
// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetExpiryDateOk() (time.Time, bool) {
if o == nil || o.ExpiryDate == nil {
var ret time.Time
return ret, false
}
return *o.ExpiryDate, true
}
// HasExpiryDate returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasExpiryDate() bool {
if o != nil && o.ExpiryDate != nil {
return true
}
return false
}
// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field.
func (o *AddLoyaltyPointsEffectProps) SetExpiryDate(v time.Time) {
o.ExpiryDate = &v
}
// GetTransactionUUID returns the TransactionUUID field value
func (o *AddLoyaltyPointsEffectProps) GetTransactionUUID() string {
if o == nil {
var ret string
return ret
}
return o.TransactionUUID
}
// SetTransactionUUID sets field value
func (o *AddLoyaltyPointsEffectProps) SetTransactionUUID(v string) {
o.TransactionUUID = v
}
// GetCartItemPosition returns the CartItemPosition field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetCartItemPosition() float32 {
if o == nil || o.CartItemPosition == nil {
var ret float32
return ret
}
return *o.CartItemPosition
}
// GetCartItemPositionOk returns a tuple with the CartItemPosition field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetCartItemPositionOk() (float32, bool) {
if o == nil || o.CartItemPosition == nil {
var ret float32
return ret, false
}
return *o.CartItemPosition, true
}
// HasCartItemPosition returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasCartItemPosition() bool {
if o != nil && o.CartItemPosition != nil {
return true
}
return false
}
// SetCartItemPosition gets a reference to the given float32 and assigns it to the CartItemPosition field.
func (o *AddLoyaltyPointsEffectProps) SetCartItemPosition(v float32) {
o.CartItemPosition = &v
}
// GetCartItemSubPosition returns the CartItemSubPosition field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetCartItemSubPosition() float32 {
if o == nil || o.CartItemSubPosition == nil {
var ret float32
return ret
}
return *o.CartItemSubPosition
}
// GetCartItemSubPositionOk returns a tuple with the CartItemSubPosition field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetCartItemSubPositionOk() (float32, bool) {
if o == nil || o.CartItemSubPosition == nil {
var ret float32
return ret, false
}
return *o.CartItemSubPosition, true
}
// HasCartItemSubPosition returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasCartItemSubPosition() bool {
if o != nil && o.CartItemSubPosition != nil {
return true
}
return false
}
// SetCartItemSubPosition gets a reference to the given float32 and assigns it to the CartItemSubPosition field.
func (o *AddLoyaltyPointsEffectProps) SetCartItemSubPosition(v float32) {
o.CartItemSubPosition = &v
}
// GetCardIdentifier returns the CardIdentifier field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetCardIdentifier() string {
if o == nil || o.CardIdentifier == nil {
var ret string
return ret
}
return *o.CardIdentifier
}
// GetCardIdentifierOk returns a tuple with the CardIdentifier field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetCardIdentifierOk() (string, bool) {
if o == nil || o.CardIdentifier == nil {
var ret string
return ret, false
}
return *o.CardIdentifier, true
}
// HasCardIdentifier returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasCardIdentifier() bool {
if o != nil && o.CardIdentifier != nil {
return true
}
return false
}
// SetCardIdentifier gets a reference to the given string and assigns it to the CardIdentifier field.
func (o *AddLoyaltyPointsEffectProps) SetCardIdentifier(v string) {
o.CardIdentifier = &v
}
// GetBundleIndex returns the BundleIndex field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetBundleIndex() int32 {
if o == nil || o.BundleIndex == nil {
var ret int32
return ret
}
return *o.BundleIndex
}
// GetBundleIndexOk returns a tuple with the BundleIndex field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetBundleIndexOk() (int32, bool) {
if o == nil || o.BundleIndex == nil {
var ret int32
return ret, false
}
return *o.BundleIndex, true
}
// HasBundleIndex returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasBundleIndex() bool {
if o != nil && o.BundleIndex != nil {
return true
}
return false
}
// SetBundleIndex gets a reference to the given int32 and assigns it to the BundleIndex field.
func (o *AddLoyaltyPointsEffectProps) SetBundleIndex(v int32) {
o.BundleIndex = &v
}
// GetBundleName returns the BundleName field value if set, zero value otherwise.
func (o *AddLoyaltyPointsEffectProps) GetBundleName() string {
if o == nil || o.BundleName == nil {
var ret string
return ret
}
return *o.BundleName
}
// GetBundleNameOk returns a tuple with the BundleName field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *AddLoyaltyPointsEffectProps) GetBundleNameOk() (string, bool) {
if o == nil || o.BundleName == nil {
var ret string
return ret, false
}
return *o.BundleName, true
}
// HasBundleName returns a boolean if a field has been set.
func (o *AddLoyaltyPointsEffectProps) HasBundleName() bool {
if o != nil && o.BundleName != nil {
return true
}
return false
}
// SetBundleName gets a reference to the given string and assigns it to the BundleName field.
func (o *AddLoyaltyPointsEffectProps) SetBundleName(v string) {
o.BundleName = &v
}
type NullableAddLoyaltyPointsEffectProps struct {
Value AddLoyaltyPointsEffectProps
ExplicitNull bool
}
func (v NullableAddLoyaltyPointsEffectProps) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
return json.Marshal(v.Value)
}
}
func (v *NullableAddLoyaltyPointsEffectProps) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}