Sha256: 11a39ebee1eb15ba5665a4b553b037c1394e516e3ddd98fa2024845b9d4675cb
Contents?: true
Size: 729 Bytes
Versions: 4
Compression:
Stored size: 729 Bytes
Contents
# # Token feature # class Spike::Token def initialize(client) @client = client end def create(params) res = @client.post(request_path: '/tokens', request_params: params) Spike::Token::Response.new(res) end def retrieve(token_id) res = @client.get(request_path: "/tokens/#{token_id}") Response.new(res) end # # Token Object # class Response < Spike::Object def id @attributes['id'] end def live_mode? @attributes['livemode'] end def created Time.at(@attributes['created']) end def type @attributes['type'] end def currency @attributes['currency'] end def source @attributes['source'] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
spike-ruby-0.1.3 | lib/spike/token.rb |
spike-ruby-0.1.2 | lib/spike/token.rb |
spike-ruby-0.1.1 | lib/spike/token.rb |
spike-ruby-0.1.0 | lib/spike/token.rb |