mirror of
https://github.com/opdavies/glassboxx-sdk-php.git
synced 2025-02-17 22:50:48 +00:00
Allow for easily sending multiple order items
This allows for the sending of multiple items in a single order, by adding a new `OrderItem` class and moving all of the order item specific fields from the `Order` to an individual item. These can then be assigned to an order using the `withOrderItems()` method as an array of order items. Fixes #19
This commit is contained in:
parent
0ed99797f5
commit
ae766763b2
9 changed files with 86 additions and 53 deletions
|
|
@ -19,16 +19,12 @@ class OrderTest extends TestCase
|
|||
|
||||
$order = new Order(
|
||||
$customer,
|
||||
'this-is-the-sku',
|
||||
'123',
|
||||
'GBP',
|
||||
10.00
|
||||
'GBP'
|
||||
);
|
||||
|
||||
$this->assertSame('GBP', $order->getCurrencyCode());
|
||||
$this->assertSame($customer, $order->getCustomer());
|
||||
$this->assertSame('123', $order->getOrderNumber());
|
||||
$this->assertSame(10.0, $order->getPrice());
|
||||
$this->assertSame('this-is-the-sku', $order->getSku());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue