Module: HelloSign::Api::ApiApp
- Included in:
- Client
- Defined in:
- lib/hello_sign/api/api_app.rb
Overview
Contains all the api calls for the ApiApp resource. Take a look at our team api document for more information about this.
Instance Method Summary collapse
-
#create_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Creates a new API Application on your account.
-
#delete_api_app(opts) ⇒ Object
Deletes an API App.
-
#get_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Retrieves information about a specific API App by a given ID.
-
#get_api_apps(opts = {}) ⇒ HelloSign::Resource::ResourceArray
Returns a list of ApiApps that you currently have access to on your account.
-
#update_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Updates parameters for a specific API Application on your account, referenced by ID.
Instance Method Details
#create_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Creates a new API Application on your account
79 80 81 |
# File 'lib/hello_sign/api/api_app.rb', line 79 def create_api_app(opts) HelloSign::Resource::ApiApp.new post('/api_app', :body => opts) end |
#delete_api_app(opts) ⇒ Object
Deletes an API App. Can only be invoked for apps you own.
108 109 110 111 |
# File 'lib/hello_sign/api/api_app.rb', line 108 def delete_api_app(opts) path = '/api_app/' + opts[:client_id] delete(path) end |
#get_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Retrieves information about a specific API App by a given ID
45 46 47 |
# File 'lib/hello_sign/api/api_app.rb', line 45 def get_api_app(opts) HelloSign::Resource::ApiApp.new get("/api_app/#{opts[:client_id]}") end |
#get_api_apps(opts = {}) ⇒ HelloSign::Resource::ResourceArray
Returns a list of ApiApps that you currently have access to on your account
59 60 61 62 63 64 |
# File 'lib/hello_sign/api/api_app.rb', line 59 def get_api_apps(opts={}) path = '/api_app/list' path += opts[:page] ? "?page=#{opts[:page]}" : '' path += opts[:page_size] ? "&page_size=#{opts[:page_size]}" : '' HelloSign::Resource::ResourceArray.new get(path, opts), 'api_apps', HelloSign::Resource::ApiApp end |
#update_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Updates parameters for a specific API Application on your account, referenced by ID
97 98 99 100 101 |
# File 'lib/hello_sign/api/api_app.rb', line 97 def update_api_app(opts) id = opts.delete(:client_id) path = '/api_app/' + id HelloSign::Resource::ApiApp.new post(path, :body => opts) end |