Class: Io::Flow::V0::Models::CardNonceForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CardNonceForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
The card nonce form presents a one time token to exchance server side for a permanent, secure tokenized card
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardNonceForm
constructor
A new instance of CardNonceForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CardNonceForm
Returns a new instance of CardNonceForm.
13264 13265 13266 13267 13268 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13264 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:token], 'CardNonceForm') @token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String) end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
13262 13263 13264 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13262 def token @token end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
13274 13275 13276 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13274 def copy(incoming={}) CardNonceForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
13278 13279 13280 13281 13282 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13278 def to_hash { :token => token } end |
#to_json ⇒ Object
13270 13271 13272 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13270 def to_json JSON.dump(to_hash) end |