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\Customer;
use Slince\Shopify\Common\Manager\GeneralCurdable;
class CustomerManager extends GeneralCurdable implements CustomerManagerInterface
{
/**
* {@inheritdoc}
public static function getServiceName()
return 'customers';
}
public function getResourceName()
return 'customer';
public function getModelClass()
return Customer::class;
public function createAccountActivationUrl($id)
$data = $this->client->post('customers/'.$id.'/account_activation_url', []);
return $data['account_activation_url'];
public function sendInvite($id, array $data)
$data = $this->client->post('customers/'.$id.'/send_invite', [
'customer_invite' => $data,
]);
return $this->fromArray($data, CustomerInvite::class);
public function search(array $query = [])
$data = $this->client->get('customers/search', $query);
return $this->createMany(reset($data));
public function orders($id)
$data = $this->client->get('customers/'.$id.'/orders');