class Clayful::Product

Public Class Methods

adjust_variant_quantity(*args) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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
name() click to toggle source
# File lib/models/product.rb, line 8
def self.name
        @@name
end
path() click to toggle source
# File lib/models/product.rb, line 12
def self.path
        @@path
end
pull_from_metafield(*args) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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