Class: Io::Flow::V0::Models::Romanization
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::Romanization
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
The data in the this model reflects transliterated text into Roman (Latin) script, a consumable format for system processing
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 = {}) ⇒ Romanization
constructor
A new instance of Romanization.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ Romanization
Returns a new instance of Romanization.
57617 57618 57619 57620 57621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57617 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.
57615 57616 57617 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57615 def address @address end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
57615 57616 57617 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57615 def contact @contact end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57627 57628 57629 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57627 def copy(incoming={}) Romanization.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
57631 57632 57633 57634 57635 57636 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57631 def to_hash { :address => address.nil? ? nil : address.to_hash, :contact => contact.nil? ? nil : contact.to_hash } end |
#to_json ⇒ Object
57623 57624 57625 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57623 def to_json JSON.dump(to_hash) end |