class Io::Flow::V0::Models::PaymentRequestBundle

Attributes

billing[R]
payment_request[R]

Public Class Methods

new(incoming={}) click to toggle source
# 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

Public Instance Methods

copy(incoming={}) click to toggle source
# 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() click to toggle source
# 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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 58724
def to_json
  JSON.dump(to_hash)
end