class Io::Flow::V0::Models::GoodsSupply

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21153
def GoodsSupply.ALL
  @@all ||= [GoodsSupply.export, GoodsSupply.intra_community, GoodsSupply.local]
end
apply(value) click to toggle source

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

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

Goods will be supplied from a DC from outside the national and customs boundaries of the destination.

# File lib/flow_commerce/flow_api_v0_client.rb, line 21159
def GoodsSupply.export
  @@_export ||= GoodsSupply.new('export')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 21148
def GoodsSupply.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  GoodsSupply.ALL.find { |v| v.value == value }
end
intra_community() click to toggle source

Goods will be supplied from a DC outside the national boundries of the destination, but within the same customs union.

# File lib/flow_commerce/flow_api_v0_client.rb, line 21165
def GoodsSupply.intra_community
  @@_intra_community ||= GoodsSupply.new('intra_community')
end
local() click to toggle source

Goods will be supplied from a DC within the same country as the destination.

# File lib/flow_commerce/flow_api_v0_client.rb, line 21170
def GoodsSupply.local
  @@_local ||= GoodsSupply.new('local')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21133
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Public Instance Methods

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