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.
16078 16079 16080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16078 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16076 16077 16078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16076 def value @value end |
Class Method Details
.ALL ⇒ Object
16098 16099 16100 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16098 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
16083 16084 16085 16086 16087 16088 16089 16090 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16083 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
16102 16103 16104 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16102 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
16093 16094 16095 16096 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16093 def ShippingConfigurationType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ShippingConfigurationType.ALL.find { |v| v.value == value } end |
.variant ⇒ Object
16106 16107 16108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16106 def ShippingConfigurationType.variant @@_variant ||= ShippingConfigurationType.new('variant') end |
Instance Method Details
#to_hash ⇒ Object
16110 16111 16112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16110 def to_hash value end |