Class: Io::Flow::V0::Models::PaymentRequestBundle
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentRequestBundle
- 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 = {}) ⇒ PaymentRequestBundle
constructor
A new instance of PaymentRequestBundle.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentRequestBundle
Returns a new instance of PaymentRequestBundle.
58717 58718 58719 58720 58721 58722 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58717 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_request, :billing], 'PaymentRequestBundle') @payment_request = (x = opts.delete(:payment_request); x.is_a?(::Io::Flow::V0::Models::PaymentRequest) ? x : ::Io::Flow::V0::Models::PaymentRequest.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.
58715 58716 58717 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58715 def billing @billing end |
#payment_request ⇒ Object (readonly)
Returns the value of attribute payment_request.
58715 58716 58717 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58715 def payment_request @payment_request end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
58728 58729 58730 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58728 def copy(incoming={}) PaymentRequestBundle.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
58732 58733 58734 58735 58736 58737 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58732 def to_hash { :payment_request => payment_request.to_hash, :billing => billing.to_hash } end |
#to_json ⇒ Object
58724 58725 58726 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58724 def to_json JSON.dump(to_hash) end |