Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getOrderConsignments Method #303

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .phpstan/baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -779,3 +779,9 @@ parameters:
message: "#^Method Bigcommerce\\\\Api\\\\Resources\\\\Sku\\:\\:update\\(\\) has no return type specified\\.$#"
count: 1
path: ../src/Bigcommerce/Api/Resources/Sku.php

-
message: '#^Method Bigcommerce\\Api\\Client\:\:getOrderConsignments\(\) has parameter \$orderID with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: ../src/Bigcommerce/Api/Client.php
9 changes: 9 additions & 0 deletions src/Bigcommerce/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,15 @@ public static function getOrderProducts($orderID)
return self::getCollection('/orders/' . $orderID . '/products', 'OrderProduct');
}

/**
* @param $orderID
* @return mixed
*/
public static function getOrderConsignments($orderID)
{
return self::getResource('/orders/' . $orderID . '/consignments', 'OrderConsignment');
}

/**
* The total number of order products in the collection.
*
Expand Down
10 changes: 10 additions & 0 deletions src/Bigcommerce/Api/Resources/OrderConsignment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Bigcommerce\Api\Resources;

use Bigcommerce\Api\Resource;
use Bigcommerce\Api\Client;

class OrderConsignment extends Resource
{
}