for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the slince/shopify-api-php
*
* (c) Slince <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Slince\Shopify\Manager\Refund;
use Slince\Shopify\Common\Manager\NestCrudable;
class RefundManager extends NestCrudable implements RefundManagerInterface
{
/**
* {@inheritdoc}
public static function getServiceName()
return 'refunds';
}
public function getModelClass()
return Refund::class;
public function getResourceName()
return 'refund';
public function getParentResourceName()
return 'order';
public function count($orderId, array $query = [])
throw new \Exception('The action is not supported');
public function update($orderId, $id, array $data)
public function remove($orderId, $id)
public function calculate($orderId, array $data)
$resource = "/orders/{$orderId}/refunds/calculate";
$json = $this->client->post($resource, ['refund' => $data])['refund'];
return $this->fromArray($json);