mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-20 17:16:10 +00:00
@@ -10,35 +10,6 @@ class Transactions extends BaseCollection
|
|||||||
{
|
{
|
||||||
use HasBillable;
|
use HasBillable;
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new transaction for the current user.
|
|
||||||
*
|
|
||||||
* @param array{
|
|
||||||
* group: null|string,
|
|
||||||
* invoice_id: null|string,
|
|
||||||
* payment_provider: null|string,
|
|
||||||
* payment_intent: null|string,
|
|
||||||
* status: string,
|
|
||||||
* type: string,
|
|
||||||
* amount: float,
|
|
||||||
* created_at: string
|
|
||||||
* } $attributes The attributes for the transaction.
|
|
||||||
* - group: The group (optional)
|
|
||||||
* - invoice_id: The invoice id (optional)
|
|
||||||
* - payment_provider: The payment provider (optional, e.g. "kofi", "stripe")
|
|
||||||
* - payment_intent: The payment intent (optional)
|
|
||||||
* - status: The status (e.g. "expired", "failed", "pending", "refunded", "succeeded")
|
|
||||||
* - type: The type (e.g. "deposit", "withdrawal")
|
|
||||||
* - amount: The amount
|
|
||||||
* - created_at: The created at datetime string (e.g. "Y-M-D H:i:s")
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
|
||||||
public function create(array $attributes = []): Transaction
|
|
||||||
{
|
|
||||||
return (new Transaction($this->billable->request('POST', 'v1/transactions', $attributes)))
|
|
||||||
->setBillable($this->billable);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user