-
Notifications
You must be signed in to change notification settings - Fork 23
HasCustomers Trait
Nikola Gavrić edited this page Oct 23, 2019
·
2 revisions
All methods:
- hasCustomer
- passedTransactions
- openedTransactions
- failedTransactions
- charge
- saveCustomer
All relationships:
- customers
- transactions
/**
* Retrieve merchant customers.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function customers() {}
/**
* Retrieve customer if he exists, otherwise return false.
*
* @param string $email
*
* @return mixed
*/
public function hasCustomer(string $email) {}
/**
* All transactions.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactions() {}
/**
* Paid transactions.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function passedTransactions() {}
/**
* Pending transactions.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function openedTransactions() {}
/**
* Failed transactions.
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function failedTransactions() {}
/**
* Charge a customer.
*
* @param float $amount
* @param string $nonce
* @param string $location_id
* @param array $options Can contain ['note', 'reference_id']
* What these 2 represent you can read on this url below
* https://github.com/NikolaGavric94/laravel-square/wiki/Square%20Facade#square-facade
* @param mixed $customer
* @param string $currency
*
* @return \Nikolag\Square\Models\Transaction
* @throws \Nikolag\Core\Exceptions\Exception
*/
public function charge(float $amount, string $nonce, string $location_id, array $options = [], $customer = null, string $currency = 'USD')
/**
* Save a customer.
*
* @param array $customer
*
* @return void
*/
public function saveCustomer(array $customer) {}