class Io::Flow::V0::Models::DeliveredDutyDisplayType

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18614
def DeliveredDutyDisplayType.ALL
  @@all ||= [DeliveredDutyDisplayType.all, DeliveredDutyDisplayType.single]
end
all() click to toggle source

Displays all available options to the customer.

# File lib/flow_commerce/flow_api_v0_client.rb, line 18619
def DeliveredDutyDisplayType.all
  @@_all ||= DeliveredDutyDisplayType.new('all')
end
apply(value) click to toggle source

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

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

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

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

Displays a single option (either DDU or DDP), while the other can be displayed by changing duties and tax preferences at checkout.

# File lib/flow_commerce/flow_api_v0_client.rb, line 18625
def DeliveredDutyDisplayType.single
  @@_single ||= DeliveredDutyDisplayType.new('single')
end

Public Instance Methods

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