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.
16563 16564 16565 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16563 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16561 16562 16563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16561 def value @value end |
Class Method Details
.ALL ⇒ Object
16583 16584 16585 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16583 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
16568 16569 16570 16571 16572 16573 16574 16575 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16568 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
16599 16600 16601 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16599 def CenterCapability.commercial_invoice @@_commercial_invoice ||= CenterCapability.new('commercial_invoice') end |
.crossdock ⇒ Object
16595 16596 16597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16595 def CenterCapability.crossdock @@_crossdock ||= CenterCapability.new('crossdock') end |
.domestic ⇒ Object
16591 16592 16593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16591 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
16578 16579 16580 16581 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16578 def CenterCapability.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CenterCapability.ALL.find { |v| v.value == value } end |
.international ⇒ Object
16587 16588 16589 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16587 def CenterCapability.international @@_international ||= CenterCapability.new('international') end |
Instance Method Details
#to_hash ⇒ Object
16603 16604 16605 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16603 def to_hash value end |