Class: Io::Flow::V0::Models::OrderQuoteLineErrorCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteLineErrorCode
- 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 OrderQuoteLineErrorCode for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of OrderQuoteLineErrorCode for this value, or nil if not found.
- .line_item_number_invalid ⇒ Object
- .line_item_number_not_available ⇒ Object
- .line_quantity_invalid ⇒ Object
- .line_value_threshold_exceeded ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ OrderQuoteLineErrorCode
constructor
A new instance of OrderQuoteLineErrorCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ OrderQuoteLineErrorCode
Returns a new instance of OrderQuoteLineErrorCode.
23618 23619 23620 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23618 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
23616 23617 23618 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23616 def value @value end |
Class Method Details
.ALL ⇒ Object
23638 23639 23640 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23638 def OrderQuoteLineErrorCode.ALL @@all ||= [OrderQuoteLineErrorCode.line_item_number_invalid, OrderQuoteLineErrorCode.line_item_number_not_available, OrderQuoteLineErrorCode.line_quantity_invalid, OrderQuoteLineErrorCode.line_value_threshold_exceeded] end |
.apply(value) ⇒ Object
Returns the instance of OrderQuoteLineErrorCode for this value, creating a new instance for an unknown value
23623 23624 23625 23626 23627 23628 23629 23630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23623 def OrderQuoteLineErrorCode.apply(value) if value.instance_of?(OrderQuoteLineErrorCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || OrderQuoteLineErrorCode.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of OrderQuoteLineErrorCode for this value, or nil if not found
23633 23634 23635 23636 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23633 def OrderQuoteLineErrorCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) OrderQuoteLineErrorCode.ALL.find { |v| v.value == value } end |
.line_item_number_invalid ⇒ Object
23642 23643 23644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23642 def OrderQuoteLineErrorCode.line_item_number_invalid @@_line_item_number_invalid ||= OrderQuoteLineErrorCode.new('line_item_number_invalid') end |
.line_item_number_not_available ⇒ Object
23646 23647 23648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23646 def OrderQuoteLineErrorCode.line_item_number_not_available @@_line_item_number_not_available ||= OrderQuoteLineErrorCode.new('line_item_number_not_available') end |
.line_quantity_invalid ⇒ Object
23650 23651 23652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23650 def OrderQuoteLineErrorCode.line_quantity_invalid @@_line_quantity_invalid ||= OrderQuoteLineErrorCode.new('line_quantity_invalid') end |
.line_value_threshold_exceeded ⇒ Object
23654 23655 23656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23654 def OrderQuoteLineErrorCode.line_value_threshold_exceeded @@_line_value_threshold_exceeded ||= OrderQuoteLineErrorCode.new('line_value_threshold_exceeded') end |
Instance Method Details
#to_hash ⇒ Object
23658 23659 23660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23658 def to_hash value end |