diff --git a/src/Bigcommerce/Api/Client.php b/src/Bigcommerce/Api/Client.php index 2c106449..0040c991 100644 --- a/src/Bigcommerce/Api/Client.php +++ b/src/Bigcommerce/Api/Client.php @@ -1177,7 +1177,17 @@ public static function getOrderStatuses() } /** - * Get collection of product skus + * Enabled shipping methods. + * + * @return array + */ + public static function getShippingMethods() + { + return self::getCollection('/shipping/methods', 'ShippingMethod'); + } + + /** + * Get collection of skus for all products * * @param array $filter * @return mixed diff --git a/src/Bigcommerce/Api/Resources/ShippingMethod.php b/src/Bigcommerce/Api/Resources/ShippingMethod.php new file mode 100644 index 00000000..1a03eabd --- /dev/null +++ b/src/Bigcommerce/Api/Resources/ShippingMethod.php @@ -0,0 +1,14 @@ +connection->expects($this->once()) + ->method('get') + ->with($this->basePath . '/shipping/methods') + ->will($this->returnValue(array((object)array()))); + + $collection = Client::getShippingMethods(); + $this->assertInternalType('array', $collection); + $this->assertContainsOnlyInstancesOf('Bigcommerce\\Api\\Resources\\ShippingMethod', $collection); + } + public function testGettingProductImagesReturnsCollectionOfProductImages() { $this->connection->expects($this->once())