Interface for Order's Default Adapter's API

Description

This interface is used to define the API for Order's Default Adapter. Implement this interface to create a custom API for communicating with Order functionality.

interface OrderDefaultAdapterAPI {
    createOrder(args, requestContext?): Promise<ExpandedOrder>;
    getOrder(args, requestContext?): Promise<ExpandedOrder>;
    getOrdersForUser(args, requestContext?): Promise<PaginatedQueryResult<Order>>;
    updateOrder(args, requestContext?): Promise<UpdateOrderResponse>;
}

Implemented by

Order

  • API for creating a single order

    Parameters

    • args: {
          options?: {
              expand?: string;
          };
          order: Partial<CreateOrderRequest>;
          orgId: string;
      }

      Input containing parameters for creating order.

      • Optional options?: {
            expand?: string;
        }

        Options to modify the returned order response.

        • Optional expand?: string
      • order: Partial<CreateOrderRequest>

        Order data to be created.

      • orgId: string

        Organization ID of the organization to which the order belongs.

    • Optional requestContext: RequestContext

    Returns Promise<ExpandedOrder>

    Order data that was created.

    Description

    This API is used to create a single order in the Order service.

  • API for getting an order

    Parameters

    • args: {
          expand?: string;
          orderId: string;
          orgId: string;
      }

      Input containing parameters for fetching an order.

      • Optional expand?: string

        Options to expand fields in the returned order response.

      • orderId: string

        Order ID of the order to be fetched.

      • orgId: string

        Organization ID of the order to be fetched.

    • Optional requestContext: RequestContext

    Returns Promise<ExpandedOrder>

    The order.

    Description

    This API is used to get an order from the Order service.

  • API for getting orders for a user

    Parameters

    • args: {
          options?: {
              queryOptions?: PaginatedListQueryOptions;
          };
          userId: string;
      }

      Input containing parameters for fetching orders.

      • Optional options?: {
            queryOptions?: PaginatedListQueryOptions;
        }

        Options to modify the returned order response.

        • Optional queryOptions?: PaginatedListQueryOptions
      • userId: string

        User ID of the user whose orders are to be fetched.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<Order>>

    Paginated list of orders for the user.

    Description

    This API is used to get orders for a user from the Order service.

  • API for updating a single order

    Parameters

    • args: {
          order: Partial<UpdateOrderRequest>;
          orderId: string;
          orgId: string;
      }

      Input containing parameters for updating order.

      • order: Partial<UpdateOrderRequest>

        Order data to be updated.

      • orderId: string

        ID of the order to be updated.

      • orgId: string

        Organization ID of the organization to which the order belongs.

    • Optional requestContext: RequestContext

    Returns Promise<UpdateOrderResponse>

    Order data that was updated.

    Description

    This API is used to update a single order in the Order service.

Generated using TypeDoc