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 API Documentation on ApiApps (app.hellosign.com/api/reference#ApiApp) for more information about this.
Instance Method Summary collapse
-
#create_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Creates a new ApiApp on your Account.
-
#delete_api_app(opts) ⇒ HTTP::Status
Deletes an ApiApp.
-
#get_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Retrieves an ApiApp with a given ID.
-
#get_api_apps(opts = {}) ⇒ HelloSign::Resource::ResourceArray
Returns a list of ApiApps that your Account can access.
-
#update_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Updates the ApiApp settings.
Instance Method Details
#create_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Creates a new ApiApp on your Account
78 79 80 |
# File 'lib/hello_sign/api/api_app.rb', line 78 def create_api_app(opts) HelloSign::Resource::ApiApp.new post('/api_app', body: opts) end |
#delete_api_app(opts) ⇒ HTTP::Status
Deletes an ApiApp. Only available for ApiApps you own.
115 116 117 118 |
# File 'lib/hello_sign/api/api_app.rb', line 115 def delete_api_app(opts) path = '/api_app/' + opts[:client_id] delete(path) end |
#get_api_app(opts) ⇒ HelloSign::Resource::ApiApp
Retrieves an ApiApp with a given ID
40 41 42 |
# File 'lib/hello_sign/api/api_app.rb', line 40 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 your Account can access.
52 53 54 55 56 57 |
# File 'lib/hello_sign/api/api_app.rb', line 52 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 the ApiApp settings.
102 103 104 105 106 |
# File 'lib/hello_sign/api/api_app.rb', line 102 def update_api_app(opts) id = opts.delete(:client_id) path = '/api_app/' + id HelloSign::Resource::ApiApp.new post(path, body: opts) end |