Adapter/PlentymarketsAdapter/RequestGenerator/Order/OrderRequestGenerator.php
private function handleCustomer(Order $order)
    {
        $customer = $order->getCustomer();

        $plentyCustomer = false;

        if ($customer->getType() === Customer::TYPE_NORMAL) {
            $plentyCustomer = $this->findCustomer($customer->getEmail());
        }

        $customerParams = $this->customerRequestGenerator->generate($customer, $order);

        if (!$plentyCustomer) {
            $plentyCustomer = $this->client->request('POST', 'accounts/contacts', $customerParams);
        } else {
            $this->client->request('PUT', 'accounts/contacts/' . $plentyCustomer['id'], $customerParams);
        }

        return $plentyCustomer;
    }
private function handleCustomer(Order $order)
    {
        $customer = $order->getCustomer();

        $plentyCustomer = false;

        if ($customer->getType() === Customer::TYPE_NORMAL) {
            $plentyCustomer = $this->findCustomer($customer->getEmail());
        }

        $customerParams = $this->customerRequestGenerator->generate($customer, $order);

        if (!$plentyCustomer) {
            $plentyCustomer = $this->client->request('POST', 'accounts/contacts', $customerParams);
        } else {
            $this->client->request('PUT', 'accounts/contacts/' . $plentyCustomer['id'], $customerParams);
        }

        return $plentyCustomer;
    }
@param Order $order

@return array|bool|mixed