Class: Increase::Resources::CardTokens
- Inherits:
-
Object
- Object
- Increase::Resources::CardTokens
- Defined in:
- lib/increase/resources/card_tokens.rb
Instance Method Summary collapse
-
#capabilities(card_token_id, request_options: {}) ⇒ Increase::Models::CardTokenCapabilities
The capabilities of a Card Token describe whether the card can be used for specific operations, such as Card Push Transfers.
-
#initialize(client:) ⇒ CardTokens
constructor
private
A new instance of CardTokens.
-
#list(created_at: nil, cursor: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CardToken>
Some parameter documentations has been truncated, see Models::CardTokenListParams for more details.
-
#retrieve(card_token_id, request_options: {}) ⇒ Increase::Models::CardToken
Retrieve a Card Token.
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.
81 82 83 |
# File 'lib/increase/resources/card_tokens.rb', line 81 def initialize(client:) @client = client end |
Instance Method Details
#capabilities(card_token_id, request_options: {}) ⇒ Increase::Models::CardTokenCapabilities
The capabilities of a Card Token describe whether the card can be used for specific operations, such as Card Push Transfers. The capabilities can change over time based on the issuing bank’s configuration of the card range.
69 70 71 72 73 74 75 76 |
# File 'lib/increase/resources/card_tokens.rb', line 69 def capabilities(card_token_id, params = {}) @client.request( method: :get, path: ["card_tokens/%1$s/capabilities", card_token_id], model: Increase::CardTokenCapabilities, options: params[:request_options] ) end |
#list(created_at: nil, cursor: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::CardToken>
Some parameter documentations has been truncated, see Models::CardTokenListParams for more details.
List Card Tokens
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/increase/resources/card_tokens.rb', line 44 def list(params = {}) parsed, = Increase::CardTokenListParams.dump_request(params) @client.request( method: :get, path: "card_tokens", query: parsed, page: Increase::Internal::Page, model: Increase::CardToken, options: ) end |
#retrieve(card_token_id, request_options: {}) ⇒ Increase::Models::CardToken
Retrieve a Card Token
17 18 19 20 21 22 23 24 |
# File 'lib/increase/resources/card_tokens.rb', line 17 def retrieve(card_token_id, params = {}) @client.request( method: :get, path: ["card_tokens/%1$s", card_token_id], model: Increase::CardToken, options: params[:request_options] ) end |