class Stripe::TokensApi

Defined in:

stripe/api/tokens_api.cr

Constant Summary

GET_TOKENS_TOKEN_MAX_LENGTH_FOR_TOKEN = 5000
POST_TOKENS_MAX_LENGTH_FOR_CUSTOMER = 5000

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : Stripe::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_get_tokens_token(*, token : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_tokens(*, account : Stripe::ConnectJsAccountTokenSpecs | Nil = nil, bank_account : Stripe::TokenCreateBankAccount | Nil = nil, card : Stripe::PostTokensRequestCard | Nil = nil, customer : String | Nil = nil, cvc_update : Stripe::CvcParams | Nil = nil, expand : Array(String) | Nil = nil, person : Stripe::PersonTokenSpecs | Nil = nil, pii : Stripe::PiiTokenSpecs | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation?(*args, **options) #

[View source]
def client_side_validation?(*args, **options, &) #

[View source]
def debugging?(*args, **options) #

[View source]
def debugging?(*args, **options, &) #

[View source]
def get_tokens_token(*, token : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Token #

Retrieves the token with the given ID.

@required @param token [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Token]

[View source]
def get_tokens_token(*, token : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Retrieves the token with the given ID.</p> @required @param token [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil


[View source]
def get_tokens_token_with_http_info(*, token : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Token, Int32, Hash(String, Array(String) | String)) #

<p>Retrieves the token with the given ID.</p> @required @param token [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Token, Integer, Hash)] Stripe::Token, response status code and response headers


[View source]
def post_tokens(*, account : Stripe::ConnectJsAccountTokenSpecs | Nil = nil, bank_account : Stripe::TokenCreateBankAccount | Nil = nil, card : Stripe::PostTokensRequestCard | Nil = nil, customer : String | Nil = nil, cvc_update : Stripe::CvcParams | Nil = nil, expand : Array(String) | Nil = nil, person : Stripe::PersonTokenSpecs | Nil = nil, pii : Stripe::PiiTokenSpecs | Nil = nil) : Stripe::Token #

Creates a single-use token that represents a bank account’s details. You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a connected account where controller.requirement_collection is application, which includes Custom accounts.

@optional @param account [Stripe::ConnectJsAccountTokenSpecs?] @optional @param bank_account [Stripe::TokenCreateBankAccount?] @optional @param card [Stripe::PostTokensRequestCard?] @optional @param customer [String?] Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). @optional @param cvc_update [Stripe::CvcParams?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param person [Stripe::PersonTokenSpecs?] @optional @param pii [Stripe::PiiTokenSpecs?] @return [Stripe::Token]

[View source]
def post_tokens(*, account : Stripe::ConnectJsAccountTokenSpecs | Nil = nil, bank_account : Stripe::TokenCreateBankAccount | Nil = nil, card : Stripe::PostTokensRequestCard | Nil = nil, customer : String | Nil = nil, cvc_update : Stripe::CvcParams | Nil = nil, expand : Array(String) | Nil = nil, person : Stripe::PersonTokenSpecs | Nil = nil, pii : Stripe::PiiTokenSpecs | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Creates a single-use token that represents a bank account’s details. You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a <a href=&quot;#accounts&quot;>connected account</a> where <a href=&quot;/api/accounts/object#account_object-controller-requirement_collection&quot;>controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.</p> @optional @param account [Stripe::ConnectJsAccountTokenSpecs?] @optional @param bank_account [Stripe::TokenCreateBankAccount?] @optional @param card [Stripe::PostTokensRequestCard?] @optional @param customer [String?] Create a token for the customer, which is owned by the application's account. You can only use this with an OAuth access token or Stripe-Account header. Learn more about cloning saved payment methods. @optional @param cvc_update [Stripe::CvcParams?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param person [Stripe::PersonTokenSpecs?] @optional @param pii [Stripe::PiiTokenSpecs?] @return nil


[View source]
def post_tokens_with_http_info(*, account : Stripe::ConnectJsAccountTokenSpecs | Nil = nil, bank_account : Stripe::TokenCreateBankAccount | Nil = nil, card : Stripe::PostTokensRequestCard | Nil = nil, customer : String | Nil = nil, cvc_update : Stripe::CvcParams | Nil = nil, expand : Array(String) | Nil = nil, person : Stripe::PersonTokenSpecs | Nil = nil, pii : Stripe::PiiTokenSpecs | Nil = nil) : Tuple(Stripe::Token, Int32, Hash(String, Array(String) | String)) #

<p>Creates a single-use token that represents a bank account’s details. You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a <a href=&quot;#accounts&quot;>connected account</a> where <a href=&quot;/api/accounts/object#account_object-controller-requirement_collection&quot;>controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts.</p> @optional @param account [Stripe::ConnectJsAccountTokenSpecs?] @optional @param bank_account [Stripe::TokenCreateBankAccount?] @optional @param card [Stripe::PostTokensRequestCard?] @optional @param customer [String?] Create a token for the customer, which is owned by the application's account. You can only use this with an OAuth access token or Stripe-Account header. Learn more about cloning saved payment methods. @optional @param cvc_update [Stripe::CvcParams?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param person [Stripe::PersonTokenSpecs?] @optional @param pii [Stripe::PiiTokenSpecs?] @return [Tuple(Stripe::Token, Integer, Hash)] Stripe::Token, response status code and response headers


[View source]