orderItemsGetByIdWithHttpInfo method
Get an order item
Gets an order item: what was bought, its delivery, its refund and what you can do next. Requires the read order permission. Returns the item exactly as it appears in items[] of the order response, including orderId, the order it belongs to. fulfillment.status and refund.status give its state; actions.cancellation says whether it can be cancelled now, actions.amendment whether it can be amended and actions.update whether it can be updated. An item of another partner, or an unknown id, returns 404 with code 10004; a malformed id or an unknown query parameter returns 400 with code 10001.
Note: This method returns the HTTP Response.
Parameters:
- String id (required):
Order item id (
items[].idfrom the order response).
Implementation
Future<Response> orderItemsGetByIdWithHttpInfo(String id, { Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/b2b/order-items/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
abortTrigger: abortTrigger,
);
}