コード例 #1
0
ファイル: Base.php プロジェクト: cwd/gsales-api-client
 /**
  * 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;
 }
コード例 #2
0
ファイル: Customer.php プロジェクト: cwd/gsales-api-client
 /**
  * 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]);
 }