-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Samson
committed
Sep 1, 2015
1 parent
e20fdd8
commit fdf8f4f
Showing
35 changed files
with
161 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.model | ||
Shopify-Trois Model | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class ApplicationCharge(Model): | ||
"""ApplicationCharge | ||
'''ApplicationCharge | ||
http://docs.shopify.com/api/applicationcharge | ||
""" | ||
''' | ||
|
||
resource = "application_charges" | ||
resource = 'application_charges' | ||
|
||
supported = ["index", "view", "create", "/activate"] | ||
supported = ['index', 'view', 'create', '/activate'] | ||
|
||
properties = [ | ||
"created_at", "id", "name", "price", "return_url", "status", "test", | ||
"updated_at", "confirmation_url" | ||
'created_at', 'id', 'name', 'price', 'return_url', 'status', 'test', | ||
'updated_at', 'confirmation_url' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.article | ||
Shopify-Trois Article | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
from .blog import Blog | ||
|
||
|
||
class Article(Model): | ||
"""Article | ||
'''Article | ||
http://docs.shopify.com/api/article | ||
""" | ||
''' | ||
|
||
resource = "articles" | ||
resource = 'articles' | ||
is_subresource_of = Blog | ||
|
||
supported = ["index", "count", "view", "create", "update", "delete"] | ||
supported = ['index', 'count', 'view', 'create', 'update', 'delete'] | ||
|
||
properties = [ | ||
"author", "blog_id", "body_html", "created_at", "id", "published_at", | ||
"summary_html", "template_suffix", "title", "updated_at", "user_id", | ||
"tags" | ||
'author', 'blog_id', 'body_html', 'created_at', 'id', 'metafield', | ||
'published', 'published_at', 'summary_html', 'tags' 'template_suffix', | ||
'title', 'updated_at', 'user_id' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.asset | ||
Shopify-Trois Asset | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
from .theme import Theme | ||
|
||
|
||
class Asset(Model): | ||
"""Asset is probably the weirdest resource exposed by Shopify. | ||
'''Asset is probably the weirdest resource exposed by Shopify. | ||
Create/Update is actually a PUT on theme/#{id}/assets.json | ||
Delete is a DELETE on theme/#{id}/assets.json and the asset key | ||
is passed by parameter... | ||
http://docs.shopify.com/api/asset | ||
""" | ||
''' | ||
|
||
resource = "assets" | ||
resource = 'assets' | ||
is_subresource_of = Theme | ||
|
||
supported = ["index"] | ||
supported = ['index'] | ||
|
||
properties = [ | ||
"key", "public_url", "created_at", "updated_at", "content_type", | ||
"size", "theme_id" | ||
'attachment', 'content_type', 'source_key', 'src', | ||
'key', 'public_url', 'created_at', 'updated_at', | ||
'size', 'theme_id', 'value' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.blog | ||
Shopify-Trois Blog | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class Blog(Model): | ||
"""Blog | ||
'''Blog | ||
http://docs.shopify.com/api/blog | ||
""" | ||
''' | ||
|
||
resource = "blogs" | ||
resource = 'blogs' | ||
|
||
supported = ["index", "count", "view", "create", "update", "delete"] | ||
supported = ['index', 'count', 'view', 'create', 'update', 'delete'] | ||
|
||
properties = [ | ||
"commentable", "created_at", "feedburner", "feedburner_location", | ||
"handle", "id", "template_suffix", "title", "updated_at", "tags" | ||
'commentable', 'created_at', 'feedburner', 'feedburner_location', | ||
'handle', 'id', 'metafield', 'template_suffix', 'title', 'updated_at', | ||
'tags' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.carrier_service | ||
Shopify-Trois CarrierService | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class CarrierService(Model): | ||
"""CarrierService | ||
'''CarrierService | ||
http://docs.shopify.com/api/carrierservice | ||
""" | ||
''' | ||
|
||
resource = "carrier_services" | ||
resource = 'carrier_services' | ||
|
||
supported = [ | ||
"index", "create", "view", "delete", "update" | ||
'index', 'create', 'view', 'delete', 'update' | ||
] | ||
|
||
properties = [ | ||
"name", "callback_url", "format", "service_discovery", "active", | ||
"carrier_service_type" | ||
'active', 'callback_url', 'carrier_service_type' | ||
'name', 'service_discovery', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.checkout | ||
Shopify-Trois Checkout | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class Checkout(Model): | ||
"""Checkout | ||
'''Checkout | ||
http://docs.shopify.com/api/checkout | ||
""" | ||
''' | ||
|
||
resource = "checkouts" | ||
resource = 'checkouts' | ||
|
||
supported = [ | ||
"count", "index" | ||
'count', 'index' | ||
] | ||
|
||
properties = [ | ||
"buyer_accepts_marketing", "cart_token", "closed_at", "completed_at", | ||
"created_at", "currency", "email", "gateway", "id", "landing_site", | ||
"note", "referring_site", "shipping_lines", "subtotal_price", | ||
"tax_lines", "taxes_included", "token", "total_discounts", | ||
"total_line_items_price", "total_price", "total_tax", "total_weight", | ||
"updated_at", "line_items", "name", "note_attributes", | ||
"discount_codes", "billing_address", "shipping_address", "customer" | ||
'abandoned_checkout_url', 'billing_address', 'buyer_accepts_marketing', | ||
'cancel_reason', 'cart_token', 'closed_at', 'completed_at', | ||
'created_at', 'currency', 'customer', 'discount_codes', 'email', | ||
'gateway', 'id', 'landing_site', 'line_items', 'note', | ||
'referring_site', 'shipping_address', 'shipping_lines', 'source_name', | ||
'subtotal_price', 'tax_lines', 'taxes_included', 'token', | ||
'total_discounts', 'total_line_items_price', 'total_price', | ||
'total_tax', 'total_weight', 'updated_at' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.collect | ||
Shopify-Trois Collect | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class Collect(Model): | ||
"""Collect | ||
'''Collect | ||
http://docs.shopify.com/api/collect | ||
""" | ||
''' | ||
|
||
resource = "collects" | ||
resource = 'collects' | ||
|
||
supported = [ | ||
"count", "create", "index", "view", | ||
'count', 'create', 'index', 'view', 'delete' | ||
] | ||
|
||
properties = [ | ||
"collection_id", "created_at", "featured", "id", "product_id", | ||
"sort_value", "updated_at", "position" | ||
'collection_id', 'created_at', 'featured', 'id', 'product_id', | ||
'sort_value', 'updated_at', 'position' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.comment | ||
Shopify-Trois Comment | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class Comment(Model): | ||
"""Comment | ||
'''Comment | ||
http://docs.shopify.com/api/comment | ||
""" | ||
''' | ||
|
||
resource = "comments" | ||
resource = 'comments' | ||
|
||
supported = [ | ||
"count", "create", "index", "update", "view", | ||
"/spam", "/not_spam", "/approve", "/remove" | ||
'count', 'create', 'index', 'update', 'view', | ||
'/spam', '/not_spam', '/approve', '/remove' | ||
] | ||
|
||
properties = [ | ||
"article_id", "author", "blog_id", "body", "body_html", "created_at", | ||
"email", "id", "ip", "published_at", "status", "updated_at", | ||
"user_agent" | ||
'article_id', 'author', 'blog_id', 'body', 'body_html', 'created_at', | ||
'email', 'id', 'ip', 'published_at', 'status', 'updated_at', | ||
'user_agent' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
''' | ||
shopify_trois.models.country | ||
Shopify-Trois Country | ||
:copyright: (c) 2013 by Martin Samson | ||
:copyright: (c) 2015 Martin Samson | ||
:license: MIT, see LICENSE for more details. | ||
""" | ||
''' | ||
|
||
from .model import Model | ||
|
||
|
||
class Country(Model): | ||
"""Country | ||
'''Country | ||
http://docs.shopify.com/api/country | ||
""" | ||
''' | ||
|
||
resource = "countries" | ||
resource = 'countries' | ||
|
||
supported = ["index", "count", "view", "create", "update", "delete"] | ||
supported = ['index', 'count', 'view', 'create', 'update', 'delete'] | ||
|
||
properties = [ | ||
"code", "id", "name", "tax", "provinces", | ||
"weight_based_shipping_rates", "price_based_shipping_rates", | ||
"carrier_shipping_rate_providers" | ||
'carrier_shipping_rate_providers' 'code', 'id', 'name', | ||
'price_based_shipping_rates', 'tax', 'provinces', | ||
'weight_based_shipping_rates' | ||
] |
Oops, something went wrong.