clayful 0.0.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.
@@ -0,0 +1,252 @@
1
+ module Clayful
2
+
3
+ class Cart
4
+
5
+ @@name = 'Cart'
6
+ @@path = ''
7
+
8
+ def self.name
9
+ @@name
10
+ end
11
+
12
+ def self.path
13
+ @@path
14
+ end
15
+
16
+ def self.count_items_for_me(*args)
17
+
18
+ Clayful.call_api({
19
+ 'model_name' => @@name,
20
+ 'method_name' => 'count_items_for_me',
21
+ 'http_method' => 'GET',
22
+ 'path' => '/v1/me/cart/items/count',
23
+ 'params' => [],
24
+ 'args' => args
25
+ })
26
+
27
+ end
28
+
29
+ def self.count_items(*args)
30
+
31
+ Clayful.call_api({
32
+ 'model_name' => @@name,
33
+ 'method_name' => 'count_items',
34
+ 'http_method' => 'GET',
35
+ 'path' => '/v1/customers/{customerId}/cart/items/count',
36
+ 'params' => ['customerId', ],
37
+ 'args' => args
38
+ })
39
+
40
+ end
41
+
42
+ def self.get_for_me(*args)
43
+
44
+ Clayful.call_api({
45
+ 'model_name' => @@name,
46
+ 'method_name' => 'get_for_me',
47
+ 'http_method' => 'POST',
48
+ 'path' => '/v1/me/cart',
49
+ 'params' => [],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.get_as_non_registered(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'get_as_non_registered',
60
+ 'http_method' => 'POST',
61
+ 'path' => '/v1/customers/non-registered/cart',
62
+ 'params' => [],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.get(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'get',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/customers/{customerId}/cart',
75
+ 'params' => ['customerId', ],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
81
+ def self.add_item_for_me(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'add_item_for_me',
86
+ 'http_method' => 'POST',
87
+ 'path' => '/v1/me/cart/items',
88
+ 'params' => [],
89
+ 'args' => args
90
+ })
91
+
92
+ end
93
+
94
+ def self.get_as_non_registered_for_me(*args)
95
+
96
+ Clayful.call_api({
97
+ 'model_name' => @@name,
98
+ 'method_name' => 'get_as_non_registered_for_me',
99
+ 'http_method' => 'POST',
100
+ 'path' => '/v1/me/non-registered/cart',
101
+ 'params' => [],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ def self.add_item(*args)
108
+
109
+ Clayful.call_api({
110
+ 'model_name' => @@name,
111
+ 'method_name' => 'add_item',
112
+ 'http_method' => 'POST',
113
+ 'path' => '/v1/customers/{customerId}/cart/items',
114
+ 'params' => ['customerId', ],
115
+ 'args' => args
116
+ })
117
+
118
+ end
119
+
120
+ def self.checkout_for_me(*args)
121
+
122
+ Clayful.call_api({
123
+ 'model_name' => @@name,
124
+ 'method_name' => 'checkout_for_me',
125
+ 'http_method' => 'POST',
126
+ 'path' => '/v1/me/cart/checkout/{type}',
127
+ 'params' => ['type', ],
128
+ 'args' => args
129
+ })
130
+
131
+ end
132
+
133
+ def self.checkout_as_non_registered(*args)
134
+
135
+ Clayful.call_api({
136
+ 'model_name' => @@name,
137
+ 'method_name' => 'checkout_as_non_registered',
138
+ 'http_method' => 'POST',
139
+ 'path' => '/v1/customers/non-registered/cart/checkout/{type}',
140
+ 'params' => ['type', ],
141
+ 'args' => args
142
+ })
143
+
144
+ end
145
+
146
+ def self.checkout(*args)
147
+
148
+ Clayful.call_api({
149
+ 'model_name' => @@name,
150
+ 'method_name' => 'checkout',
151
+ 'http_method' => 'POST',
152
+ 'path' => '/v1/customers/{customerId}/cart/checkout/{type}',
153
+ 'params' => ['customerId', 'type', ],
154
+ 'args' => args
155
+ })
156
+
157
+ end
158
+
159
+ def self.checkout_as_non_registered_for_me(*args)
160
+
161
+ Clayful.call_api({
162
+ 'model_name' => @@name,
163
+ 'method_name' => 'checkout_as_non_registered_for_me',
164
+ 'http_method' => 'POST',
165
+ 'path' => '/v1/me/non-registered/cart/checkout/{type}',
166
+ 'params' => ['type', ],
167
+ 'args' => args
168
+ })
169
+
170
+ end
171
+
172
+ def self.update_item_for_me(*args)
173
+
174
+ Clayful.call_api({
175
+ 'model_name' => @@name,
176
+ 'method_name' => 'update_item_for_me',
177
+ 'http_method' => 'PUT',
178
+ 'path' => '/v1/me/cart/items/{itemId}',
179
+ 'params' => ['itemId', ],
180
+ 'args' => args
181
+ })
182
+
183
+ end
184
+
185
+ def self.update_item(*args)
186
+
187
+ Clayful.call_api({
188
+ 'model_name' => @@name,
189
+ 'method_name' => 'update_item',
190
+ 'http_method' => 'PUT',
191
+ 'path' => '/v1/customers/{customerId}/cart/items/{itemId}',
192
+ 'params' => ['customerId', 'itemId', ],
193
+ 'args' => args
194
+ })
195
+
196
+ end
197
+
198
+ def self.empty_for_me(*args)
199
+
200
+ Clayful.call_api({
201
+ 'model_name' => @@name,
202
+ 'method_name' => 'empty_for_me',
203
+ 'http_method' => 'DELETE',
204
+ 'path' => '/v1/me/cart/items',
205
+ 'params' => [],
206
+ 'args' => args
207
+ })
208
+
209
+ end
210
+
211
+ def self.empty(*args)
212
+
213
+ Clayful.call_api({
214
+ 'model_name' => @@name,
215
+ 'method_name' => 'empty',
216
+ 'http_method' => 'DELETE',
217
+ 'path' => '/v1/customers/{customerId}/cart/items',
218
+ 'params' => ['customerId', ],
219
+ 'args' => args
220
+ })
221
+
222
+ end
223
+
224
+ def self.delete_item_for_me(*args)
225
+
226
+ Clayful.call_api({
227
+ 'model_name' => @@name,
228
+ 'method_name' => 'delete_item_for_me',
229
+ 'http_method' => 'DELETE',
230
+ 'path' => '/v1/me/cart/items/{itemId}',
231
+ 'params' => ['itemId', ],
232
+ 'args' => args
233
+ })
234
+
235
+ end
236
+
237
+ def self.delete_item(*args)
238
+
239
+ Clayful.call_api({
240
+ 'model_name' => @@name,
241
+ 'method_name' => 'delete_item',
242
+ 'http_method' => 'DELETE',
243
+ 'path' => '/v1/customers/{customerId}/cart/items/{itemId}',
244
+ 'params' => ['customerId', 'itemId', ],
245
+ 'args' => args
246
+ })
247
+
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,109 @@
1
+ module Clayful
2
+
3
+ class Catalog
4
+
5
+ @@name = 'Catalog'
6
+ @@path = 'catalogs'
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/catalogs',
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/catalogs/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/catalogs/{catalogId}',
49
+ 'params' => ['catalogId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.pull_from_metafield(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'pull_from_metafield',
60
+ 'http_method' => 'POST',
61
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/pull',
62
+ 'params' => ['catalogId', 'field', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.increase_metafield(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'increase_metafield',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/inc',
75
+ 'params' => ['catalogId', 'field', ],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
81
+ def self.push_to_metafield(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'push_to_metafield',
86
+ 'http_method' => 'POST',
87
+ 'path' => '/v1/catalogs/{catalogId}/meta/{field}/push',
88
+ 'params' => ['catalogId', '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/catalogs/{catalogId}/meta/{field}',
101
+ 'params' => ['catalogId', 'field', ],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ end
108
+
109
+ end
@@ -0,0 +1,109 @@
1
+ module Clayful
2
+
3
+ class Collection
4
+
5
+ @@name = 'Collection'
6
+ @@path = 'collections'
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/collections',
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/collections/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/collections/{collectionId}',
49
+ 'params' => ['collectionId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.push_to_metafield(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'push_to_metafield',
60
+ 'http_method' => 'POST',
61
+ 'path' => '/v1/collections/{collectionId}/meta/{field}/push',
62
+ 'params' => ['collectionId', 'field', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.increase_metafield(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'increase_metafield',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/collections/{collectionId}/meta/{field}/inc',
75
+ 'params' => ['collectionId', '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/collections/{collectionId}/meta/{field}/pull',
88
+ 'params' => ['collectionId', '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/collections/{collectionId}/meta/{field}',
101
+ 'params' => ['collectionId', 'field', ],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ end
108
+
109
+ end