clayful 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -65,26 +65,26 @@ module Clayful
65
65
 
66
66
  end
67
67
 
68
- def self.push_to_metafield(*args)
68
+ def self.pull_from_metafield(*args)
69
69
 
70
70
  Clayful.call_api({
71
71
  'model_name' => @@name,
72
- 'method_name' => 'push_to_metafield',
72
+ 'method_name' => 'pull_from_metafield',
73
73
  'http_method' => 'POST',
74
- 'path' => '/v1/products/{productId}/meta/{field}/push',
74
+ 'path' => '/v1/products/{productId}/meta/{field}/pull',
75
75
  'params' => ['productId', 'field', ],
76
76
  'args' => args
77
77
  })
78
78
 
79
79
  end
80
80
 
81
- def self.pull_from_metafield(*args)
81
+ def self.push_to_metafield(*args)
82
82
 
83
83
  Clayful.call_api({
84
84
  'model_name' => @@name,
85
- 'method_name' => 'pull_from_metafield',
85
+ 'method_name' => 'push_to_metafield',
86
86
  'http_method' => 'POST',
87
- 'path' => '/v1/products/{productId}/meta/{field}/pull',
87
+ 'path' => '/v1/products/{productId}/meta/{field}/push',
88
88
  'params' => ['productId', 'field', ],
89
89
  'args' => args
90
90
  })
@@ -171,13 +171,13 @@ module Clayful
171
171
 
172
172
  end
173
173
 
174
- def self.pull_from_metafield(*args)
174
+ def self.push_to_metafield(*args)
175
175
 
176
176
  Clayful.call_api({
177
177
  'model_name' => @@name,
178
- 'method_name' => 'pull_from_metafield',
178
+ 'method_name' => 'push_to_metafield',
179
179
  'http_method' => 'POST',
180
- 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/pull',
180
+ 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/push',
181
181
  'params' => ['reviewId', 'field', ],
182
182
  'args' => args
183
183
  })
@@ -197,13 +197,13 @@ module Clayful
197
197
 
198
198
  end
199
199
 
200
- def self.push_to_metafield(*args)
200
+ def self.pull_from_metafield(*args)
201
201
 
202
202
  Clayful.call_api({
203
203
  'model_name' => @@name,
204
- 'method_name' => 'push_to_metafield',
204
+ 'method_name' => 'pull_from_metafield',
205
205
  'http_method' => 'POST',
206
- 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/push',
206
+ 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/pull',
207
207
  'params' => ['reviewId', 'field', ],
208
208
  'args' => args
209
209
  })
@@ -275,27 +275,27 @@ module Clayful
275
275
 
276
276
  end
277
277
 
278
- def self.cancel_flag(*args)
278
+ def self.delete_metafield(*args)
279
279
 
280
280
  Clayful.call_api({
281
281
  'model_name' => @@name,
282
- 'method_name' => 'cancel_flag',
282
+ 'method_name' => 'delete_metafield',
283
283
  'http_method' => 'DELETE',
284
- 'path' => '/v1/products/reviews/{reviewId}/flags/{customerId}',
285
- 'params' => ['reviewId', 'customerId', ],
284
+ 'path' => '/v1/products/reviews/{reviewId}/meta/{field}',
285
+ 'params' => ['reviewId', 'field', ],
286
286
  'args' => args
287
287
  })
288
288
 
289
289
  end
290
290
 
291
- def self.delete_metafield(*args)
291
+ def self.cancel_flag(*args)
292
292
 
293
293
  Clayful.call_api({
294
294
  'model_name' => @@name,
295
- 'method_name' => 'delete_metafield',
295
+ 'method_name' => 'cancel_flag',
296
296
  'http_method' => 'DELETE',
297
- 'path' => '/v1/products/reviews/{reviewId}/meta/{field}',
298
- 'params' => ['reviewId', 'field', ],
297
+ 'path' => '/v1/products/reviews/{reviewId}/flags/{customerId}',
298
+ 'params' => ['reviewId', 'customerId', ],
299
299
  'args' => args
300
300
  })
301
301
 
@@ -105,13 +105,13 @@ module Clayful
105
105
 
106
106
  end
107
107
 
108
- def self.push_to_metafield(*args)
108
+ def self.increase_metafield(*args)
109
109
 
110
110
  Clayful.call_api({
111
111
  'model_name' => @@name,
112
- 'method_name' => 'push_to_metafield',
112
+ 'method_name' => 'increase_metafield',
113
113
  'http_method' => 'POST',
114
- 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/push',
114
+ 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/inc',
115
115
  'params' => ['reviewCommentId', 'field', ],
116
116
  'args' => args
117
117
  })
@@ -131,13 +131,13 @@ module Clayful
131
131
 
132
132
  end
133
133
 
134
- def self.increase_metafield(*args)
134
+ def self.push_to_metafield(*args)
135
135
 
136
136
  Clayful.call_api({
137
137
  'model_name' => @@name,
138
- 'method_name' => 'increase_metafield',
138
+ 'method_name' => 'push_to_metafield',
139
139
  'http_method' => 'POST',
140
- 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/inc',
140
+ 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/push',
141
141
  'params' => ['reviewCommentId', 'field', ],
142
142
  'args' => args
143
143
  })
@@ -209,27 +209,27 @@ module Clayful
209
209
 
210
210
  end
211
211
 
212
- def self.delete_metafield(*args)
212
+ def self.cancel_flag(*args)
213
213
 
214
214
  Clayful.call_api({
215
215
  'model_name' => @@name,
216
- 'method_name' => 'delete_metafield',
216
+ 'method_name' => 'cancel_flag',
217
217
  'http_method' => 'DELETE',
218
- 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}',
219
- 'params' => ['reviewCommentId', 'field', ],
218
+ 'path' => '/v1/products/reviews/comments/{reviewCommentId}/flags/{customerId}',
219
+ 'params' => ['reviewCommentId', 'customerId', ],
220
220
  'args' => args
221
221
  })
222
222
 
223
223
  end
224
224
 
225
- def self.cancel_flag(*args)
225
+ def self.delete_metafield(*args)
226
226
 
227
227
  Clayful.call_api({
228
228
  'model_name' => @@name,
229
- 'method_name' => 'cancel_flag',
229
+ 'method_name' => 'delete_metafield',
230
230
  'http_method' => 'DELETE',
231
- 'path' => '/v1/products/reviews/comments/{reviewCommentId}/flags/{customerId}',
232
- 'params' => ['reviewCommentId', 'customerId', ],
231
+ 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}',
232
+ 'params' => ['reviewCommentId', 'field', ],
233
233
  'args' => args
234
234
  })
235
235
 
@@ -104,15 +104,14 @@ module Clayful
104
104
 
105
105
  end
106
106
 
107
- def self.sync_inventory(*args)
107
+ def self.cancel(*args)
108
108
 
109
109
  Clayful.call_api({
110
110
  'model_name' => @@name,
111
- 'method_name' => 'sync_inventory',
111
+ 'method_name' => 'cancel',
112
112
  'http_method' => 'POST',
113
- 'path' => '/v1/subscriptions/{subscriptionId}/synced',
113
+ 'path' => '/v1/subscriptions/{subscriptionId}/cancellation',
114
114
  'params' => ['subscriptionId', ],
115
- 'without_payload' => true,
116
115
  'args' => args
117
116
  })
118
117
 
@@ -131,26 +130,26 @@ module Clayful
131
130
 
132
131
  end
133
132
 
134
- def self.cancel(*args)
133
+ def self.schedule(*args)
135
134
 
136
135
  Clayful.call_api({
137
136
  'model_name' => @@name,
138
- 'method_name' => 'cancel',
137
+ 'method_name' => 'schedule',
139
138
  'http_method' => 'POST',
140
- 'path' => '/v1/subscriptions/{subscriptionId}/cancellation',
139
+ 'path' => '/v1/subscriptions/{subscriptionId}/scheduled',
141
140
  'params' => ['subscriptionId', ],
142
141
  'args' => args
143
142
  })
144
143
 
145
144
  end
146
145
 
147
- def self.mark_as_done(*args)
146
+ def self.sync_inventory(*args)
148
147
 
149
148
  Clayful.call_api({
150
149
  'model_name' => @@name,
151
- 'method_name' => 'mark_as_done',
150
+ 'method_name' => 'sync_inventory',
152
151
  'http_method' => 'POST',
153
- 'path' => '/v1/subscriptions/{subscriptionId}/done',
152
+ 'path' => '/v1/subscriptions/{subscriptionId}/synced',
154
153
  'params' => ['subscriptionId', ],
155
154
  'without_payload' => true,
156
155
  'args' => args
@@ -158,14 +157,15 @@ module Clayful
158
157
 
159
158
  end
160
159
 
161
- def self.schedule(*args)
160
+ def self.mark_as_done(*args)
162
161
 
163
162
  Clayful.call_api({
164
163
  'model_name' => @@name,
165
- 'method_name' => 'schedule',
164
+ 'method_name' => 'mark_as_done',
166
165
  'http_method' => 'POST',
167
- 'path' => '/v1/subscriptions/{subscriptionId}/scheduled',
166
+ 'path' => '/v1/subscriptions/{subscriptionId}/done',
168
167
  'params' => ['subscriptionId', ],
168
+ 'without_payload' => true,
169
169
  'args' => args
170
170
  })
171
171
 
@@ -210,39 +210,39 @@ module Clayful
210
210
 
211
211
  end
212
212
 
213
- def self.pull_from_metafield(*args)
213
+ def self.increase_metafield(*args)
214
214
 
215
215
  Clayful.call_api({
216
216
  'model_name' => @@name,
217
- 'method_name' => 'pull_from_metafield',
217
+ 'method_name' => 'increase_metafield',
218
218
  'http_method' => 'POST',
219
- 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/pull',
219
+ 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/inc',
220
220
  'params' => ['subscriptionId', 'field', ],
221
221
  'args' => args
222
222
  })
223
223
 
224
224
  end
225
225
 
226
- def self.increase_metafield(*args)
226
+ def self.push_to_metafield(*args)
227
227
 
228
228
  Clayful.call_api({
229
229
  'model_name' => @@name,
230
- 'method_name' => 'increase_metafield',
230
+ 'method_name' => 'push_to_metafield',
231
231
  'http_method' => 'POST',
232
- 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/inc',
232
+ 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/push',
233
233
  'params' => ['subscriptionId', 'field', ],
234
234
  'args' => args
235
235
  })
236
236
 
237
237
  end
238
238
 
239
- def self.push_to_metafield(*args)
239
+ def self.pull_from_metafield(*args)
240
240
 
241
241
  Clayful.call_api({
242
242
  'model_name' => @@name,
243
- 'method_name' => 'push_to_metafield',
243
+ 'method_name' => 'pull_from_metafield',
244
244
  'http_method' => 'POST',
245
- 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/push',
245
+ 'path' => '/v1/subscriptions/{subscriptionId}/meta/{field}/pull',
246
246
  'params' => ['subscriptionId', 'field', ],
247
247
  'args' => args
248
248
  })
@@ -0,0 +1,109 @@
1
+ module Clayful
2
+
3
+ class Vendor
4
+
5
+ @@name = 'Vendor'
6
+ @@path = 'vendors'
7
+
8
+ def self.name
9
+ @@name
10
+ end
11
+
12
+ def self.path
13
+ @@path
14
+ end
15
+
16
+ def self.list(*args)
17
+
18
+ Clayful.call_api({
19
+ 'model_name' => @@name,
20
+ 'method_name' => 'list',
21
+ 'http_method' => 'GET',
22
+ 'path' => '/v1/vendors',
23
+ 'params' => [],
24
+ 'args' => args
25
+ })
26
+
27
+ end
28
+
29
+ def self.count(*args)
30
+
31
+ Clayful.call_api({
32
+ 'model_name' => @@name,
33
+ 'method_name' => 'count',
34
+ 'http_method' => 'GET',
35
+ 'path' => '/v1/vendors/count',
36
+ 'params' => [],
37
+ 'args' => args
38
+ })
39
+
40
+ end
41
+
42
+ def self.get(*args)
43
+
44
+ Clayful.call_api({
45
+ 'model_name' => @@name,
46
+ 'method_name' => 'get',
47
+ 'http_method' => 'GET',
48
+ 'path' => '/v1/vendors/{vendorId}',
49
+ 'params' => ['vendorId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.increase_metafield(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'increase_metafield',
60
+ 'http_method' => 'POST',
61
+ 'path' => '/v1/vendors/{vendorId}/meta/{field}/inc',
62
+ 'params' => ['vendorId', 'field', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.push_to_metafield(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'push_to_metafield',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/vendors/{vendorId}/meta/{field}/push',
75
+ 'params' => ['vendorId', 'field', ],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
81
+ def self.pull_from_metafield(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'pull_from_metafield',
86
+ 'http_method' => 'POST',
87
+ 'path' => '/v1/vendors/{vendorId}/meta/{field}/pull',
88
+ 'params' => ['vendorId', 'field', ],
89
+ 'args' => args
90
+ })
91
+
92
+ end
93
+
94
+ def self.delete_metafield(*args)
95
+
96
+ Clayful.call_api({
97
+ 'model_name' => @@name,
98
+ 'method_name' => 'delete_metafield',
99
+ 'http_method' => 'DELETE',
100
+ 'path' => '/v1/vendors/{vendorId}/meta/{field}',
101
+ 'params' => ['vendorId', 'field', ],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ end
108
+
109
+ end
@@ -195,39 +195,39 @@ module Clayful
195
195
 
196
196
  end
197
197
 
198
- def self.push_to_metafield(*args)
198
+ def self.pull_from_metafield(*args)
199
199
 
200
200
  Clayful.call_api({
201
201
  'model_name' => @@name,
202
- 'method_name' => 'push_to_metafield',
202
+ 'method_name' => 'pull_from_metafield',
203
203
  'http_method' => 'POST',
204
- 'path' => '/v1/wishlists/{wishListId}/meta/{field}/push',
204
+ 'path' => '/v1/wishlists/{wishListId}/meta/{field}/pull',
205
205
  'params' => ['wishListId', 'field', ],
206
206
  'args' => args
207
207
  })
208
208
 
209
209
  end
210
210
 
211
- def self.increase_metafield(*args)
211
+ def self.push_to_metafield(*args)
212
212
 
213
213
  Clayful.call_api({
214
214
  'model_name' => @@name,
215
- 'method_name' => 'increase_metafield',
215
+ 'method_name' => 'push_to_metafield',
216
216
  'http_method' => 'POST',
217
- 'path' => '/v1/wishlists/{wishListId}/meta/{field}/inc',
217
+ 'path' => '/v1/wishlists/{wishListId}/meta/{field}/push',
218
218
  'params' => ['wishListId', 'field', ],
219
219
  'args' => args
220
220
  })
221
221
 
222
222
  end
223
223
 
224
- def self.pull_from_metafield(*args)
224
+ def self.increase_metafield(*args)
225
225
 
226
226
  Clayful.call_api({
227
227
  'model_name' => @@name,
228
- 'method_name' => 'pull_from_metafield',
228
+ 'method_name' => 'increase_metafield',
229
229
  'http_method' => 'POST',
230
- 'path' => '/v1/wishlists/{wishListId}/meta/{field}/pull',
230
+ 'path' => '/v1/wishlists/{wishListId}/meta/{field}/inc',
231
231
  'params' => ['wishListId', 'field', ],
232
232
  'args' => args
233
233
  })
@@ -312,27 +312,27 @@ module Clayful
312
312
 
313
313
  end
314
314
 
315
- def self.delete_item(*args)
315
+ def self.delete_metafield(*args)
316
316
 
317
317
  Clayful.call_api({
318
318
  'model_name' => @@name,
319
- 'method_name' => 'delete_item',
319
+ 'method_name' => 'delete_metafield',
320
320
  'http_method' => 'DELETE',
321
- 'path' => '/v1/wishlists/{wishListId}/items/{productId}',
322
- 'params' => ['wishListId', 'productId', ],
321
+ 'path' => '/v1/wishlists/{wishListId}/meta/{field}',
322
+ 'params' => ['wishListId', 'field', ],
323
323
  'args' => args
324
324
  })
325
325
 
326
326
  end
327
327
 
328
- def self.delete_metafield(*args)
328
+ def self.delete_item(*args)
329
329
 
330
330
  Clayful.call_api({
331
331
  'model_name' => @@name,
332
- 'method_name' => 'delete_metafield',
332
+ 'method_name' => 'delete_item',
333
333
  'http_method' => 'DELETE',
334
- 'path' => '/v1/wishlists/{wishListId}/meta/{field}',
335
- 'params' => ['wishListId', 'field', ],
334
+ 'path' => '/v1/wishlists/{wishListId}/items/{productId}',
335
+ 'params' => ['wishListId', 'productId', ],
336
336
  'args' => args
337
337
  })
338
338