class Io::Flow::V0::Clients::PaymentRequestBundles
Public Class Methods
new(client)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7996 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end
Public Instance Methods
get_by_id(organization, id)
click to toggle source
Returns
information about a specific payment request bundle
# File lib/flow_commerce/flow_api_v0_client.rb, line 8009 def get_by_id(organization, id) HttpClient::Preconditions.assert_class('organization', organization, String) HttpClient::Preconditions.assert_class('id', id, String) r = @client.request("/#{CGI.escape(organization)}/payment/request/bundles/#{CGI.escape(id)}").get ::Io::Flow::V0::Models::PaymentRequestBundle.new(r) end
post(organization, payment_request_bundle_form)
click to toggle source
Creates a new payment request bundle
# File lib/flow_commerce/flow_api_v0_client.rb, line 8001 def post(organization, payment_request_bundle_form) HttpClient::Preconditions.assert_class('organization', organization, String) (x = payment_request_bundle_form; x.is_a?(::Io::Flow::V0::Models::PaymentRequestBundleForm) ? x : ::Io::Flow::V0::Models::PaymentRequestBundleForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/payment/request/bundles").with_json(payment_request_bundle_form.to_json).post ::Io::Flow::V0::Models::PaymentRequestBundle.new(r) end
put_by_id(organization, id, payment_request_bundle_form)
click to toggle source
Updates payment request bundle
# File lib/flow_commerce/flow_api_v0_client.rb, line 8017 def put_by_id(organization, id, payment_request_bundle_form) HttpClient::Preconditions.assert_class('organization', organization, String) HttpClient::Preconditions.assert_class('id', id, String) (x = payment_request_bundle_form; x.is_a?(::Io::Flow::V0::Models::PaymentRequestBundleForm) ? x : ::Io::Flow::V0::Models::PaymentRequestBundleForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/payment/request/bundles/#{CGI.escape(id)}").with_json(payment_request_bundle_form.to_json).put ::Io::Flow::V0::Models::PaymentRequestBundle.new(r) end