How to use the bigcommerce.api.resource.ResourceObject function in bigcommerce

To help you get started, we’ve selected a few bigcommerce examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
class Shipments(ResourceObject):
    can_update = True
    read_only = ["id", "date_created", "customer_id", "shipping_method", "items"]
    sub_resource = Mapping(billing_address = Mapping(single=True),
                           shipping_address = Mapping(single=True),
                           items = Mapping())
    pass


class ConfigurableFields(ResourceObject):
    pass



class SKU(ResourceObject):
    sub_resources = Mapping(options = Mapping())
    read_only = ["id","product_id"]
    can_update = True
    
    @classmethod
    def filter_set(cls):
        return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
                      max_id = NumberFilter( info="Minimum id of the product" ),
                      sku = StringFilter(),
                      upc = StringFilter(),
                      min_inventory_level = NumberFilter(),
                      max_inventory_level = NumberFilter(),
                      inventory_warning_level = NumberFilter(),
                      bin_picking_number = NumberFilter(),
                      )
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
read_only = ["id","product_id"]
    can_update = True
    
    @classmethod
    def filter_set(cls):
        return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
                      max_id = NumberFilter( info="Minimum id of the product" ),
                      sku = StringFilter(),
                      upc = StringFilter(),
                      min_inventory_level = NumberFilter(),
                      max_inventory_level = NumberFilter(),
                      inventory_warning_level = NumberFilter(),
                      bin_picking_number = NumberFilter(),
                      ) 
    
class ProductOptions(ResourceObject):
    pass


class States(ResourceObject):
    @classmethod
    def filter_set(cls):
        return FilterSet(state = StringFilter(),
                      state_abbreviations = StringFilter()
                      ) 
    

class Images(ResourceObject):
    can_update = True
    read_only = ["id","product_id","date_created"]
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / brands.py View on Github external
from bigcommerce.api.resource import ResourceObject


class Brands(ResourceObject):
    """
    
    """
    can_update = True
    read_only = ["id"]
    
    def __repr__(self):
        return "%s- %s" % (self.id, self.name)
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
from bigcommerce.api.resource import ResourceObject
from bigcommerce.api.mapping import Mapping
from bigcommerce.api.filters import FilterSet, StringFilter, NumberFilter, DateFilter, BoolFilter


class ShippingAddresses(ResourceObject):
    pass


class Coupons(ResourceObject):
    pass


class OrderProducts(ResourceObject):
    sub_resources = Mapping(
                            applied_discounts = Mapping(),
                            product_options = Mapping(),
                            configurable_fields = Mapping())
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / optionsetoptions.py View on Github external
from bigcommerce.api.resource import ResourceObject

# TODO: why is this in its own module rather than being in subresources?

class OptionSetOptions(ResourceObject):
    can_update = True
    read_only = ["id"]

    def __repr__(self):
        return "%s- %s" % (self.id, self.display_name)
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
class Coupons(ResourceObject):
    pass


class OrderProducts(ResourceObject):
    sub_resources = Mapping(
                            applied_discounts = Mapping(),
                            product_options = Mapping(),
                            configurable_fields = Mapping())
    
    


class Shipments(ResourceObject):
    can_update = True
    read_only = ["id", "date_created", "customer_id", "shipping_method", "items"]
    sub_resource = Mapping(billing_address = Mapping(single=True),
                           shipping_address = Mapping(single=True),
                           items = Mapping())
    pass


class ConfigurableFields(ResourceObject):
    pass



class SKU(ResourceObject):
    sub_resources = Mapping(options = Mapping())
    read_only = ["id","product_id"]
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / optionvalues.py View on Github external
from bigcommerce.api.resource import ResourceObject


class OptionValues(ResourceObject):
    """
    
    """
    can_update = True
    read_only = ["id", "option_id"]
    
    def __repr__(self):
        return "%s- %s -> %s" % (self.id, self.label, self.value)
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
from bigcommerce.api.resource import ResourceObject
from bigcommerce.api.mapping import Mapping
from bigcommerce.api.filters import FilterSet, StringFilter, NumberFilter, DateFilter, BoolFilter


class ShippingAddresses(ResourceObject):
    pass


class Coupons(ResourceObject):
    pass


class OrderProducts(ResourceObject):
    sub_resources = Mapping(
                            applied_discounts = Mapping(),
                            product_options = Mapping(),
                            configurable_fields = Mapping())
    
    


class Shipments(ResourceObject):
    can_update = True
    read_only = ["id", "date_created", "customer_id", "shipping_method", "items"]
    sub_resource = Mapping(billing_address = Mapping(single=True),
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
from bigcommerce.api.resource import ResourceObject
from bigcommerce.api.mapping import Mapping
from bigcommerce.api.filters import FilterSet, StringFilter, NumberFilter, DateFilter, BoolFilter


class ShippingAddresses(ResourceObject):
    pass


class Coupons(ResourceObject):
    pass


class OrderProducts(ResourceObject):
    sub_resources = Mapping(
                            applied_discounts = Mapping(),
                            product_options = Mapping(),
                            configurable_fields = Mapping())
    
    


class Shipments(ResourceObject):
    can_update = True
    read_only = ["id", "date_created", "customer_id", "shipping_method", "items"]
    sub_resource = Mapping(billing_address = Mapping(single=True),
                           shipping_address = Mapping(single=True),
                           items = Mapping())
    pass
github bigcommerce / bigcommerce-api-python / bigcommerce / api / resources / subresource.py View on Github external
product_options = Mapping(),
                            configurable_fields = Mapping())
    
    


class Shipments(ResourceObject):
    can_update = True
    read_only = ["id", "date_created", "customer_id", "shipping_method", "items"]
    sub_resource = Mapping(billing_address = Mapping(single=True),
                           shipping_address = Mapping(single=True),
                           items = Mapping())
    pass


class ConfigurableFields(ResourceObject):
    pass



class SKU(ResourceObject):
    sub_resources = Mapping(options = Mapping())
    read_only = ["id","product_id"]
    can_update = True
    
    @classmethod
    def filter_set(cls):
        return FilterSet(min_id = NumberFilter( info="Minimum id of the product" ),
                      max_id = NumberFilter( info="Minimum id of the product" ),
                      sku = StringFilter(),
                      upc = StringFilter(),
                      min_inventory_level = NumberFilter(),