class Io::Flow::V0::Models::CountryPickerSource
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18135 def CountryPickerSource.ALL @@all ||= [CountryPickerSource.experience, CountryPickerSource.destination] end
apply(value)
click to toggle source
Returns the instance of CountryPickerSource
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 18120 def CountryPickerSource.apply(value) if value.instance_of?(CountryPickerSource) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CountryPickerSource.new(value)) end end
destination()
click to toggle source
Indicates we should build the list of countries based on all countries to which you have a rate card (ie. all valid destination countries)
# File lib/flow_commerce/flow_api_v0_client.rb, line 18147 def CountryPickerSource.destination @@_destination ||= CountryPickerSource.new('destination') end
experience()
click to toggle source
Indicates we should build the list of countries based on each active experience country
# File lib/flow_commerce/flow_api_v0_client.rb, line 18141 def CountryPickerSource.experience @@_experience ||= CountryPickerSource.new('experience') end
from_string(value)
click to toggle source
Returns the instance of CountryPickerSource
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 18130 def CountryPickerSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CountryPickerSource.ALL.find { |v| v.value == value } end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18115 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 18151 def to_hash value end