WuBookExtras::del_opportunity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of Laravel WuBook.
5
 *
6
 * (c) Filippo Galante <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace IlGala\LaravelWubook\Api;
13
14
use IlGala\LaravelWubook\Api\WuBookApi;
15
16
/**
17
 * Description of WuBookExtras
18
 *
19
 * @author Filippo Galante <[email protected]>
20
 */
21
class WuBookExtras extends WuBookApi
22
{
23
24
    /**
25
     * @var string
26
     */
27
    private $token;
28
29
    /**
30
     * Create a new WuBookRooms Instance.
31
     */
32
    public function __construct($config, $cache, $client, $token = null)
33
    {
34
        parent::__construct($config, $cache, $client);
35
36
        $this->token = $token;
37
    }
38
39
    /**
40
     * http://tdocs.wubook.net/wired/extras.html#fetch_opportunities
41
     *
42
     * @param string $dfrom
43
     * @param string $dto
44
     * @param int $ancillary
45
     * @return mixed
46
     */
47
    public function fetch_opportunities($dfrom, $dto, $ancillary = 0)
48
    {
49
        return $this->call_method($this->token, 'fetch_opportunities', [$dfrom, $dto, $ancillary]);
50
    }
51
52
    /**
53
     * http://tdocs.wubook.net/wired/extras.html#new_opportunity
54
     *
55
     * @param array $data
56
     * @return mixed
57
     */
58
    public function new_opportunity($data)
59
    {
60
        return $this->call_method($this->token, 'new_opportunity', $data);
61
    }
62
63
    /**
64
     * http://tdocs.wubook.net/wired/extras.html#mod_opportunity
65
     *
66
     * @param array $data
67
     * @return mixed
68
     */
69
    public function mod_opportunity($data)
70
    {
71
        return $this->call_method($this->token, 'mod_opportunity', $data);
72
    }
73
74
    /**
75
     * http://tdocs.wubook.net/wired/extras.html#del_opportunity
76
     *
77
     * @param int $id
78
     * @return mixed
79
     */
80
    public function del_opportunity($id)
81
    {
82
        return $this->call_method($this->token, 'del_opportunity', [$id]);
83
    }
84
85
    /**
86
     * http://tdocs.wubook.net/wired/extras.html#fetch_soffers
87
     *
88
     * @param string $dfrom
89
     * @param string $dto
90
     * @param int $ancillary
91
     * @return mixed
92
     */
93
    public function fetch_soffers($dfrom, $dto, $ancillary = 0)
94
    {
95
        return $this->call_method($this->token, 'fetch_soffers', [$dfrom, $dto, $ancillary]);
96
    }
97
98
    /**
99
     * http://tdocs.wubook.net/wired/extras.html#new_soffer
100
     *
101
     * @param array $data
102
     * @return mixed
103
     */
104
    public function new_soffer($data)
105
    {
106
        return $this->call_method($this->token, 'new_soffer', $data);
107
    }
108
109
    /**
110
     * http://tdocs.wubook.net/wired/extras.html#mod_soffer
111
     *
112
     * @param array $data
113
     * @return mixed
114
     */
115
    public function mod_soffer($data)
116
    {
117
        return $this->call_method($this->token, 'mod_soffer', $data);
118
    }
119
120
    /**
121
     * http://tdocs.wubook.net/wired/extras.html#del_soffer
122
     *
123
     * @param int $id
124
     * @return mixed
125
     */
126
    public function del_soffer($id)
127
    {
128
        return $this->call_method($this->token, 'del_soffer', [$id]);
129
    }
130
}
131