Completed
Push — master ( 787c0a...5bceb7 )
by Jean C.
01:53
created

Moip::accounts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Artesaos\Moip;
4
5
use Moip\Moip as Api;
6
7
/**
8
 * Class Moip.
9
 *
10
 * @package Artesaos\Moip
11
 */
12
class Moip
13
{
14
    /**
15
     * Class Moip sdk.
16
     *
17
     * @var \Moip\Moip
18
     **/
19
    private $moip;
20
21
    /**
22
     * Moip constructor.
23
     *
24
     * @param \Moip\Moip $api
25
     */
26
    function __construct(Api $api)
0 ignored issues
show
Best Practice introduced by Jean C. Garcia
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
    {
28
        $this->moip = $api;
29
30
        return $this;
0 ignored issues
show
Bug introduced by Jean C. Garcia
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
31
    }
32
33
    /**
34
     * Return a intance of package.
35
     *
36
     * @return \Moip\Moip
37
     */
38
    public function getApi()
39
    {
40
        return $this->moip;
41
    }
42
43
    /**
44
     * Start Moip sdk.
45
     *
46
     * @deprecated
47
     */
48
    public function start()
49
    {
50
        return $this;
51
    }
52
53
    /**
54
     * Create a new Accounts instance.
55
     *
56
     * @return \Moip\Resource\Account
57
     */
58
    public function accounts()
59
    {
60
        return $this->moip->accounts();
61
    }
62
63
    /**
64
     * Create a new Customer instance.
65
     *
66
     * @return \Moip\Resource\Customer
67
     */
68
    public function customers()
69
    {
70
        return $this->moip->customers();
71
    }
72
73
    /**
74
     * Create a new Entry instance.
75
     *
76
     * @return \Moip\Resource\Entry
77
     */
78
    public function entries()
79
    {
80
        return $this->moip->entries();
81
    }
82
83
    /**
84
     * Create a new Order instance.
85
     *
86
     * @return \Moip\Resource\Orders
87
     */
88
    public function orders()
89
    {
90
        return $this->moip->orders();
91
    }
92
93
    /**
94
     * Create a new Payment instance.
95
     *
96
     * @return \Moip\Resource\Payment
97
     */
98
    public function payments()
99
    {
100
        return $this->moip->payments();
101
    }
102
103
    /**
104
     * Create a new Multiorders instance.
105
     *
106
     * @return \Moip\Resource\Multiorders
107
     */
108
    public function multiorders()
109
    {
110
        return $this->moip->multiorders();
111
    }
112
113
    /**
114
     * Create a new Notifications instance.
115
     *
116
     * @return \Moip\Resource\NotificationPreferences
117
     */
118
    public function notifications()
119
    {
120
        return $this->moip->notifications();
121
    }
122
123
    /**
124
     * Create a new Tranfers instance.
125
     *
126
     * @return \Moip\Resource\Transfers
127
     */
128
    public function transfers()
129
    {
130
        return $this->moip->transfers();
131
    }
132
}
133