class Io::Flow::V0::Models::ValueAddedService

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28399
def ValueAddedService.ALL
  @@all ||= [ValueAddedService.hazardous_material]
end
apply(value) click to toggle source

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

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

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

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

See en.wikipedia.org/wiki/ORM-D

# File lib/flow_commerce/flow_api_v0_client.rb, line 28404
def ValueAddedService.hazardous_material
  @@_hazardous_material ||= ValueAddedService.new('Hazardous Material')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 28379
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 28408
def to_hash
  value
end