snowio / orderhive-data-model
There is no license information available for the latest version (v0.3.11) of this package.
v0.3.11
2022-10-12 13:36 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^7.5
- dev-master
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.7
- v0.1.6
- v0.1.5
- dev-fix/add-remark-comment
- dev-feature/add-psr2-check
- dev-fix/relax-sales-order-id
- dev-feature/shipments/item-create-function
- dev-feature/allow-order-partial-update
- dev-feature/update-po-model
- dev-feature/add-to-custom-field-set
- dev-feature/bundle-product
This package is auto-updated.
Last update: 2024-10-12 17:48:34 UTC
README
Data model for the Order Hive API
Currently supports:
- Order
Example
<?php use SnowIO\OrderHiveDataModel\Command\CreateOrderCommand; use SnowIO\OrderHiveDataModel\Order\OrderStatus; use SnowIO\OrderHiveDataModel\Order\Order; use SnowIO\OrderHiveDataModel\Order\ItemSet; use SnowIO\OrderHiveDataModel\Order\Item; $createOrderCommand = CreateOrderCommand::of( Order::of(0001) ->withOrderStatus(OrderStatus::CONFIRM) ->withStoreId('1') ->withCurrency("USD") ->withTaxType("EXCLUSIVE") ->withOrderItems(ItemSet::of([ Item::of(111, 1)->withPrice(1.99)->withSku('a'), Item::of(222, 1)->withPrice(2.99)->withSku('b'), ])) );