Class: Increase::Resources::Simulations::CardTokens
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardTokens
- Defined in:
- lib/increase/resources/simulations/card_tokens.rb
Instance Method Summary collapse
-
#create(capabilities: nil, expiration: nil, last4: nil, prefix: nil, primary_account_number_length: nil, request_options: {}) ⇒ Increase::Models::CardToken
Simulates tokenizing a card in the sandbox environment.
-
#initialize(client:) ⇒ CardTokens
constructor
private
A new instance of CardTokens.
Constructor Details
#initialize(client:) ⇒ CardTokens
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CardTokens.
40 41 42 |
# File 'lib/increase/resources/simulations/card_tokens.rb', line 40 def initialize(client:) @client = client end |
Instance Method Details
#create(capabilities: nil, expiration: nil, last4: nil, prefix: nil, primary_account_number_length: nil, request_options: {}) ⇒ Increase::Models::CardToken
Simulates tokenizing a card in the sandbox environment.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/increase/resources/simulations/card_tokens.rb', line 26 def create(params = {}) parsed, = Increase::Simulations::CardTokenCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_tokens", body: parsed, model: Increase::CardToken, options: ) end |