Class: Io::Flow::V0::Models::PricingLevySetting
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PricingLevySetting
- 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 PricingLevySetting for this value, creating a new instance for an unknown value.
- .displayed ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of PricingLevySetting for this value, or nil if not found.
- .ignored ⇒ Object
- .included ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ PricingLevySetting
constructor
A new instance of PricingLevySetting.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PricingLevySetting
Returns a new instance of PricingLevySetting.
10457 10458 10459 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10457 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
10455 10456 10457 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10455 def value @value end |
Class Method Details
.ALL ⇒ Object
10477 10478 10479 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10477 def PricingLevySetting.ALL @@all ||= [PricingLevySetting.included, PricingLevySetting.displayed, PricingLevySetting.ignored] end |
.apply(value) ⇒ Object
Returns the instance of PricingLevySetting for this value, creating a new instance for an unknown value
10462 10463 10464 10465 10466 10467 10468 10469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10462 def PricingLevySetting.apply(value) if value.instance_of?(PricingLevySetting) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PricingLevySetting.new(value)) end end |
.displayed ⇒ Object
10485 10486 10487 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10485 def PricingLevySetting.displayed @@_displayed ||= PricingLevySetting.new('displayed') end |
.from_string(value) ⇒ Object
Returns the instance of PricingLevySetting for this value, or nil if not found
10472 10473 10474 10475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10472 def PricingLevySetting.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PricingLevySetting.ALL.find { |v| v.value == value } end |
.ignored ⇒ Object
10489 10490 10491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10489 def PricingLevySetting.ignored @@_ignored ||= PricingLevySetting.new('ignored') end |
.included ⇒ Object
10481 10482 10483 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10481 def PricingLevySetting.included @@_included ||= PricingLevySetting.new('included') end |
Instance Method Details
#to_hash ⇒ Object
10493 10494 10495 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 10493 def to_hash value end |