Class: Io::Flow::V0::Models::CheckoutTokenForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CheckoutTokenForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
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.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CheckoutTokenForm
constructor
A new instance of CheckoutTokenForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CheckoutTokenForm
Returns a new instance of CheckoutTokenForm.
23853 23854 23855 23856 23857 23858 23859 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23853 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order_number, :session_id, :urls], 'CheckoutTokenForm') @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.
23851 23852 23853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23851 def order_number @order_number end |
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
23851 23852 23853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23851 def session_id @session_id end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
23851 23852 23853 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23851 def urls @urls end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
23865 23866 23867 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23865 def copy(incoming={}) CheckoutTokenForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
23869 23870 23871 23872 23873 23874 23875 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23869 def to_hash { :order_number => order_number, :session_id => session_id, :urls => urls.to_hash } end |
#to_json ⇒ Object
23861 23862 23863 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23861 def to_json JSON.dump(to_hash) end |