ExOanda.Response (ExOanda v0.1.1)

View Source

Common response schema for Oanda API.

Summary

Types

t()

Common response schema for ExOanda.

Types

t()

@type t() :: %ExOanda.Response{
  data: nil,
  error_code: String.t() | nil,
  error_message: String.t() | nil,
  id: term(),
  request_id: String.t(),
  status: atom()
}

t(data)

@type t(data) :: %ExOanda.Response{
  data: data,
  error_code: String.t() | nil,
  error_message: String.t() | nil,
  id: term(),
  request_id: String.t(),
  status: atom()
}

Common response schema for ExOanda.

The type of the data field is determined by the Oanda endpoint being called, however, the type of the nested schema is passed as a generic type parameter. For example, the response schema for ExOanda.Accounts.list is ExOanda.Response.t(ExOanda.Response.ListAccounts.t()).