Skip to content

Commit

Permalink
Merge pull request #222 from kevinmatter/add-get-order-coupons
Browse files Browse the repository at this point in the history
add getOrderCoupons
  • Loading branch information
bookernath authored Aug 22, 2018
2 parents cbb7175 + 4ba916c commit bd9f452
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Bigcommerce/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
11 changes: 11 additions & 0 deletions src/Bigcommerce/Api/Resources/OrderCoupons.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Bigcommerce\Api\Resources;

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

class OrderCoupons extends Resource
{

}

0 comments on commit bd9f452

Please sign in to comment.