diff --git a/src/Bigcommerce/Api/Client.php b/src/Bigcommerce/Api/Client.php index 27248419..383188d2 100644 --- a/src/Bigcommerce/Api/Client.php +++ b/src/Bigcommerce/Api/Client.php @@ -1424,6 +1424,19 @@ public static function deleteAllShipmentsForOrder($orderID) return self::deleteResource('/orders/' . $orderID . '/shipments'); } + /** + * Get order coupons for a given order + * + * @param $orderID + * @param array $filter + * @return mixed + */ + public static function getOrderCoupons($orderID, $filter = array()) + { + $filter = Filter::create($filter); + return self::getCollection('/orders/' . $orderID . '/coupons' . $filter->toQuery(), 'OrderCoupons'); + } + /** * Get a single order shipping address by given order and order shipping address id. * diff --git a/src/Bigcommerce/Api/Resources/OrderCoupons.php b/src/Bigcommerce/Api/Resources/OrderCoupons.php new file mode 100644 index 00000000..09ee386b --- /dev/null +++ b/src/Bigcommerce/Api/Resources/OrderCoupons.php @@ -0,0 +1,11 @@ +