nubank_api v1.1.0 NubankAPI.Feature.Events

Module responsable for handle the data from the :events link.

This link is avaible in NuBankAPI.Access links as response from NubankAPI.Auth.get_token/2.

Link to this section Summary

Functions

Fetch events from all categories

List the known events categories

Link to this section Functions

Link to this function

fetch_events(access, opts \\ [])

Fetch events from all categories.

Args:

  • access - %NubankAPI.Access{} which cotains the access token and the endpoints
  • options - Keyword list of options

Options:

  • :category - Filter the events by the category, if nil this filter is not applied, by default it's nil

Examples

iex> NubankAPI.Feature.Events.fetch_events(access)
{:ok, [%NubankAPI.Event{}]}

or

iex> NubankAPI.Feature.Events.fetch_events(access, category: :transaction)
{:ok, [%NubankAPI.Event{category: :transaction}]}
Link to this function

list_known_categories()

List the known events categories

Examples

iex> NubankAPI.Feature.Events.list_known_categories()
[:transaction, :payment, ...]