Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class Option(ParentResource):
res_name = "options"
class Options(ResourceSet):
res_name = "options"
resource_class = Option
class OptionSet(ParentResource):
res_name = "optionsets"
class OptionSets(ResourceSet):
res_name = "optionsets"
resource_class = OptionSet
class Order(ParentResource):
res_name = "orders"
class Orders(ResourceSet):
res_name = "orders"
resource_class = Order
class Product(ParentResource):
res_name = "products"
class Products(ResourceSet):
res_name = "products"
resource_class = Product
class Redirect(Resource):
res_name = "redirects"
class Store(Resource):
res_name = "store"
class Stores(ResourceSet):
"""Only supports GET /store.json, according to documentation."""
res_name = "store"
resource_class = Store
class Country(ParentResource):
res_name = "countries"
class Countries(ResourceSet):
res_name = "countries"
resource_class = Country
class Customer(ParentResource):
res_name = "customers"
class Customers(ResourceSet):
res_name = "customers"
resource_class = Customer
class Option(ParentResource):
res_name = "options"
class Options(ResourceSet):
res_name = "options"
resource_class = Option
class OptionSet(ParentResource):
res_name = "optionsets"
class Country(ParentResource):
res_name = "countries"
class Countries(ResourceSet):
res_name = "countries"
resource_class = Country
class Customer(ParentResource):
res_name = "customers"
class Customers(ResourceSet):
res_name = "customers"
resource_class = Customer
class Option(ParentResource):
res_name = "options"
class Options(ResourceSet):
res_name = "options"
resource_class = Option
class OptionSet(ParentResource):
res_name = "optionsets"
class OptionSets(ResourceSet):
res_name = "optionsets"
resource_class = OptionSet
class Order(ParentResource):
res_name = "orders"
class OptionSet(ParentResource):
res_name = "optionsets"
class OptionSets(ResourceSet):
res_name = "optionsets"
resource_class = OptionSet
class Order(ParentResource):
res_name = "orders"
class Orders(ResourceSet):
res_name = "orders"
resource_class = Order
class Product(ParentResource):
res_name = "products"
class Products(ResourceSet):
res_name = "products"
resource_class = Product
class Redirect(Resource):
res_name = "redirects"
class Redirects(ResourceSet):
res_name = "redirects"
resource_class = Redirect
class Shipping(ParentResource):
"""Only GET"""
res_name = "shipping"
class Coupon(Resource):
res_name = "coupons"
class Coupons(ResourceSet):
res_name = "coupons"
resource_class = Coupon
class Store(Resource):
res_name = "store"
class Stores(ResourceSet):
"""Only supports GET /store.json, according to documentation."""
res_name = "store"
resource_class = Store
class Country(ParentResource):
res_name = "countries"
class Countries(ResourceSet):
res_name = "countries"
resource_class = Country
class Customer(ParentResource):
res_name = "customers"
class Customers(ResourceSet):
res_name = "customers"
resource_class = Customer
class Option(ParentResource):
res_name = "options"
class Customer(ParentResource):
res_name = "customers"
class Customers(ResourceSet):
res_name = "customers"
resource_class = Customer
class Option(ParentResource):
res_name = "options"
class Options(ResourceSet):
res_name = "options"
resource_class = Option
class OptionSet(ParentResource):
res_name = "optionsets"
class OptionSets(ResourceSet):
res_name = "optionsets"
resource_class = OptionSet
class Order(ParentResource):
res_name = "orders"
class Orders(ResourceSet):
res_name = "orders"
resource_class = Order
class Product(ParentResource):
res_name = "products"
def __init__(self, fields=None):
super(ParentResource, self).__init__(fields)
self.subresources = SubResourceManager(self)
class Product(ParentResource):
res_name = "products"
class Products(ResourceSet):
res_name = "products"
resource_class = Product
class Redirect(Resource):
res_name = "redirects"
class Redirects(ResourceSet):
res_name = "redirects"
resource_class = Redirect
class Shipping(ParentResource):
"""Only GET"""
res_name = "shipping"