Class: Inttegro::Resources::Apps

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(http) ⇒ Apps

Returns a new instance of Apps.

Parameters:



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.

Parameters:

Returns:



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.

Returns:



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.

Parameters:

Returns:



38
39
40
# File 'lib/inttegro/resources/apps.rb', line 38

def update(payload)
  @http.post_resource("/apps/update", Inttegro::Application, :app, payload)
end