Class: Io::Flow::V0::Models::PaymentContactBilling
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentContactBilling
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentContactBilling
constructor
A new instance of PaymentContactBilling.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentContactBilling
Returns a new instance of PaymentContactBilling.
56610 56611 56612 56613 56614 56615 56616 56617 56618 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56610 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:last_name], 'PaymentContactBilling') @first_name = (x = opts.delete(:first_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('first_name', x, String)) @last_name = HttpClient::Preconditions.assert_class('last_name', opts.delete(:last_name), String) @company = (x = opts.delete(:company); x.nil? ? nil : HttpClient::Preconditions.assert_class('company', x, String)) @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
#company ⇒ Object (readonly)
Returns the value of attribute company.
56608 56609 56610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56608 def company @company end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
56608 56609 56610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56608 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
56608 56609 56610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56608 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
56608 56609 56610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56608 def last_name @last_name end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
56608 56609 56610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56608 def phone @phone end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56624 56625 56626 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56624 def copy(incoming={}) PaymentContactBilling.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56628 56629 56630 56631 56632 56633 56634 56635 56636 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56628 def to_hash { :first_name => first_name, :last_name => last_name, :company => company, :email => email, :phone => phone } end |
#to_json ⇒ Object
56620 56621 56622 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56620 def to_json JSON.dump(to_hash) end |