class Io::Flow::V0::Models::CustomerAddressType
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18354 def CustomerAddressType.ALL @@all ||= [CustomerAddressType.billing, CustomerAddressType.invoice, CustomerAddressType.shipping] end
apply(value)
click to toggle source
Returns the instance of CustomerAddressType
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 18339 def CustomerAddressType.apply(value) if value.instance_of?(CustomerAddressType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || CustomerAddressType.new(value)) end end
billing()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18358 def CustomerAddressType.billing @@_billing ||= CustomerAddressType.new('billing') end
from_string(value)
click to toggle source
Returns the instance of CustomerAddressType
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 18349 def CustomerAddressType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) CustomerAddressType.ALL.find { |v| v.value == value } end
invoice()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18362 def CustomerAddressType.invoice @@_invoice ||= CustomerAddressType.new('invoice') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18334 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
shipping()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18366 def CustomerAddressType.shipping @@_shipping ||= CustomerAddressType.new('shipping') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 18370 def to_hash value end