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.
14028 14029 14030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14028 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14026 14027 14028 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14026 def value @value end |
Class Method Details
.ALL ⇒ Object
14048 14049 14050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14048 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
14033 14034 14035 14036 14037 14038 14039 14040 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14033 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
14064 14065 14066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14064 def CenterCapability.commercial_invoice @@_commercial_invoice ||= CenterCapability.new('commercial_invoice') end |
.crossdock ⇒ Object
14060 14061 14062 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14060 def CenterCapability.crossdock @@_crossdock ||= CenterCapability.new('crossdock') end |
.domestic ⇒ Object
14056 14057 14058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14056 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
14043 14044 14045 14046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14043 def CenterCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CenterCapability.ALL.find { |v| v.value == value } end |
.international ⇒ Object
14052 14053 14054 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14052 def CenterCapability.international @@_international ||= CenterCapability.new('international') end |
Instance Method Details
#to_hash ⇒ Object
14068 14069 14070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14068 def to_hash value end |