diff --git a/.phpstan/baseline.neon b/.phpstan/baseline.neon index de83541..1cc82f5 100644 --- a/.phpstan/baseline.neon +++ b/.phpstan/baseline.neon @@ -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 diff --git a/src/Bigcommerce/Api/Client.php b/src/Bigcommerce/Api/Client.php index 7f14a47..aea1982 100644 --- a/src/Bigcommerce/Api/Client.php +++ b/src/Bigcommerce/Api/Client.php @@ -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. * diff --git a/src/Bigcommerce/Api/Resources/OrderConsignment.php b/src/Bigcommerce/Api/Resources/OrderConsignment.php new file mode 100644 index 0000000..34ed364 --- /dev/null +++ b/src/Bigcommerce/Api/Resources/OrderConsignment.php @@ -0,0 +1,10 @@ +