Class: Io::Flow::V0::Models::ShippingConfigurationType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingConfigurationType
- 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 ShippingConfigurationType for this value, creating a new instance for an unknown value.
- .default ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, or nil if not found.
- .variant ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ShippingConfigurationType
constructor
A new instance of ShippingConfigurationType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ShippingConfigurationType
Returns a new instance of ShippingConfigurationType.
20389 20390 20391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20389 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20387 20388 20389 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20387 def value @value end |
Class Method Details
.ALL ⇒ Object
20409 20410 20411 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20409 def ShippingConfigurationType.ALL @@all ||= [ShippingConfigurationType.default, ShippingConfigurationType.variant] end |
.apply(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, creating a new instance for an unknown value
20394 20395 20396 20397 20398 20399 20400 20401 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20394 def ShippingConfigurationType.apply(value) if value.instance_of?(ShippingConfigurationType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ShippingConfigurationType.new(value)) end end |
.default ⇒ Object
20413 20414 20415 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20413 def ShippingConfigurationType.default @@_default ||= ShippingConfigurationType.new('default') end |
.from_string(value) ⇒ Object
Returns the instance of ShippingConfigurationType for this value, or nil if not found
20404 20405 20406 20407 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20404 def ShippingConfigurationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShippingConfigurationType.ALL.find { |v| v.value == value } end |
.variant ⇒ Object
20417 20418 20419 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20417 def ShippingConfigurationType.variant @@_variant ||= ShippingConfigurationType.new('variant') end |
Instance Method Details
#to_hash ⇒ Object
20421 20422 20423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20421 def to_hash value end |