Class: Io::Flow::V0::Models::PriceFacetBoundary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PriceFacetBoundary
- 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 PriceFacetBoundary for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of PriceFacetBoundary for this value, or nil if not found.
- .max ⇒ Object
- .min ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ PriceFacetBoundary
constructor
A new instance of PriceFacetBoundary.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PriceFacetBoundary
Returns a new instance of PriceFacetBoundary.
25422 25423 25424 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25422 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
25420 25421 25422 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25420 def value @value end |
Class Method Details
.ALL ⇒ Object
25442 25443 25444 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25442 def PriceFacetBoundary.ALL @@all ||= [PriceFacetBoundary.min, PriceFacetBoundary.max] end |
.apply(value) ⇒ Object
Returns the instance of PriceFacetBoundary for this value, creating a new instance for an unknown value
25427 25428 25429 25430 25431 25432 25433 25434 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25427 def PriceFacetBoundary.apply(value) if value.instance_of?(PriceFacetBoundary) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || PriceFacetBoundary.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of PriceFacetBoundary for this value, or nil if not found
25437 25438 25439 25440 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25437 def PriceFacetBoundary.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PriceFacetBoundary.ALL.find { |v| v.value == value } end |
.max ⇒ Object
25450 25451 25452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25450 def PriceFacetBoundary.max @@_max ||= PriceFacetBoundary.new('max') end |
.min ⇒ Object
25446 25447 25448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25446 def PriceFacetBoundary.min @@_min ||= PriceFacetBoundary.new('min') end |
Instance Method Details
#to_hash ⇒ Object
25454 25455 25456 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25454 def to_hash value end |