Class: Io::Flow::V0::Models::OrderQuoteContact
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteContact
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteContact
constructor
A new instance of OrderQuoteContact.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteContact
Returns a new instance of OrderQuoteContact.
52995 52996 52997 52998 52999 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52995 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @email = (x = opts.delete(:email); x.nil? ? nil : HttpClient::Preconditions.assert_class('email', x, String)) @phone = (x = opts.delete(:phone); x.nil? ? nil : HttpClient::Preconditions.assert_class('phone', x, String)) end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
52993 52994 52995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52993 def email @email end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
52993 52994 52995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52993 def phone @phone end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53005 53006 53007 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53005 def copy(incoming={}) OrderQuoteContact.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53009 53010 53011 53012 53013 53014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53009 def to_hash { :email => email, :phone => phone } end |
#to_json ⇒ Object
53001 53002 53003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53001 def to_json JSON.dump(to_hash) end |