clayful 2.4.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.
- checksums.yaml +4 -4
- data/lib/models/brand.rb +40 -40
- data/lib/models/cart.rb +85 -85
- data/lib/models/catalog.rb +40 -40
- data/lib/models/collection.rb +40 -40
- data/lib/models/country.rb +11 -11
- data/lib/models/coupon.rb +68 -16
- data/lib/models/currency.rb +11 -11
- data/lib/models/customer.rb +153 -153
- data/lib/models/discount.rb +20 -20
- data/lib/models/downloadable.rb +14 -14
- data/lib/models/group.rb +20 -20
- data/lib/models/image.rb +72 -72
- data/lib/models/order.rb +255 -255
- data/lib/models/order_tag.rb +11 -11
- data/lib/models/payment_method.rb +11 -11
- data/lib/models/product.rb +92 -79
- data/lib/models/review.rb +104 -104
- data/lib/models/review_comment.rb +68 -68
- data/lib/models/shipping_method.rb +11 -11
- data/lib/models/shipping_policy.rb +11 -11
- data/lib/models/store.rb +14 -14
- data/lib/models/subscription.rb +112 -112
- data/lib/models/subscription_plan.rb +11 -11
- data/lib/models/tax_category.rb +11 -11
- data/lib/models/vendor.rb +40 -40
- data/lib/models/wish_list.rb +116 -116
- metadata +2 -2
data/lib/models/discount.rb
CHANGED
@@ -13,27 +13,27 @@ module Clayful
|
|
13
13
|
@@path
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.
|
16
|
+
def self.count(*args)
|
17
17
|
|
18
18
|
Clayful.call_api({
|
19
19
|
'model_name' => @@name,
|
20
|
-
'method_name' => '
|
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.
|
29
|
+
def self.delete_metafield(*args)
|
30
30
|
|
31
31
|
Clayful.call_api({
|
32
32
|
'model_name' => @@name,
|
33
|
-
'method_name' => '
|
34
|
-
'http_method' => '
|
35
|
-
'path' => '/v1/discounts/
|
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
|
|
@@ -52,27 +52,27 @@ module Clayful
|
|
52
52
|
|
53
53
|
end
|
54
54
|
|
55
|
-
def self.
|
55
|
+
def self.increase_metafield(*args)
|
56
56
|
|
57
57
|
Clayful.call_api({
|
58
58
|
'model_name' => @@name,
|
59
|
-
'method_name' => '
|
59
|
+
'method_name' => 'increase_metafield',
|
60
60
|
'http_method' => 'POST',
|
61
|
-
'path' => '/v1/discounts/{discountId}/meta/{field}/
|
61
|
+
'path' => '/v1/discounts/{discountId}/meta/{field}/inc',
|
62
62
|
'params' => ['discountId', 'field', ],
|
63
63
|
'args' => args
|
64
64
|
})
|
65
65
|
|
66
66
|
end
|
67
67
|
|
68
|
-
def self.
|
68
|
+
def self.list(*args)
|
69
69
|
|
70
70
|
Clayful.call_api({
|
71
71
|
'model_name' => @@name,
|
72
|
-
'method_name' => '
|
73
|
-
'http_method' => '
|
74
|
-
'path' => '/v1/discounts
|
75
|
-
'params' => [
|
72
|
+
'method_name' => 'list',
|
73
|
+
'http_method' => 'GET',
|
74
|
+
'path' => '/v1/discounts',
|
75
|
+
'params' => [],
|
76
76
|
'args' => args
|
77
77
|
})
|
78
78
|
|
@@ -91,13 +91,13 @@ module Clayful
|
|
91
91
|
|
92
92
|
end
|
93
93
|
|
94
|
-
def self.
|
94
|
+
def self.push_to_metafield(*args)
|
95
95
|
|
96
96
|
Clayful.call_api({
|
97
97
|
'model_name' => @@name,
|
98
|
-
'method_name' => '
|
99
|
-
'http_method' => '
|
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
|
})
|
data/lib/models/downloadable.rb
CHANGED
@@ -13,27 +13,28 @@ module Clayful
|
|
13
13
|
@@path
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.
|
16
|
+
def self.count(*args)
|
17
17
|
|
18
18
|
Clayful.call_api({
|
19
19
|
'model_name' => @@name,
|
20
|
-
'method_name' => '
|
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.
|
29
|
+
def self.create_download_url(*args)
|
30
30
|
|
31
31
|
Clayful.call_api({
|
32
32
|
'model_name' => @@name,
|
33
|
-
'method_name' => '
|
34
|
-
'http_method' => '
|
35
|
-
'path' => '/v1/downloadables/
|
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.
|
56
|
+
def self.list(*args)
|
56
57
|
|
57
58
|
Clayful.call_api({
|
58
59
|
'model_name' => @@name,
|
59
|
-
'method_name' => '
|
60
|
-
'http_method' => '
|
61
|
-
'path' => '/v1/downloadables
|
62
|
-
'params' => [
|
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.
|
16
|
+
def self.count(*args)
|
17
17
|
|
18
18
|
Clayful.call_api({
|
19
19
|
'model_name' => @@name,
|
20
|
-
'method_name' => '
|
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.
|
29
|
+
def self.delete_metafield(*args)
|
30
30
|
|
31
31
|
Clayful.call_api({
|
32
32
|
'model_name' => @@name,
|
33
|
-
'method_name' => '
|
34
|
-
'http_method' => '
|
35
|
-
'path' => '/v1/groups/
|
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,27 +52,27 @@ module Clayful
|
|
52
52
|
|
53
53
|
end
|
54
54
|
|
55
|
-
def self.
|
55
|
+
def self.increase_metafield(*args)
|
56
56
|
|
57
57
|
Clayful.call_api({
|
58
58
|
'model_name' => @@name,
|
59
|
-
'method_name' => '
|
59
|
+
'method_name' => 'increase_metafield',
|
60
60
|
'http_method' => 'POST',
|
61
|
-
'path' => '/v1/groups/{groupId}/meta/{field}/
|
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.
|
68
|
+
def self.list(*args)
|
69
69
|
|
70
70
|
Clayful.call_api({
|
71
71
|
'model_name' => @@name,
|
72
|
-
'method_name' => '
|
73
|
-
'http_method' => '
|
74
|
-
'path' => '/v1/groups
|
75
|
-
'params' => [
|
72
|
+
'method_name' => 'list',
|
73
|
+
'http_method' => 'GET',
|
74
|
+
'path' => '/v1/groups',
|
75
|
+
'params' => [],
|
76
76
|
'args' => args
|
77
77
|
})
|
78
78
|
|
@@ -91,13 +91,13 @@ module Clayful
|
|
91
91
|
|
92
92
|
end
|
93
93
|
|
94
|
-
def self.
|
94
|
+
def self.push_to_metafield(*args)
|
95
95
|
|
96
96
|
Clayful.call_api({
|
97
97
|
'model_name' => @@name,
|
98
|
-
'method_name' => '
|
99
|
-
'http_method' => '
|
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.
|
16
|
+
def self.count(*args)
|
17
17
|
|
18
18
|
Clayful.call_api({
|
19
19
|
'model_name' => @@name,
|
20
|
-
'method_name' => '
|
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.
|
29
|
+
def self.count_for_me(*args)
|
30
30
|
|
31
31
|
Clayful.call_api({
|
32
32
|
'model_name' => @@name,
|
33
|
-
'method_name' => '
|
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.
|
42
|
+
def self.create(*args)
|
43
43
|
|
44
44
|
Clayful.call_api({
|
45
45
|
'model_name' => @@name,
|
46
|
-
'method_name' => '
|
47
|
-
'http_method' => '
|
48
|
-
'path' => '/v1/images
|
49
|
-
'params' => [
|
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.
|
56
|
+
def self.create_as_customer(*args)
|
56
57
|
|
57
58
|
Clayful.call_api({
|
58
59
|
'model_name' => @@name,
|
59
|
-
'method_name' => '
|
60
|
-
'http_method' => '
|
61
|
-
'path' => '/v1/
|
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.
|
70
|
+
def self.create_for_me(*args)
|
69
71
|
|
70
72
|
Clayful.call_api({
|
71
73
|
'model_name' => @@name,
|
72
|
-
'method_name' => '
|
73
|
-
'http_method' => '
|
74
|
-
'path' => '/v1/me/images
|
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.
|
84
|
+
def self.delete(*args)
|
82
85
|
|
83
86
|
Clayful.call_api({
|
84
87
|
'model_name' => @@name,
|
85
|
-
'method_name' => '
|
86
|
-
'http_method' => '
|
87
|
-
'path' => '/v1/
|
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.
|
97
|
+
def self.delete_as_customer(*args)
|
95
98
|
|
96
99
|
Clayful.call_api({
|
97
100
|
'model_name' => @@name,
|
98
|
-
'method_name' => '
|
99
|
-
'http_method' => '
|
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.
|
110
|
+
def self.delete_for_me(*args)
|
109
111
|
|
110
112
|
Clayful.call_api({
|
111
113
|
'model_name' => @@name,
|
112
|
-
'method_name' => '
|
113
|
-
'http_method' => '
|
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.
|
123
|
+
def self.get(*args)
|
123
124
|
|
124
125
|
Clayful.call_api({
|
125
126
|
'model_name' => @@name,
|
126
|
-
'method_name' => '
|
127
|
-
'http_method' => '
|
128
|
-
'path' => '/v1/
|
129
|
-
'params' => ['
|
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.
|
136
|
+
def self.get_for_me(*args)
|
137
137
|
|
138
138
|
Clayful.call_api({
|
139
139
|
'model_name' => @@name,
|
140
|
-
'method_name' => '
|
141
|
-
'http_method' => '
|
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.
|
149
|
+
def self.list(*args)
|
151
150
|
|
152
151
|
Clayful.call_api({
|
153
152
|
'model_name' => @@name,
|
154
|
-
'method_name' => '
|
155
|
-
'http_method' => '
|
156
|
-
'path' => '/v1/
|
157
|
-
'params' => [
|
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.
|
162
|
+
def self.list_for_me(*args)
|
165
163
|
|
166
164
|
Clayful.call_api({
|
167
165
|
'model_name' => @@name,
|
168
|
-
'method_name' => '
|
169
|
-
'http_method' => '
|
170
|
-
'path' => '/v1/
|
171
|
-
'params' => [
|
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.
|
175
|
+
def self.update(*args)
|
179
176
|
|
180
177
|
Clayful.call_api({
|
181
178
|
'model_name' => @@name,
|
182
|
-
'method_name' => '
|
183
|
-
'http_method' => '
|
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.
|
189
|
+
def self.update_as_customer(*args)
|
192
190
|
|
193
191
|
Clayful.call_api({
|
194
192
|
'model_name' => @@name,
|
195
|
-
'method_name' => '
|
196
|
-
'http_method' => '
|
197
|
-
'path' => '/v1/
|
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.
|
203
|
+
def self.update_for_me(*args)
|
205
204
|
|
206
205
|
Clayful.call_api({
|
207
206
|
'model_name' => @@name,
|
208
|
-
'method_name' => '
|
209
|
-
'http_method' => '
|
210
|
-
'path' => '/v1/
|
211
|
-
'params' => ['
|
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
|
|