Class: Io::Flow::V0::Models::RomanizationForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RomanizationForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Information to be romanized
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RomanizationForm
constructor
A new instance of RomanizationForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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
#address ⇒ Object (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 |
#contact ⇒ Object (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_hash ⇒ Object
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_json ⇒ Object
64854 64855 64856 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64854 def to_json JSON.dump(to_hash) end |