Class: Increase::Resources::Simulations::CardTokens

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/card_tokens.rb

Instance Method Summary collapse

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.

Parameters:



42
43
44
# File 'lib/increase/resources/simulations/card_tokens.rb', line 42

def initialize(client:)
  @client = client
end

Instance Method Details

#create(capabilities: nil, expiration: nil, last4: nil, outcome: nil, prefix: nil, primary_account_number_length: nil, request_options: {}) ⇒ Increase::Models::CardToken

Simulates tokenizing a card in the sandbox environment.

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/increase/resources/simulations/card_tokens.rb', line 28

def create(params = {})
  parsed, options = Increase::Simulations::CardTokenCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "simulations/card_tokens",
    body: parsed,
    model: Increase::CardToken,
    options: options
  )
end