leal 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +7 -0
  2. data/.fern/metadata.json +10 -0
  3. data/.fernignore +1 -0
  4. data/.rubocop.yml +103 -0
  5. data/CONTRIBUTING.md +120 -0
  6. data/LICENSE +21 -0
  7. data/README.md +185 -0
  8. data/Rakefile +20 -0
  9. data/custom.gemspec.rb +16 -0
  10. data/lib/leal/cards/client.rb +193 -0
  11. data/lib/leal/cards/types/create_cards_request.rb +13 -0
  12. data/lib/leal/cards/types/create_cards_request_card.rb +33 -0
  13. data/lib/leal/cards/types/create_cards_response.rb +45 -0
  14. data/lib/leal/cards/types/get_cards_request.rb +13 -0
  15. data/lib/leal/cards/types/get_cards_response.rb +45 -0
  16. data/lib/leal/cards/types/list_cards_request.rb +13 -0
  17. data/lib/leal/cards/types/list_cards_response_item.rb +45 -0
  18. data/lib/leal/cards/types/update_cards_request.rb +15 -0
  19. data/lib/leal/cards/types/update_cards_request_card.rb +33 -0
  20. data/lib/leal/cards/types/update_cards_response.rb +45 -0
  21. data/lib/leal/client.rb +62 -0
  22. data/lib/leal/customer_cards/client.rb +203 -0
  23. data/lib/leal/customer_cards/types/get_customer_cards_request.rb +15 -0
  24. data/lib/leal/customer_cards/types/get_customer_cards_response.rb +43 -0
  25. data/lib/leal/customer_cards/types/list_customer_cards_request.rb +13 -0
  26. data/lib/leal/customer_cards/types/list_customer_cards_response_item.rb +37 -0
  27. data/lib/leal/customer_cards/types/redeem_customer_cards_request.rb +17 -0
  28. data/lib/leal/customer_cards/types/redeem_customer_cards_response.rb +13 -0
  29. data/lib/leal/customer_cards/types/redeem_customer_cards_response_redemption.rb +21 -0
  30. data/lib/leal/customer_cards/types/stamp_customer_cards_request.rb +19 -0
  31. data/lib/leal/customer_cards/types/stamp_customer_cards_response.rb +43 -0
  32. data/lib/leal/customers/client.rb +217 -0
  33. data/lib/leal/customers/types/create_customers_request.rb +17 -0
  34. data/lib/leal/customers/types/create_customers_request_customer.rb +23 -0
  35. data/lib/leal/customers/types/create_customers_response.rb +35 -0
  36. data/lib/leal/customers/types/get_customers_request.rb +13 -0
  37. data/lib/leal/customers/types/get_customers_response.rb +35 -0
  38. data/lib/leal/customers/types/list_customers_request.rb +21 -0
  39. data/lib/leal/customers/types/list_customers_response.rb +13 -0
  40. data/lib/leal/customers/types/list_customers_response_pagination.rb +17 -0
  41. data/lib/leal/customers/types/update_customers_request.rb +15 -0
  42. data/lib/leal/customers/types/update_customers_request_customer.rb +23 -0
  43. data/lib/leal/customers/types/update_customers_response.rb +35 -0
  44. data/lib/leal/environment.rb +7 -0
  45. data/lib/leal/errors/api_error.rb +8 -0
  46. data/lib/leal/errors/client_error.rb +17 -0
  47. data/lib/leal/errors/redirect_error.rb +8 -0
  48. data/lib/leal/errors/response_error.rb +42 -0
  49. data/lib/leal/errors/server_error.rb +11 -0
  50. data/lib/leal/errors/timeout_error.rb +8 -0
  51. data/lib/leal/internal/errors/constraint_error.rb +10 -0
  52. data/lib/leal/internal/errors/type_error.rb +10 -0
  53. data/lib/leal/internal/http/base_request.rb +51 -0
  54. data/lib/leal/internal/http/raw_client.rb +265 -0
  55. data/lib/leal/internal/iterators/cursor_item_iterator.rb +28 -0
  56. data/lib/leal/internal/iterators/cursor_page_iterator.rb +63 -0
  57. data/lib/leal/internal/iterators/item_iterator.rb +65 -0
  58. data/lib/leal/internal/iterators/offset_item_iterator.rb +30 -0
  59. data/lib/leal/internal/iterators/offset_page_iterator.rb +103 -0
  60. data/lib/leal/internal/json/request.rb +41 -0
  61. data/lib/leal/internal/json/serializable.rb +25 -0
  62. data/lib/leal/internal/multipart/multipart_encoder.rb +141 -0
  63. data/lib/leal/internal/multipart/multipart_form_data.rb +78 -0
  64. data/lib/leal/internal/multipart/multipart_form_data_part.rb +51 -0
  65. data/lib/leal/internal/multipart/multipart_request.rb +40 -0
  66. data/lib/leal/internal/types/array.rb +47 -0
  67. data/lib/leal/internal/types/boolean.rb +34 -0
  68. data/lib/leal/internal/types/enum.rb +56 -0
  69. data/lib/leal/internal/types/hash.rb +36 -0
  70. data/lib/leal/internal/types/model/field.rb +38 -0
  71. data/lib/leal/internal/types/model.rb +208 -0
  72. data/lib/leal/internal/types/type.rb +35 -0
  73. data/lib/leal/internal/types/union.rb +161 -0
  74. data/lib/leal/internal/types/unknown.rb +15 -0
  75. data/lib/leal/internal/types/utils.rb +116 -0
  76. data/lib/leal/locations/client.rb +225 -0
  77. data/lib/leal/locations/types/create_locations_request.rb +13 -0
  78. data/lib/leal/locations/types/create_locations_request_location.rb +13 -0
  79. data/lib/leal/locations/types/create_locations_response.rb +25 -0
  80. data/lib/leal/locations/types/delete_locations_request.rb +13 -0
  81. data/lib/leal/locations/types/get_locations_request.rb +13 -0
  82. data/lib/leal/locations/types/get_locations_response.rb +25 -0
  83. data/lib/leal/locations/types/list_locations_request.rb +11 -0
  84. data/lib/leal/locations/types/list_locations_response_item.rb +25 -0
  85. data/lib/leal/locations/types/update_locations_request.rb +15 -0
  86. data/lib/leal/locations/types/update_locations_request_location.rb +13 -0
  87. data/lib/leal/locations/types/update_locations_response.rb +25 -0
  88. data/lib/leal/posters/client.rb +232 -0
  89. data/lib/leal/posters/types/create_posters_request.rb +13 -0
  90. data/lib/leal/posters/types/create_posters_request_poster.rb +23 -0
  91. data/lib/leal/posters/types/create_posters_response.rb +37 -0
  92. data/lib/leal/posters/types/delete_posters_request.rb +13 -0
  93. data/lib/leal/posters/types/get_posters_request.rb +13 -0
  94. data/lib/leal/posters/types/get_posters_response.rb +37 -0
  95. data/lib/leal/posters/types/list_posters_request.rb +15 -0
  96. data/lib/leal/posters/types/list_posters_response_item.rb +37 -0
  97. data/lib/leal/posters/types/update_posters_request.rb +15 -0
  98. data/lib/leal/posters/types/update_posters_request_poster.rb +21 -0
  99. data/lib/leal/posters/types/update_posters_response.rb +37 -0
  100. data/lib/leal/rewards/client.rb +233 -0
  101. data/lib/leal/rewards/types/create_rewards_request.rb +13 -0
  102. data/lib/leal/rewards/types/create_rewards_request_reward.rb +21 -0
  103. data/lib/leal/rewards/types/create_rewards_response.rb +29 -0
  104. data/lib/leal/rewards/types/delete_rewards_request.rb +13 -0
  105. data/lib/leal/rewards/types/get_rewards_request.rb +13 -0
  106. data/lib/leal/rewards/types/get_rewards_response.rb +29 -0
  107. data/lib/leal/rewards/types/list_rewards_request.rb +15 -0
  108. data/lib/leal/rewards/types/list_rewards_response_item.rb +29 -0
  109. data/lib/leal/rewards/types/update_rewards_request.rb +15 -0
  110. data/lib/leal/rewards/types/update_rewards_request_reward.rb +19 -0
  111. data/lib/leal/rewards/types/update_rewards_response.rb +29 -0
  112. data/lib/leal/status/client.rb +53 -0
  113. data/lib/leal/status/types/check_status_response.rb +23 -0
  114. data/lib/leal/status/types/check_status_response_rate_limit.rb +15 -0
  115. data/lib/leal/stores/client.rb +130 -0
  116. data/lib/leal/stores/types/get_stores_request.rb +11 -0
  117. data/lib/leal/stores/types/get_stores_response.rb +31 -0
  118. data/lib/leal/stores/types/list_stores_response_item.rb +31 -0
  119. data/lib/leal/stores/types/update_stores_request.rb +13 -0
  120. data/lib/leal/stores/types/update_stores_request_account.rb +13 -0
  121. data/lib/leal/stores/types/update_stores_response.rb +31 -0
  122. data/lib/leal/types/error.rb +13 -0
  123. data/lib/leal/types/error_errors.rb +14 -0
  124. data/lib/leal/version.rb +5 -0
  125. data/lib/leal.rb +120 -0
  126. data/reference.md +2414 -0
  127. metadata +168 -0
data/reference.md ADDED
@@ -0,0 +1,2414 @@
1
+ # Reference
2
+ ## Stores
3
+ <details><summary><code>client.stores.<a href="/lib/leal/stores/client.rb">list</a>() -> Internal::Types::Array[Leal::Stores::Types::ListStoresResponseItem]</code></summary>
4
+ <dl>
5
+ <dd>
6
+
7
+ #### 📝 Description
8
+
9
+ <dl>
10
+ <dd>
11
+
12
+ <dl>
13
+ <dd>
14
+
15
+ Returns every store the authenticated user has access to, including summary counts for locations, cards, customers, and posters.
16
+ </dd>
17
+ </dl>
18
+ </dd>
19
+ </dl>
20
+
21
+ #### 🔌 Usage
22
+
23
+ <dl>
24
+ <dd>
25
+
26
+ <dl>
27
+ <dd>
28
+
29
+ ```ruby
30
+ client.stores.list
31
+ ```
32
+ </dd>
33
+ </dl>
34
+ </dd>
35
+ </dl>
36
+
37
+ #### ⚙️ Parameters
38
+
39
+ <dl>
40
+ <dd>
41
+
42
+ <dl>
43
+ <dd>
44
+
45
+ **request_options:** `Leal::Stores::RequestOptions`
46
+
47
+ </dd>
48
+ </dl>
49
+ </dd>
50
+ </dl>
51
+
52
+
53
+ </dd>
54
+ </dl>
55
+ </details>
56
+
57
+ <details><summary><code>client.stores.<a href="/lib/leal/stores/client.rb">get</a>(id:) -> Leal::Stores::Types::GetStoresResponse</code></summary>
58
+ <dl>
59
+ <dd>
60
+
61
+ #### 📝 Description
62
+
63
+ <dl>
64
+ <dd>
65
+
66
+ <dl>
67
+ <dd>
68
+
69
+ Returns detailed information for a single store, including summary counts for its associated resources.
70
+ </dd>
71
+ </dl>
72
+ </dd>
73
+ </dl>
74
+
75
+ #### 🔌 Usage
76
+
77
+ <dl>
78
+ <dd>
79
+
80
+ <dl>
81
+ <dd>
82
+
83
+ ```ruby
84
+ client.stores.get(id: 1)
85
+ ```
86
+ </dd>
87
+ </dl>
88
+ </dd>
89
+ </dl>
90
+
91
+ #### ⚙️ Parameters
92
+
93
+ <dl>
94
+ <dd>
95
+
96
+ <dl>
97
+ <dd>
98
+
99
+ **id:** `Integer` — Store ID
100
+
101
+ </dd>
102
+ </dl>
103
+
104
+ <dl>
105
+ <dd>
106
+
107
+ **request_options:** `Leal::Stores::RequestOptions`
108
+
109
+ </dd>
110
+ </dl>
111
+ </dd>
112
+ </dl>
113
+
114
+
115
+ </dd>
116
+ </dl>
117
+ </details>
118
+
119
+ <details><summary><code>client.stores.<a href="/lib/leal/stores/client.rb">update</a>(id:, request) -> Leal::Stores::Types::UpdateStoresResponse</code></summary>
120
+ <dl>
121
+ <dd>
122
+
123
+ #### 📝 Description
124
+
125
+ <dl>
126
+ <dd>
127
+
128
+ <dl>
129
+ <dd>
130
+
131
+ Updates the store's name or store_name. Use `store_name` for the public-facing name displayed to customers.
132
+ </dd>
133
+ </dl>
134
+ </dd>
135
+ </dl>
136
+
137
+ #### 🔌 Usage
138
+
139
+ <dl>
140
+ <dd>
141
+
142
+ <dl>
143
+ <dd>
144
+
145
+ ```ruby
146
+ client.stores.update(
147
+ id: 1,
148
+ account: {}
149
+ )
150
+ ```
151
+ </dd>
152
+ </dl>
153
+ </dd>
154
+ </dl>
155
+
156
+ #### ⚙️ Parameters
157
+
158
+ <dl>
159
+ <dd>
160
+
161
+ <dl>
162
+ <dd>
163
+
164
+ **id:** `Integer` — Store ID
165
+
166
+ </dd>
167
+ </dl>
168
+
169
+ <dl>
170
+ <dd>
171
+
172
+ **account:** `Leal::Stores::Types::UpdateStoresRequestAccount`
173
+
174
+ </dd>
175
+ </dl>
176
+
177
+ <dl>
178
+ <dd>
179
+
180
+ **request_options:** `Leal::Stores::RequestOptions`
181
+
182
+ </dd>
183
+ </dl>
184
+ </dd>
185
+ </dl>
186
+
187
+
188
+ </dd>
189
+ </dl>
190
+ </details>
191
+
192
+ ## Cards
193
+ <details><summary><code>client.cards.<a href="/lib/leal/cards/client.rb">list</a>(account_id:) -> Internal::Types::Array[Leal::Cards::Types::ListCardsResponseItem]</code></summary>
194
+ <dl>
195
+ <dd>
196
+
197
+ #### 📝 Description
198
+
199
+ <dl>
200
+ <dd>
201
+
202
+ <dl>
203
+ <dd>
204
+
205
+ Returns loyalty card templates for the specified store. By default, only
206
+ active (unarchived) cards are returned. Use the `scope` parameter to include
207
+ archived cards.
208
+ </dd>
209
+ </dl>
210
+ </dd>
211
+ </dl>
212
+
213
+ #### 🔌 Usage
214
+
215
+ <dl>
216
+ <dd>
217
+
218
+ <dl>
219
+ <dd>
220
+
221
+ ```ruby
222
+ client.cards.list(account_id: 1)
223
+ ```
224
+ </dd>
225
+ </dl>
226
+ </dd>
227
+ </dl>
228
+
229
+ #### ⚙️ Parameters
230
+
231
+ <dl>
232
+ <dd>
233
+
234
+ <dl>
235
+ <dd>
236
+
237
+ **account_id:** `Integer` — Parent store ID
238
+
239
+ </dd>
240
+ </dl>
241
+
242
+ <dl>
243
+ <dd>
244
+
245
+ **scope:** `String` — Filter cards by archive status. Default: active only.
246
+
247
+ </dd>
248
+ </dl>
249
+
250
+ <dl>
251
+ <dd>
252
+
253
+ **request_options:** `Leal::Cards::RequestOptions`
254
+
255
+ </dd>
256
+ </dl>
257
+ </dd>
258
+ </dl>
259
+
260
+
261
+ </dd>
262
+ </dl>
263
+ </details>
264
+
265
+ <details><summary><code>client.cards.<a href="/lib/leal/cards/client.rb">create</a>(account_id:, request) -> Leal::Cards::Types::CreateCardsResponse</code></summary>
266
+ <dl>
267
+ <dd>
268
+
269
+ #### 📝 Description
270
+
271
+ <dl>
272
+ <dd>
273
+
274
+ <dl>
275
+ <dd>
276
+
277
+ Creates a new loyalty stamp card template for the store. The card defines the
278
+ visual design (colours, icon, strip) and program rules (stamps required,
279
+ initial stamps).
280
+ </dd>
281
+ </dl>
282
+ </dd>
283
+ </dl>
284
+
285
+ #### 🔌 Usage
286
+
287
+ <dl>
288
+ <dd>
289
+
290
+ <dl>
291
+ <dd>
292
+
293
+ ```ruby
294
+ client.cards.create(
295
+ account_id: 1,
296
+ card: {
297
+ name: "name"
298
+ }
299
+ )
300
+ ```
301
+ </dd>
302
+ </dl>
303
+ </dd>
304
+ </dl>
305
+
306
+ #### ⚙️ Parameters
307
+
308
+ <dl>
309
+ <dd>
310
+
311
+ <dl>
312
+ <dd>
313
+
314
+ **account_id:** `Integer` — Parent store ID
315
+
316
+ </dd>
317
+ </dl>
318
+
319
+ <dl>
320
+ <dd>
321
+
322
+ **card:** `Leal::Cards::Types::CreateCardsRequestCard`
323
+
324
+ </dd>
325
+ </dl>
326
+
327
+ <dl>
328
+ <dd>
329
+
330
+ **request_options:** `Leal::Cards::RequestOptions`
331
+
332
+ </dd>
333
+ </dl>
334
+ </dd>
335
+ </dl>
336
+
337
+
338
+ </dd>
339
+ </dl>
340
+ </details>
341
+
342
+ <details><summary><code>client.cards.<a href="/lib/leal/cards/client.rb">get</a>(account_id:, id:) -> Leal::Cards::Types::GetCardsResponse</code></summary>
343
+ <dl>
344
+ <dd>
345
+
346
+ #### 📝 Description
347
+
348
+ <dl>
349
+ <dd>
350
+
351
+ <dl>
352
+ <dd>
353
+
354
+ Returns a single loyalty card template by ID, including reward and customer card counts.
355
+ </dd>
356
+ </dl>
357
+ </dd>
358
+ </dl>
359
+
360
+ #### 🔌 Usage
361
+
362
+ <dl>
363
+ <dd>
364
+
365
+ <dl>
366
+ <dd>
367
+
368
+ ```ruby
369
+ client.cards.get(
370
+ account_id: 1,
371
+ id: 1
372
+ )
373
+ ```
374
+ </dd>
375
+ </dl>
376
+ </dd>
377
+ </dl>
378
+
379
+ #### ⚙️ Parameters
380
+
381
+ <dl>
382
+ <dd>
383
+
384
+ <dl>
385
+ <dd>
386
+
387
+ **account_id:** `Integer` — Parent store ID
388
+
389
+ </dd>
390
+ </dl>
391
+
392
+ <dl>
393
+ <dd>
394
+
395
+ **id:** `Integer` — Card ID
396
+
397
+ </dd>
398
+ </dl>
399
+
400
+ <dl>
401
+ <dd>
402
+
403
+ **request_options:** `Leal::Cards::RequestOptions`
404
+
405
+ </dd>
406
+ </dl>
407
+ </dd>
408
+ </dl>
409
+
410
+
411
+ </dd>
412
+ </dl>
413
+ </details>
414
+
415
+ <details><summary><code>client.cards.<a href="/lib/leal/cards/client.rb">update</a>(account_id:, id:, request) -> Leal::Cards::Types::UpdateCardsResponse</code></summary>
416
+ <dl>
417
+ <dd>
418
+
419
+ #### 📝 Description
420
+
421
+ <dl>
422
+ <dd>
423
+
424
+ <dl>
425
+ <dd>
426
+
427
+ Updates an existing loyalty card template. Only the provided attributes are changed.
428
+ </dd>
429
+ </dl>
430
+ </dd>
431
+ </dl>
432
+
433
+ #### 🔌 Usage
434
+
435
+ <dl>
436
+ <dd>
437
+
438
+ <dl>
439
+ <dd>
440
+
441
+ ```ruby
442
+ client.cards.update(
443
+ account_id: 1,
444
+ id: 1,
445
+ card: {}
446
+ )
447
+ ```
448
+ </dd>
449
+ </dl>
450
+ </dd>
451
+ </dl>
452
+
453
+ #### ⚙️ Parameters
454
+
455
+ <dl>
456
+ <dd>
457
+
458
+ <dl>
459
+ <dd>
460
+
461
+ **account_id:** `Integer` — Parent store ID
462
+
463
+ </dd>
464
+ </dl>
465
+
466
+ <dl>
467
+ <dd>
468
+
469
+ **id:** `Integer` — Card ID
470
+
471
+ </dd>
472
+ </dl>
473
+
474
+ <dl>
475
+ <dd>
476
+
477
+ **card:** `Leal::Cards::Types::UpdateCardsRequestCard`
478
+
479
+ </dd>
480
+ </dl>
481
+
482
+ <dl>
483
+ <dd>
484
+
485
+ **request_options:** `Leal::Cards::RequestOptions`
486
+
487
+ </dd>
488
+ </dl>
489
+ </dd>
490
+ </dl>
491
+
492
+
493
+ </dd>
494
+ </dl>
495
+ </details>
496
+
497
+ ## Customers
498
+ <details><summary><code>client.customers.<a href="/lib/leal/customers/client.rb">list</a>(account_id:) -> Leal::Customers::Types::ListCustomersResponse</code></summary>
499
+ <dl>
500
+ <dd>
501
+
502
+ #### 📝 Description
503
+
504
+ <dl>
505
+ <dd>
506
+
507
+ <dl>
508
+ <dd>
509
+
510
+ Returns a paginated list of customers for the store. Use the `search` parameter to filter
511
+ by name, email, phone, card code (barcode), or external reference ID. Alternatively, pass
512
+ `source` AND `external_id` together to perform an exact lookup by an external reference -
513
+ the response will contain at most one customer.
514
+ </dd>
515
+ </dl>
516
+ </dd>
517
+ </dl>
518
+
519
+ #### 🔌 Usage
520
+
521
+ <dl>
522
+ <dd>
523
+
524
+ <dl>
525
+ <dd>
526
+
527
+ ```ruby
528
+ client.customers.list(account_id: 1)
529
+ ```
530
+ </dd>
531
+ </dl>
532
+ </dd>
533
+ </dl>
534
+
535
+ #### ⚙️ Parameters
536
+
537
+ <dl>
538
+ <dd>
539
+
540
+ <dl>
541
+ <dd>
542
+
543
+ **account_id:** `Integer` — Store (account) ID
544
+
545
+ </dd>
546
+ </dl>
547
+
548
+ <dl>
549
+ <dd>
550
+
551
+ **search:** `String` — Search query to filter customers by name, email, phone, card code (barcode), or external reference ID
552
+
553
+ </dd>
554
+ </dl>
555
+
556
+ <dl>
557
+ <dd>
558
+
559
+ **source:** `String` — External system slug (e.g. `square`, `shopify`). When combined with `external_id`, performs an exact lookup.
560
+
561
+ </dd>
562
+ </dl>
563
+
564
+ <dl>
565
+ <dd>
566
+
567
+ **external_id:** `String` — External system's identifier for the customer. Must be combined with `source`.
568
+
569
+ </dd>
570
+ </dl>
571
+
572
+ <dl>
573
+ <dd>
574
+
575
+ **page:** `Integer` — Page number (defaults to 1)
576
+
577
+ </dd>
578
+ </dl>
579
+
580
+ <dl>
581
+ <dd>
582
+
583
+ **items:** `Integer` — Number of items per page
584
+
585
+ </dd>
586
+ </dl>
587
+
588
+ <dl>
589
+ <dd>
590
+
591
+ **request_options:** `Leal::Customers::RequestOptions`
592
+
593
+ </dd>
594
+ </dl>
595
+ </dd>
596
+ </dl>
597
+
598
+
599
+ </dd>
600
+ </dl>
601
+ </details>
602
+
603
+ <details><summary><code>client.customers.<a href="/lib/leal/customers/client.rb">create</a>(account_id:, request) -> Leal::Customers::Types::CreateCustomersResponse</code></summary>
604
+ <dl>
605
+ <dd>
606
+
607
+ #### 📝 Description
608
+
609
+ <dl>
610
+ <dd>
611
+
612
+ <dl>
613
+ <dd>
614
+
615
+ Creates a new customer for the store. Requires `first_name` and at least one of `email` or `phone`.
616
+ Optionally enroll the customer in a loyalty card by passing `card_id`, and trigger delivery of
617
+ card links (email/SMS) by passing `send_card_links`. When a card with initial stamps is assigned,
618
+ those stamps are automatically applied as a welcome bonus.
619
+
620
+ Pass `metadata` to attach arbitrary key/value data, and `external_references` to link the
621
+ customer to records in other systems (e.g. Square, Shopify). External references are upserted
622
+ by `(source, external_id)` so this endpoint is safe to call with the same references twice.
623
+ </dd>
624
+ </dl>
625
+ </dd>
626
+ </dl>
627
+
628
+ #### 🔌 Usage
629
+
630
+ <dl>
631
+ <dd>
632
+
633
+ <dl>
634
+ <dd>
635
+
636
+ ```ruby
637
+ client.customers.create(
638
+ account_id: 1,
639
+ customer: {
640
+ first_name: "first_name"
641
+ }
642
+ )
643
+ ```
644
+ </dd>
645
+ </dl>
646
+ </dd>
647
+ </dl>
648
+
649
+ #### ⚙️ Parameters
650
+
651
+ <dl>
652
+ <dd>
653
+
654
+ <dl>
655
+ <dd>
656
+
657
+ **account_id:** `Integer` — Store (account) ID
658
+
659
+ </dd>
660
+ </dl>
661
+
662
+ <dl>
663
+ <dd>
664
+
665
+ **card_id:** `Integer` — Loyalty card ID to auto-enroll the customer in
666
+
667
+ </dd>
668
+ </dl>
669
+
670
+ <dl>
671
+ <dd>
672
+
673
+ **customer:** `Leal::Customers::Types::CreateCustomersRequestCustomer`
674
+
675
+ </dd>
676
+ </dl>
677
+
678
+ <dl>
679
+ <dd>
680
+
681
+ **send_card_links:** `Internal::Types::Boolean` — When true, sends the card links to the customer via email/SMS after enrollment. Note: even without this flag, the response includes `apple_wallet_url` and `google_wallet_url` in each customer card object so you can deliver them yourself.
682
+
683
+ </dd>
684
+ </dl>
685
+
686
+ <dl>
687
+ <dd>
688
+
689
+ **request_options:** `Leal::Customers::RequestOptions`
690
+
691
+ </dd>
692
+ </dl>
693
+ </dd>
694
+ </dl>
695
+
696
+
697
+ </dd>
698
+ </dl>
699
+ </details>
700
+
701
+ <details><summary><code>client.customers.<a href="/lib/leal/customers/client.rb">get</a>(account_id:, id:) -> Leal::Customers::Types::GetCustomersResponse</code></summary>
702
+ <dl>
703
+ <dd>
704
+
705
+ #### 📝 Description
706
+
707
+ <dl>
708
+ <dd>
709
+
710
+ <dl>
711
+ <dd>
712
+
713
+ Returns detailed information about a single customer, including all of their
714
+ enrolled loyalty cards with stamp progress and wallet pass URLs (`apple_wallet_url`
715
+ and `google_wallet_url`) for each card. Also includes `metadata` and
716
+ `external_references` so you can sync state with external systems.
717
+ </dd>
718
+ </dl>
719
+ </dd>
720
+ </dl>
721
+
722
+ #### 🔌 Usage
723
+
724
+ <dl>
725
+ <dd>
726
+
727
+ <dl>
728
+ <dd>
729
+
730
+ ```ruby
731
+ client.customers.get(
732
+ account_id: 1,
733
+ id: 1
734
+ )
735
+ ```
736
+ </dd>
737
+ </dl>
738
+ </dd>
739
+ </dl>
740
+
741
+ #### ⚙️ Parameters
742
+
743
+ <dl>
744
+ <dd>
745
+
746
+ <dl>
747
+ <dd>
748
+
749
+ **account_id:** `Integer` — Store (account) ID
750
+
751
+ </dd>
752
+ </dl>
753
+
754
+ <dl>
755
+ <dd>
756
+
757
+ **id:** `Integer` — Customer ID
758
+
759
+ </dd>
760
+ </dl>
761
+
762
+ <dl>
763
+ <dd>
764
+
765
+ **request_options:** `Leal::Customers::RequestOptions`
766
+
767
+ </dd>
768
+ </dl>
769
+ </dd>
770
+ </dl>
771
+
772
+
773
+ </dd>
774
+ </dl>
775
+ </details>
776
+
777
+ <details><summary><code>client.customers.<a href="/lib/leal/customers/client.rb">update</a>(account_id:, id:, request) -> Leal::Customers::Types::UpdateCustomersResponse</code></summary>
778
+ <dl>
779
+ <dd>
780
+
781
+ #### 📝 Description
782
+
783
+ <dl>
784
+ <dd>
785
+
786
+ <dl>
787
+ <dd>
788
+
789
+ Updates an existing customer's details. To add stamps or redeem rewards, use the
790
+ customer cards endpoints instead.
791
+
792
+ `metadata` is shallow-merged into the existing metadata. `external_references` are upserted
793
+ by `(source, external_id)` - to remove a reference, omit it from subsequent calls and use
794
+ a separate `DELETE` workflow (not yet exposed via API; manage in dashboard for now).
795
+ </dd>
796
+ </dl>
797
+ </dd>
798
+ </dl>
799
+
800
+ #### 🔌 Usage
801
+
802
+ <dl>
803
+ <dd>
804
+
805
+ <dl>
806
+ <dd>
807
+
808
+ ```ruby
809
+ client.customers.update(
810
+ account_id: 1,
811
+ id: 1,
812
+ customer: {}
813
+ )
814
+ ```
815
+ </dd>
816
+ </dl>
817
+ </dd>
818
+ </dl>
819
+
820
+ #### ⚙️ Parameters
821
+
822
+ <dl>
823
+ <dd>
824
+
825
+ <dl>
826
+ <dd>
827
+
828
+ **account_id:** `Integer` — Store (account) ID
829
+
830
+ </dd>
831
+ </dl>
832
+
833
+ <dl>
834
+ <dd>
835
+
836
+ **id:** `Integer` — Customer ID
837
+
838
+ </dd>
839
+ </dl>
840
+
841
+ <dl>
842
+ <dd>
843
+
844
+ **customer:** `Leal::Customers::Types::UpdateCustomersRequestCustomer`
845
+
846
+ </dd>
847
+ </dl>
848
+
849
+ <dl>
850
+ <dd>
851
+
852
+ **request_options:** `Leal::Customers::RequestOptions`
853
+
854
+ </dd>
855
+ </dl>
856
+ </dd>
857
+ </dl>
858
+
859
+
860
+ </dd>
861
+ </dl>
862
+ </details>
863
+
864
+ ## Customer Cards
865
+ <details><summary><code>client.customer_cards.<a href="/lib/leal/customer_cards/client.rb">list</a>(account_id:, customer_id:) -> Internal::Types::Array[Leal::CustomerCards::Types::ListCustomerCardsResponseItem]</code></summary>
866
+ <dl>
867
+ <dd>
868
+
869
+ #### 📝 Description
870
+
871
+ <dl>
872
+ <dd>
873
+
874
+ <dl>
875
+ <dd>
876
+
877
+ Returns all loyalty cards enrolled for a specific customer, including stamp progress,
878
+ status, wallet pass installation state, and wallet pass URLs (`apple_wallet_url` and
879
+ `google_wallet_url`) that you can use to let customers add their loyalty card to
880
+ Apple Wallet or Google Wallet from your own app or website.
881
+ </dd>
882
+ </dl>
883
+ </dd>
884
+ </dl>
885
+
886
+ #### 🔌 Usage
887
+
888
+ <dl>
889
+ <dd>
890
+
891
+ <dl>
892
+ <dd>
893
+
894
+ ```ruby
895
+ client.customer_cards.list(
896
+ account_id: 1,
897
+ customer_id: 1
898
+ )
899
+ ```
900
+ </dd>
901
+ </dl>
902
+ </dd>
903
+ </dl>
904
+
905
+ #### ⚙️ Parameters
906
+
907
+ <dl>
908
+ <dd>
909
+
910
+ <dl>
911
+ <dd>
912
+
913
+ **account_id:** `Integer` — Store (account) ID
914
+
915
+ </dd>
916
+ </dl>
917
+
918
+ <dl>
919
+ <dd>
920
+
921
+ **customer_id:** `Integer` — Customer ID
922
+
923
+ </dd>
924
+ </dl>
925
+
926
+ <dl>
927
+ <dd>
928
+
929
+ **request_options:** `Leal::CustomerCards::RequestOptions`
930
+
931
+ </dd>
932
+ </dl>
933
+ </dd>
934
+ </dl>
935
+
936
+
937
+ </dd>
938
+ </dl>
939
+ </details>
940
+
941
+ <details><summary><code>client.customer_cards.<a href="/lib/leal/customer_cards/client.rb">get</a>(account_id:, customer_id:, id:) -> Leal::CustomerCards::Types::GetCustomerCardsResponse</code></summary>
942
+ <dl>
943
+ <dd>
944
+
945
+ #### 📝 Description
946
+
947
+ <dl>
948
+ <dd>
949
+
950
+ <dl>
951
+ <dd>
952
+
953
+ Returns detailed information about a specific customer card, including stamp progress,
954
+ a list of rewards the customer has earned enough stamps to redeem, and wallet pass URLs
955
+ (`apple_wallet_url` and `google_wallet_url`) for adding the card to Apple Wallet or
956
+ Google Wallet.
957
+ </dd>
958
+ </dl>
959
+ </dd>
960
+ </dl>
961
+
962
+ #### 🔌 Usage
963
+
964
+ <dl>
965
+ <dd>
966
+
967
+ <dl>
968
+ <dd>
969
+
970
+ ```ruby
971
+ client.customer_cards.get(
972
+ account_id: 1,
973
+ customer_id: 1,
974
+ id: 1
975
+ )
976
+ ```
977
+ </dd>
978
+ </dl>
979
+ </dd>
980
+ </dl>
981
+
982
+ #### ⚙️ Parameters
983
+
984
+ <dl>
985
+ <dd>
986
+
987
+ <dl>
988
+ <dd>
989
+
990
+ **account_id:** `Integer` — Store (account) ID
991
+
992
+ </dd>
993
+ </dl>
994
+
995
+ <dl>
996
+ <dd>
997
+
998
+ **customer_id:** `Integer` — Customer ID
999
+
1000
+ </dd>
1001
+ </dl>
1002
+
1003
+ <dl>
1004
+ <dd>
1005
+
1006
+ **id:** `Integer` — Customer card ID
1007
+
1008
+ </dd>
1009
+ </dl>
1010
+
1011
+ <dl>
1012
+ <dd>
1013
+
1014
+ **request_options:** `Leal::CustomerCards::RequestOptions`
1015
+
1016
+ </dd>
1017
+ </dl>
1018
+ </dd>
1019
+ </dl>
1020
+
1021
+
1022
+ </dd>
1023
+ </dl>
1024
+ </details>
1025
+
1026
+ <details><summary><code>client.customer_cards.<a href="/lib/leal/customer_cards/client.rb">redeem</a>(account_id:, customer_id:, id:, request) -> Leal::CustomerCards::Types::RedeemCustomerCardsResponse</code></summary>
1027
+ <dl>
1028
+ <dd>
1029
+
1030
+ #### 📝 Description
1031
+
1032
+ <dl>
1033
+ <dd>
1034
+
1035
+ <dl>
1036
+ <dd>
1037
+
1038
+ Redeems a reward for a customer, deducting the required stamps from their card.
1039
+ The customer must have enough stamps on this card to cover the reward's cost.
1040
+ Triggers wallet pass updates and push notifications.
1041
+ </dd>
1042
+ </dl>
1043
+ </dd>
1044
+ </dl>
1045
+
1046
+ #### 🔌 Usage
1047
+
1048
+ <dl>
1049
+ <dd>
1050
+
1051
+ <dl>
1052
+ <dd>
1053
+
1054
+ ```ruby
1055
+ client.customer_cards.redeem(
1056
+ account_id: 1,
1057
+ customer_id: 1,
1058
+ id: 1,
1059
+ reward_id: 1
1060
+ )
1061
+ ```
1062
+ </dd>
1063
+ </dl>
1064
+ </dd>
1065
+ </dl>
1066
+
1067
+ #### ⚙️ Parameters
1068
+
1069
+ <dl>
1070
+ <dd>
1071
+
1072
+ <dl>
1073
+ <dd>
1074
+
1075
+ **account_id:** `Integer` — Store (account) ID
1076
+
1077
+ </dd>
1078
+ </dl>
1079
+
1080
+ <dl>
1081
+ <dd>
1082
+
1083
+ **customer_id:** `Integer` — Customer ID
1084
+
1085
+ </dd>
1086
+ </dl>
1087
+
1088
+ <dl>
1089
+ <dd>
1090
+
1091
+ **id:** `Integer` — Customer card ID
1092
+
1093
+ </dd>
1094
+ </dl>
1095
+
1096
+ <dl>
1097
+ <dd>
1098
+
1099
+ **reward_id:** `Integer` — Reward ID to redeem
1100
+
1101
+ </dd>
1102
+ </dl>
1103
+
1104
+ <dl>
1105
+ <dd>
1106
+
1107
+ **request_options:** `Leal::CustomerCards::RequestOptions`
1108
+
1109
+ </dd>
1110
+ </dl>
1111
+ </dd>
1112
+ </dl>
1113
+
1114
+
1115
+ </dd>
1116
+ </dl>
1117
+ </details>
1118
+
1119
+ <details><summary><code>client.customer_cards.<a href="/lib/leal/customer_cards/client.rb">stamp</a>(account_id:, customer_id:, id:, request) -> Leal::CustomerCards::Types::StampCustomerCardsResponse</code></summary>
1120
+ <dl>
1121
+ <dd>
1122
+
1123
+ #### 📝 Description
1124
+
1125
+ <dl>
1126
+ <dd>
1127
+
1128
+ <dl>
1129
+ <dd>
1130
+
1131
+ Adds stamps to a customer's loyalty card. Triggers ledger entries, wallet pass updates,
1132
+ and push notifications. Pass `skip_notifications` to stamp silently.
1133
+ </dd>
1134
+ </dl>
1135
+ </dd>
1136
+ </dl>
1137
+
1138
+ #### 🔌 Usage
1139
+
1140
+ <dl>
1141
+ <dd>
1142
+
1143
+ <dl>
1144
+ <dd>
1145
+
1146
+ ```ruby
1147
+ client.customer_cards.stamp(
1148
+ account_id: 1,
1149
+ customer_id: 1,
1150
+ id: 1,
1151
+ stamps: 1
1152
+ )
1153
+ ```
1154
+ </dd>
1155
+ </dl>
1156
+ </dd>
1157
+ </dl>
1158
+
1159
+ #### ⚙️ Parameters
1160
+
1161
+ <dl>
1162
+ <dd>
1163
+
1164
+ <dl>
1165
+ <dd>
1166
+
1167
+ **account_id:** `Integer` — Store (account) ID
1168
+
1169
+ </dd>
1170
+ </dl>
1171
+
1172
+ <dl>
1173
+ <dd>
1174
+
1175
+ **customer_id:** `Integer` — Customer ID
1176
+
1177
+ </dd>
1178
+ </dl>
1179
+
1180
+ <dl>
1181
+ <dd>
1182
+
1183
+ **id:** `Integer` — Customer card ID
1184
+
1185
+ </dd>
1186
+ </dl>
1187
+
1188
+ <dl>
1189
+ <dd>
1190
+
1191
+ **skip_notifications:** `Internal::Types::Boolean` — When true, stamp changes bypass notifications
1192
+
1193
+ </dd>
1194
+ </dl>
1195
+
1196
+ <dl>
1197
+ <dd>
1198
+
1199
+ **stamps:** `Integer` — Number of stamps to add (e.g. 1, 3)
1200
+
1201
+ </dd>
1202
+ </dl>
1203
+
1204
+ <dl>
1205
+ <dd>
1206
+
1207
+ **request_options:** `Leal::CustomerCards::RequestOptions`
1208
+
1209
+ </dd>
1210
+ </dl>
1211
+ </dd>
1212
+ </dl>
1213
+
1214
+
1215
+ </dd>
1216
+ </dl>
1217
+ </details>
1218
+
1219
+ ## Locations
1220
+ <details><summary><code>client.locations.<a href="/lib/leal/locations/client.rb">list</a>(account_id:) -> Internal::Types::Array[Leal::Locations::Types::ListLocationsResponseItem]</code></summary>
1221
+ <dl>
1222
+ <dd>
1223
+
1224
+ #### 📝 Description
1225
+
1226
+ <dl>
1227
+ <dd>
1228
+
1229
+ <dl>
1230
+ <dd>
1231
+
1232
+ Returns every physical location belonging to the specified store.
1233
+ </dd>
1234
+ </dl>
1235
+ </dd>
1236
+ </dl>
1237
+
1238
+ #### 🔌 Usage
1239
+
1240
+ <dl>
1241
+ <dd>
1242
+
1243
+ <dl>
1244
+ <dd>
1245
+
1246
+ ```ruby
1247
+ client.locations.list(account_id: 1)
1248
+ ```
1249
+ </dd>
1250
+ </dl>
1251
+ </dd>
1252
+ </dl>
1253
+
1254
+ #### ⚙️ Parameters
1255
+
1256
+ <dl>
1257
+ <dd>
1258
+
1259
+ <dl>
1260
+ <dd>
1261
+
1262
+ **account_id:** `Integer` — Parent store ID
1263
+
1264
+ </dd>
1265
+ </dl>
1266
+
1267
+ <dl>
1268
+ <dd>
1269
+
1270
+ **request_options:** `Leal::Locations::RequestOptions`
1271
+
1272
+ </dd>
1273
+ </dl>
1274
+ </dd>
1275
+ </dl>
1276
+
1277
+
1278
+ </dd>
1279
+ </dl>
1280
+ </details>
1281
+
1282
+ <details><summary><code>client.locations.<a href="/lib/leal/locations/client.rb">create</a>(account_id:, request) -> Leal::Locations::Types::CreateLocationsResponse</code></summary>
1283
+ <dl>
1284
+ <dd>
1285
+
1286
+ #### 📝 Description
1287
+
1288
+ <dl>
1289
+ <dd>
1290
+
1291
+ <dl>
1292
+ <dd>
1293
+
1294
+ Creates a new physical location for the store. The provided address is
1295
+ automatically geocoded to latitude and longitude coordinates in the background.
1296
+ </dd>
1297
+ </dl>
1298
+ </dd>
1299
+ </dl>
1300
+
1301
+ #### 🔌 Usage
1302
+
1303
+ <dl>
1304
+ <dd>
1305
+
1306
+ <dl>
1307
+ <dd>
1308
+
1309
+ ```ruby
1310
+ client.locations.create(
1311
+ account_id: 1,
1312
+ location: {
1313
+ address: "address",
1314
+ name: "name"
1315
+ }
1316
+ )
1317
+ ```
1318
+ </dd>
1319
+ </dl>
1320
+ </dd>
1321
+ </dl>
1322
+
1323
+ #### ⚙️ Parameters
1324
+
1325
+ <dl>
1326
+ <dd>
1327
+
1328
+ <dl>
1329
+ <dd>
1330
+
1331
+ **account_id:** `Integer` — Parent store ID
1332
+
1333
+ </dd>
1334
+ </dl>
1335
+
1336
+ <dl>
1337
+ <dd>
1338
+
1339
+ **location:** `Leal::Locations::Types::CreateLocationsRequestLocation`
1340
+
1341
+ </dd>
1342
+ </dl>
1343
+
1344
+ <dl>
1345
+ <dd>
1346
+
1347
+ **request_options:** `Leal::Locations::RequestOptions`
1348
+
1349
+ </dd>
1350
+ </dl>
1351
+ </dd>
1352
+ </dl>
1353
+
1354
+
1355
+ </dd>
1356
+ </dl>
1357
+ </details>
1358
+
1359
+ <details><summary><code>client.locations.<a href="/lib/leal/locations/client.rb">get</a>(account_id:, id:) -> Leal::Locations::Types::GetLocationsResponse</code></summary>
1360
+ <dl>
1361
+ <dd>
1362
+
1363
+ #### 📝 Description
1364
+
1365
+ <dl>
1366
+ <dd>
1367
+
1368
+ <dl>
1369
+ <dd>
1370
+
1371
+ Returns a single location by ID.
1372
+ </dd>
1373
+ </dl>
1374
+ </dd>
1375
+ </dl>
1376
+
1377
+ #### 🔌 Usage
1378
+
1379
+ <dl>
1380
+ <dd>
1381
+
1382
+ <dl>
1383
+ <dd>
1384
+
1385
+ ```ruby
1386
+ client.locations.get(
1387
+ account_id: 1,
1388
+ id: 1
1389
+ )
1390
+ ```
1391
+ </dd>
1392
+ </dl>
1393
+ </dd>
1394
+ </dl>
1395
+
1396
+ #### ⚙️ Parameters
1397
+
1398
+ <dl>
1399
+ <dd>
1400
+
1401
+ <dl>
1402
+ <dd>
1403
+
1404
+ **account_id:** `Integer` — Parent store ID
1405
+
1406
+ </dd>
1407
+ </dl>
1408
+
1409
+ <dl>
1410
+ <dd>
1411
+
1412
+ **id:** `Integer` — Location ID
1413
+
1414
+ </dd>
1415
+ </dl>
1416
+
1417
+ <dl>
1418
+ <dd>
1419
+
1420
+ **request_options:** `Leal::Locations::RequestOptions`
1421
+
1422
+ </dd>
1423
+ </dl>
1424
+ </dd>
1425
+ </dl>
1426
+
1427
+
1428
+ </dd>
1429
+ </dl>
1430
+ </details>
1431
+
1432
+ <details><summary><code>client.locations.<a href="/lib/leal/locations/client.rb">delete</a>(account_id:, id:) -> </code></summary>
1433
+ <dl>
1434
+ <dd>
1435
+
1436
+ #### 📝 Description
1437
+
1438
+ <dl>
1439
+ <dd>
1440
+
1441
+ <dl>
1442
+ <dd>
1443
+
1444
+ Permanently deletes a location. This action cannot be undone.
1445
+ </dd>
1446
+ </dl>
1447
+ </dd>
1448
+ </dl>
1449
+
1450
+ #### 🔌 Usage
1451
+
1452
+ <dl>
1453
+ <dd>
1454
+
1455
+ <dl>
1456
+ <dd>
1457
+
1458
+ ```ruby
1459
+ client.locations.delete(
1460
+ account_id: 1,
1461
+ id: 1
1462
+ )
1463
+ ```
1464
+ </dd>
1465
+ </dl>
1466
+ </dd>
1467
+ </dl>
1468
+
1469
+ #### ⚙️ Parameters
1470
+
1471
+ <dl>
1472
+ <dd>
1473
+
1474
+ <dl>
1475
+ <dd>
1476
+
1477
+ **account_id:** `Integer` — Parent store ID
1478
+
1479
+ </dd>
1480
+ </dl>
1481
+
1482
+ <dl>
1483
+ <dd>
1484
+
1485
+ **id:** `Integer` — Location ID
1486
+
1487
+ </dd>
1488
+ </dl>
1489
+
1490
+ <dl>
1491
+ <dd>
1492
+
1493
+ **request_options:** `Leal::Locations::RequestOptions`
1494
+
1495
+ </dd>
1496
+ </dl>
1497
+ </dd>
1498
+ </dl>
1499
+
1500
+
1501
+ </dd>
1502
+ </dl>
1503
+ </details>
1504
+
1505
+ <details><summary><code>client.locations.<a href="/lib/leal/locations/client.rb">update</a>(account_id:, id:, request) -> Leal::Locations::Types::UpdateLocationsResponse</code></summary>
1506
+ <dl>
1507
+ <dd>
1508
+
1509
+ #### 📝 Description
1510
+
1511
+ <dl>
1512
+ <dd>
1513
+
1514
+ <dl>
1515
+ <dd>
1516
+
1517
+ Updates an existing location. If the address is changed, it will be re-geocoded automatically.
1518
+ </dd>
1519
+ </dl>
1520
+ </dd>
1521
+ </dl>
1522
+
1523
+ #### 🔌 Usage
1524
+
1525
+ <dl>
1526
+ <dd>
1527
+
1528
+ <dl>
1529
+ <dd>
1530
+
1531
+ ```ruby
1532
+ client.locations.update(
1533
+ account_id: 1,
1534
+ id: 1,
1535
+ location: {}
1536
+ )
1537
+ ```
1538
+ </dd>
1539
+ </dl>
1540
+ </dd>
1541
+ </dl>
1542
+
1543
+ #### ⚙️ Parameters
1544
+
1545
+ <dl>
1546
+ <dd>
1547
+
1548
+ <dl>
1549
+ <dd>
1550
+
1551
+ **account_id:** `Integer` — Parent store ID
1552
+
1553
+ </dd>
1554
+ </dl>
1555
+
1556
+ <dl>
1557
+ <dd>
1558
+
1559
+ **id:** `Integer` — Location ID
1560
+
1561
+ </dd>
1562
+ </dl>
1563
+
1564
+ <dl>
1565
+ <dd>
1566
+
1567
+ **location:** `Leal::Locations::Types::UpdateLocationsRequestLocation`
1568
+
1569
+ </dd>
1570
+ </dl>
1571
+
1572
+ <dl>
1573
+ <dd>
1574
+
1575
+ **request_options:** `Leal::Locations::RequestOptions`
1576
+
1577
+ </dd>
1578
+ </dl>
1579
+ </dd>
1580
+ </dl>
1581
+
1582
+
1583
+ </dd>
1584
+ </dl>
1585
+ </details>
1586
+
1587
+ ## Posters
1588
+ <details><summary><code>client.posters.<a href="/lib/leal/posters/client.rb">list</a>(account_id:) -> Internal::Types::Array[Leal::Posters::Types::ListPostersResponseItem]</code></summary>
1589
+ <dl>
1590
+ <dd>
1591
+
1592
+ #### 📝 Description
1593
+
1594
+ <dl>
1595
+ <dd>
1596
+
1597
+ <dl>
1598
+ <dd>
1599
+
1600
+ Returns all posters for the store. Optionally filter by card or active status.
1601
+ </dd>
1602
+ </dl>
1603
+ </dd>
1604
+ </dl>
1605
+
1606
+ #### 🔌 Usage
1607
+
1608
+ <dl>
1609
+ <dd>
1610
+
1611
+ <dl>
1612
+ <dd>
1613
+
1614
+ ```ruby
1615
+ client.posters.list(account_id: 1)
1616
+ ```
1617
+ </dd>
1618
+ </dl>
1619
+ </dd>
1620
+ </dl>
1621
+
1622
+ #### ⚙️ Parameters
1623
+
1624
+ <dl>
1625
+ <dd>
1626
+
1627
+ <dl>
1628
+ <dd>
1629
+
1630
+ **account_id:** `Integer` — Store (account) ID
1631
+
1632
+ </dd>
1633
+ </dl>
1634
+
1635
+ <dl>
1636
+ <dd>
1637
+
1638
+ **card_id:** `Integer` — Filter posters belonging to a specific card
1639
+
1640
+ </dd>
1641
+ </dl>
1642
+
1643
+ <dl>
1644
+ <dd>
1645
+
1646
+ **active:** `String` — When present, return only active posters
1647
+
1648
+ </dd>
1649
+ </dl>
1650
+
1651
+ <dl>
1652
+ <dd>
1653
+
1654
+ **request_options:** `Leal::Posters::RequestOptions`
1655
+
1656
+ </dd>
1657
+ </dl>
1658
+ </dd>
1659
+ </dl>
1660
+
1661
+
1662
+ </dd>
1663
+ </dl>
1664
+ </details>
1665
+
1666
+ <details><summary><code>client.posters.<a href="/lib/leal/posters/client.rb">create</a>(account_id:, request) -> Leal::Posters::Types::CreatePostersResponse</code></summary>
1667
+ <dl>
1668
+ <dd>
1669
+
1670
+ #### 📝 Description
1671
+
1672
+ <dl>
1673
+ <dd>
1674
+
1675
+ <dl>
1676
+ <dd>
1677
+
1678
+ Creates a new printable QR code poster for customer signup. The poster will automatically
1679
+ generate a unique public signup URL and QR code. The `card_id` is required on create to
1680
+ associate the poster with a loyalty card.
1681
+ </dd>
1682
+ </dl>
1683
+ </dd>
1684
+ </dl>
1685
+
1686
+ #### 🔌 Usage
1687
+
1688
+ <dl>
1689
+ <dd>
1690
+
1691
+ <dl>
1692
+ <dd>
1693
+
1694
+ ```ruby
1695
+ client.posters.create(
1696
+ account_id: 1,
1697
+ poster: {
1698
+ card_id: 1
1699
+ }
1700
+ )
1701
+ ```
1702
+ </dd>
1703
+ </dl>
1704
+ </dd>
1705
+ </dl>
1706
+
1707
+ #### ⚙️ Parameters
1708
+
1709
+ <dl>
1710
+ <dd>
1711
+
1712
+ <dl>
1713
+ <dd>
1714
+
1715
+ **account_id:** `Integer` — Store (account) ID
1716
+
1717
+ </dd>
1718
+ </dl>
1719
+
1720
+ <dl>
1721
+ <dd>
1722
+
1723
+ **poster:** `Leal::Posters::Types::CreatePostersRequestPoster`
1724
+
1725
+ </dd>
1726
+ </dl>
1727
+
1728
+ <dl>
1729
+ <dd>
1730
+
1731
+ **request_options:** `Leal::Posters::RequestOptions`
1732
+
1733
+ </dd>
1734
+ </dl>
1735
+ </dd>
1736
+ </dl>
1737
+
1738
+
1739
+ </dd>
1740
+ </dl>
1741
+ </details>
1742
+
1743
+ <details><summary><code>client.posters.<a href="/lib/leal/posters/client.rb">get</a>(account_id:, id:) -> Leal::Posters::Types::GetPostersResponse</code></summary>
1744
+ <dl>
1745
+ <dd>
1746
+
1747
+ #### 📝 Description
1748
+
1749
+ <dl>
1750
+ <dd>
1751
+
1752
+ <dl>
1753
+ <dd>
1754
+
1755
+ Returns a single poster by ID, including generated signup and display URLs.
1756
+ </dd>
1757
+ </dl>
1758
+ </dd>
1759
+ </dl>
1760
+
1761
+ #### 🔌 Usage
1762
+
1763
+ <dl>
1764
+ <dd>
1765
+
1766
+ <dl>
1767
+ <dd>
1768
+
1769
+ ```ruby
1770
+ client.posters.get(
1771
+ account_id: 1,
1772
+ id: 1
1773
+ )
1774
+ ```
1775
+ </dd>
1776
+ </dl>
1777
+ </dd>
1778
+ </dl>
1779
+
1780
+ #### ⚙️ Parameters
1781
+
1782
+ <dl>
1783
+ <dd>
1784
+
1785
+ <dl>
1786
+ <dd>
1787
+
1788
+ **account_id:** `Integer` — Store (account) ID
1789
+
1790
+ </dd>
1791
+ </dl>
1792
+
1793
+ <dl>
1794
+ <dd>
1795
+
1796
+ **id:** `Integer` — Poster ID
1797
+
1798
+ </dd>
1799
+ </dl>
1800
+
1801
+ <dl>
1802
+ <dd>
1803
+
1804
+ **request_options:** `Leal::Posters::RequestOptions`
1805
+
1806
+ </dd>
1807
+ </dl>
1808
+ </dd>
1809
+ </dl>
1810
+
1811
+
1812
+ </dd>
1813
+ </dl>
1814
+ </details>
1815
+
1816
+ <details><summary><code>client.posters.<a href="/lib/leal/posters/client.rb">delete</a>(account_id:, id:) -> </code></summary>
1817
+ <dl>
1818
+ <dd>
1819
+
1820
+ #### 📝 Description
1821
+
1822
+ <dl>
1823
+ <dd>
1824
+
1825
+ <dl>
1826
+ <dd>
1827
+
1828
+ Permanently deletes a poster. The public signup URL will stop working.
1829
+ </dd>
1830
+ </dl>
1831
+ </dd>
1832
+ </dl>
1833
+
1834
+ #### 🔌 Usage
1835
+
1836
+ <dl>
1837
+ <dd>
1838
+
1839
+ <dl>
1840
+ <dd>
1841
+
1842
+ ```ruby
1843
+ client.posters.delete(
1844
+ account_id: 1,
1845
+ id: 1
1846
+ )
1847
+ ```
1848
+ </dd>
1849
+ </dl>
1850
+ </dd>
1851
+ </dl>
1852
+
1853
+ #### ⚙️ Parameters
1854
+
1855
+ <dl>
1856
+ <dd>
1857
+
1858
+ <dl>
1859
+ <dd>
1860
+
1861
+ **account_id:** `Integer` — Store (account) ID
1862
+
1863
+ </dd>
1864
+ </dl>
1865
+
1866
+ <dl>
1867
+ <dd>
1868
+
1869
+ **id:** `Integer` — Poster ID
1870
+
1871
+ </dd>
1872
+ </dl>
1873
+
1874
+ <dl>
1875
+ <dd>
1876
+
1877
+ **request_options:** `Leal::Posters::RequestOptions`
1878
+
1879
+ </dd>
1880
+ </dl>
1881
+ </dd>
1882
+ </dl>
1883
+
1884
+
1885
+ </dd>
1886
+ </dl>
1887
+ </details>
1888
+
1889
+ <details><summary><code>client.posters.<a href="/lib/leal/posters/client.rb">update</a>(account_id:, id:, request) -> Leal::Posters::Types::UpdatePostersResponse</code></summary>
1890
+ <dl>
1891
+ <dd>
1892
+
1893
+ #### 📝 Description
1894
+
1895
+ <dl>
1896
+ <dd>
1897
+
1898
+ <dl>
1899
+ <dd>
1900
+
1901
+ Updates an existing poster. The `card_id` cannot be changed after creation.
1902
+ </dd>
1903
+ </dl>
1904
+ </dd>
1905
+ </dl>
1906
+
1907
+ #### 🔌 Usage
1908
+
1909
+ <dl>
1910
+ <dd>
1911
+
1912
+ <dl>
1913
+ <dd>
1914
+
1915
+ ```ruby
1916
+ client.posters.update(
1917
+ account_id: 1,
1918
+ id: 1,
1919
+ poster: {}
1920
+ )
1921
+ ```
1922
+ </dd>
1923
+ </dl>
1924
+ </dd>
1925
+ </dl>
1926
+
1927
+ #### ⚙️ Parameters
1928
+
1929
+ <dl>
1930
+ <dd>
1931
+
1932
+ <dl>
1933
+ <dd>
1934
+
1935
+ **account_id:** `Integer` — Store (account) ID
1936
+
1937
+ </dd>
1938
+ </dl>
1939
+
1940
+ <dl>
1941
+ <dd>
1942
+
1943
+ **id:** `Integer` — Poster ID
1944
+
1945
+ </dd>
1946
+ </dl>
1947
+
1948
+ <dl>
1949
+ <dd>
1950
+
1951
+ **poster:** `Leal::Posters::Types::UpdatePostersRequestPoster`
1952
+
1953
+ </dd>
1954
+ </dl>
1955
+
1956
+ <dl>
1957
+ <dd>
1958
+
1959
+ **request_options:** `Leal::Posters::RequestOptions`
1960
+
1961
+ </dd>
1962
+ </dl>
1963
+ </dd>
1964
+ </dl>
1965
+
1966
+
1967
+ </dd>
1968
+ </dl>
1969
+ </details>
1970
+
1971
+ ## Rewards
1972
+ <details><summary><code>client.rewards.<a href="/lib/leal/rewards/client.rb">list</a>(account_id:) -> Internal::Types::Array[Leal::Rewards::Types::ListRewardsResponseItem]</code></summary>
1973
+ <dl>
1974
+ <dd>
1975
+
1976
+ #### 📝 Description
1977
+
1978
+ <dl>
1979
+ <dd>
1980
+
1981
+ <dl>
1982
+ <dd>
1983
+
1984
+ Returns all rewards for the store. Optionally filter by card or active status.
1985
+ </dd>
1986
+ </dl>
1987
+ </dd>
1988
+ </dl>
1989
+
1990
+ #### 🔌 Usage
1991
+
1992
+ <dl>
1993
+ <dd>
1994
+
1995
+ <dl>
1996
+ <dd>
1997
+
1998
+ ```ruby
1999
+ client.rewards.list(account_id: 1)
2000
+ ```
2001
+ </dd>
2002
+ </dl>
2003
+ </dd>
2004
+ </dl>
2005
+
2006
+ #### ⚙️ Parameters
2007
+
2008
+ <dl>
2009
+ <dd>
2010
+
2011
+ <dl>
2012
+ <dd>
2013
+
2014
+ **account_id:** `Integer` — Store (account) ID
2015
+
2016
+ </dd>
2017
+ </dl>
2018
+
2019
+ <dl>
2020
+ <dd>
2021
+
2022
+ **card_id:** `Integer` — Filter rewards belonging to a specific card
2023
+
2024
+ </dd>
2025
+ </dl>
2026
+
2027
+ <dl>
2028
+ <dd>
2029
+
2030
+ **active:** `String` — When present, return only active rewards
2031
+
2032
+ </dd>
2033
+ </dl>
2034
+
2035
+ <dl>
2036
+ <dd>
2037
+
2038
+ **request_options:** `Leal::Rewards::RequestOptions`
2039
+
2040
+ </dd>
2041
+ </dl>
2042
+ </dd>
2043
+ </dl>
2044
+
2045
+
2046
+ </dd>
2047
+ </dl>
2048
+ </details>
2049
+
2050
+ <details><summary><code>client.rewards.<a href="/lib/leal/rewards/client.rb">create</a>(account_id:, request) -> Leal::Rewards::Types::CreateRewardsResponse</code></summary>
2051
+ <dl>
2052
+ <dd>
2053
+
2054
+ #### 📝 Description
2055
+
2056
+ <dl>
2057
+ <dd>
2058
+
2059
+ <dl>
2060
+ <dd>
2061
+
2062
+ Creates a new reward for a loyalty card. The card must belong to the same store.
2063
+ The `card_id` is required on create but cannot be changed afterwards.
2064
+ </dd>
2065
+ </dl>
2066
+ </dd>
2067
+ </dl>
2068
+
2069
+ #### 🔌 Usage
2070
+
2071
+ <dl>
2072
+ <dd>
2073
+
2074
+ <dl>
2075
+ <dd>
2076
+
2077
+ ```ruby
2078
+ client.rewards.create(
2079
+ account_id: 1,
2080
+ reward: {
2081
+ card_id: 1,
2082
+ name: "name",
2083
+ stamps_required: 1
2084
+ }
2085
+ )
2086
+ ```
2087
+ </dd>
2088
+ </dl>
2089
+ </dd>
2090
+ </dl>
2091
+
2092
+ #### ⚙️ Parameters
2093
+
2094
+ <dl>
2095
+ <dd>
2096
+
2097
+ <dl>
2098
+ <dd>
2099
+
2100
+ **account_id:** `Integer` — Store (account) ID
2101
+
2102
+ </dd>
2103
+ </dl>
2104
+
2105
+ <dl>
2106
+ <dd>
2107
+
2108
+ **reward:** `Leal::Rewards::Types::CreateRewardsRequestReward`
2109
+
2110
+ </dd>
2111
+ </dl>
2112
+
2113
+ <dl>
2114
+ <dd>
2115
+
2116
+ **request_options:** `Leal::Rewards::RequestOptions`
2117
+
2118
+ </dd>
2119
+ </dl>
2120
+ </dd>
2121
+ </dl>
2122
+
2123
+
2124
+ </dd>
2125
+ </dl>
2126
+ </details>
2127
+
2128
+ <details><summary><code>client.rewards.<a href="/lib/leal/rewards/client.rb">get</a>(account_id:, id:) -> Leal::Rewards::Types::GetRewardsResponse</code></summary>
2129
+ <dl>
2130
+ <dd>
2131
+
2132
+ #### 📝 Description
2133
+
2134
+ <dl>
2135
+ <dd>
2136
+
2137
+ <dl>
2138
+ <dd>
2139
+
2140
+ Returns a single reward by ID.
2141
+ </dd>
2142
+ </dl>
2143
+ </dd>
2144
+ </dl>
2145
+
2146
+ #### 🔌 Usage
2147
+
2148
+ <dl>
2149
+ <dd>
2150
+
2151
+ <dl>
2152
+ <dd>
2153
+
2154
+ ```ruby
2155
+ client.rewards.get(
2156
+ account_id: 1,
2157
+ id: 1
2158
+ )
2159
+ ```
2160
+ </dd>
2161
+ </dl>
2162
+ </dd>
2163
+ </dl>
2164
+
2165
+ #### ⚙️ Parameters
2166
+
2167
+ <dl>
2168
+ <dd>
2169
+
2170
+ <dl>
2171
+ <dd>
2172
+
2173
+ **account_id:** `Integer` — Store (account) ID
2174
+
2175
+ </dd>
2176
+ </dl>
2177
+
2178
+ <dl>
2179
+ <dd>
2180
+
2181
+ **id:** `Integer` — Reward ID
2182
+
2183
+ </dd>
2184
+ </dl>
2185
+
2186
+ <dl>
2187
+ <dd>
2188
+
2189
+ **request_options:** `Leal::Rewards::RequestOptions`
2190
+
2191
+ </dd>
2192
+ </dl>
2193
+ </dd>
2194
+ </dl>
2195
+
2196
+
2197
+ </dd>
2198
+ </dl>
2199
+ </details>
2200
+
2201
+ <details><summary><code>client.rewards.<a href="/lib/leal/rewards/client.rb">delete</a>(account_id:, id:) -> </code></summary>
2202
+ <dl>
2203
+ <dd>
2204
+
2205
+ #### 📝 Description
2206
+
2207
+ <dl>
2208
+ <dd>
2209
+
2210
+ <dl>
2211
+ <dd>
2212
+
2213
+ Permanently deletes a reward. This cannot be undone.
2214
+ </dd>
2215
+ </dl>
2216
+ </dd>
2217
+ </dl>
2218
+
2219
+ #### 🔌 Usage
2220
+
2221
+ <dl>
2222
+ <dd>
2223
+
2224
+ <dl>
2225
+ <dd>
2226
+
2227
+ ```ruby
2228
+ client.rewards.delete(
2229
+ account_id: 1,
2230
+ id: 1
2231
+ )
2232
+ ```
2233
+ </dd>
2234
+ </dl>
2235
+ </dd>
2236
+ </dl>
2237
+
2238
+ #### ⚙️ Parameters
2239
+
2240
+ <dl>
2241
+ <dd>
2242
+
2243
+ <dl>
2244
+ <dd>
2245
+
2246
+ **account_id:** `Integer` — Store (account) ID
2247
+
2248
+ </dd>
2249
+ </dl>
2250
+
2251
+ <dl>
2252
+ <dd>
2253
+
2254
+ **id:** `Integer` — Reward ID
2255
+
2256
+ </dd>
2257
+ </dl>
2258
+
2259
+ <dl>
2260
+ <dd>
2261
+
2262
+ **request_options:** `Leal::Rewards::RequestOptions`
2263
+
2264
+ </dd>
2265
+ </dl>
2266
+ </dd>
2267
+ </dl>
2268
+
2269
+
2270
+ </dd>
2271
+ </dl>
2272
+ </details>
2273
+
2274
+ <details><summary><code>client.rewards.<a href="/lib/leal/rewards/client.rb">update</a>(account_id:, id:, request) -> Leal::Rewards::Types::UpdateRewardsResponse</code></summary>
2275
+ <dl>
2276
+ <dd>
2277
+
2278
+ #### 📝 Description
2279
+
2280
+ <dl>
2281
+ <dd>
2282
+
2283
+ <dl>
2284
+ <dd>
2285
+
2286
+ Updates an existing reward. The `card_id` cannot be changed after creation.
2287
+ </dd>
2288
+ </dl>
2289
+ </dd>
2290
+ </dl>
2291
+
2292
+ #### 🔌 Usage
2293
+
2294
+ <dl>
2295
+ <dd>
2296
+
2297
+ <dl>
2298
+ <dd>
2299
+
2300
+ ```ruby
2301
+ client.rewards.update(
2302
+ account_id: 1,
2303
+ id: 1,
2304
+ reward: {}
2305
+ )
2306
+ ```
2307
+ </dd>
2308
+ </dl>
2309
+ </dd>
2310
+ </dl>
2311
+
2312
+ #### ⚙️ Parameters
2313
+
2314
+ <dl>
2315
+ <dd>
2316
+
2317
+ <dl>
2318
+ <dd>
2319
+
2320
+ **account_id:** `Integer` — Store (account) ID
2321
+
2322
+ </dd>
2323
+ </dl>
2324
+
2325
+ <dl>
2326
+ <dd>
2327
+
2328
+ **id:** `Integer` — Reward ID
2329
+
2330
+ </dd>
2331
+ </dl>
2332
+
2333
+ <dl>
2334
+ <dd>
2335
+
2336
+ **reward:** `Leal::Rewards::Types::UpdateRewardsRequestReward`
2337
+
2338
+ </dd>
2339
+ </dl>
2340
+
2341
+ <dl>
2342
+ <dd>
2343
+
2344
+ **request_options:** `Leal::Rewards::RequestOptions`
2345
+
2346
+ </dd>
2347
+ </dl>
2348
+ </dd>
2349
+ </dl>
2350
+
2351
+
2352
+ </dd>
2353
+ </dl>
2354
+ </details>
2355
+
2356
+ ## Status
2357
+ <details><summary><code>client.status.<a href="/lib/leal/status/client.rb">check</a>() -> Leal::Status::Types::CheckStatusResponse</code></summary>
2358
+ <dl>
2359
+ <dd>
2360
+
2361
+ #### 📝 Description
2362
+
2363
+ <dl>
2364
+ <dd>
2365
+
2366
+ <dl>
2367
+ <dd>
2368
+
2369
+ Returns the status of the API. No authentication required.
2370
+
2371
+ Every response from this API, including this one, carries `RateLimit-Limit`,
2372
+ `RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy`. Exceeding
2373
+ the limit returns 429 with `Retry-After` in seconds.
2374
+ </dd>
2375
+ </dl>
2376
+ </dd>
2377
+ </dl>
2378
+
2379
+ #### 🔌 Usage
2380
+
2381
+ <dl>
2382
+ <dd>
2383
+
2384
+ <dl>
2385
+ <dd>
2386
+
2387
+ ```ruby
2388
+ client.status.check
2389
+ ```
2390
+ </dd>
2391
+ </dl>
2392
+ </dd>
2393
+ </dl>
2394
+
2395
+ #### ⚙️ Parameters
2396
+
2397
+ <dl>
2398
+ <dd>
2399
+
2400
+ <dl>
2401
+ <dd>
2402
+
2403
+ **request_options:** `Leal::Status::RequestOptions`
2404
+
2405
+ </dd>
2406
+ </dl>
2407
+ </dd>
2408
+ </dl>
2409
+
2410
+
2411
+ </dd>
2412
+ </dl>
2413
+ </details>
2414
+