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.
57645 57646 57647 57648 57649 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57645 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.
57643 57644 57645 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57643 def address @address end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
57643 57644 57645 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57643 def contact @contact end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57655 57656 57657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57655 def copy(incoming={}) RomanizationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
57659 57660 57661 57662 57663 57664 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57659 def to_hash { :address => address.nil? ? nil : address.to_hash, :contact => contact.nil? ? nil : contact.to_hash } end |
#to_json ⇒ Object
57651 57652 57653 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57651 def to_json JSON.dump(to_hash) end |