FortnoxEx.Models.Article (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a article
Deletes a article
Gets a article
Gets a list of partial article objects with pagination information.
Streams a partial article objects. Will go through each page of results with a delay between page. The stream will produce a single article data object for each hit.
Updates a article
Link to this section Functions
Creates a article
Examples
iex> create_article(client, %{"Name" => "ACME") {:ok, %{"ArticleNumber" => "1", "Name" => "ACME"}}
iex> create_article(client, article_attrs)
Deletes a article
Examples
iex> delete_article(client, "1") :ok
iex> delete_article(client, "missing")
Gets a article
Examples
iex> get_article(client, "1")
iex> get_article(clientm "1")
Gets a list of partial article objects with pagination information.
Examples
iex> list_articles(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"ArticleNumber" => "1", "Name" => "ACME"}]}
iex> list_articles(client, [])
Streams a partial article objects. Will go through each page of results with a delay between page. The stream will produce a single article data object for each hit.
Examples
iex> stream_articles(client, []) stream_of_articles
iex> stream_articles(client, [])
Updates a article
Examples
iex> update_article(client, "1", %{"Name" => "Johnny"})
iex> update_article(clientm "1", article_attrs)