Class: Io::Flow::V0::Models::RomanizationForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Information to be romanized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ RomanizationForm

Returns a new instance of RomanizationForm.



64848
64849
64850
64851
64852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64848

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @address = (x = opts.delete(:address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
  @contact = (x = opts.delete(:contact); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Contact) ? x : ::Io::Flow::V0::Models::Contact.new(x)))
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



64846
64847
64848
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64846

def address
  @address
end

#contactObject (readonly)

Returns the value of attribute contact.



64846
64847
64848
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64846

def contact
  @contact
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



64858
64859
64860
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64858

def copy(incoming={})
  RomanizationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



64862
64863
64864
64865
64866
64867
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64862

def to_hash
  {
    :address => address.nil? ? nil : address.to_hash,
    :contact => contact.nil? ? nil : contact.to_hash
  }
end

#to_jsonObject



64854
64855
64856
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64854

def to_json
  JSON.dump(to_hash)
end