Class: Clayful::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/models/product.rb

Constant Summary collapse

@@name =
'Product'
@@path =
'products'

Class Method Summary collapse

Class Method Details

.adjust_variant_quantity(*args) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/models/product.rb', line 16

def self.adjust_variant_quantity(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'adjust_variant_quantity',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/variants/{variantId}/quantity',
		'params'           => ['productId', 'variantId', ],
		'args'             => args
	})

end

.count(*args) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/models/product.rb', line 29

def self.count(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'count',
		'http_method'      => 'GET',
		'path'             => '/v1/products/count',
		'params'           => [],
		'args'             => args
	})

end

.create(*args) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/models/product.rb', line 42

def self.create(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'create',
		'http_method'      => 'POST',
		'path'             => '/v1/products',
		'params'           => [],
		'args'             => args
	})

end

.create_variant(*args) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/models/product.rb', line 55

def self.create_variant(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'create_variant',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/variants',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.create_variation(*args) ⇒ Object



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/models/product.rb', line 68

def self.create_variation(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'create_variation',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/options/{optionId}/variations',
		'params'           => ['productId', 'optionId', ],
		'args'             => args
	})

end

.delete(*args) ⇒ Object



81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/models/product.rb', line 81

def self.delete(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'delete',
		'http_method'      => 'DELETE',
		'path'             => '/v1/products/{productId}',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.delete_metafield(*args) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/models/product.rb', line 94

def self.delete_metafield(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'delete_metafield',
		'http_method'      => 'DELETE',
		'path'             => '/v1/products/{productId}/meta/{field}',
		'params'           => ['productId', 'field', ],
		'args'             => args
	})

end

.delete_variant(*args) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/models/product.rb', line 107

def self.delete_variant(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'delete_variant',
		'http_method'      => 'DELETE',
		'path'             => '/v1/products/{productId}/variants/{variantId}',
		'params'           => ['productId', 'variantId', ],
		'args'             => args
	})

end

.delete_variation(*args) ⇒ Object



120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/models/product.rb', line 120

def self.delete_variation(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'delete_variation',
		'http_method'      => 'DELETE',
		'path'             => '/v1/products/{productId}/options/{optionId}/variations/{variationId}',
		'params'           => ['productId', 'optionId', 'variationId', ],
		'args'             => args
	})

end

.get(*args) ⇒ Object



133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/models/product.rb', line 133

def self.get(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'get',
		'http_method'      => 'GET',
		'path'             => '/v1/products/{productId}',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.increase_metafield(*args) ⇒ Object



146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/models/product.rb', line 146

def self.increase_metafield(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'increase_metafield',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/meta/{field}/inc',
		'params'           => ['productId', 'field', ],
		'args'             => args
	})

end

.list(*args) ⇒ Object



159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/models/product.rb', line 159

def self.list(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'list',
		'http_method'      => 'GET',
		'path'             => '/v1/products',
		'params'           => [],
		'args'             => args
	})

end

.mark_as_censored(*args) ⇒ Object



172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/models/product.rb', line 172

def self.mark_as_censored(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'mark_as_censored',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/censored',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.mark_as_uncensored(*args) ⇒ Object



185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/models/product.rb', line 185

def self.mark_as_uncensored(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'mark_as_uncensored',
		'http_method'      => 'DELETE',
		'path'             => '/v1/products/{productId}/censored',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.nameObject



8
9
10
# File 'lib/models/product.rb', line 8

def self.name
	@@name
end

.pathObject



12
13
14
# File 'lib/models/product.rb', line 12

def self.path
	@@path
end

.pull_from_metafield(*args) ⇒ Object



198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/models/product.rb', line 198

def self.pull_from_metafield(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'pull_from_metafield',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/meta/{field}/pull',
		'params'           => ['productId', 'field', ],
		'args'             => args
	})

end

.push_to_metafield(*args) ⇒ Object



211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/models/product.rb', line 211

def self.push_to_metafield(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'push_to_metafield',
		'http_method'      => 'POST',
		'path'             => '/v1/products/{productId}/meta/{field}/push',
		'params'           => ['productId', 'field', ],
		'args'             => args
	})

end

.update(*args) ⇒ Object



224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/models/product.rb', line 224

def self.update(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'update',
		'http_method'      => 'PUT',
		'path'             => '/v1/products/{productId}',
		'params'           => ['productId', ],
		'args'             => args
	})

end

.update_option(*args) ⇒ Object



237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/models/product.rb', line 237

def self.update_option(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'update_option',
		'http_method'      => 'PUT',
		'path'             => '/v1/products/{productId}/options/{optionId}',
		'params'           => ['productId', 'optionId', ],
		'args'             => args
	})

end

.update_variant(*args) ⇒ Object



250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/models/product.rb', line 250

def self.update_variant(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'update_variant',
		'http_method'      => 'PUT',
		'path'             => '/v1/products/{productId}/variants/{variantId}',
		'params'           => ['productId', 'variantId', ],
		'args'             => args
	})

end

.update_variation(*args) ⇒ Object



263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/models/product.rb', line 263

def self.update_variation(*args)

	Clayful.call_api({
		'model_name'       => @@name,
		'method_name'      => 'update_variation',
		'http_method'      => 'PUT',
		'path'             => '/v1/products/{productId}/options/{optionId}/variations/{variationId}',
		'params'           => ['productId', 'optionId', 'variationId', ],
		'args'             => args
	})

end