Class: Io::Flow::V0::Models::PaymentAddressShipping
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentAddressShipping
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentAddressShipping
constructor
A new instance of PaymentAddressShipping.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentAddressShipping
Returns a new instance of PaymentAddressShipping.
56355 56356 56357 56358 56359 56360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56355 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:contact, :location], 'PaymentAddressShipping') @contact = (x = opts.delete(:contact); x.is_a?(::Io::Flow::V0::Models::PaymentContactShipping) ? x : ::Io::Flow::V0::Models::PaymentContactShipping.new(x)) @location = (x = opts.delete(:location); x.is_a?(::Io::Flow::V0::Models::PaymentAddress) ? x : ::Io::Flow::V0::Models::PaymentAddress.new(x)) end |
Instance Attribute Details
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
56353 56354 56355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56353 def contact @contact end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
56353 56354 56355 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56353 def location @location end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56366 56367 56368 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56366 def copy(incoming={}) PaymentAddressShipping.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56370 56371 56372 56373 56374 56375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56370 def to_hash { :contact => contact.to_hash, :location => location.to_hash } end |
#to_json ⇒ Object
56362 56363 56364 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56362 def to_json JSON.dump(to_hash) end |