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,109 @@
1
+ module Clayful
2
+
3
+ class Discount
4
+
5
+ @@name = 'Discount'
6
+ @@path = 'discounts'
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/discounts',
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/discounts/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/discounts/{discountId}',
49
+ 'params' => ['discountId', ],
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/discounts/{discountId}/meta/{field}/push',
62
+ 'params' => ['discountId', '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/discounts/{discountId}/meta/{field}/inc',
75
+ 'params' => ['discountId', '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/discounts/{discountId}/meta/{field}/pull',
88
+ 'params' => ['discountId', '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/discounts/{discountId}/meta/{field}',
101
+ 'params' => ['discountId', 'field', ],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ end
108
+
109
+ end
@@ -0,0 +1,71 @@
1
+ module Clayful
2
+
3
+ class Downloadable
4
+
5
+ @@name = 'Downloadable'
6
+ @@path = 'downloadables'
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/downloadables',
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/downloadables/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/downloadables/{downloadableId}',
49
+ 'params' => ['downloadableId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.create_download_url(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'create_download_url',
60
+ 'http_method' => 'POST',
61
+ 'path' => '/v1/downloadables/{downloadableId}/url',
62
+ 'params' => ['downloadableId', ],
63
+ 'without_payload' => true,
64
+ 'args' => args
65
+ })
66
+
67
+ end
68
+
69
+ end
70
+
71
+ end
@@ -0,0 +1,109 @@
1
+ module Clayful
2
+
3
+ class Group
4
+
5
+ @@name = 'Group'
6
+ @@path = 'groups'
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/groups',
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/groups/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/groups/{groupId}',
49
+ 'params' => ['groupId', ],
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/groups/{groupId}/meta/{field}/inc',
62
+ 'params' => ['groupId', 'field', ],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.pull_from_metafield(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'pull_from_metafield',
73
+ 'http_method' => 'POST',
74
+ 'path' => '/v1/groups/{groupId}/meta/{field}/pull',
75
+ 'params' => ['groupId', '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/groups/{groupId}/meta/{field}/push',
88
+ 'params' => ['groupId', '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/groups/{groupId}/meta/{field}',
101
+ 'params' => ['groupId', 'field', ],
102
+ 'args' => args
103
+ })
104
+
105
+ end
106
+
107
+ end
108
+
109
+ end
@@ -0,0 +1,219 @@
1
+ module Clayful
2
+
3
+ class Image
4
+
5
+ @@name = 'Image'
6
+ @@path = 'images'
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/images',
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/images/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/images/{imageId}',
49
+ 'params' => ['imageId', ],
50
+ 'args' => args
51
+ })
52
+
53
+ end
54
+
55
+ def self.list_for_me(*args)
56
+
57
+ Clayful.call_api({
58
+ 'model_name' => @@name,
59
+ 'method_name' => 'list_for_me',
60
+ 'http_method' => 'GET',
61
+ 'path' => '/v1/me/images',
62
+ 'params' => [],
63
+ 'args' => args
64
+ })
65
+
66
+ end
67
+
68
+ def self.count_for_me(*args)
69
+
70
+ Clayful.call_api({
71
+ 'model_name' => @@name,
72
+ 'method_name' => 'count_for_me',
73
+ 'http_method' => 'GET',
74
+ 'path' => '/v1/me/images/count',
75
+ 'params' => [],
76
+ 'args' => args
77
+ })
78
+
79
+ end
80
+
81
+ def self.get_for_me(*args)
82
+
83
+ Clayful.call_api({
84
+ 'model_name' => @@name,
85
+ 'method_name' => 'get_for_me',
86
+ 'http_method' => 'GET',
87
+ 'path' => '/v1/me/images/{imageId}',
88
+ 'params' => ['imageId', ],
89
+ 'args' => args
90
+ })
91
+
92
+ end
93
+
94
+ def self.create(*args)
95
+
96
+ Clayful.call_api({
97
+ 'model_name' => @@name,
98
+ 'method_name' => 'create',
99
+ 'http_method' => 'POST',
100
+ 'path' => '/v1/images',
101
+ 'params' => [],
102
+ 'uses_form_data' => true,
103
+ 'args' => args
104
+ })
105
+
106
+ end
107
+
108
+ def self.create_for_me(*args)
109
+
110
+ Clayful.call_api({
111
+ 'model_name' => @@name,
112
+ 'method_name' => 'create_for_me',
113
+ 'http_method' => 'POST',
114
+ 'path' => '/v1/me/images',
115
+ 'params' => [],
116
+ 'uses_form_data' => true,
117
+ 'args' => args
118
+ })
119
+
120
+ end
121
+
122
+ def self.create_as_customer(*args)
123
+
124
+ Clayful.call_api({
125
+ 'model_name' => @@name,
126
+ 'method_name' => 'create_as_customer',
127
+ 'http_method' => 'POST',
128
+ 'path' => '/v1/customers/{customerId}/images',
129
+ 'params' => ['customerId', ],
130
+ 'uses_form_data' => true,
131
+ 'args' => args
132
+ })
133
+
134
+ end
135
+
136
+ def self.update(*args)
137
+
138
+ Clayful.call_api({
139
+ 'model_name' => @@name,
140
+ 'method_name' => 'update',
141
+ 'http_method' => 'PUT',
142
+ 'path' => '/v1/images/{imageId}',
143
+ 'params' => ['imageId', ],
144
+ 'uses_form_data' => true,
145
+ 'args' => args
146
+ })
147
+
148
+ end
149
+
150
+ def self.update_for_me(*args)
151
+
152
+ Clayful.call_api({
153
+ 'model_name' => @@name,
154
+ 'method_name' => 'update_for_me',
155
+ 'http_method' => 'PUT',
156
+ 'path' => '/v1/me/images/{imageId}',
157
+ 'params' => ['imageId', ],
158
+ 'uses_form_data' => true,
159
+ 'args' => args
160
+ })
161
+
162
+ end
163
+
164
+ def self.update_as_customer(*args)
165
+
166
+ Clayful.call_api({
167
+ 'model_name' => @@name,
168
+ 'method_name' => 'update_as_customer',
169
+ 'http_method' => 'PUT',
170
+ 'path' => '/v1/customers/{customerId}/images/{imageId}',
171
+ 'params' => ['customerId', 'imageId', ],
172
+ 'uses_form_data' => true,
173
+ 'args' => args
174
+ })
175
+
176
+ end
177
+
178
+ def self.delete(*args)
179
+
180
+ Clayful.call_api({
181
+ 'model_name' => @@name,
182
+ 'method_name' => 'delete',
183
+ 'http_method' => 'DELETE',
184
+ 'path' => '/v1/images/{imageId}',
185
+ 'params' => ['imageId', ],
186
+ 'args' => args
187
+ })
188
+
189
+ end
190
+
191
+ def self.delete_for_me(*args)
192
+
193
+ Clayful.call_api({
194
+ 'model_name' => @@name,
195
+ 'method_name' => 'delete_for_me',
196
+ 'http_method' => 'DELETE',
197
+ 'path' => '/v1/me/images/{imageId}',
198
+ 'params' => ['imageId', ],
199
+ 'args' => args
200
+ })
201
+
202
+ end
203
+
204
+ def self.delete_as_customer(*args)
205
+
206
+ Clayful.call_api({
207
+ 'model_name' => @@name,
208
+ 'method_name' => 'delete_as_customer',
209
+ 'http_method' => 'DELETE',
210
+ 'path' => '/v1/customers/{customerId}/images/{imageId}',
211
+ 'params' => ['customerId', 'imageId', ],
212
+ 'args' => args
213
+ })
214
+
215
+ end
216
+
217
+ end
218
+
219
+ end