Skip to content
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: 4 additions & 2 deletions src/Bigcommerce/Api/Resources/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ class Shipment extends Resource
'order_id',
'date_created',
'customer_id',
'shipping_method',
'billing_address',
'shipping_address'
);

protected $ignoreOnUpdate = array(
'id',
'order_id',
'date_created',
'customer_id',
'shipping_method',
'items',
'billing_address',
'shipping_address'
);

public function create()
Expand Down
11 changes: 0 additions & 11 deletions src/Bigcommerce/Api/Resources/Sku.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ class Sku extends Resource
'product_id',
);

public function options()
{
$options = Client::getCollection($this->fields->options->resource, 'SkuOption');

foreach ($options as $option) {
$option->product_id = $this->product_id;
}

return $options;
}

public function create()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd look at keeping this method for backwards compaitability (assuming it returns the same objects), with the implementation @ransomcarroll suggested here: #146 (comment)

{
return Client::createResource('/products/' . $this->product_id . '/skus', $this->getCreateFields());
Expand Down
31 changes: 0 additions & 31 deletions src/Bigcommerce/Api/Resources/SkuOption.php

This file was deleted.

28 changes: 0 additions & 28 deletions test/Unit/Api/Resources/SkuOptionTest.php

This file was deleted.

20 changes: 0 additions & 20 deletions test/Unit/Api/Resources/SkuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,4 @@ public function testUpdatePassesThroughToConnection()

$sku->update();
}

public function testOptionsPassesThroughToConnection()
{
$sku = new Sku((object)array(
'product_id' => 1,
'options' => (object)array(
'resource' => '/products/1/skus/1/options'
)
));
$this->connection->expects($this->once())
->method('get')
->with($this->basePath . '/products/1/skus/1/options')
->will($this->returnValue(array(array(), array())));

$collection = $sku->options;
$this->assertInternalType('array', $collection);
foreach ($collection as $condition) {
$this->assertInstanceOf('Bigcommerce\\Api\\Resources\\SkuOption', $condition);
}
}
}