View Source StarkInfra.PixStatement (starkinfra v0.1.0)

Groups PixStatement related functions

Link to this section Summary

Functions

The PixStatement struct stores information about all the transactions that happened on a specific day at your settlment account according to the Central Bank. It must be created by the user before it can be accessed. This feature is only available for direct participants. When you initialize a PixStatement, the entity will not be automatically created in the Stark Infra API. The 'create' function sends the structs to the Stark Infra API and returns the created struct.

Same as create(), but it will unwrap the error tuple and raise in case of errors.

Create a PixStatement linked to your Workspace in the Stark Infra API

Same as csv(), but it will unwrap the error tuple and raise in case of errors.

Retrieve a specific PixStatement by its ID in a .csv file.

Same as get(), but it will unwrap the error tuple and raise in case of errors.

Retrieve the PixStatement struct linked to your Workspace in the Stark Infra API by its id.

Same as page(), but it will unwrap the error tuple and raise in case of errors.

Receive a list of up to 100 PixStatements structs previously created in the Stark Infra API

Same as query(), but it will unwrap the error tuple and raise in case of errors.

Receive a stream of PixStatements structs previously created in the Stark Infra API

Link to this section Types

@type t() :: %StarkInfra.PixStatement{
  after: term(),
  before: term(),
  created: term(),
  id: term(),
  status: term(),
  transaction_count: term(),
  type: term(),
  updated: term()
}

Link to this section Functions

Link to this function

%StarkInfra.PixStatement{}

View Source (struct)

The PixStatement struct stores information about all the transactions that happened on a specific day at your settlment account according to the Central Bank. It must be created by the user before it can be accessed. This feature is only available for direct participants. When you initialize a PixStatement, the entity will not be automatically created in the Stark Infra API. The 'create' function sends the structs to the Stark Infra API and returns the created struct.

parameters-required

Parameters (required):

  • :after [Date]: transactions that happened at this date are stored in the PixStatement, must be the same as before. ex: ~D[2020, 3, 10]
  • :before [Date]: transactions that happened at this date are stored in the PixStatement, must be the same as after. ex: ~D[2020, 3, 10]
  • :type [string]: types of entities to include in statement. Options: ["interchange", "interchangeTotal", "transaction"]

attributes-return-only

Attributes (return-only):

  • :id [string]: unique id returned when the PixStatement is created. ex: "5656565656565656"
  • :status [string]: current PixStatement status. ex: ["success", "failed"]
  • :transaction_count [integer]: number of transactions that happened during the day that the PixStatement was requested. ex: 11
  • :created [DateTime]: creation datetime for the PixStatement. ex: ~U[2020-03-10 10:30:0:0]
  • :updated [DateTime]: latest update datetime for the PixStatement. ex: ~U[2020-03-10 10:30:0:0]
Link to this function

create!(keys, options \\ [])

View Source
@spec create!(t() | map(), [
  {:user, StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil}
]) :: {:ok, t()} | {:error, [{:error, StarkInfra.Error.t()}]}

Same as create(), but it will unwrap the error tuple and raise in case of errors.

Link to this function

create(keys, options \\ [])

View Source
@spec create(t() | map(), [
  {:user, StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil}
]) :: {:ok, t()} | {:error, [{:error, StarkInfra.Error.t()}]}

Create a PixStatement linked to your Workspace in the Stark Infra API

options

Options:

  • :statement [PixStatement struct]: PixStatement struct to be created in the API.

options-1

Options:

  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • PixStatement struct with updated attributes.

Same as csv(), but it will unwrap the error tuple and raise in case of errors.

Retrieve a specific PixStatement by its ID in a .csv file.

parameters-required

Parameters (required):

  • :id [string]: struct unique id. ex: "5656565656565656"

options

Options:

  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • .zip file containing a PixStatement in .csv format

Same as get(), but it will unwrap the error tuple and raise in case of errors.

Retrieve the PixStatement struct linked to your Workspace in the Stark Infra API by its id.

parameters-required

Parameters (required):

  • :id [string]: struct unique id. ex: "5656565656565656"

options

Options:

  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • PixStatement struct that corresponds to the given id.
@spec page!(
  cursor: binary(),
  limit: integer(),
  ids: [binary()],
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:cont, [t()]} | {:error, [StarkInfra.Error.t()]}

Same as page(), but it will unwrap the error tuple and raise in case of errors.

@spec page(
  cursor: binary(),
  limit: integer(),
  ids: [binary()],
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:cont, [t()]} | {:error, [StarkInfra.Error.t()]}

Receive a list of up to 100 PixStatements structs previously created in the Stark Infra API

options

Options:

  • :cursor [string, default nil]: cursor returned on the previous page function call
  • :limit [integer, default 100]: maximum number of structs to be retrieved. Max = 100. ex: 35
  • :ids [list of strings, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • list of PixStatement structs with updated attributes
  • cursor to retrieve the next page of PixStatement structs
@spec query!(
  limit: integer(),
  ids: [binary()],
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:cont, [t()]} | {:error, [StarkInfra.Error.t()]}

Same as query(), but it will unwrap the error tuple and raise in case of errors.

@spec query(
  limit: integer(),
  ids: [binary()],
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:cont, [t()]} | {:error, [StarkInfra.Error.t()]}

Receive a stream of PixStatements structs previously created in the Stark Infra API

options

Options:

  • :limit [integer, default nil]: maximum number of structs to be retrieved. Unlimited if nil. ex: 35
  • :ids [list of strings, default nil]: list of ids to filter retrieved structs. ex: ["5656565656565656", "4545454545454545"]
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkInfra.project(). Only necessary if default project or organization has not been set in configs.

return

Return:

  • stream of PixStatement structs with updated attributes