Class: Io::Flow::V0::Models::CardTokenForm
- Inherits:
-
CardAuthorizationData
- Object
- CardAuthorizationData
- Io::Flow::V0::Models::CardTokenForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Attributes inherited from CardAuthorizationData
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardTokenForm
constructor
A new instance of CardTokenForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from CardAuthorizationData
Constructor Details
#initialize(incoming = {}) ⇒ CardTokenForm
Returns a new instance of CardTokenForm.
15335 15336 15337 15338 15339 15340 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15335 def initialize(incoming={}) super(:discriminator => CardAuthorizationData::Types::CARD_TOKEN_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:token], 'CardTokenForm') @token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String) end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
15333 15334 15335 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15333 def token @token end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
15346 15347 15348 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15346 def copy(incoming={}) CardTokenForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
15350 15351 15352 15353 15354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15350 def subtype_to_hash { :token => token } end |
#to_json ⇒ Object
15342 15343 15344 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15342 def to_json JSON.dump(to_hash) end |