class Io::Flow::V0::Models::FulfillmentMethodValue

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21011
def FulfillmentMethodValue.ALL
  @@all ||= [FulfillmentMethodValue.digital, FulfillmentMethodValue.physical]
end
apply(value) click to toggle source

Returns the instance of FulfillmentMethodValue for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 20996
def FulfillmentMethodValue.apply(value)
  if value.instance_of?(FulfillmentMethodValue)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || FulfillmentMethodValue.new(value))
  end
end
digital() click to toggle source

Indicates item will be fulfilled digitally and no shipment is required (e.g. Gift Card).

# File lib/flow_commerce/flow_api_v0_client.rb, line 21017
def FulfillmentMethodValue.digital
  @@_digital ||= FulfillmentMethodValue.new('digital')
end
from_string(value) click to toggle source

Returns the instance of FulfillmentMethodValue for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 21006
def FulfillmentMethodValue.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  FulfillmentMethodValue.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 20991
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
physical() click to toggle source

Indicates item will be shipped in a physical package.

# File lib/flow_commerce/flow_api_v0_client.rb, line 21022
def FulfillmentMethodValue.physical
  @@_physical ||= FulfillmentMethodValue.new('physical')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21026
def to_hash
  value
end