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.
64820 64821 64822 64823 64824 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64820 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.
64818 64819 64820 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64818 def address @address end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
64818 64819 64820 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64818 def contact @contact end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
64830 64831 64832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64830 def copy(incoming={}) Romanization.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
64834 64835 64836 64837 64838 64839 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64834 def to_hash { :address => address.nil? ? nil : address.to_hash, :contact => contact.nil? ? nil : contact.to_hash } end |
#to_json ⇒ Object
64826 64827 64828 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64826 def to_json JSON.dump(to_hash) end |