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.



12530
12531
12532
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12530

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12528
12529
12530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12528

def value
  @value
end

Class Method Details

.ALLObject



12550
12551
12552
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12550

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



12535
12536
12537
12538
12539
12540
12541
12542
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12535

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



12555
12556
12557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12555

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

.business_non_verifiedObject

A business, but with no additional verification



12560
12561
12562
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12560

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



12545
12546
12547
12548
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12545

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

.individualObject



12564
12565
12566
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12564

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

Instance Method Details

#to_hashObject



12568
12569
12570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12568

def to_hash
  value
end