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.
58745 58746 58747 58748 58749 58750 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58745 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.
58743 58744 58745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58743 def billing @billing end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
58743 58744 58745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58743 def payment_request @payment_request end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
58756 58757 58758 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58756 def copy(incoming={}) PaymentRequestBundleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
58760 58761 58762 58763 58764 58765 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58760 def to_hash { :payment_request => payment_request.to_hash, :billing => billing.to_hash } end |
#to_json ⇒ Object
58752 58753 58754 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58752 def to_json JSON.dump(to_hash) end |