class Io::Flow::V0::Models::ShopifyGrant
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26621 def ShopifyGrant.ALL @@all ||= [ShopifyGrant.customer, ShopifyGrant.discount, ShopifyGrant.gift_card, ShopifyGrant.metafield, ShopifyGrant.order] end
apply(value)
click to toggle source
Returns the instance of ShopifyGrant
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 26606 def ShopifyGrant.apply(value) if value.instance_of?(ShopifyGrant) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ShopifyGrant.new(value)) end end
customer()
click to toggle source
Access to /admin/customers.json
# File lib/flow_commerce/flow_api_v0_client.rb, line 26626 def ShopifyGrant.customer @@_customer ||= ShopifyGrant.new('customer') end
discount()
click to toggle source
Access to /admin/price_rules/:id/discount_codes.json
# File lib/flow_commerce/flow_api_v0_client.rb, line 26631 def ShopifyGrant.discount @@_discount ||= ShopifyGrant.new('discount') end
from_string(value)
click to toggle source
Returns the instance of ShopifyGrant
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 26616 def ShopifyGrant.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShopifyGrant.ALL.find { |v| v.value == value } end
gift_card()
click to toggle source
Access to /admin/gift_cards.json
# File lib/flow_commerce/flow_api_v0_client.rb, line 26636 def ShopifyGrant.gift_card @@_gift_card ||= ShopifyGrant.new('gift_card') end
metafield()
click to toggle source
Access to /admin/variants/:id/metafields.json
# File lib/flow_commerce/flow_api_v0_client.rb, line 26641 def ShopifyGrant.metafield @@_metafield ||= ShopifyGrant.new('metafield') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26601 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
order()
click to toggle source
Access to /admin/orders/:id/metafields.json
# File lib/flow_commerce/flow_api_v0_client.rb, line 26646 def ShopifyGrant.order @@_order ||= ShopifyGrant.new('order') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 26650 def to_hash value end