Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/commerce/order_management/order_management_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@

To learn how to manage orders with the REST API, see the [REST API reference](../../api/rest_api/rest_api_reference/rest_api_reference.html#orders).

To get orders and manage them, use the `Ibexa\Contracts\OrderManagement\OrderServiceInterface` interface.
To get orders and manage them, use the [`Ibexa\Contracts\OrderManagement\OrderServiceInterface`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html) interface.

Check failure on line 12 in docs/commerce/order_management/order_management_api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/commerce/order_management/order_management_api.md#L12

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/commerce/order_management/order_management_api.md", "range": {"start": {"line": 12, "column": 137}}}, "severity": "ERROR"}

## Get single order

### Get single order by identifier

To access a single order by using its string identifier, use the `OrderService::getOrderByIdentifier` method:
To access a single order by using its string identifier, use the [`OrderServiceInterface::getOrderByIdentifier`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_getOrderByIdentifier) method:

Check failure on line 18 in docs/commerce/order_management/order_management_api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/commerce/order_management/order_management_api.md#L18

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/commerce/order_management/order_management_api.md", "range": {"start": {"line": 18, "column": 153}}}, "severity": "ERROR"}

``` php
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 61, 65) =]]
```

### Get single order by ID

To access a single order by using its numerical ID, use the `OrderService::getOrder` method:
To access a single order by using its numerical ID, use the [`OrderServiceInterface::getOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_getOrder) method:

Check failure on line 26 in docs/commerce/order_management/order_management_api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/commerce/order_management/order_management_api.md#L26

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/commerce/order_management/order_management_api.md", "range": {"start": {"line": 26, "column": 136}}}, "severity": "ERROR"}

``` php
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 67, 72) =]]
```

## Get multiple orders

To fetch multiple orders, use the `OrderService::findOrders` method.
To fetch multiple orders, use the [`OrderServiceInterface::findOrders`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_findOrders) method.

Check failure on line 34 in docs/commerce/order_management/order_management_api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/commerce/order_management/order_management_api.md#L34

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/commerce/order_management/order_management_api.md", "range": {"start": {"line": 34, "column": 112}}}, "severity": "ERROR"}
It follows the same search query pattern as other APIs:

``` php
Expand All @@ -43,7 +43,7 @@

## Create order

To create an order, use the `OrderService::createOrder` method and provide it with the [`Ibexa\Contracts\OrderManagement\Value\Struct\OrderCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-Value-Struct-OrderCreateStruct.html) object that contains a list of products, purchased quantities, product, total prices, and tax amounts.
To create an order, use the [`OrderServiceInterface::createOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_createOrder) method and provide it with the [`Ibexa\Contracts\OrderManagement\Value\Struct\OrderCreateStruct`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-Value-Struct-OrderCreateStruct.html) object that contains a list of products, purchased quantities, product, total prices, and tax amounts.

``` php
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 101, 113) =]]
Expand All @@ -53,7 +53,7 @@

You can update the order after it's created.
You could do it to support a scenario when, for example, the order is processed manually and its status has to be changed in the system.
To update order information, use the `OrderService::updateOrder` method:
To update order information, use the [`OrderServiceInterface::updateOrder`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-OrderManagement-OrderServiceInterface.html#method_updateOrder) method:

Check failure on line 56 in docs/commerce/order_management/order_management_api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/commerce/order_management/order_management_api.md#L56

[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'
Raw output
{"message": "[Ibexa.VariablesGlobal] Use global variable '[[= product_name_base =]]' instead of 'Ibexa'", "location": {"path": "docs/commerce/order_management/order_management_api.md", "range": {"start": {"line": 56, "column": 116}}}, "severity": "ERROR"}

``` php
[[= include_file('code_samples/api/commerce/src/Command/OrderCommand.php', 114, 119) =]]
Expand Down