forked from talon-one/talon_go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_card_ledger_transaction_log_entry.go
318 lines (266 loc) · 8.72 KB
/
model_card_ledger_transaction_log_entry.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
/*
* 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"
)
// CardLedgerTransactionLogEntry Log entry for a given loyalty card transaction.
type CardLedgerTransactionLogEntry struct {
// Date and time the loyalty card transaction occurred.
Created time.Time `json:"created"`
// ID of the loyalty program.
ProgramId int32 `json:"programId"`
// The alphanumeric identifier of the loyalty card.
CardIdentifier string `json:"cardIdentifier"`
// The ID of the Application that owns this entity.
ApplicationId *int32 `json:"applicationId,omitempty"`
// The **internal** ID of the session.
SessionId *int32 `json:"sessionId,omitempty"`
// ID of the customer session where the transaction occurred.
CustomerSessionId *string `json:"customerSessionId,omitempty"`
// Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points.
Type string `json:"type"`
// Name or reason of the loyalty ledger transaction.
Name string `json:"name"`
// When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time.
StartDate string `json:"startDate"`
// Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points become active from the given date.
ExpiryDate string `json:"expiryDate"`
// ID of the subledger.
SubledgerId string `json:"subledgerId"`
// Amount of loyalty points added or deducted in the transaction.
Amount float32 `json:"amount"`
// ID of the loyalty ledger entry.
Id int32 `json:"id"`
}
// GetCreated returns the Created field value
func (o *CardLedgerTransactionLogEntry) GetCreated() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.Created
}
// SetCreated sets field value
func (o *CardLedgerTransactionLogEntry) SetCreated(v time.Time) {
o.Created = v
}
// GetProgramId returns the ProgramId field value
func (o *CardLedgerTransactionLogEntry) GetProgramId() int32 {
if o == nil {
var ret int32
return ret
}
return o.ProgramId
}
// SetProgramId sets field value
func (o *CardLedgerTransactionLogEntry) SetProgramId(v int32) {
o.ProgramId = v
}
// GetCardIdentifier returns the CardIdentifier field value
func (o *CardLedgerTransactionLogEntry) GetCardIdentifier() string {
if o == nil {
var ret string
return ret
}
return o.CardIdentifier
}
// SetCardIdentifier sets field value
func (o *CardLedgerTransactionLogEntry) SetCardIdentifier(v string) {
o.CardIdentifier = v
}
// GetApplicationId returns the ApplicationId field value if set, zero value otherwise.
func (o *CardLedgerTransactionLogEntry) GetApplicationId() int32 {
if o == nil || o.ApplicationId == nil {
var ret int32
return ret
}
return *o.ApplicationId
}
// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *CardLedgerTransactionLogEntry) GetApplicationIdOk() (int32, bool) {
if o == nil || o.ApplicationId == nil {
var ret int32
return ret, false
}
return *o.ApplicationId, true
}
// HasApplicationId returns a boolean if a field has been set.
func (o *CardLedgerTransactionLogEntry) HasApplicationId() bool {
if o != nil && o.ApplicationId != nil {
return true
}
return false
}
// SetApplicationId gets a reference to the given int32 and assigns it to the ApplicationId field.
func (o *CardLedgerTransactionLogEntry) SetApplicationId(v int32) {
o.ApplicationId = &v
}
// GetSessionId returns the SessionId field value if set, zero value otherwise.
func (o *CardLedgerTransactionLogEntry) GetSessionId() int32 {
if o == nil || o.SessionId == nil {
var ret int32
return ret
}
return *o.SessionId
}
// GetSessionIdOk returns a tuple with the SessionId field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *CardLedgerTransactionLogEntry) GetSessionIdOk() (int32, bool) {
if o == nil || o.SessionId == nil {
var ret int32
return ret, false
}
return *o.SessionId, true
}
// HasSessionId returns a boolean if a field has been set.
func (o *CardLedgerTransactionLogEntry) HasSessionId() bool {
if o != nil && o.SessionId != nil {
return true
}
return false
}
// SetSessionId gets a reference to the given int32 and assigns it to the SessionId field.
func (o *CardLedgerTransactionLogEntry) SetSessionId(v int32) {
o.SessionId = &v
}
// GetCustomerSessionId returns the CustomerSessionId field value if set, zero value otherwise.
func (o *CardLedgerTransactionLogEntry) GetCustomerSessionId() string {
if o == nil || o.CustomerSessionId == nil {
var ret string
return ret
}
return *o.CustomerSessionId
}
// GetCustomerSessionIdOk returns a tuple with the CustomerSessionId field value if set, zero value otherwise
// and a boolean to check if the value has been set.
func (o *CardLedgerTransactionLogEntry) GetCustomerSessionIdOk() (string, bool) {
if o == nil || o.CustomerSessionId == nil {
var ret string
return ret, false
}
return *o.CustomerSessionId, true
}
// HasCustomerSessionId returns a boolean if a field has been set.
func (o *CardLedgerTransactionLogEntry) HasCustomerSessionId() bool {
if o != nil && o.CustomerSessionId != nil {
return true
}
return false
}
// SetCustomerSessionId gets a reference to the given string and assigns it to the CustomerSessionId field.
func (o *CardLedgerTransactionLogEntry) SetCustomerSessionId(v string) {
o.CustomerSessionId = &v
}
// GetType returns the Type field value
func (o *CardLedgerTransactionLogEntry) GetType() string {
if o == nil {
var ret string
return ret
}
return o.Type
}
// SetType sets field value
func (o *CardLedgerTransactionLogEntry) SetType(v string) {
o.Type = v
}
// GetName returns the Name field value
func (o *CardLedgerTransactionLogEntry) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// SetName sets field value
func (o *CardLedgerTransactionLogEntry) SetName(v string) {
o.Name = v
}
// GetStartDate returns the StartDate field value
func (o *CardLedgerTransactionLogEntry) GetStartDate() string {
if o == nil {
var ret string
return ret
}
return o.StartDate
}
// SetStartDate sets field value
func (o *CardLedgerTransactionLogEntry) SetStartDate(v string) {
o.StartDate = v
}
// GetExpiryDate returns the ExpiryDate field value
func (o *CardLedgerTransactionLogEntry) GetExpiryDate() string {
if o == nil {
var ret string
return ret
}
return o.ExpiryDate
}
// SetExpiryDate sets field value
func (o *CardLedgerTransactionLogEntry) SetExpiryDate(v string) {
o.ExpiryDate = v
}
// GetSubledgerId returns the SubledgerId field value
func (o *CardLedgerTransactionLogEntry) GetSubledgerId() string {
if o == nil {
var ret string
return ret
}
return o.SubledgerId
}
// SetSubledgerId sets field value
func (o *CardLedgerTransactionLogEntry) SetSubledgerId(v string) {
o.SubledgerId = v
}
// GetAmount returns the Amount field value
func (o *CardLedgerTransactionLogEntry) GetAmount() float32 {
if o == nil {
var ret float32
return ret
}
return o.Amount
}
// SetAmount sets field value
func (o *CardLedgerTransactionLogEntry) SetAmount(v float32) {
o.Amount = v
}
// GetId returns the Id field value
func (o *CardLedgerTransactionLogEntry) GetId() int32 {
if o == nil {
var ret int32
return ret
}
return o.Id
}
// SetId sets field value
func (o *CardLedgerTransactionLogEntry) SetId(v int32) {
o.Id = v
}
type NullableCardLedgerTransactionLogEntry struct {
Value CardLedgerTransactionLogEntry
ExplicitNull bool
}
func (v NullableCardLedgerTransactionLogEntry) MarshalJSON() ([]byte, error) {
switch {
case v.ExplicitNull:
return []byte("null"), nil
default:
return json.Marshal(v.Value)
}
}
func (v *NullableCardLedgerTransactionLogEntry) UnmarshalJSON(src []byte) error {
if bytes.Equal(src, []byte("null")) {
v.ExplicitNull = true
return nil
}
return json.Unmarshal(src, &v.Value)
}