Class: Stripe::V2::Core::AccountTokenService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/v2/core/account_token_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Creates an Account Token.

** raises RateLimitError



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/stripe/services/v2/core/account_token_service.rb', line 11

def create(params = {}, opts = {})
  params = V2::Core::AccountTokenCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams)

  request(
    method: :post,
    path: "/v2/core/account_tokens",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves an Account Token.

** raises RateLimitError



26
27
28
29
30
31
32
33
34
# File 'lib/stripe/services/v2/core/account_token_service.rb', line 26

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v2/core/account_tokens/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end