-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlan.php
More file actions
61 lines (57 loc) 路 1.65 KB
/
Copy pathPlan.php
File metadata and controls
61 lines (57 loc) 路 1.65 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 Plan
* ----
* API wrapper for PayStack Plan API
*/
class Plan
{
public $name;
public $amount;
public $interval;
public $integration;
public $domain;
public $plan_code;
public $send_invoices;
public $send_sms;
public $hosted_page;
public $currency;
public $id;
public $createdAt;
public $updatedAt;
public function __construct(array $plan)
{
$this->name = $plan['name'];
$this->amount = $plan['amount'];
$this->interval = $plan['interval'];
$this->integration = $plan['integration'];
$this->domain = $plan['domain'];
$this->plan_code = $plan['plan_code'];
$this->send_invoices = $plan['send_invoices'];
$this->send_sms = $plan['send_sms'];
$this->hosted_page = $plan['hosted_page'];
$this->currency = $plan['currency'];
$this->id = $plan['id'];
$this->createdAt = $plan['createdAt'];
$this->updatedAt = $plan['updatedAt'];
}
public function toArray()
{
return [
'name' => $this->name,
'amount' => $this->amount,
'interval' => $this->interval,
'integration' => $this->integration,
'domain' => $this->domain,
'plan_code' => $this->plan_code,
'send_invoices' => $this->send_invoices,
'send_sms' => $this->send_sms,
'hosted_page' => $this->hosted_page,
'currency' => $this->currency,
'id' => $this->id,
'createdAt' => $this->createdAt,
'updatedAt' => $this->updatedAt,
];
}
}