class Spike::Token

Token feature

Public Class Methods

new(client) click to toggle source
# File lib/spike/token.rb, line 5
def initialize(client)
  @client = client
end

Public Instance Methods

create(params) click to toggle source
# File lib/spike/token.rb, line 9
def create(params)
  res = @client.post(request_path: '/tokens', request_params: params)
  Spike::Token::Response.new(res)
end
retrieve(token_id) click to toggle source
# File lib/spike/token.rb, line 14
def retrieve(token_id)
  res = @client.get(request_path: "/tokens/#{token_id}")
  Response.new(res)
end