Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public get |
apiMethods: * |
|
Method Summary
| Public Methods | ||
| public |
cancel(id: number | string, options: object): RequestPromise Cancel an order |
|
| public |
close(id: number | string): RequestPromise Close an open order |
|
| public |
open(id: number | string): RequestPromise Open a closed order |
|
Inherited Summary
| From class Base | ||
| public get |
Returns an object that supplies the clear, count and merge actions for this resource |
|
| public get |
apiMethods: Array<string>: * An array of methods to be exposed via APIProxy |
|
| public |
clear() Dispatches the clear action for this resource. |
|
| public |
create(resource: object, options: object): RequestPromise Performs a POST request, sending the resource along as the request body |
|
| public |
destroy(id: number | string, options: object): RequestPromise Destroys the resource |
|
| public |
fetch(query: ResourceQuery): RequestPromise Performs a GET request for the specified query. |
|
| public |
fetchCount(query: ResourceQuery): RequestPromise Performs a GET request for the resource's count endpoint |
|
| public |
Updates the given resource |
|
| protected |
urlFor(query: ResourceQuery, params: ResourceQuery): string |
|
Public Constructors
Public Members
Public Methods
public cancel(id: number | string, options: object): RequestPromise source
Cancel an order
Params:
| Name | Type | Attribute | Description |
| id | number | string | The id of the order |
|
| options | object |
|
Options for the cancel operation |
| options.amount | number |
|
The (decimal) amount to refund |
| options.restock | boolean |
|
Whether or not to restock inventory |
| options.reason | string |
|
One of customer, inventory, fraud or other |
| options.email | boolean |
|
Whether or not to send the customer an email regarding the cancellation |
public close(id: number | string): RequestPromise source
Close an open order
public open(id: number | string): RequestPromise source
Open a closed order