Class: Io::Flow::V0::Models::CenterCapability
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CenterCapability
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of CenterCapability for this value, creating a new instance for an unknown value.
- .commercial_invoice ⇒ Object
- .crossdock ⇒ Object
- .domestic ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of CenterCapability for this value, or nil if not found.
- .international ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ CenterCapability
constructor
A new instance of CenterCapability.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ CenterCapability
Returns a new instance of CenterCapability.
17795 17796 17797 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17795 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
17793 17794 17795 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17793 def value @value end |
Class Method Details
.ALL ⇒ Object
17815 17816 17817 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17815 def CenterCapability.ALL @@all ||= [CenterCapability.international, CenterCapability.domestic, CenterCapability.crossdock, CenterCapability.commercial_invoice] end |
.apply(value) ⇒ Object
Returns the instance of CenterCapability for this value, creating a new instance for an unknown value
17800 17801 17802 17803 17804 17805 17806 17807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17800 def CenterCapability.apply(value) if value.instance_of?(CenterCapability) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CenterCapability.new(value)) end end |
.commercial_invoice ⇒ Object
17831 17832 17833 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17831 def CenterCapability.commercial_invoice @@_commercial_invoice ||= CenterCapability.new('commercial_invoice') end |
.crossdock ⇒ Object
17827 17828 17829 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17827 def CenterCapability.crossdock @@_crossdock ||= CenterCapability.new('crossdock') end |
.domestic ⇒ Object
17823 17824 17825 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17823 def CenterCapability.domestic @@_domestic ||= CenterCapability.new('domestic') end |
.from_string(value) ⇒ Object
Returns the instance of CenterCapability for this value, or nil if not found
17810 17811 17812 17813 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17810 def CenterCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CenterCapability.ALL.find { |v| v.value == value } end |
.international ⇒ Object
17819 17820 17821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17819 def CenterCapability.international @@_international ||= CenterCapability.new('international') end |
Instance Method Details
#to_hash ⇒ Object
17835 17836 17837 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17835 def to_hash value end |