omise v0.4.2 Omise.Search

Provides Search API interfaces.

https://www.omise.co/search-api

Summary

Types

t()
t() :: %Omise.Search{data: list, filters: map, location: String.t, object: String.t, page: integer, query: String.t, scope: String.t, total: integer, total_pages: integer}

Functions

execute(scope, params, opts \\ [])
execute(String.t, Keyword.t, Keyword.t) ::
  {:ok, t} |
  {:error, Omise.Error.t}

Retrieve a search data.

Query Parameters:

  • order - (optional, default: chronological) The order of the list returned. I.e.: chronological (from earliest to latest), reverse_chronological (from latest to earliest).
  • scope - A scope you are searching for I.e. charge, dispute, recipient, and customer.
  • query - Searching text within the scope, see more in availble search fields.
  • filters - Searching text with specific key within the scope, see more in list of filter keys.
  • page - (optional, default: 1) Specific number of searching page.

Examples

Omise.Search.execute("charge",
  order: "reverse_chronological",
  query: "Elixir",
  filters: [captured: true, amount: 1000]
)

Omise.Search.execute("customer",
  query: "Elm",
  filters: [created: "2016-03-15"]
)