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.



14124
14125
14126
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14124

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



14122
14123
14124
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14122

def value
  @value
end

Class Method Details

.ALLObject



14144
14145
14146
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14144

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



14129
14130
14131
14132
14133
14134
14135
14136
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14129

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



14149
14150
14151
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14149

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

.business_non_verifiedObject

A business, but with no additional verification



14154
14155
14156
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14154

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



14139
14140
14141
14142
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14139

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

.individualObject



14158
14159
14160
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14158

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

Instance Method Details

#to_hashObject



14162
14163
14164
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14162

def to_hash
  value
end