Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 /**
  * 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]);
 }