Mercadopago.Preference (mercadopago_sdk_elixir v0.3.1)

Copy Markdown View Source

Checkout Pro payment preferences.

This is the hosted flow: create a preference, then redirect the buyer to the init_point MercadoPago returns. For the Checkout API — where you own the payment form — see Mercadopago.Order and Mercadopago.Payment.

Summary

Functions

Creates a preference from preference_data.

Fetches a preference by id.

Searches preferences matching filters (query-string parameters).

Streams every result of search/3, fetching each page as it is consumed.

Functions

create(client, preference_data, opts \\ [])

Creates a preference from preference_data.

get(client, preference_id, opts \\ [])

Fetches a preference by id.

search(client, filters \\ nil, opts \\ [])

@spec search(Mercadopago.Client.t(), map() | nil, keyword()) ::
  Mercadopago.HTTP.response()

Searches preferences matching filters (query-string parameters).

search_stream(client, filters \\ nil, opts \\ [])

@spec search_stream(Mercadopago.Client.t(), map() | nil, keyword()) :: Enumerable.t()

Streams every result of search/3, fetching each page as it is consumed.

See Mercadopago.Pagination.stream/3 for the options and for how failures are reported.

update(client, preference_id, preference_data, opts \\ [])

Updates a preference.