View Source StarkInfra.PixClaim.Log (starkinfra v0.0.1)

Groups PixClaim.Log related functions

Link to this section Summary

Functions

Every time a PixClaim entity is modified, a corresponding PixClaim.Log is generated for the entity. This log is never generated by the user.

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

Receive a single PixClaim.Log struct previously created by 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 PixClaim.Log structs previously created in the Stark Infra API and the cursor to the next page. Use this function instead of query if you want to manually page your claims.

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

Receive a stream of PixClaim.Log structs previously created in the Stark Infra API

Link to this section Types

@type t() :: %StarkInfra.PixClaim.Log{
  agent: term(),
  claim: term(),
  created: term(),
  errors: term(),
  id: term(),
  reason: term(),
  type: term()
}

Link to this section Functions

Link to this function

%StarkInfra.PixClaim.Log{}

View Source (struct)

Every time a PixClaim entity is modified, a corresponding PixClaim.Log is generated for the entity. This log is never generated by the user.

attributes

Attributes:

- `:id` [string]: unique id returned when the log is created. ex: "5656565656565656"
- `:created` [DateTime]: creation datetime for the log. ex: ~U[2020-3-10 10:30:0:0]
- `:type` [string]: type of the PixClaim event which triggered the log creation. Options: created, failed, delivering, delivered, confirming, confirmed, success, canceling and canceled.
- `:errors` [list of strings]: list of errors linked to this PixClaim event
- `:agent` [string]: agent that modified the PixClaim resulting in the Log. Options: "claimer", "claimed".
- `:reason` [string]: reason why the PixClaim was modified, resulting in the Log. Options: "fraud", "userRequested", "accountClosure", "defaultOperation", "reconciliation".
- `:claim` [PixClaim]: PixClaim entity to which the log refers to.

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

Receive a single PixClaim.Log struct previously created by 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:

- PixClaim.Log struct with updated attributes
@spec page!(
  cursor: binary() | nil,
  ids: [binary()] | nil,
  limit: integer() | nil,
  after: Date.t() | binary() | nil,
  before: Date.t() | binary() | nil,
  types: [binary()] | nil,
  claim_ids: [binary()] | nil,
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {binary(), [t()]}

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

@spec page(
  cursor: binary() | nil,
  ids: [binary()] | nil,
  limit: integer() | nil,
  after: Date.t() | binary() | nil,
  before: Date.t() | binary() | nil,
  types: [binary()] | nil,
  claim_ids: [binary()] | nil,
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:ok, {binary(), [t()]}} | {:error, [StarkInfra.Error.t()]}

Receive a list of up to 100 PixClaim.Log structs previously created in the Stark Infra API and the cursor to the next page. Use this function instead of query if you want to manually page your claims.

options

Options:

- `:cursor` [string, default nil]: cursor returned on the previous page function call
- `:ids` [list of strings, default nil]: Log ids to filter PixClaim Logs. ex: ["5656565656565656"]
- `:limit` [integer, default 100]: maximum number of structs to be retrieved. Max = 100. ex: 35
- `:after` [Date or string, default nil]: date filter for structs created after a specified date. ex: ~D[2020, 3, 10]
- `:before` [Date or string, default nil]: date filter for structs created before a specified date. ex: ~D[2020, 3, 10]
- `:types` [list of strings, default nil]: filter retrieved structs by types. Options: created, failed, delivering, delivered, confirming, confirmed, success, canceling and canceled
- `:claim_ids` [list of strings, default nil]: list of PixClaim 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 PixClaim.Log structs with updated attributes
- cursor to retrieve the next page of PixClaim.Log structs
@spec query!(
  ids: [binary()] | nil,
  limit: integer() | nil,
  after: Date.t() | binary() | nil,
  before: Date.t() | binary() | nil,
  types: [binary()] | nil,
  claim_ids: [binary()] | nil,
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: [t()]

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

@spec query(
  ids: [binary()] | nil,
  limit: integer() | nil,
  after: Date.t() | binary() | nil,
  before: Date.t() | binary() | nil,
  types: [binary()] | nil,
  claim_ids: [binary()] | nil,
  user: StarkInfra.User.Project.t() | StarkInfra.User.Organization.t() | nil
) :: {:ok, [t()]} | {:error, [StarkInfra.Error.t()]}

Receive a stream of PixClaim.Log structs previously created in the Stark Infra API

options

Options:

- `:ids` [list of strings, default nil]: Log ids to filter PixClaim Logs. ex: ["5656565656565656"]
- `:limit` [integer, default 100]: maximum number of structs to be retrieved. Max = 100. ex: 35
- `:after` [Date or string, default nil]: date filter for structs created after specified date. ex: ~D[2020, 3, 10]
- `:before` [Date or string, default nil]: date filter for structs created before a specified date. ex: ~D[2020, 3, 10]
- `:types` [list of strings, default nil]: filter retrieved structs by types. Options: created, failed, delivering, delivered, confirming, confirmed, success, canceling and canceled
- `:claim_ids` [list of strings, default nil]: list of PixClaim 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 PixClaim.Log structs with updated attributes