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.
50060 50061 50062 50063 50064 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50060 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.
50058 50059 50060 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50058 def address @address end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
50058 50059 50060 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50058 def contact @contact end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50070 50071 50072 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50070 def copy(incoming={}) Romanization.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50074 50075 50076 50077 50078 50079 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50074 def to_hash { :address => address.nil? ? nil : address.to_hash, :contact => contact.nil? ? nil : contact.to_hash } end |
#to_json ⇒ Object
50066 50067 50068 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50066 def to_json JSON.dump(to_hash) end |