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.
60157 60158 60159 60160 60161 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60157 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.
60155 60156 60157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60155 def address @address end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
60155 60156 60157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60155 def contact @contact end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
60167 60168 60169 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60167 def copy(incoming={}) RomanizationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
60171 60172 60173 60174 60175 60176 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60171 def to_hash { :address => address.nil? ? nil : address.to_hash, :contact => contact.nil? ? nil : contact.to_hash } end |
#to_json ⇒ Object
60163 60164 60165 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60163 def to_json JSON.dump(to_hash) end |