Class: Io::Flow::V0::Models::PaymentContactShipping
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentContactShipping
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#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 = {}) ⇒ PaymentContactShipping
constructor
A new instance of PaymentContactShipping.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentContactShipping
Returns a new instance of PaymentContactShipping.
56644 56645 56646 56647 56648 56649 56650 56651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56644 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:last_name, :email], 'PaymentContactShipping') @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) @email = HttpClient::Preconditions.assert_class('email', opts.delete(:email), 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.
56642 56643 56644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56642 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
56642 56643 56644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56642 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
56642 56643 56644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56642 def last_name @last_name end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
56642 56643 56644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56642 def phone @phone end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56657 56658 56659 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56657 def copy(incoming={}) PaymentContactShipping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56661 56662 56663 56664 56665 56666 56667 56668 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56661 def to_hash { :first_name => first_name, :last_name => last_name, :email => email, :phone => phone } end |
#to_json ⇒ Object
56653 56654 56655 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56653 def to_json JSON.dump(to_hash) end |