The docs can be found at https://hexdocs.pm/oneflow.
The package can be installed
by adding oneflow
to your list of dependencies in mix.exs
:
def deps do
[{:oneflow, "~> 0.1.2"}]
end
config :oneflow,
token: "TOKEN",
secret: "SECRET",
log: true,
endpoint: "https://API-URL/api",
{:ok, order} = Onefelow.get("/order/ORDER-ID")
{:ok, result} = Onefelow.search("query", "shipments", ["status:shipped])
To be sure that the required fields are set before placing an order, Surround any structs creation that you implement with a try catch like this:
try do
%Oneflow.Destination{ name: "awesomePrinter" }
....
rescue
e in ArgumentError -> IO.inspect e
e in KeyError -> IO.inspect e
end
- /shipping-method
- /sku