Skip to content

Commit

Permalink
Added variant create from array (#8)
Browse files Browse the repository at this point in the history
* Added variant create from array

* Feedback
  • Loading branch information
James300 authored and rickywiens committed Sep 7, 2017
1 parent 7d5c693 commit fb7099e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Services/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public function create(ShopifyProduct $product, ShopifyVariant $variant)
return $this->unserializeModel($raw['variant'], ShopifyVariant::class);
}

/**
* @param $array
*
* @return object
*/
public function createFromArray($array)
{
return $this->unserializeModel($array, ShopifyVariant::class);
}

/**
* @param $id
*
Expand Down

0 comments on commit fb7099e

Please sign in to comment.