Class: Io::Flow::V0::Models::CheckoutTokenReferenceForm
- Inherits:
-
CheckoutTokenForm
- Object
- CheckoutTokenForm
- Io::Flow::V0::Models::CheckoutTokenReferenceForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Use this form when order number and session id are known. Optional customer information will be created or updated.
Instance Attribute Summary collapse
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Attributes inherited from CheckoutTokenForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CheckoutTokenReferenceForm
constructor
A new instance of CheckoutTokenReferenceForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from CheckoutTokenForm
Constructor Details
#initialize(incoming = {}) ⇒ CheckoutTokenReferenceForm
Returns a new instance of CheckoutTokenReferenceForm.
25310 25311 25312 25313 25314 25315 25316 25317 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25310 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 |
Instance Attribute Details
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
25308 25309 25310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25308 def order_number @order_number end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
25308 25309 25310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25308 def session_id @session_id end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
25308 25309 25310 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25308 def urls @urls end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25323 25324 25325 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25323 def copy(incoming={}) CheckoutTokenReferenceForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25327 25328 25329 25330 25331 25332 25333 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25327 def subtype_to_hash { :order_number => order_number, :session_id => session_id, :urls => urls.to_hash } end |
#to_json ⇒ Object
25319 25320 25321 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25319 def to_json JSON.dump(to_hash) end |