Class: Io::Flow::V0::Models::TradeAgreementStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TradeAgreementStatus
- 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 TradeAgreementStatus for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of TradeAgreementStatus for this value, or nil if not found.
- .not_supported ⇒ Object
- .supported ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ TradeAgreementStatus
constructor
A new instance of TradeAgreementStatus.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TradeAgreementStatus
Returns a new instance of TradeAgreementStatus.
27938 27939 27940 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27938 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27936 27937 27938 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27936 def value @value end |
Class Method Details
.ALL ⇒ Object
27958 27959 27960 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27958 def TradeAgreementStatus.ALL @@all ||= [TradeAgreementStatus.supported, TradeAgreementStatus.not_supported] end |
.apply(value) ⇒ Object
Returns the instance of TradeAgreementStatus for this value, creating a new instance for an unknown value
27943 27944 27945 27946 27947 27948 27949 27950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27943 def TradeAgreementStatus.apply(value) if value.instance_of?(TradeAgreementStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TradeAgreementStatus.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of TradeAgreementStatus for this value, or nil if not found
27953 27954 27955 27956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27953 def TradeAgreementStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TradeAgreementStatus.ALL.find { |v| v.value == value } end |
.not_supported ⇒ Object
27966 27967 27968 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27966 def TradeAgreementStatus.not_supported @@_not_supported ||= TradeAgreementStatus.new('not_supported') end |
.supported ⇒ Object
27962 27963 27964 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27962 def TradeAgreementStatus.supported @@_supported ||= TradeAgreementStatus.new('supported') end |
Instance Method Details
#to_hash ⇒ Object
27970 27971 27972 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27970 def to_hash value end |