Tai.Orders.Worker (tai v0.0.75)

Link to this section Summary

Link to this section Types

Link to this type

amend_attrs()

Specs

amend_attrs() :: %{
  optional(:price) => Decimal.t(),
  optional(:qty) => Decimal.t()
}
Link to this type

amend_bulk_reject_reason()

Specs

amend_bulk_reject_reason() :: invalid_status_error_reason()
Link to this type

amend_bulk_result()

Specs

amend_bulk_result() :: [
  ok: updated :: order(),
  error: amend_bulk_reject_reason()
]
Link to this type

amend_result()

Specs

amend_result() ::
  {:ok, updated :: order()}
  | {:error,
     invalid_status_error_reason()
     | Tai.Venues.Adapter.amend_order_error_reason()}
Link to this type

cancel_result()

Specs

Link to this type

create_result()

Specs

create_result() ::
  {:ok, order()} | {:error, Tai.Venues.Adapter.create_order_error_reason()}
Link to this type

invalid_status_error_reason()

Specs

invalid_status_error_reason() ::
  {:invalid_status, was :: status(), transition()}

Specs

order() :: Tai.Orders.Order.t()

Specs

status() :: atom()
Link to this type

submission()

Specs

Link to this type

transition()

Specs

Link to this section Functions

Link to this function

amend(pid, order, attrs)

Specs

amend(pid(), order(), amend_attrs()) :: amend_result()
Link to this function

amend_bulk(pid, amend_set)

Specs

amend_bulk(pid(), [{order(), amend_attrs()}]) :: amend_bulk_result()
Link to this function

cancel(pid, order)

Specs

cancel(pid(), order()) :: cancel_result()
Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create(pid, submission)

Specs

create(pid(), submission()) :: create_result()
Link to this function

send_amend_to_venue(order, attrs)