Class: Io::Flow::V0::Models::ExporterOfRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ ExporterOfRecord

Returns a new instance of ExporterOfRecord.



20444
20445
20446
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20444

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



20442
20443
20444
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20442

def value
  @value
end

Class Method Details

.ALLObject



20464
20465
20466
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20464

def ExporterOfRecord.ALL
  @@all ||= [ExporterOfRecord.flow, ExporterOfRecord.organization]
end

.apply(value) ⇒ Object

Returns the instance of ExporterOfRecord for this value, creating a new instance for an unknown value



20449
20450
20451
20452
20453
20454
20455
20456
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20449

def ExporterOfRecord.apply(value)
  if value.instance_of?(ExporterOfRecord)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || ExporterOfRecord.new(value))
  end
end

.flowObject



20468
20469
20470
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20468

def ExporterOfRecord.flow
  @@_flow ||= ExporterOfRecord.new('flow')
end

.from_string(value) ⇒ Object

Returns the instance of ExporterOfRecord for this value, or nil if not found



20459
20460
20461
20462
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20459

def ExporterOfRecord.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  ExporterOfRecord.ALL.find { |v| v.value == value }
end

.organizationObject



20472
20473
20474
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20472

def ExporterOfRecord.organization
  @@_organization ||= ExporterOfRecord.new('organization')
end

Instance Method Details

#to_hashObject



20476
20477
20478
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20476

def to_hash
  value
end