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.



18255
18256
18257
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18255

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18253
18254
18255
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18253

def value
  @value
end

Class Method Details

.ALLObject



18275
18276
18277
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18275

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



18260
18261
18262
18263
18264
18265
18266
18267
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18260

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



18279
18280
18281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18279

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



18270
18271
18272
18273
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18270

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

.organizationObject



18283
18284
18285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18283

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

Instance Method Details

#to_hashObject



18287
18288
18289
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18287

def to_hash
  value
end