class Io::Flow::V0::Models::CheckoutTokenReferenceForm
Use this form when order number and session id are known. Optional customer information will be created or updated.
Attributes
order_number[R]
session_id[R]
urls[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::CheckoutTokenForm::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 36247 def initialize(incoming={}) super(:discriminator => CheckoutTokenForm::Types::CHECKOUT_TOKEN_REFERENCE_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order_number, :session_id, :urls], 'CheckoutTokenReferenceForm') @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String) @session_id = HttpClient::Preconditions.assert_class('session_id', opts.delete(:session_id), String) @urls = (x = opts.delete(:urls); x.is_a?(::Io::Flow::V0::Models::CheckoutUrlsForm) ? x : ::Io::Flow::V0::Models::CheckoutUrlsForm.new(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 36260 def copy(incoming={}) CheckoutTokenReferenceForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 36264 def subtype_to_hash { :order_number => order_number, :session_id => session_id, :urls => urls.to_hash } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 36256 def to_json JSON.dump(to_hash) end