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