Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
class ConfigurableFields(ResourceObject):
pass
from bigcommerce.api.mapping import Mapping
from . import ResourceObject
import SubResources
class Customers(ResourceObject):
"""
"""
sub_resources = Mapping(addresses = Mapping())
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
class ConfigurableFields(ResourceObject):
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(),
)
class ProductOptions(ResourceObject):
from resource import ResourceObject
from bigcommerce.api.mapping import Mapping
from bigcommerce.api.filters import FilterSet, StringFilter, NumberFilter, DateFilter, BoolFilter
class Customers(ResourceObject):
"""
"""
sub_resources = Mapping(addresses = Mapping())
@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" ),
first_name = StringFilter(),
last_name = StringFilter(),
company = StringFilter(),
email = StringFilter(),
phone = StringFilter(),
store_credit = NumberFilter(),
customer_group_id = NumberFilter(),
min_date_created = DateFilter(),
max_date_created = DateFilter()
)
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"]
can_update = True
@classmethod