Class: Io::Flow::V0::Models::MerchantOfRecord
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::MerchantOfRecord
- 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 MerchantOfRecord for this value, creating a new instance for an unknown value.
- .flow ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, or nil if not found.
- .organization ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ MerchantOfRecord
constructor
A new instance of MerchantOfRecord.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ MerchantOfRecord
Returns a new instance of MerchantOfRecord.
13434 13435 13436 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13434 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
13432 13433 13434 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13432 def value @value end |
Class Method Details
.ALL ⇒ Object
13454 13455 13456 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13454 def MerchantOfRecord.ALL @@all ||= [MerchantOfRecord.flow, MerchantOfRecord.organization] end |
.apply(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, creating a new instance for an unknown value
13439 13440 13441 13442 13443 13444 13445 13446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13439 def MerchantOfRecord.apply(value) if value.instance_of?(MerchantOfRecord) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || MerchantOfRecord.new(value)) end end |
.flow ⇒ Object
13458 13459 13460 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13458 def MerchantOfRecord.flow @@_flow ||= MerchantOfRecord.new('flow') end |
.from_string(value) ⇒ Object
Returns the instance of MerchantOfRecord for this value, or nil if not found
13449 13450 13451 13452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13449 def MerchantOfRecord.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) MerchantOfRecord.ALL.find { |v| v.value == value } end |
.organization ⇒ Object
13462 13463 13464 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13462 def MerchantOfRecord.organization @@_organization ||= MerchantOfRecord.new('organization') end |
Instance Method Details
#to_hash ⇒ Object
13466 13467 13468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13466 def to_hash value end |