clayful 2.2.1 → 2.5.0

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.
@@ -13,40 +13,40 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.count(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
20
+ 'method_name' => 'count',
21
21
  'http_method' => 'GET',
22
- 'path' => '/v1/currencies',
22
+ 'path' => '/v1/currencies/count',
23
23
  'params' => [],
24
24
  'args' => args
25
25
  })
26
26
 
27
27
  end
28
28
 
29
- def self.count(*args)
29
+ def self.get(*args)
30
30
 
31
31
  Clayful.call_api({
32
32
  'model_name' => @@name,
33
- 'method_name' => 'count',
33
+ 'method_name' => 'get',
34
34
  'http_method' => 'GET',
35
- 'path' => '/v1/currencies/count',
36
- 'params' => [],
35
+ 'path' => '/v1/currencies/{currencyId}',
36
+ 'params' => ['currencyId', ],
37
37
  'args' => args
38
38
  })
39
39
 
40
40
  end
41
41
 
42
- def self.get(*args)
42
+ def self.list(*args)
43
43
 
44
44
  Clayful.call_api({
45
45
  'model_name' => @@name,
46
- 'method_name' => 'get',
46
+ 'method_name' => 'list',
47
47
  'http_method' => 'GET',
48
- 'path' => '/v1/currencies/{currencyId}',
49
- 'params' => ['currencyId', ],
48
+ 'path' => '/v1/currencies',
49
+ 'params' => [],
50
50
  'args' => args
51
51
  })
52
52
 
@@ -13,40 +13,40 @@ module Clayful
13
13
  @@path
14
14
  end
15
15
 
16
- def self.list(*args)
16
+ def self.add_coupon(*args)
17
17
 
18
18
  Clayful.call_api({
19
19
  'model_name' => @@name,
20
- 'method_name' => 'list',
21
- 'http_method' => 'GET',
22
- 'path' => '/v1/customers',
23
- 'params' => [],
20
+ 'method_name' => 'add_coupon',
21
+ 'http_method' => 'POST',
22
+ 'path' => '/v1/customers/{customerId}/coupons',
23
+ 'params' => ['customerId', ],
24
24
  'args' => args
25
25
  })
26
26
 
27
27
  end
28
28
 
29
- def self.get_me(*args)
29
+ def self.authenticate(*args)
30
30
 
31
31
  Clayful.call_api({
32
32
  'model_name' => @@name,
33
- 'method_name' => 'get_me',
34
- 'http_method' => 'GET',
35
- 'path' => '/v1/me',
33
+ 'method_name' => 'authenticate',
34
+ 'http_method' => 'POST',
35
+ 'path' => '/v1/customers/auth',
36
36
  'params' => [],
37
37
  'args' => args
38
38
  })
39
39
 
40
40
  end
41
41
 
42
- def self.is_authenticated(*args)
42
+ def self.authenticate_by_3rd_party(*args)
43
43
 
44
44
  Clayful.call_api({
45
45
  'model_name' => @@name,
46
- 'method_name' => 'is_authenticated',
47
- 'http_method' => 'GET',
48
- 'path' => '/v1/customers/auth',
49
- 'params' => [],
46
+ 'method_name' => 'authenticate_by_3rd_party',
47
+ 'http_method' => 'POST',
48
+ 'path' => '/v1/customers/auth/{vendor}',
49
+ 'params' => ['vendor', ],
50
50
  'args' => args
51
51
  })
52
52
 
@@ -65,142 +65,155 @@ module Clayful
65
65
 
66
66
  end
67
67
 
68
- def self.get(*args)
68
+ def self.count_coupons(*args)
69
69
 
70
70
  Clayful.call_api({
71
71
  'model_name' => @@name,
72
- 'method_name' => 'get',
72
+ 'method_name' => 'count_coupons',
73
73
  'http_method' => 'GET',
74
- 'path' => '/v1/customers/{customerId}',
74
+ 'path' => '/v1/customers/{customerId}/coupons/count',
75
75
  'params' => ['customerId', ],
76
76
  'args' => args
77
77
  })
78
78
 
79
79
  end
80
80
 
81
- def self.list_coupons_for_me(*args)
81
+ def self.count_coupons_for_me(*args)
82
82
 
83
83
  Clayful.call_api({
84
84
  'model_name' => @@name,
85
- 'method_name' => 'list_coupons_for_me',
85
+ 'method_name' => 'count_coupons_for_me',
86
86
  'http_method' => 'GET',
87
- 'path' => '/v1/me/coupons',
87
+ 'path' => '/v1/me/coupons/count',
88
88
  'params' => [],
89
89
  'args' => args
90
90
  })
91
91
 
92
92
  end
93
93
 
94
- def self.list_coupons(*args)
94
+ def self.create(*args)
95
95
 
96
96
  Clayful.call_api({
97
97
  'model_name' => @@name,
98
- 'method_name' => 'list_coupons',
99
- 'http_method' => 'GET',
100
- 'path' => '/v1/customers/{customerId}/coupons',
101
- 'params' => ['customerId', ],
98
+ 'method_name' => 'create',
99
+ 'http_method' => 'POST',
100
+ 'path' => '/v1/customers',
101
+ 'params' => [],
102
102
  'args' => args
103
103
  })
104
104
 
105
105
  end
106
106
 
107
- def self.count_coupons_for_me(*args)
107
+ def self.create_me(*args)
108
108
 
109
109
  Clayful.call_api({
110
110
  'model_name' => @@name,
111
- 'method_name' => 'count_coupons_for_me',
112
- 'http_method' => 'GET',
113
- 'path' => '/v1/me/coupons/count',
111
+ 'method_name' => 'create_me',
112
+ 'http_method' => 'POST',
113
+ 'path' => '/v1/me',
114
114
  'params' => [],
115
115
  'args' => args
116
116
  })
117
117
 
118
118
  end
119
119
 
120
- def self.count_coupons(*args)
120
+ def self.create_verification(*args)
121
121
 
122
122
  Clayful.call_api({
123
123
  'model_name' => @@name,
124
- 'method_name' => 'count_coupons',
125
- 'http_method' => 'GET',
126
- 'path' => '/v1/customers/{customerId}/coupons/count',
124
+ 'method_name' => 'create_verification',
125
+ 'http_method' => 'POST',
126
+ 'path' => '/v1/customers/verifications',
127
+ 'params' => [],
128
+ 'args' => args
129
+ })
130
+
131
+ end
132
+
133
+ def self.delete(*args)
134
+
135
+ Clayful.call_api({
136
+ 'model_name' => @@name,
137
+ 'method_name' => 'delete',
138
+ 'http_method' => 'DELETE',
139
+ 'path' => '/v1/customers/{customerId}',
127
140
  'params' => ['customerId', ],
128
141
  'args' => args
129
142
  })
130
143
 
131
144
  end
132
145
 
133
- def self.list_by_flag_votes(*args)
146
+ def self.delete_coupon(*args)
134
147
 
135
148
  Clayful.call_api({
136
149
  'model_name' => @@name,
137
- 'method_name' => 'list_by_flag_votes',
138
- 'http_method' => 'GET',
139
- 'path' => '/v1/{voteModel}/{voteModelId}/flags/customers',
140
- 'params' => ['voteModel', 'voteModelId', ],
150
+ 'method_name' => 'delete_coupon',
151
+ 'http_method' => 'DELETE',
152
+ 'path' => '/v1/customers/{customerId}/coupons/{couponId}',
153
+ 'params' => ['customerId', 'couponId', ],
141
154
  'args' => args
142
155
  })
143
156
 
144
157
  end
145
158
 
146
- def self.list_by_flag_votes(*args)
159
+ def self.delete_coupon_for_me(*args)
147
160
 
148
161
  Clayful.call_api({
149
162
  'model_name' => @@name,
150
- 'method_name' => 'list_by_flag_votes',
151
- 'http_method' => 'GET',
152
- 'path' => '/v1/{voteModel}/{voteModelId}/flags/customers',
153
- 'params' => ['voteModel', 'voteModelId', ],
163
+ 'method_name' => 'delete_coupon_for_me',
164
+ 'http_method' => 'DELETE',
165
+ 'path' => '/v1/me/coupons/{couponId}',
166
+ 'params' => ['couponId', ],
154
167
  'args' => args
155
168
  })
156
169
 
157
170
  end
158
171
 
159
- def self.list_by_help_votes(*args)
172
+ def self.delete_me(*args)
160
173
 
161
174
  Clayful.call_api({
162
175
  'model_name' => @@name,
163
- 'method_name' => 'list_by_help_votes',
164
- 'http_method' => 'GET',
165
- 'path' => '/v1/{voteModel}/{voteModelId}/helped/{upDown}/customers',
166
- 'params' => ['voteModel', 'voteModelId', 'upDown', ],
176
+ 'method_name' => 'delete_me',
177
+ 'http_method' => 'DELETE',
178
+ 'path' => '/v1/me',
179
+ 'params' => [],
167
180
  'args' => args
168
181
  })
169
182
 
170
183
  end
171
184
 
172
- def self.list_by_help_votes(*args)
185
+ def self.delete_metafield(*args)
173
186
 
174
187
  Clayful.call_api({
175
188
  'model_name' => @@name,
176
- 'method_name' => 'list_by_help_votes',
177
- 'http_method' => 'GET',
178
- 'path' => '/v1/{voteModel}/{voteModelId}/helped/{upDown}/customers',
179
- 'params' => ['voteModel', 'voteModelId', 'upDown', ],
189
+ 'method_name' => 'delete_metafield',
190
+ 'http_method' => 'DELETE',
191
+ 'path' => '/v1/customers/{customerId}/meta/{field}',
192
+ 'params' => ['customerId', 'field', ],
180
193
  'args' => args
181
194
  })
182
195
 
183
196
  end
184
197
 
185
- def self.create(*args)
198
+ def self.get(*args)
186
199
 
187
200
  Clayful.call_api({
188
201
  'model_name' => @@name,
189
- 'method_name' => 'create',
190
- 'http_method' => 'POST',
191
- 'path' => '/v1/customers',
192
- 'params' => [],
202
+ 'method_name' => 'get',
203
+ 'http_method' => 'GET',
204
+ 'path' => '/v1/customers/{customerId}',
205
+ 'params' => ['customerId', ],
193
206
  'args' => args
194
207
  })
195
208
 
196
209
  end
197
210
 
198
- def self.create_me(*args)
211
+ def self.get_me(*args)
199
212
 
200
213
  Clayful.call_api({
201
214
  'model_name' => @@name,
202
- 'method_name' => 'create_me',
203
- 'http_method' => 'POST',
215
+ 'method_name' => 'get_me',
216
+ 'http_method' => 'GET',
204
217
  'path' => '/v1/me',
205
218
  'params' => [],
206
219
  'args' => args
@@ -208,119 +221,118 @@ module Clayful
208
221
 
209
222
  end
210
223
 
211
- def self.authenticate(*args)
224
+ def self.increase_metafield(*args)
212
225
 
213
226
  Clayful.call_api({
214
227
  'model_name' => @@name,
215
- 'method_name' => 'authenticate',
228
+ 'method_name' => 'increase_metafield',
216
229
  'http_method' => 'POST',
217
- 'path' => '/v1/customers/auth',
218
- 'params' => [],
230
+ 'path' => '/v1/customers/{customerId}/meta/{field}/inc',
231
+ 'params' => ['customerId', 'field', ],
219
232
  'args' => args
220
233
  })
221
234
 
222
235
  end
223
236
 
224
- def self.create_verification(*args)
237
+ def self.is_authenticated(*args)
225
238
 
226
239
  Clayful.call_api({
227
240
  'model_name' => @@name,
228
- 'method_name' => 'create_verification',
229
- 'http_method' => 'POST',
230
- 'path' => '/v1/customers/verifications',
241
+ 'method_name' => 'is_authenticated',
242
+ 'http_method' => 'GET',
243
+ 'path' => '/v1/customers/auth',
231
244
  'params' => [],
232
245
  'args' => args
233
246
  })
234
247
 
235
248
  end
236
249
 
237
- def self.authenticate_by_3rd_party(*args)
250
+ def self.list(*args)
238
251
 
239
252
  Clayful.call_api({
240
253
  'model_name' => @@name,
241
- 'method_name' => 'authenticate_by_3rd_party',
242
- 'http_method' => 'POST',
243
- 'path' => '/v1/customers/auth/{vendor}',
244
- 'params' => ['vendor', ],
245
- 'without_payload' => true,
254
+ 'method_name' => 'list',
255
+ 'http_method' => 'GET',
256
+ 'path' => '/v1/customers',
257
+ 'params' => [],
246
258
  'args' => args
247
259
  })
248
260
 
249
261
  end
250
262
 
251
- def self.request_verification_email(*args)
263
+ def self.list_by_flag_votes(*args)
252
264
 
253
265
  Clayful.call_api({
254
266
  'model_name' => @@name,
255
- 'method_name' => 'request_verification_email',
256
- 'http_method' => 'POST',
257
- 'path' => '/v1/customers/verifications/emails',
258
- 'params' => [],
267
+ 'method_name' => 'list_by_flag_votes',
268
+ 'http_method' => 'GET',
269
+ 'path' => '/v1/{voteModel}/{voteModelId}/flags/customers',
270
+ 'params' => ['voteModel', 'voteModelId', ],
259
271
  'args' => args
260
272
  })
261
273
 
262
274
  end
263
275
 
264
- def self.request_verification(*args)
276
+ def self.list_by_flag_votes(*args)
265
277
 
266
278
  Clayful.call_api({
267
279
  'model_name' => @@name,
268
- 'method_name' => 'request_verification',
269
- 'http_method' => 'POST',
270
- 'path' => '/v1/customers/verifications/{channelSlug}',
271
- 'params' => ['channelSlug', ],
280
+ 'method_name' => 'list_by_flag_votes',
281
+ 'http_method' => 'GET',
282
+ 'path' => '/v1/{voteModel}/{voteModelId}/flags/customers',
283
+ 'params' => ['voteModel', 'voteModelId', ],
272
284
  'args' => args
273
285
  })
274
286
 
275
287
  end
276
288
 
277
- def self.verify(*args)
289
+ def self.list_by_help_votes(*args)
278
290
 
279
291
  Clayful.call_api({
280
292
  'model_name' => @@name,
281
- 'method_name' => 'verify',
282
- 'http_method' => 'POST',
283
- 'path' => '/v1/customers/{customerId}/verified',
284
- 'params' => ['customerId', ],
293
+ 'method_name' => 'list_by_help_votes',
294
+ 'http_method' => 'GET',
295
+ 'path' => '/v1/{voteModel}/{voteModelId}/helped/{upDown}/customers',
296
+ 'params' => ['voteModel', 'voteModelId', 'upDown', ],
285
297
  'args' => args
286
298
  })
287
299
 
288
300
  end
289
301
 
290
- def self.add_coupon(*args)
302
+ def self.list_by_help_votes(*args)
291
303
 
292
304
  Clayful.call_api({
293
305
  'model_name' => @@name,
294
- 'method_name' => 'add_coupon',
295
- 'http_method' => 'POST',
296
- 'path' => '/v1/customers/{customerId}/coupons',
297
- 'params' => ['customerId', ],
306
+ 'method_name' => 'list_by_help_votes',
307
+ 'http_method' => 'GET',
308
+ 'path' => '/v1/{voteModel}/{voteModelId}/helped/{upDown}/customers',
309
+ 'params' => ['voteModel', 'voteModelId', 'upDown', ],
298
310
  'args' => args
299
311
  })
300
312
 
301
313
  end
302
314
 
303
- def self.push_to_metafield(*args)
315
+ def self.list_coupons(*args)
304
316
 
305
317
  Clayful.call_api({
306
318
  'model_name' => @@name,
307
- 'method_name' => 'push_to_metafield',
308
- 'http_method' => 'POST',
309
- 'path' => '/v1/customers/{customerId}/meta/{field}/push',
310
- 'params' => ['customerId', 'field', ],
319
+ 'method_name' => 'list_coupons',
320
+ 'http_method' => 'GET',
321
+ 'path' => '/v1/customers/{customerId}/coupons',
322
+ 'params' => ['customerId', ],
311
323
  'args' => args
312
324
  })
313
325
 
314
326
  end
315
327
 
316
- def self.increase_metafield(*args)
328
+ def self.list_coupons_for_me(*args)
317
329
 
318
330
  Clayful.call_api({
319
331
  'model_name' => @@name,
320
- 'method_name' => 'increase_metafield',
321
- 'http_method' => 'POST',
322
- 'path' => '/v1/customers/{customerId}/meta/{field}/inc',
323
- 'params' => ['customerId', 'field', ],
332
+ 'method_name' => 'list_coupons_for_me',
333
+ 'http_method' => 'GET',
334
+ 'path' => '/v1/me/coupons',
335
+ 'params' => [],
324
336
  'args' => args
325
337
  })
326
338
 
@@ -339,53 +351,53 @@ module Clayful
339
351
 
340
352
  end
341
353
 
342
- def self.update_me(*args)
354
+ def self.push_to_metafield(*args)
343
355
 
344
356
  Clayful.call_api({
345
357
  'model_name' => @@name,
346
- 'method_name' => 'update_me',
347
- 'http_method' => 'PUT',
348
- 'path' => '/v1/me',
349
- 'params' => [],
358
+ 'method_name' => 'push_to_metafield',
359
+ 'http_method' => 'POST',
360
+ 'path' => '/v1/customers/{customerId}/meta/{field}/push',
361
+ 'params' => ['customerId', 'field', ],
350
362
  'args' => args
351
363
  })
352
364
 
353
365
  end
354
366
 
355
- def self.update(*args)
367
+ def self.recover_credential(*args)
356
368
 
357
369
  Clayful.call_api({
358
370
  'model_name' => @@name,
359
- 'method_name' => 'update',
360
- 'http_method' => 'PUT',
361
- 'path' => '/v1/customers/{customerId}',
362
- 'params' => ['customerId', ],
371
+ 'method_name' => 'recover_credential',
372
+ 'http_method' => 'POST',
373
+ 'path' => '/v1/customers/credentials/{credentialField}/recoveries/{recoveryMethod}',
374
+ 'params' => ['credentialField', 'recoveryMethod', ],
363
375
  'args' => args
364
376
  })
365
377
 
366
378
  end
367
379
 
368
- def self.update_credentials_for_me(*args)
380
+ def self.request_verification(*args)
369
381
 
370
382
  Clayful.call_api({
371
383
  'model_name' => @@name,
372
- 'method_name' => 'update_credentials_for_me',
373
- 'http_method' => 'PUT',
374
- 'path' => '/v1/me/credentials',
375
- 'params' => [],
384
+ 'method_name' => 'request_verification',
385
+ 'http_method' => 'POST',
386
+ 'path' => '/v1/customers/verifications/{channelSlug}',
387
+ 'params' => ['channelSlug', ],
376
388
  'args' => args
377
389
  })
378
390
 
379
391
  end
380
392
 
381
- def self.update_credentials(*args)
393
+ def self.request_verification_email(*args)
382
394
 
383
395
  Clayful.call_api({
384
396
  'model_name' => @@name,
385
- 'method_name' => 'update_credentials',
386
- 'http_method' => 'PUT',
387
- 'path' => '/v1/customers/{customerId}/credentials',
388
- 'params' => ['customerId', ],
397
+ 'method_name' => 'request_verification_email',
398
+ 'http_method' => 'POST',
399
+ 'path' => '/v1/customers/verifications/emails',
400
+ 'params' => [],
389
401
  'args' => args
390
402
  })
391
403
 
@@ -404,66 +416,66 @@ module Clayful
404
416
 
405
417
  end
406
418
 
407
- def self.delete_me(*args)
419
+ def self.update(*args)
408
420
 
409
421
  Clayful.call_api({
410
422
  'model_name' => @@name,
411
- 'method_name' => 'delete_me',
412
- 'http_method' => 'DELETE',
413
- 'path' => '/v1/me',
414
- 'params' => [],
423
+ 'method_name' => 'update',
424
+ 'http_method' => 'PUT',
425
+ 'path' => '/v1/customers/{customerId}',
426
+ 'params' => ['customerId', ],
415
427
  'args' => args
416
428
  })
417
429
 
418
430
  end
419
431
 
420
- def self.delete(*args)
432
+ def self.update_credentials(*args)
421
433
 
422
434
  Clayful.call_api({
423
435
  'model_name' => @@name,
424
- 'method_name' => 'delete',
425
- 'http_method' => 'DELETE',
426
- 'path' => '/v1/customers/{customerId}',
436
+ 'method_name' => 'update_credentials',
437
+ 'http_method' => 'PUT',
438
+ 'path' => '/v1/customers/{customerId}/credentials',
427
439
  'params' => ['customerId', ],
428
440
  'args' => args
429
441
  })
430
442
 
431
443
  end
432
444
 
433
- def self.delete_coupon_for_me(*args)
445
+ def self.update_credentials_for_me(*args)
434
446
 
435
447
  Clayful.call_api({
436
448
  'model_name' => @@name,
437
- 'method_name' => 'delete_coupon_for_me',
438
- 'http_method' => 'DELETE',
439
- 'path' => '/v1/me/coupons/{couponId}',
440
- 'params' => ['couponId', ],
449
+ 'method_name' => 'update_credentials_for_me',
450
+ 'http_method' => 'PUT',
451
+ 'path' => '/v1/me/credentials',
452
+ 'params' => [],
441
453
  'args' => args
442
454
  })
443
455
 
444
456
  end
445
457
 
446
- def self.delete_coupon(*args)
458
+ def self.update_me(*args)
447
459
 
448
460
  Clayful.call_api({
449
461
  'model_name' => @@name,
450
- 'method_name' => 'delete_coupon',
451
- 'http_method' => 'DELETE',
452
- 'path' => '/v1/customers/{customerId}/coupons/{couponId}',
453
- 'params' => ['customerId', 'couponId', ],
462
+ 'method_name' => 'update_me',
463
+ 'http_method' => 'PUT',
464
+ 'path' => '/v1/me',
465
+ 'params' => [],
454
466
  'args' => args
455
467
  })
456
468
 
457
469
  end
458
470
 
459
- def self.delete_metafield(*args)
471
+ def self.verify(*args)
460
472
 
461
473
  Clayful.call_api({
462
474
  'model_name' => @@name,
463
- 'method_name' => 'delete_metafield',
464
- 'http_method' => 'DELETE',
465
- 'path' => '/v1/customers/{customerId}/meta/{field}',
466
- 'params' => ['customerId', 'field', ],
475
+ 'method_name' => 'verify',
476
+ 'http_method' => 'POST',
477
+ 'path' => '/v1/customers/{customerId}/verified',
478
+ 'params' => ['customerId', ],
467
479
  'args' => args
468
480
  })
469
481