Class: Inttegro::Resources::Apps
- Inherits:
-
Object
- Object
- Inttegro::Resources::Apps
- Defined in:
- lib/inttegro/resources/apps.rb
Overview
Client for creating, reading, and updating Inttegro applications.
Access this resource through Client#apps.
Instance Method Summary collapse
-
#create(payload) ⇒ Inttegro::Application
Create an application and return its typed application record.
-
#initialize(http) ⇒ Apps
constructor
A new instance of Apps.
-
#lookup ⇒ Inttegro::Application
Retrieve the application authenticated by the client's API key.
-
#update(payload) ⇒ Inttegro::Application
Update mutable fields on the authenticated application.
Constructor Details
#initialize(http) ⇒ Apps
Returns a new instance of Apps.
15 16 17 |
# File 'lib/inttegro/resources/apps.rb', line 15 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#create(payload) ⇒ Inttegro::Application
Create an application and return its typed application record.
23 24 25 |
# File 'lib/inttegro/resources/apps.rb', line 23 def create(payload) @http.post_resource("/apps/create", Inttegro::Application, :app, payload) end |
#lookup ⇒ Inttegro::Application
Retrieve the application authenticated by the client's API key.
30 31 32 |
# File 'lib/inttegro/resources/apps.rb', line 30 def lookup @http.post_resource("/apps/lookup", Inttegro::Application, :app, {}) end |
#update(payload) ⇒ Inttegro::Application
Update mutable fields on the authenticated application.
38 39 40 |
# File 'lib/inttegro/resources/apps.rb', line 38 def update(payload) @http.post_resource("/apps/update", Inttegro::Application, :app, payload) end |