/** * sets customer id * * @param int|CustomerType $customer * * @return $this */ public function setCustomerId($customer) { $customerId = $customer instanceof CustomerType ? $customer->getId() : $customer; $this->customers_id = $customerId; return $this; }
/** * updates a customer, needs approval on gsales * * @param CustomerType $customer * @param int|null $customerId overriding customer id to be used * * @return CustomerType */ public function updateProposal(CustomerType $customer, $customerId = null) { $customerId = $customerId === null ? $customer->getId() : $customerId; return $this->call('updateCustomerProposal', ['customerid' => $customerId, 'data' => $customer]); }