falsify 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rubocop.yml +123 -0
- data/.travis.yml +7 -0
- data/.yardopts +2 -0
- data/CHANGELOG.md +31 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +75 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +10 -0
- data/bin/console +10 -0
- data/bin/docs +3 -0
- data/bin/setup +8 -0
- data/falsify.gemspec +39 -0
- data/lib/falsify.rb +4 -0
- data/lib/falsify/error.rb +5 -0
- data/lib/falsify/models/address.rb +54 -0
- data/lib/falsify/models/customer/customer.rb +114 -0
- data/lib/falsify/models/customer/metafield.rb +36 -0
- data/lib/falsify/models/fulfillment/fulfillment.rb +96 -0
- data/lib/falsify/models/fulfillment/fulfillment_event.rb +75 -0
- data/lib/falsify/models/fulfillment/fulfillment_line_item.rb +75 -0
- data/lib/falsify/models/fulfillment/supported_tracking_companies.rb +51 -0
- data/lib/falsify/models/order/client_details.rb +36 -0
- data/lib/falsify/models/order/discount_allocation.rb +15 -0
- data/lib/falsify/models/order/discount_application.rb +62 -0
- data/lib/falsify/models/order/discount_code.rb +26 -0
- data/lib/falsify/models/order/order.rb +248 -0
- data/lib/falsify/models/order/order_line_item.rb +102 -0
- data/lib/falsify/models/order/price_set.rb +52 -0
- data/lib/falsify/models/order/refund/refund.rb +72 -0
- data/lib/falsify/models/order/refund/refund_line_item.rb +0 -0
- data/lib/falsify/models/order/shipping_line.rb +39 -0
- data/lib/falsify/models/order/tax_line.rb +14 -0
- data/lib/falsify/models/product/collection/collect.rb +29 -0
- data/lib/falsify/models/product/collection/custom_collection.rb +72 -0
- data/lib/falsify/models/product/collection/smart_collection.rb +181 -0
- data/lib/falsify/models/product/product.rb +83 -0
- data/lib/falsify/models/product/product_image.rb +39 -0
- data/lib/falsify/models/product/product_variant.rb +111 -0
- data/lib/falsify/version.rb +3 -0
- metadata +214 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
module Falsify
|
2
|
+
# A PriceSet contains a price in both *shop* and *presentment* currencies.
|
3
|
+
#
|
4
|
+
# Used for:
|
5
|
+
# - price_set
|
6
|
+
# - discounted_price_set
|
7
|
+
# - total_discounts_set
|
8
|
+
# - total_line_items_price_set
|
9
|
+
# - total_price_set
|
10
|
+
# - total_tax_set
|
11
|
+
# - discount_allocations.amount_set
|
12
|
+
class PriceSet
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :shop_money_amount
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :shop_money_currency_code
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :presentment_money_amount
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :presentment_money_currency_code
|
21
|
+
|
22
|
+
# @param hash [Hash]
|
23
|
+
# @return [PriceSet]
|
24
|
+
def self.create_from_hash(hash)
|
25
|
+
ps = PriceSet.new()
|
26
|
+
|
27
|
+
shop_money = hash[:shop_money]
|
28
|
+
ps.shop_money_amount = shop_money[:amount]
|
29
|
+
ps.shop_money_currency_code = shop_money[:currency_code]
|
30
|
+
|
31
|
+
presentment_money = hash[:presentment_money]
|
32
|
+
ps.presentment_money_amount = presentment_money[:amount]
|
33
|
+
ps.presentment_money_currency_code = presentment_money[:currency_code]
|
34
|
+
|
35
|
+
return ps
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [Hash]
|
39
|
+
def to_hash()
|
40
|
+
return {
|
41
|
+
'shop_money': {
|
42
|
+
"amount": @shop_money_amount,
|
43
|
+
"currency_code": @shop_money_currency_code,
|
44
|
+
},
|
45
|
+
'presentment_money': {
|
46
|
+
"amount": @presentment_money_amount,
|
47
|
+
"currency_code": @presentment_money_currency_code,
|
48
|
+
},
|
49
|
+
}
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module Falsify
|
2
|
+
# Required Fields:
|
3
|
+
# - refund_line_items
|
4
|
+
class Refund
|
5
|
+
# The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the refund was created.
|
6
|
+
# @return [String]
|
7
|
+
attr_reader :created_at
|
8
|
+
# The unique identifier for the refund.
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :id
|
11
|
+
# An optional note attached to a refund.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :note
|
14
|
+
# @!attribute order_adjustments [r]
|
15
|
+
# A list of order adjustments attached to the refund.
|
16
|
+
# Order adjustments are generated to account for refunded shipping costs and differences between calculated and actual refund amounts.
|
17
|
+
# Each entry has the following properties:
|
18
|
+
#
|
19
|
+
# - **id** : The unique identifier for the order adjustment.
|
20
|
+
# - **order_id** : The unique identifier for the order that the order adjustment is associated with.
|
21
|
+
# - **refund_id** : The unique identifier for the refund that the order adjustment is associated with.
|
22
|
+
# - **amount** : The value of the discrepancy between the calculated refund and the actual refund. If the `kind` property's value is `shipping_refund`, then `amount` returns the value of shipping charges refunded to the customer.
|
23
|
+
# - **tax_amount** : The taxes that are added to `amount`, such as applicable shipping taxes added to a shipping refund.
|
24
|
+
# - **kind** : The order adjustment type. Valid values: `shipping_refund` and `refund_discrepancy`.
|
25
|
+
# - **reason** : The reason for the order adjustment. To set this value, include `discrepancy_reason` when you create a refund.
|
26
|
+
# - **amount_set** : The amount of the order adjustment in shop and presentment currencies.
|
27
|
+
# - **tax_amount_set** : The tax amount of the order adjustment in shop and presentment currencies.
|
28
|
+
# @return [String]
|
29
|
+
attr_reader :order_adjustments
|
30
|
+
# The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the refund was imported.
|
31
|
+
# This value can be set to a date in the past when importing from other systems.
|
32
|
+
# If no value is provided, then it will be auto-generated as the current time in Shopify.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :processed_at
|
35
|
+
# @!attribute refund_line_items [rw]
|
36
|
+
# A list of refunded line items.
|
37
|
+
# Each entry has the following properties:
|
38
|
+
#
|
39
|
+
# - **id** : The unique identifier of the line item in the refund.
|
40
|
+
# - **line_item** : A [line item](https://help.shopify.com/en/api/reference/order#line-items-property) being returned.
|
41
|
+
# - **line_item_id** : The ID of the related line item in the order.
|
42
|
+
# - **quantity** : The quantity of the associated line item that was returned.
|
43
|
+
# - **restock_type** : How this refund line item affects inventory levels.
|
44
|
+
# Valid values:
|
45
|
+
# - **no_restock** : Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be returned or made available for sale again.
|
46
|
+
# - **cancel** : The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
|
47
|
+
# - **return** : The items were already delivered, and will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
|
48
|
+
# - **legacy_restock** : The deprecated `restock` property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
|
49
|
+
# - **location_id** : The unique identifier of the [location](https://help.shopify.com/en/api/reference/inventory/location) where the items will be restocked. Required when `restock_type` has the value `return` or `cancel`.
|
50
|
+
# - **subtotal** : The subtotal of the refund line item.
|
51
|
+
# - **total_tax** : The total tax on the refund line item.
|
52
|
+
# - **subtotal_set** : The subtotal of the refund line item in shop and presentment currencies.
|
53
|
+
# - **total_tax_set** : The total tax of the line item in shop and presentment currencies.
|
54
|
+
# - **no_restock** : Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be returned or made available for sale again.
|
55
|
+
# - **cancel** : The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
|
56
|
+
# - **return** : The items were already delivered, and will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
|
57
|
+
# - **legacy_restock** : The deprecated `restock` property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :refund_line_items
|
60
|
+
# Whether to add the line items back to the store's inventory.
|
61
|
+
# Provide a `restock_type` to influence how this refund affects inventory instead
|
62
|
+
# @return [Boolean]
|
63
|
+
attr_accessor :restock
|
64
|
+
# A list of transactions involved in the refund.
|
65
|
+
# For more information, see the [Transaction](https://help.shopify.com/en/api/reference/orders/transaction) resource.
|
66
|
+
# @return [Array<Transaction>]
|
67
|
+
attr_accessor :transactions
|
68
|
+
# The unique identifier of the user who performed the refund.
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :user_id
|
71
|
+
end
|
72
|
+
end
|
File without changes
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Falsify
|
2
|
+
# An individual shipping method used to fulfill an order.
|
3
|
+
class ShippingLine
|
4
|
+
# A reference to the shipping method.
|
5
|
+
# @return [String]
|
6
|
+
attr_accessor :code
|
7
|
+
# The price of the shipping method after line-level discounts have been applied.
|
8
|
+
# Doesn't reflect cart-level or order-level discounts.
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :discounted_price
|
11
|
+
# The price of the shipping method in both shop and presentment currencies after line-level discounts have been applied.
|
12
|
+
# @return [PriceSet]
|
13
|
+
attr_accessor :discounted_price_set
|
14
|
+
# The price of this shipping method in the shop currency.
|
15
|
+
# Can't be negative.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :price
|
18
|
+
# The price of the shipping method in shop and presentment currencies.
|
19
|
+
# @return [PriceSet]
|
20
|
+
attr_accessor :price_set
|
21
|
+
# The source of the shipping method.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :source
|
24
|
+
# The title of the shipping method.
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :title
|
27
|
+
# A list of tax line objects, each of which details a tax applicable to this shipping line.
|
28
|
+
# @return [Array<TaxLine>]
|
29
|
+
attr_accessor :tax_lines
|
30
|
+
# A reference to the carrier service that provided the rate.
|
31
|
+
# Present when the rate was computed by a third-party carrier service.
|
32
|
+
# @return [String]
|
33
|
+
attr_accessor :carrier_identifier
|
34
|
+
# A reference to the fulfillment service that is being requested for the shipping method.
|
35
|
+
# Present if the shipping method requires processing by a third party fulfillment service; null otherwise.
|
36
|
+
# @return [String,nil]
|
37
|
+
attr_accessor :requested_fulfillment_service_id
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Falsify
|
2
|
+
# Details a tax applied to a LineItem.
|
3
|
+
class TaxLine
|
4
|
+
# The name of the tax.
|
5
|
+
# @return [String]
|
6
|
+
attr_accessor :title
|
7
|
+
# The amount added to the order for this tax in the shop currency.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :price
|
10
|
+
# The tax rate applied to the order to calculate the tax price.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :rate
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Falsify
|
2
|
+
# See the [API documentation](https://help.shopify.com/en/api/reference/products/collect).
|
3
|
+
class Collect
|
4
|
+
# The ID of the custom collection containing the product.
|
5
|
+
# @return [String]
|
6
|
+
attr_accessor :collection_id
|
7
|
+
# The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the collect was created.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :created_at
|
10
|
+
# A unique numeric identifier for the collect.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :id
|
13
|
+
# The position of this product in a manually sorted custom collection.
|
14
|
+
# The first position is 1.
|
15
|
+
# This value is applied only when the custom collection is sorted manually.
|
16
|
+
# @return [Integer]
|
17
|
+
attr_accessor :position
|
18
|
+
# The unique numeric identifier for the product in the custom collection.
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :product_id
|
21
|
+
# This is the same value as `position` but padded with leading zeroes to make it alphanumeric-sortable.
|
22
|
+
# This value is applied only when the custom collection is sorted manually.
|
23
|
+
# @return [String]
|
24
|
+
attr_accessor :sort_value
|
25
|
+
# The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the collect was last updated.
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :updated_at
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require "enumerize"
|
2
|
+
|
3
|
+
module Falsify
|
4
|
+
# See the [API documentation](https://help.shopify.com/en/api/reference/products/customcollection).
|
5
|
+
#
|
6
|
+
# Required Fields:
|
7
|
+
# - title
|
8
|
+
class Customcollection
|
9
|
+
extend Enumerize
|
10
|
+
# The description of the custom collection, complete with HTML markup.
|
11
|
+
# Many templates display this on their custom collection pages.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :body_html
|
14
|
+
# A human-friendly unique string for the custom collection automatically generated from its title.
|
15
|
+
# This is used in shop themes by the Liquid templating language to refer to the custom collection.
|
16
|
+
# (limit: 255 characters)
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :handle
|
19
|
+
# Image associated with the custom collection.
|
20
|
+
# Valid values are:
|
21
|
+
# - **attachment** : An image attached to a custom collection returned as Base64-encoded binary data.
|
22
|
+
# - **src** : The source URL that specifies the location of the image.
|
23
|
+
# - **alt** : Alternative text that describes the collection image.
|
24
|
+
# - **created_at** : The time and date ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the image was added to the collection.
|
25
|
+
# - **width** : The width of the image in pixels.
|
26
|
+
# - **height** : The height of the image in pixels.
|
27
|
+
# @return [Hash]
|
28
|
+
attr_accessor :image
|
29
|
+
# The ID for the custom collection.
|
30
|
+
# @return [String]
|
31
|
+
attr_reader :id
|
32
|
+
# Whether the custom collection is published to the Online Store channel.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :published
|
35
|
+
# The time and date ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the collection was made visible.
|
36
|
+
# Returns `null` for a hidden custom collection.
|
37
|
+
# @return [String,nil]
|
38
|
+
attr_reader :published_at
|
39
|
+
# @!attribute published_scope [r]
|
40
|
+
# Whether the collection is published to the Point of Sale channel.
|
41
|
+
# Valid values:
|
42
|
+
# - `web`: The custom collection is published to the Online Store channel but not published to the Point of Sale channel.
|
43
|
+
# - `global`: The custom collection is published to both the Online Store channel and the Point of Sale channel.
|
44
|
+
# @return [:web, :global]
|
45
|
+
enumerize :published_scope, in: [:web, :global]
|
46
|
+
# The order in which products in the custom collection appear.
|
47
|
+
# Valid values:
|
48
|
+
# - **alpha-asc** : Alphabetically, in ascending order (A - Z).
|
49
|
+
# - **alpha-desc** : Alphabetically, in descending order (Z - A).
|
50
|
+
# - **best-selling** : By best-selling products.
|
51
|
+
# - **created** : By date created, in ascending order (oldest - newest).
|
52
|
+
# - **created-desc** : By date created, in descending order (newest - oldest).
|
53
|
+
# - **manual** : Order created by the shop owner.
|
54
|
+
# - **price-asc** : By price, in ascending order (lowest - highest).
|
55
|
+
# - **price-desc** : By price, in descending order (highest - lowest).
|
56
|
+
# # @return [String]
|
57
|
+
# @return ["alpha-asc", "alpha-desc", "best-selling", "created", "created-desc", "manual", "price-asc", "price-desc"]
|
58
|
+
attr_accessor :sort_order
|
59
|
+
# The suffix of the liquid template being used.
|
60
|
+
# For example, if the value is `custom`, then the collection is using the `collection.custom.liquid` template.
|
61
|
+
# If the value is `null`, then the collection is using the default `collection.liquid`.
|
62
|
+
# @return [String,nil]
|
63
|
+
attr_accessor :template_suffix
|
64
|
+
# The name of the custom collection.
|
65
|
+
# (limit: 255 characters)
|
66
|
+
# @return [String]
|
67
|
+
attr_accessor :title
|
68
|
+
# The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the custom collection was last modified.
|
69
|
+
# @return [String]
|
70
|
+
attr_reader :updated_at
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
require "enumerize"
|
2
|
+
|
3
|
+
module Falsify
|
4
|
+
# See the [API documentation](https://help.shopify.com/en/api/reference/products/smartcollection).
|
5
|
+
#
|
6
|
+
# Required Fields:
|
7
|
+
# - rules
|
8
|
+
# - title
|
9
|
+
class Smartcollection
|
10
|
+
extend Enumerize
|
11
|
+
# @!attribute body_html [rw]
|
12
|
+
# The description of the smart collection.
|
13
|
+
# Includes HTML markup.
|
14
|
+
# Many shop themes display this on the smart collection page.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :body_html
|
17
|
+
# @!attribute handle [rw]
|
18
|
+
# A human-friendly unique string for the smart collection.
|
19
|
+
# Automatically generated from the `title`.
|
20
|
+
# Used in shop themes by the Liquid templating language to refer to the smart collection.
|
21
|
+
# (maximum: 255 characters)
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :handle
|
24
|
+
# @!attribute id [rw]
|
25
|
+
# The ID of the smart collection.
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :id
|
28
|
+
# @!attribute image [rw]
|
29
|
+
# The image associated with the smart collection.
|
30
|
+
# Valid values:
|
31
|
+
# - `attachment`: An image attached to a smart collection returned as Base64-encoded binary data.
|
32
|
+
# - `src`: A URL that specifies the location of the image.
|
33
|
+
# - `alt`: Alternative text that describes the collection image.
|
34
|
+
# @return [Hash]
|
35
|
+
attr_accessor :image
|
36
|
+
# @!attribute published_at [rw]
|
37
|
+
# The date and time ([ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)) that the smart collection was published.
|
38
|
+
# Returns `null` when the collection is hidden.
|
39
|
+
# @return [String,nil]
|
40
|
+
attr_accessor :published_at
|
41
|
+
# @!attribute published_scope [rw]
|
42
|
+
# Whether the smart collection is published to the Point of Sale channel.
|
43
|
+
# Valid values:
|
44
|
+
# - `web`: The smart collection is published to the Online Store channel but not published to the Point of Sale channel.
|
45
|
+
# - `global`: The smart collection is published to both the Online Store channel and the Point of Sale channel.
|
46
|
+
# @return [:web, :global]
|
47
|
+
enumerize :published_scope, in: [:web, :global]
|
48
|
+
# @!attribute rules [rw]
|
49
|
+
# The list of rules that define what products go into the smart collection.
|
50
|
+
# Each rule has the following properties:
|
51
|
+
#
|
52
|
+
# -
|
53
|
+
#
|
54
|
+
# **column** : The property of a product being used to populate the smart collection.
|
55
|
+
#
|
56
|
+
# Valid values for text relations:
|
57
|
+
#
|
58
|
+
# - `title`: The product title.
|
59
|
+
# - `type`: The product type.
|
60
|
+
# - `vendor`: The name of the product vendor.
|
61
|
+
# - `variant_title`: The title of a product variant.
|
62
|
+
#
|
63
|
+
# Valid values for number relations:
|
64
|
+
#
|
65
|
+
# - `variant_compare_at_price`: The compare price.
|
66
|
+
# - `variant_weight`: The weight of the product.
|
67
|
+
# - `variant_inventory`: The inventory stock.
|
68
|
+
# Note: `not_equals` does not work with this property.
|
69
|
+
# - `variant_price`: product price.
|
70
|
+
#
|
71
|
+
# Valid values for an `equals` relation:
|
72
|
+
#
|
73
|
+
# - `tag`: A tag associated with the product.
|
74
|
+
# -
|
75
|
+
#
|
76
|
+
# **relation** : The relationship between the **column** choice, and the **condition**.
|
77
|
+
#
|
78
|
+
# Valid values for number relations:
|
79
|
+
#
|
80
|
+
# - `greater_than` The column value is greater than the condition.
|
81
|
+
# - `less_than` The column value is less than the condition.
|
82
|
+
# - `equals` The column value is equal to the condition.
|
83
|
+
# - `not_equals` The column value is not equal to the condition.
|
84
|
+
#
|
85
|
+
# Valid values for text relations:
|
86
|
+
#
|
87
|
+
# - `equals`: Checks if the **column** value is equal to the **condition** value.
|
88
|
+
# - `not_equals`: Checks if the **column** value is not equal to the **condition** value.
|
89
|
+
# - `starts_with`: Checks if the **column** value starts with the **condition** value.
|
90
|
+
# - `ends_with`: Checks if the **column** value ends with the **condition** value.
|
91
|
+
# - `contains`: Checks if the **column** value contains the **condition** value.
|
92
|
+
# - `not_contains`: Checks if the **column** value does not contain the **condition** value.
|
93
|
+
# -
|
94
|
+
#
|
95
|
+
# **condition** : Select products for a smart collection using a condition.
|
96
|
+
# Values are either strings or numbers, depending on the **relation** value.
|
97
|
+
#
|
98
|
+
# **column** : The property of a product being used to populate the smart collection.
|
99
|
+
#
|
100
|
+
# Valid values for text relations:
|
101
|
+
#
|
102
|
+
# - `title`: The product title.
|
103
|
+
# - `type`: The product type.
|
104
|
+
# - `vendor`: The name of the product vendor.
|
105
|
+
# - `variant_title`: The title of a product variant.
|
106
|
+
#
|
107
|
+
# Valid values for number relations:
|
108
|
+
#
|
109
|
+
# - `variant_compare_at_price`: The compare price.
|
110
|
+
# - `variant_weight`: The weight of the product.
|
111
|
+
# - `variant_inventory`: The inventory stock. Note: `not_equals` does not work with this property.
|
112
|
+
# - `variant_price`: product price.
|
113
|
+
#
|
114
|
+
# Valid values for an `equals` relation:
|
115
|
+
#
|
116
|
+
# - `tag`: A tag associated with the product.
|
117
|
+
#
|
118
|
+
# **relation** : The relationship between the **column** choice, and the **condition**.
|
119
|
+
#
|
120
|
+
# Valid values for number relations:
|
121
|
+
#
|
122
|
+
# - `greater_than` The column value is greater than the condition.
|
123
|
+
# - `less_than` The column value is less than the condition.
|
124
|
+
# - `equals` The column value is equal to the condition.
|
125
|
+
# - `not_equals` The column value is not equal to the condition.
|
126
|
+
#
|
127
|
+
# Valid values for text relations:
|
128
|
+
#
|
129
|
+
# - `equals`: Checks if the **column** value is equal to the **condition** value.
|
130
|
+
# - `not_equals`: Checks if the **column** value is not equal to the **condition** value.
|
131
|
+
# - `starts_with`: Checks if the **column** value starts with the **condition** value.
|
132
|
+
# - `ends_with`: Checks if the **column** value ends with the **condition** value.
|
133
|
+
# - `contains`: Checks if the **column** value contains the **condition** value.
|
134
|
+
# - `not_contains`: Checks if the **column** value does not contain the **condition** value.
|
135
|
+
#
|
136
|
+
# **condition** : Select products for a smart collection using a condition.
|
137
|
+
# Values are either strings or numbers, depending on the **relation** value.
|
138
|
+
# @return [String]
|
139
|
+
attr_accessor :rules
|
140
|
+
# @!attribute disjunctive [rw]
|
141
|
+
# Whether the product must match all the rules to be included in the smart collection.
|
142
|
+
# Valid values:
|
143
|
+
#
|
144
|
+
# - `true`: Products only need to match one or more of the rules to be included in the smart collection.
|
145
|
+
# - `false`: Products must match all of the rules to be included in the smart collection.
|
146
|
+
# @return [String]
|
147
|
+
attr_accessor :disjunctive
|
148
|
+
# @!attribute sort_order [rw]
|
149
|
+
# The order of the products in the smart collection.
|
150
|
+
# Valid values:
|
151
|
+
#
|
152
|
+
# - `alpha-asc`: The products are sorted alphabetically from A to Z.
|
153
|
+
# - `alpha-des`: The products are sorted alphabetically from Z to A.
|
154
|
+
# - `best-selling`: The products are sorted by number of sales.
|
155
|
+
# - `created`: The products are sorted by the date they were created, from oldest to newest.
|
156
|
+
# - `created-desc`: The products are sorted by the date they were created, from newest to oldest.
|
157
|
+
# - `manual`: The products are manually sorted by the shop owner. **Deprecation will begin in 2019.**
|
158
|
+
# - `price-asc`: The products are sorted by price from lowest to highest.
|
159
|
+
# - `price-desc`: The products are sorted by price from highest to lowest.
|
160
|
+
# @return [String]
|
161
|
+
attr_accessor :sort_order
|
162
|
+
# @!attribute template_suffix [rw]
|
163
|
+
# The suffix of the Liquid template that the shop uses.
|
164
|
+
# By default, the original template is called product.liquid, and additional templates are called product.`suffix`.liquid.
|
165
|
+
# @return [String]
|
166
|
+
attr_accessor :template_suffix
|
167
|
+
# @!attribute title [rw]
|
168
|
+
# The name of the smart collection.
|
169
|
+
# Maximum length: 255 characters.
|
170
|
+
# @return [String]
|
171
|
+
attr_accessor :title
|
172
|
+
# @!attribute updated_at [r]
|
173
|
+
# The date and time ([ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601)) when the smart collection was last modified.
|
174
|
+
# @return [String]
|
175
|
+
attr_reader :updated_at
|
176
|
+
# @!attribute products_manually_sorted_count [r]
|
177
|
+
# The number of manually-sorted products in the smart collection.
|
178
|
+
# @return [String]
|
179
|
+
attr_reader :products_manually_sorted_count
|
180
|
+
end
|
181
|
+
end
|