Class: Io::Flow::V0::Models::ConsumerInvoiceCustomerType

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) ⇒ ConsumerInvoiceCustomerType

Returns a new instance of ConsumerInvoiceCustomerType.



13202
13203
13204
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13202

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



13200
13201
13202
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13200

def value
  @value
end

Class Method Details

.ALLObject



13222
13223
13224
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13222

def ConsumerInvoiceCustomerType.ALL
  @@all ||= [ConsumerInvoiceCustomerType.business_eu_verified, ConsumerInvoiceCustomerType.business_non_verified, ConsumerInvoiceCustomerType.individual]
end

.apply(value) ⇒ Object

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



13207
13208
13209
13210
13211
13212
13213
13214
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13207

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

.business_eu_verifiedObject

A business that have been verified in the European Union



13227
13228
13229
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13227

def ConsumerInvoiceCustomerType.business_eu_verified
  @@_business_eu_verified ||= ConsumerInvoiceCustomerType.new('business_eu_verified')
end

.business_non_verifiedObject

A business, but with no additional verification



13232
13233
13234
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13232

def ConsumerInvoiceCustomerType.business_non_verified
  @@_business_non_verified ||= ConsumerInvoiceCustomerType.new('business_non_verified')
end

.from_string(value) ⇒ Object

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



13217
13218
13219
13220
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13217

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

.individualObject



13236
13237
13238
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13236

def ConsumerInvoiceCustomerType.individual
  @@_individual ||= ConsumerInvoiceCustomerType.new('individual')
end

Instance Method Details

#to_hashObject



13240
13241
13242
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13240

def to_hash
  value
end