Inttegro.Apps (inttegro v0.2.0)

Copy Markdown View Source

Creates and manages Inttegro applications.

An application is the authorization and ownership boundary for commerce data. Use this API to inspect the application represented by the current secret key, create child applications, and update mutable application metadata. Child applications receive their own credentials and can be governed through an explicit parent-child relationship policy.

Summary

Functions

Creates an Inttegro application, initial secret key, and direct parent-child relationship for the authenticated creator app.

Retrieves the application associated with the API key used to authenticate the request.

Updates one or more mutable attributes of the application associated with the API key used to authenticate the request.

Functions

create(client, request, options \\ [])

Creates an Inttegro application, initial secret key, and direct parent-child relationship for the authenticated creator app.

Parameters

Returns

Returns {:ok, Inttegro.Apps.Application.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Apps.CreateApplicationRequest.new!(request_attributes)

case Inttegro.Apps.create(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end

lookup(client, options \\ [])

@spec lookup(Inttegro.Client.t(), keyword()) ::
  {:ok, Inttegro.Apps.Application.t()} | {:error, Exception.t()}

Retrieves the application associated with the API key used to authenticate the request.

Parameters

  • client — an authenticated Inttegro.Client.
  • options — request options such as :idempotency_key and additional :headers.

Returns

Returns {:ok, Inttegro.Apps.Application.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

Inttegro.Apps.lookup(client)

update(client, request, options \\ [])

Updates one or more mutable attributes of the application associated with the API key used to authenticate the request.

Parameters

Returns

Returns {:ok, Inttegro.Apps.Application.t()} when Inttegro accepts and decodes the operation. Returns {:error, exception} for API, transport, or decoding failures. A successful API response can still describe an asynchronous resource that has not reached its terminal state.

Example

request = Inttegro.Apps.UpdateApplicationRequest.new!(request_attributes)

case Inttegro.Apps.update(client, request) do
  {:ok, result} -> result
  {:error, error} -> {:error, error}
end