stark_bank v1.1.2 StarkBank.Charge.Log View Source

Used to consult charge events;

Functions:

  • get
  • get_by_id

Link to this section Summary

Functions

Gets the charge logs according to the provided parameters

Gets the charge log specified by the provided ID;

Link to this section Functions

Link to this function

get(credentials, charge_ids, options \\ [])

View Source

Gets the charge logs according to the provided parameters

Parameters:

  • credentials [PID]: agent PID returned by StarkBank.Auth.login;
  • charge_ids [list of strings or list of StarkBank.Charge.Structs.ChargeData]: charge IDs or charge structs, e.g.: ["5618308887871488"];
  • options [keyword list]: refines request

    • events [list of string]: filter by log events, namely: "register", "registered", "overdue", "updated", "canceled", "failed", "paid" or "bank";
    • limit [int]: maximum results retrieved;

Returns {:ok, charge_logs}:

  • charge_logs [list of StarkBank.Charge.Structs.ChargeLogData]: retrieved charge logs;

Example:

iex> StarkBank.Charge.Log.get(credentials, ["6307371336859648", charge])

Link to this function

get_by_id(credentials, charge_log_id)

View Source

Gets the charge log specified by the provided ID;

Parameters:

  • credentials [PID]: agent PID returned by StarkBank.Auth.login;
  • charge_log_id [string or StarkBank.Charge.Structs.ChargeLogData]: charge log ID or struct, e.g.: "6743665380687872";

Returns {:ok, charge_log}:

  • charge_log [StarkBank.Charge.Structs.ChargeLogData]: retrieved charge log;

Example:

iex> StarkBank.Charge.Log.get_by_id(credentials, "6307371336859648")