Receive a single customer

@link   https://help.shopify.com/api/reference/customer#show
@param  integer $customerId
@param  array   $params
@return Customer
973792
public function get($customerId, array $params = array())
    {
        $endpoint = '/admin/customers/'.$customerId.'.json';;
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Customer::class, $response['customer']);
    }
1234615
public static function create(array $arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        if(!empty($data['metadata'])){
            $data['metadata'] = json_encode($data['metadata']);
        }

        //submit to api
        $customer_data = APIRequests::request(
            '/ecommerce/customers',
            APIRequests::METHOD_POST,
            $data
        );

        //return response
        return self::toObj($customer_data['body']);
    }
1308636
public function all(array $params = array())
    {
        $endpoint = '/admin/customers.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Customer::class, $response['customers']);
    }
560897
public function get($giftCardId, array $params = array())
    {
        $endpoint = '/admin/gift_cards/'.$giftCardId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(GiftCard::class, $response['gift_card']);
    }
216828
public function get($pageId, array $params = array())
    {
        $endpoint = '/admin/pages/'.$pageId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Page::class, $response['page']);
    }
1126564
public function connect($customerUUID, array $subscriptions)
    {
        $arr = [];
        for($i=0; $i < count($subscriptions); $i++) {
            $arr[$i] = $subscriptions[$i];
            if($subscriptions[$i] instanceof Subscription) {
                $arr[$i] = $subscriptions[$i]->toArray();
            }
        }

        array_unshift($arr, $this->toArray());

        $this->getClient()
            ->send('/v1/customers/'.$customerUUID.'/connect_subscriptions', 'POST', [
                'subscriptions' => $arr,
            ]);
        return true;
    }
800078
public function get($customerId, $orgUnitPath, $optParams = array()) {
      $params = array('customerId' => $customerId, 'orgUnitPath' => $orgUnitPath);
      $params = array_merge($params, $optParams);
      $data = $this->__call('get', array($params));
      if ($this->useObjects()) {
        return new Google_OrgUnit($data);
      } else {
        return $data;
      }
    }
207653
public function search(array $params = array())
    {
        $endpoint = '/admin/customers/search.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createCollection(Customer::class, $response['customers']);
    }
1220089
public function update(string $customerId, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/credit_card', $customerId);

        return $this->post($url, $data, $headers);
    }
1056316
private function _getStripeCustomer(int $userId): Customer
    {
        try {
            $user = Craft::$app->getUsers()->getUserById($userId);
            $customers = StripePlugin::getInstance()->getCustomers();
            $customer = $customers->getCustomer($this->id, $user);
            return Customer::retrieve($customer->reference);
        } catch (\Exception $exception) {
            throw new CustomerException('Could not fetch Stripe customer: ' . $exception->getMessage());
        }
    }
196786
public function customers($id)
    {
        $customers = $this->execute(
            self::HTTP_GET,
            self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes'
        );

        return $customers;
    }
320925
public function listSchemas($customerId, $optParams = array())
  {
    $params = array('customerId' => $customerId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Directory_Schemas");
  }
336054
public function getSubscriptionByCustomerExtUid($customerExtUid)
    {
        /** @var SubscriptionFbApi $response */
        $response = $this->call(new Request('subscription.get', array('customer_ext_uid' => $customerExtUid)), 'DVelopment\FastBill\Model\SubscriptionFbApi');
        $subscriptions = $response->getResponse()->getSubscriptions();

        return reset($subscriptions);
    }
98584
public function send(OrderInterface $order, $customerId = null)
    {
        $request = new ApiRequest();
        if (!empty($customerId)) {
            $request->setPath(ApiRequest::PATH_ORDER_TAGGING);
            $replaceParams = array('{m}' => $this->account->getName(), '{cid}' => $customerId);
        } else {
            $request->setPath(ApiRequest::PATH_UNMATCHED_ORDER_TAGGING);
            $replaceParams = array('{m}' => $this->account->getName());
        }
        if (is_string($this->activeDomain)) {
            $request->setActiveDomainHeader($this->activeDomain);
        }
        if (is_string($this->account->getName())) {
            $request->setNostoAccountHeader($this->account->getName());
        }
        $request->setReplaceParams($replaceParams);
        $response = $request->post($order);
        return self::checkResponse($request, $response);
    }
1214189
public function getForId($customerId, $mandateId, array $parameters = [])
    {
        $this->parentId = $customerId;

        return parent::rest_read($mandateId, $parameters);
    }
282960
public function createWebsite(int $customerId, Website $website): ?int
    {
        return $this->restClient->createResource(
            $website,
            sprintf(self::CREATE_CUSTOMER_WEBSITE, $customerId)
        );
    }
144589
public function create(array $card, $customerId = null) {
        $expiryMonth    = str_pad($card['expiryMonth'], 2, '0', STR_PAD_LEFT);
        $expiryYear     = $card['expiryYear'];
        $expiresAt      = $this->getExpirationDate($expiryMonth, $expiryYear);
        $ccType         = $this->ccTypeAdapter->getFromGateway($card['paymentMethod']);

        /** @var PaymentTokenInterface $paymentToken */
        $paymentToken = $this->creditCardTokenFactory->create();
        $paymentToken->setExpiresAt($expiresAt);

        if( array_key_exists('id', $card) ) {
            $paymentToken->setGatewayToken($card['id']);
        }

        $tokenDetails = [
            'type'              => $ccType,
            'maskedCC'          => $card['last4'],
            'expirationDate'    => $expiryMonth . '/' . $expiryYear,
        ];

        $paymentToken->setTokenDetails($this->convertDetailsToJSON($tokenDetails));
        $paymentToken->setIsActive(true);
        $paymentToken->setPaymentMethodCode(ConfigProvider::CODE);

        if($customerId) {
            $paymentToken->setCustomerId($customerId);
        }

        $paymentToken->setPublicHash($this->generatePublicHash($paymentToken));

        return $paymentToken;
    }