FortnoxEx.Models.Offer (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a offer
Deletes a offer
Gets a offer
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.
Updates a offer
Link to this section Functions
Creates a offer
Examples
iex> create_offer(client, %{"Name" => "ACME") {:ok, %{"DocumentNumber" => "1", "Name" => "ACME"}}
iex> create_offer(client, offer_attrs)
Deletes a offer
Examples
iex> delete_offer(client, "1") :ok
iex> delete_offer(client, "missing")
Gets a offer
Examples
iex> get_offer(client, "1")
iex> get_offer(clientm "1")
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, [])
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, [])
Updates a offer
Examples
iex> update_offer(client, "1", %{"Name" => "Johnny"})
iex> update_offer(clientm "1", offer_attrs)