-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubscription.php
More file actions
61 lines (57 loc) 路 1.71 KB
/
Copy pathSubscription.php
File metadata and controls
61 lines (57 loc) 路 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
namespace Leaf\Billing\Paystack;
/**
* PayStack Subscription
* ----
* API wrapper for PayStack Subscription API
*/
class Subscription
{
public $customer;
public $plan;
public $integration;
public $domain;
public $start;
public $status;
public $quantity;
public $amount;
public $subscription_code;
public $email_token;
public $id;
public $createdAt;
public $updatedAt;
public function __construct(array $customer)
{
$this->customer = $customer['customer'];
$this->plan = $customer['plan'];
$this->integration = $customer['integration'];
$this->domain = $customer['domain'];
$this->start = $customer['start'];
$this->status = $customer['status'];
$this->quantity = $customer['quantity'];
$this->amount = $customer['amount'];
$this->subscription_code = $customer['subscription_code'];
$this->email_token = $customer['email_token'];
$this->id = $customer['id'];
$this->createdAt = $customer['createdAt'];
$this->updatedAt = $customer['updatedAt'];
}
public function toArray()
{
return [
'customer' => $this->customer,
'plan' => $this->plan,
'integration' => $this->integration,
'domain' => $this->domain,
'start' => $this->start,
'status' => $this->status,
'quantity' => $this->quantity,
'amount' => $this->amount,
'subscription_code' => $this->subscription_code,
'email_token' => $this->email_token,
'id' => $this->id,
'createdAt' => $this->createdAt,
'updatedAt' => $this->updatedAt,
];
}
}