FortnoxEx.Models.Offer (FortnoxEx v0.1.0) View Source

Link to this section Summary

Functions

Gets a list of partial offer objects with pagination information.

Streams a partial offer objects. Will go through each page of results with a delay between page. The stream will produce a single offer data object for each hit.

Link to this section Functions

Link to this function

create_offer(client, offer_data)

View Source

Creates a offer

Examples

iex> create_offer(client, %{"Name" => "ACME") {:ok, %{"DocumentNumber" => "1", "Name" => "ACME"}}

iex> create_offer(client, offer_attrs)

Link to this function

delete_offer(client, offer_number)

View Source

Deletes a offer

Examples

iex> delete_offer(client, "1") :ok

iex> delete_offer(client, "missing")

Link to this function

get_offer(client, offer_number)

View Source

Gets a offer

Examples

iex> get_offer(client, "1")

iex> get_offer(clientm "1")

Link to this function

list_offers(client, query)

View Source

Gets a list of partial offer objects with pagination information.

Examples

iex> list_offers(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"DocumentNumber" => "1", "Name" => "ACME"}]}

iex> list_offers(client, [])

Link to this function

stream_offers(client, query)

View Source

Streams a partial offer objects. Will go through each page of results with a delay between page. The stream will produce a single offer data object for each hit.

Examples

iex> stream_offers(client, []) stream_of_offers

iex> stream_offers(client, [])

Link to this function

update_offer(client, offer_number, offer_data)

View Source

Updates a offer

Examples

iex> update_offer(client, "1", %{"Name" => "Johnny"})

iex> update_offer(clientm "1", offer_attrs)