starkbank v2.6.2 StarkBank.DarfPayment.Log View Source

Groups DarfPayment.Log related functions

Link to this section Summary

Functions

Every time a DarfPayment entity is modified, a corresponding DarfPayment.Log is generated for the entity. This log is never generated by the user, but it can be retrieved to check additional information on the DarfPayment.

Receive a single DarfPayment Log struct previously created by the Stark Bank API by passing its id

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

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

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

Receive a stream of DarfPayment Log structs previously created in the Stark Bank API

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

Link to this section Types

Link to this type

t()

View Source
t() :: %StarkBank.DarfPayment.Log{
  created: term(),
  errors: term(),
  id: term(),
  payment: term(),
  type: term()
}

Link to this section Functions

Link to this function

%StarkBank.DarfPayment.Log{}

View Source (struct)

Every time a DarfPayment entity is modified, a corresponding DarfPayment.Log is generated for the entity. This log is never generated by the user, but it can be retrieved to check additional information on the DarfPayment.

Attributes (return-only):

  • :id [string]: unique id returned when payment is created. ex: "5656565656565656"
  • :payment [DarfPayment]: DarfPayment entity to which the log refers to.
  • :errors [list of strings]: list of errors linked to this DarfPayment event.
  • :type [string]: tax type. ex: "das"
  • :created [DateTime]: creation datetime for the payment. ex: ~U[2020-03-26 19:32:35.418698Z]
Link to this function

get(id, options \\ [])

View Source
get(binary(), [
  {:user, StarkBank.User.Project.t() | StarkBank.User.Organization.t() | nil}
]) :: {:ok, t()} | {:error, [%StarkBank.Error{code: term(), message: term()}]}

Receive a single DarfPayment Log struct previously created by the Stark Bank API by passing its id

Parameters (required):

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

Options:

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

Return:

  • DarfPayment Log struct with updated attributes
Link to this function

get!(id, options \\ [])

View Source
get!(binary(), [
  {:user, StarkBank.User.Project.t() | StarkBank.User.Organization.t() | nil}
]) :: t()

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

Link to this function

page(options \\ [])

View Source
page(
  cursor: binary(),
  limit: integer(),
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  types: [binary()],
  payment_ids: [binary()],
  user: StarkBank.User.Project.t() | StarkBank.User.Organization.t()
) ::
  {:ok, {binary(), [t()]}}
  | {:error, [%StarkBank.Error{code: term(), message: term()}]}

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

Options:

  • :cursor [string, default nil]: cursor returned on the previous page function call
  • :limit [integer, default nil]: maximum number of entities to be retrieved. Unlimited if nil. ex: 35
  • :after [Date or string, default nil]: date filter for entities created only after specified date. ex: ~D[2020-03-25]
  • :before [Date or string, default nil]: date filter for entities created only before specified date. ex: ~D[2020-03-25]
  • :types [list of strings, default null]: filter retrieved structs by event types. ex: 'paid' or 'registered'
  • :payment_ids [list of strings, default null]: list of DarfPayment ids to filter retrieved structs. ex: ['5656565656565656', '4545454545454545']
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkBank.project(). Only necessary if default project or organization has not been set in configs.

Return:

  • list of DarfPayment Log structs with updated attributes and cursor to retrieve the next page of DarfPayment structs
Link to this function

page!(options \\ [])

View Source
page!(
  cursor: binary(),
  cursor: binary(),
  limit: integer(),
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  types: [binary()],
  payment_ids: [binary()],
  user: StarkBank.User.Project.t() | StarkBank.User.Organization.t()
) :: [t()]

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

Link to this function

query(options \\ [])

View Source
query(
  limit: integer(),
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  types: [binary()],
  payment_ids: [binary()],
  user: StarkBank.User.Project.t() | StarkBank.User.Organization.t()
) ::
  ({:cont, {:ok, [t()]}}
   | {:error, [StarkBank.Error.t()]}
   | {:halt, any()}
   | {:suspend, any()},
   any() ->
     any())

Receive a stream of DarfPayment Log structs previously created in the Stark Bank API

Options:

  • :limit [integer, default nil]: maximum number of entities to be retrieved. Unlimited if nil. ex: 35
  • :after [Date or string, default nil]: date filter for entities created only after specified date. ex: ~D[2020-03-25]
  • :before [Date or string, default nil]: date filter for entities created only before specified date. ex: ~D[2020-03-25]
  • :types [list of strings, default null]: filter retrieved structs by event types. ex: 'paid' or 'registered'
  • :payment_ids [list of strings, default null]: list of DarfPayment ids to filter retrieved structs. ex: ['5656565656565656', '4545454545454545']
  • :user [Organization/Project, default nil]: Organization or Project struct returned from StarkBank.project(). Only necessary if default project or organization has not been set in configs.

Return:

  • stream of DarfPayment Log structs with updated attributes
Link to this function

query!(options \\ [])

View Source
query!(
  limit: integer(),
  after: Date.t() | binary(),
  before: Date.t() | binary(),
  types: [binary()],
  payment_ids: [binary()],
  user: StarkBank.User.Project.t() | StarkBank.User.Organization.t()
) :: ({:cont, [t()]} | {:halt, any()} | {:suspend, any()}, any() -> any())

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