clayful 1.0.0 → 2.3.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.
@@ -52,13 +52,52 @@ module Clayful
52
52
 
53
53
  end
54
54
 
55
- def self.increase_metafield(*args)
55
+ def self.create(*args)
56
56
 
57
57
  Clayful.call_api({
58
58
  'model_name' => @@name,
59
- 'method_name' => 'increase_metafield',
59
+ 'method_name' => 'create',
60
60
  'http_method' => 'POST',
61
- 'path' => '/v1/products/{productId}/meta/{field}/inc',
61
+ 'path' => '/v1/products',
62
+ 'params' => [],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.create_variant(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'create_variant',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/products/{productId}/variants',
75
+ 'params' => ['productId', ],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
81
+ def self.create_variation(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'create_variation',
86
+ 'http_method' => 'POST',
87
+ 'path' => '/v1/products/{productId}/options/{optionId}/variations',
88
+ 'params' => ['productId', 'optionId', ],
89
+ 'args' => args
90
+ })
91
+
92
+ end
93
+
94
+ def self.pull_from_metafield(*args)
95
+
96
+ Clayful.call_api({
97
+ 'model_name' => @@name,
98
+ 'method_name' => 'pull_from_metafield',
99
+ 'http_method' => 'POST',
100
+ 'path' => '/v1/products/{productId}/meta/{field}/pull',
62
101
  'params' => ['productId', 'field', ],
63
102
  'args' => args
64
103
  })
@@ -78,19 +117,84 @@ module Clayful
78
117
 
79
118
  end
80
119
 
81
- def self.pull_from_metafield(*args)
120
+ def self.increase_metafield(*args)
82
121
 
83
122
  Clayful.call_api({
84
123
  'model_name' => @@name,
85
- 'method_name' => 'pull_from_metafield',
124
+ 'method_name' => 'increase_metafield',
86
125
  'http_method' => 'POST',
87
- 'path' => '/v1/products/{productId}/meta/{field}/pull',
126
+ 'path' => '/v1/products/{productId}/meta/{field}/inc',
88
127
  'params' => ['productId', 'field', ],
89
128
  'args' => args
90
129
  })
91
130
 
92
131
  end
93
132
 
133
+ def self.update(*args)
134
+
135
+ Clayful.call_api({
136
+ 'model_name' => @@name,
137
+ 'method_name' => 'update',
138
+ 'http_method' => 'PUT',
139
+ 'path' => '/v1/products/{productId}',
140
+ 'params' => ['productId', ],
141
+ 'args' => args
142
+ })
143
+
144
+ end
145
+
146
+ def self.update_option(*args)
147
+
148
+ Clayful.call_api({
149
+ 'model_name' => @@name,
150
+ 'method_name' => 'update_option',
151
+ 'http_method' => 'PUT',
152
+ 'path' => '/v1/products/{productId}/options/{optionId}',
153
+ 'params' => ['productId', 'optionId', ],
154
+ 'args' => args
155
+ })
156
+
157
+ end
158
+
159
+ def self.update_variant(*args)
160
+
161
+ Clayful.call_api({
162
+ 'model_name' => @@name,
163
+ 'method_name' => 'update_variant',
164
+ 'http_method' => 'PUT',
165
+ 'path' => '/v1/products/{productId}/variants/{variantId}',
166
+ 'params' => ['productId', 'variantId', ],
167
+ 'args' => args
168
+ })
169
+
170
+ end
171
+
172
+ def self.update_variation(*args)
173
+
174
+ Clayful.call_api({
175
+ 'model_name' => @@name,
176
+ 'method_name' => 'update_variation',
177
+ 'http_method' => 'PUT',
178
+ 'path' => '/v1/products/{productId}/options/{optionId}/variations/{variationId}',
179
+ 'params' => ['productId', 'optionId', 'variationId', ],
180
+ 'args' => args
181
+ })
182
+
183
+ end
184
+
185
+ def self.delete(*args)
186
+
187
+ Clayful.call_api({
188
+ 'model_name' => @@name,
189
+ 'method_name' => 'delete',
190
+ 'http_method' => 'DELETE',
191
+ 'path' => '/v1/products/{productId}',
192
+ 'params' => ['productId', ],
193
+ 'args' => args
194
+ })
195
+
196
+ end
197
+
94
198
  def self.delete_metafield(*args)
95
199
 
96
200
  Clayful.call_api({
@@ -104,6 +208,32 @@ module Clayful
104
208
 
105
209
  end
106
210
 
211
+ def self.delete_variant(*args)
212
+
213
+ Clayful.call_api({
214
+ 'model_name' => @@name,
215
+ 'method_name' => 'delete_variant',
216
+ 'http_method' => 'DELETE',
217
+ 'path' => '/v1/products/{productId}/variants/{variantId}',
218
+ 'params' => ['productId', 'variantId', ],
219
+ 'args' => args
220
+ })
221
+
222
+ end
223
+
224
+ def self.delete_variation(*args)
225
+
226
+ Clayful.call_api({
227
+ 'model_name' => @@name,
228
+ 'method_name' => 'delete_variation',
229
+ 'http_method' => 'DELETE',
230
+ 'path' => '/v1/products/{productId}/options/{optionId}/variations/{variationId}',
231
+ 'params' => ['productId', 'optionId', 'variationId', ],
232
+ 'args' => args
233
+ })
234
+
235
+ end
236
+
107
237
  end
108
238
 
109
239
  end
@@ -171,39 +171,39 @@ module Clayful
171
171
 
172
172
  end
173
173
 
174
- def self.pull_from_metafield(*args)
174
+ def self.increase_metafield(*args)
175
175
 
176
176
  Clayful.call_api({
177
177
  'model_name' => @@name,
178
- 'method_name' => 'pull_from_metafield',
178
+ 'method_name' => 'increase_metafield',
179
179
  'http_method' => 'POST',
180
- 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/pull',
180
+ 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/inc',
181
181
  'params' => ['reviewId', 'field', ],
182
182
  'args' => args
183
183
  })
184
184
 
185
185
  end
186
186
 
187
- def self.increase_metafield(*args)
187
+ def self.push_to_metafield(*args)
188
188
 
189
189
  Clayful.call_api({
190
190
  'model_name' => @@name,
191
- 'method_name' => 'increase_metafield',
191
+ 'method_name' => 'push_to_metafield',
192
192
  'http_method' => 'POST',
193
- 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/inc',
193
+ 'path' => '/v1/products/reviews/{reviewId}/meta/{field}/push',
194
194
  'params' => ['reviewId', 'field', ],
195
195
  'args' => args
196
196
  })
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,39 +105,39 @@ module Clayful
105
105
 
106
106
  end
107
107
 
108
- def self.push_to_metafield(*args)
108
+ def self.pull_from_metafield(*args)
109
109
 
110
110
  Clayful.call_api({
111
111
  'model_name' => @@name,
112
- 'method_name' => 'push_to_metafield',
112
+ 'method_name' => 'pull_from_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}/pull',
115
115
  'params' => ['reviewCommentId', 'field', ],
116
116
  'args' => args
117
117
  })
118
118
 
119
119
  end
120
120
 
121
- def self.pull_from_metafield(*args)
121
+ def self.increase_metafield(*args)
122
122
 
123
123
  Clayful.call_api({
124
124
  'model_name' => @@name,
125
- 'method_name' => 'pull_from_metafield',
125
+ 'method_name' => 'increase_metafield',
126
126
  'http_method' => 'POST',
127
- 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/pull',
127
+ 'path' => '/v1/products/reviews/comments/{reviewCommentId}/meta/{field}/inc',
128
128
  'params' => ['reviewCommentId', 'field', ],
129
129
  'args' => args
130
130
  })
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
  })
@@ -0,0 +1,57 @@
1
+ module Clayful
2
+
3
+ class ShippingPolicy
4
+
5
+ @@name = 'ShippingPolicy'
6
+ @@path = 'shipping/policies'
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/shipping/policies',
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/shipping/policies/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/shipping/policies/{shippingPolicyId}',
49
+ 'params' => ['shippingPolicyId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ end
56
+
57
+ end
@@ -104,13 +104,13 @@ module Clayful
104
104
 
105
105
  end
106
106
 
107
- def self.sync_inventory(*args)
107
+ def self.mark_as_done(*args)
108
108
 
109
109
  Clayful.call_api({
110
110
  'model_name' => @@name,
111
- 'method_name' => 'sync_inventory',
111
+ 'method_name' => 'mark_as_done',
112
112
  'http_method' => 'POST',
113
- 'path' => '/v1/subscriptions/{subscriptionId}/synced',
113
+ 'path' => '/v1/subscriptions/{subscriptionId}/done',
114
114
  'params' => ['subscriptionId', ],
115
115
  'without_payload' => true,
116
116
  'args' => args
@@ -131,66 +131,66 @@ module Clayful
131
131
 
132
132
  end
133
133
 
134
- def self.cancel(*args)
134
+ def self.sync_inventory(*args)
135
135
 
136
136
  Clayful.call_api({
137
137
  'model_name' => @@name,
138
- 'method_name' => 'cancel',
138
+ 'method_name' => 'sync_inventory',
139
139
  'http_method' => 'POST',
140
- 'path' => '/v1/subscriptions/{subscriptionId}/cancellation',
140
+ 'path' => '/v1/subscriptions/{subscriptionId}/synced',
141
141
  'params' => ['subscriptionId', ],
142
+ 'without_payload' => true,
142
143
  'args' => args
143
144
  })
144
145
 
145
146
  end
146
147
 
147
- def self.mark_as_done(*args)
148
+ def self.schedule(*args)
148
149
 
149
150
  Clayful.call_api({
150
151
  'model_name' => @@name,
151
- 'method_name' => 'mark_as_done',
152
+ 'method_name' => 'schedule',
152
153
  'http_method' => 'POST',
153
- 'path' => '/v1/subscriptions/{subscriptionId}/done',
154
+ 'path' => '/v1/subscriptions/{subscriptionId}/scheduled',
154
155
  'params' => ['subscriptionId', ],
155
- 'without_payload' => true,
156
156
  'args' => args
157
157
  })
158
158
 
159
159
  end
160
160
 
161
- def self.schedule(*args)
161
+ def self.cancel(*args)
162
162
 
163
163
  Clayful.call_api({
164
164
  'model_name' => @@name,
165
- 'method_name' => 'schedule',
165
+ 'method_name' => 'cancel',
166
166
  'http_method' => 'POST',
167
- 'path' => '/v1/subscriptions/{subscriptionId}/scheduled',
167
+ 'path' => '/v1/subscriptions/{subscriptionId}/cancellation',
168
168
  'params' => ['subscriptionId', ],
169
169
  'args' => args
170
170
  })
171
171
 
172
172
  end
173
173
 
174
- def self.schedule_for_me(*args)
174
+ def self.cancel_for_me(*args)
175
175
 
176
176
  Clayful.call_api({
177
177
  'model_name' => @@name,
178
- 'method_name' => 'schedule_for_me',
178
+ 'method_name' => 'cancel_for_me',
179
179
  'http_method' => 'POST',
180
- 'path' => '/v1/me/subscriptions/{subscriptionId}/scheduled',
180
+ 'path' => '/v1/me/subscriptions/{subscriptionId}/cancellation',
181
181
  'params' => ['subscriptionId', ],
182
182
  'args' => args
183
183
  })
184
184
 
185
185
  end
186
186
 
187
- def self.cancel_for_me(*args)
187
+ def self.schedule_for_me(*args)
188
188
 
189
189
  Clayful.call_api({
190
190
  'model_name' => @@name,
191
- 'method_name' => 'cancel_for_me',
191
+ 'method_name' => 'schedule_for_me',
192
192
  'http_method' => 'POST',
193
- 'path' => '/v1/me/subscriptions/{subscriptionId}/cancellation',
193
+ 'path' => '/v1/me/subscriptions/{subscriptionId}/scheduled',
194
194
  'params' => ['subscriptionId', ],
195
195
  'args' => args
196
196
  })