Class: Io::Flow::V0::Models::PaymentRequestBundleForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentRequestBundleForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#payment_request ⇒ Object
readonly
Returns the value of attribute payment_request.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentRequestBundleForm
constructor
A new instance of PaymentRequestBundleForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentRequestBundleForm
Returns a new instance of PaymentRequestBundleForm.
54354 54355 54356 54357 54358 54359 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54354 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_request, :billing], 'PaymentRequestBundleForm') @payment_request = (x = opts.delete(:payment_request); x.is_a?(::Io::Flow::V0::Models::PaymentRequestForm) ? x : ::Io::Flow::V0::Models::PaymentRequestForm.new(x)) @billing = (x = opts.delete(:billing); x.is_a?(::Io::Flow::V0::Models::PaymentRequestBilling) ? x : ::Io::Flow::V0::Models::PaymentRequestBilling.new(x)) end |
Instance Attribute Details
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
54352 54353 54354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54352 def billing @billing end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
54352 54353 54354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54352 def payment_request @payment_request end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
54365 54366 54367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54365 def copy(incoming={}) PaymentRequestBundleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
54369 54370 54371 54372 54373 54374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54369 def to_hash { :payment_request => payment_request.to_hash, :billing => billing.to_hash } end |
#to_json ⇒ Object
54361 54362 54363 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54361 def to_json JSON.dump(to_hash) end |