Class: Io::Flow::V0::Models::OrderBuilderCustomerForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderBuilderCustomerForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderBuilderCustomerForm
constructor
A new instance of OrderBuilderCustomerForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderBuilderCustomerForm
Returns a new instance of OrderBuilderCustomerForm.
51392 51393 51394 51395 51396 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51392 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:customer], 'OrderBuilderCustomerForm') @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::OrderCustomerForm) ? x : ::Io::Flow::V0::Models::OrderCustomerForm.new(x)) end |
Instance Attribute Details
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
51390 51391 51392 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51390 def customer @customer end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51402 51403 51404 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51402 def copy(incoming={}) OrderBuilderCustomerForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51406 51407 51408 51409 51410 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51406 def to_hash { :customer => customer.to_hash } end |
#to_json ⇒ Object
51398 51399 51400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51398 def to_json JSON.dump(to_hash) end |