Class: ContextIO::ConnectTokenCollection
- Inherits:
-
Object
- Object
- ContextIO::ConnectTokenCollection
- Includes:
- API::ResourceCollection
- Defined in:
- lib/contextio/connect_token_collection.rb
Overview
Represents a collection of connect tokens for your account. You can use this to create a new token, fetch a specific one or iterate over them.
Instance Attribute Summary
Attributes included from API::ResourceCollection
#resource_url, #where_constraints
Instance Method Summary collapse
-
#create(callback_url, options = {}) ⇒ ConnectToken
Creates a new connect token for your account.
Methods included from API::ResourceCollection
#[], #each, #empty?, #size, #where
Instance Method Details
#create(callback_url, options = {}) ⇒ ConnectToken
Creates a new connect token for your account.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/contextio/connect_token_collection.rb', line 32 def create(callback_url, ={}) result_hash = api.request( :post, resource_url, .merge(callback_url: callback_url) ) result_hash.delete('success') resource_class.new(api, result_hash) end |