Class: ShipEngine::Domain::Tokens

Inherits:
Object
  • Object
show all
Defined in:
lib/shipengine/domains/tokens.rb

Instance Method Summary collapse

Constructor Details

#initializeTokens

Returns a new instance of Tokens.



8
9
10
# File 'lib/shipengine/domains/tokens.rb', line 8

def initialize
  @client = ShipEngine::Client.new
end

Instance Method Details

#ephemeral_token(params: {}) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/shipengine/domains/tokens.rb', line 12

def ephemeral_token(params: {})
  response = @client.post(
    path: ShipEngine::Constants::PATHS.v1.tokens.root,
    options: params
  )

  Hashie::Mash.new(response.body)
end