Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.97 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.97 KB

Orders

(orders)

Overview

The orders endpoints.

Available Operations

create_order

Create an order for a drink.

Example Usage

import speakeasybar
from speakeasybar.models import shared

s = speakeasybar.Speakeasybar(
    security=shared.Security(
        api_key="<YOUR_API_KEY>",
    ),
)


res = s.orders.create_order(request_body=[
    shared.OrderInput(
        product_code='APM-1F2D3',
        quantity=26535,
        type=shared.OrderType.DRINK,
    ),
], callback_url='<value>')

if res.order is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request_body List[shared.OrderInput] ✔️ N/A
callback_url Optional[str] The url to call when the order is updated.

Response

operations.CreateOrderResponse

Errors

Error Object Status Code Content Type
errors.APIError 5XX application/json
errors.SDKError 4xx-5xx /