Passed
Push — master ( 07bc23...954a10 )
by Dominic
02:25
created
src/Builders/PaymentBuilder.php 1 patch
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -4,118 +4,118 @@
 block discarded – undo
4 4
 
5 5
 class PaymentBuilder extends Builder
6 6
 {
7
-    /**
8
-     * The ID of the account to pay from
9
-     * 
10
-     * @var string
11
-     */
12
-    public $account_id;
7
+	/**
8
+	 * The ID of the account to pay from
9
+	 * 
10
+	 * @var string
11
+	 */
12
+	public $account_id;
13 13
 
14
-    /**
15
-     * The receiving party
16
-     *
17
-     * @var array
18
-     */
19
-    public $receiver;
14
+	/**
15
+	 * The receiving party
16
+	 *
17
+	 * @var array
18
+	 */
19
+	public $receiver;
20 20
 
21
-    /**
22
-     * The payment amount
23
-     *
24
-     * @var float
25
-     */
26
-    public $amount;
21
+	/**
22
+	 * The payment amount
23
+	 *
24
+	 * @var float
25
+	 */
26
+	public $amount;
27 27
 
28
-    /**
29
-     * The payment currency
30
-     *
31
-     * @var string
32
-     */
33
-    public $currency;
28
+	/**
29
+	 * The payment currency
30
+	 *
31
+	 * @var string
32
+	 */
33
+	public $currency;
34 34
 
35
-    /**
36
-     * An optional payment reference
37
-     *
38
-     * @var string
39
-     */
40
-    public $reference;
35
+	/**
36
+	 * An optional payment reference
37
+	 *
38
+	 * @var string
39
+	 */
40
+	public $reference;
41 41
 
42
-    /**
43
-     * An optional date to schedule the payment
44
-     *
45
-     * @var string
46
-     */
47
-    public $schedule_for;
42
+	/**
43
+	 * An optional date to schedule the payment
44
+	 *
45
+	 * @var string
46
+	 */
47
+	public $schedule_for;
48 48
 
49
-    /**
50
-     * Set the outgoing account ID
51
-     *
52
-     * @param string $accountId the ID of the account to pay from
53
-     * @return self
54
-     */
55
-    public function account(string $accountId)
56
-    {
57
-        return $this->setAttribute('account_id', $accountId);
58
-    }
49
+	/**
50
+	 * Set the outgoing account ID
51
+	 *
52
+	 * @param string $accountId the ID of the account to pay from
53
+	 * @return self
54
+	 */
55
+	public function account(string $accountId)
56
+	{
57
+		return $this->setAttribute('account_id', $accountId);
58
+	}
59 59
 
60
-    /**
61
-     * Set the receiver of the payment
62
-     *
63
-     * @param string $counterpartyId the ID of the receiving counterparty
64
-     * @param string $accountId	the ID of the receiving counterparty's account, only for payments to business counterparties
65
-     * @return self
66
-     */
67
-    public function receiver(string $counterpartyId, string $accountId = null)
68
-    {
69
-        $receiver = ['counterparty_id' => $counterpartyId];
60
+	/**
61
+	 * Set the receiver of the payment
62
+	 *
63
+	 * @param string $counterpartyId the ID of the receiving counterparty
64
+	 * @param string $accountId	the ID of the receiving counterparty's account, only for payments to business counterparties
65
+	 * @return self
66
+	 */
67
+	public function receiver(string $counterpartyId, string $accountId = null)
68
+	{
69
+		$receiver = ['counterparty_id' => $counterpartyId];
70 70
 
71
-        if ($accountId) {
72
-            $receiver['account_id'] = $accountId;
73
-        }
71
+		if ($accountId) {
72
+			$receiver['account_id'] = $accountId;
73
+		}
74 74
 
75
-        return $this->setAttribute('receiver', $receiver);
76
-    }
75
+		return $this->setAttribute('receiver', $receiver);
76
+	}
77 77
 
78
-    /**
79
-     * Set the transaction amount
80
-     *
81
-     * @param float $amount
82
-     * @return self
83
-     */
84
-    public function amount(float $amount)
85
-    {
86
-        return $this->setAttribute('amount', $amount);
87
-    }
78
+	/**
79
+	 * Set the transaction amount
80
+	 *
81
+	 * @param float $amount
82
+	 * @return self
83
+	 */
84
+	public function amount(float $amount)
85
+	{
86
+		return $this->setAttribute('amount', $amount);
87
+	}
88 88
 
89
-    /**
90
-     * Set the transaction currency
91
-     *
92
-     * @param float $amount
93
-     * @return self
94
-     */
95
-    public function currency(string $currency)
96
-    {
97
-        return $this->setAttribute('currency', $currency);
98
-    }
89
+	/**
90
+	 * Set the transaction currency
91
+	 *
92
+	 * @param float $amount
93
+	 * @return self
94
+	 */
95
+	public function currency(string $currency)
96
+	{
97
+		return $this->setAttribute('currency', $currency);
98
+	}
99 99
 
100
-    /**
101
-     * Set an optional textual reference shown on the transaction
102
-     *
103
-     * @param string $reference
104
-     * @return self
105
-     */
106
-    public function reference(string $reference)
107
-    {
108
-        return $this->setAttribute('reference', $reference);
109
-    }
100
+	/**
101
+	 * Set an optional textual reference shown on the transaction
102
+	 *
103
+	 * @param string $reference
104
+	 * @return self
105
+	 */
106
+	public function reference(string $reference)
107
+	{
108
+		return $this->setAttribute('reference', $reference);
109
+	}
110 110
 
111
-    /**
112
-     * Set an optional date to schedule the payment
113
-     *
114
-     * @param string $date
115
-     * @return self
116
-     */
117
-    public function schedule(string $date)
118
-    {
119
-        return $this->setAttribute('schedule_for', $date);
120
-    }
111
+	/**
112
+	 * Set an optional date to schedule the payment
113
+	 *
114
+	 * @param string $date
115
+	 * @return self
116
+	 */
117
+	public function schedule(string $date)
118
+	{
119
+		return $this->setAttribute('schedule_for', $date);
120
+	}
121 121
 }
Please login to merge, or discard this patch.
src/Builders/CounterpartyBuilder.php 1 patch
Indentation   +370 added lines, -370 removed lines patch added patch discarded remove patch
@@ -4,375 +4,375 @@
 block discarded – undo
4 4
 
5 5
 class CounterpartyBuilder extends Builder
6 6
 {
7
-    /**
8
-     * The profile type of a Revolut counterparty
9
-     *
10
-     * @var string
11
-     */
12
-    public $profile_type;
13
-
14
-    /**
15
-     * The name of a Revolut counterparty
16
-     *
17
-     * @var string
18
-     */
19
-    public $name;
7
+	/**
8
+	 * The profile type of a Revolut counterparty
9
+	 *
10
+	 * @var string
11
+	 */
12
+	public $profile_type;
13
+
14
+	/**
15
+	 * The name of a Revolut counterparty
16
+	 *
17
+	 * @var string
18
+	 */
19
+	public $name;
20 20
     
21
-    /**
22
-     * The phone number of a counterparty
23
-     *
24
-     * @var string
25
-     */
26
-    public $phone;
27
-
28
-    /**
29
-     * The email address of a counterparty
30
-     *
31
-     * @var string
32
-     */
33
-    public $email;
34
-
35
-    /**
36
-     * The first and last name of an external counterparty
37
-     *
38
-     * @var array
39
-     */
40
-    public $individual_name;
41
-
42
-    /**
43
-     * The company name of an external counterparty
44
-     *
45
-     * @var string
46
-     */
47
-    public $company_name;
48
-
49
-    /**
50
-     * The bank country of an external counterparty
51
-     *
52
-     * @var string
53
-     */
54
-    public $bank_country;
55
-
56
-    /**
57
-     * The currency of an external counterparty's account
58
-     *
59
-     * @var string
60
-     */
61
-    public $currency;
62
-
63
-    /**
64
-     * The address of an external counterparty
65
-     *
66
-     * @var array
67
-     */
68
-    public $address;
69
-
70
-    /**
71
-     * The account number of an external counterparty
72
-     *
73
-     * @var string
74
-     */
75
-    public $account_number;
76
-
77
-    /**
78
-     * The routing number of an external counterparty
79
-     *
80
-     * @var string
81
-     */
82
-    public $routing_number;
83
-
84
-    /**
85
-     * The sort code of an external counterparty
86
-     *
87
-     * @var string
88
-     */
89
-    public $sort_code;
90
-
91
-    /**
92
-     * The International Bank Account Number (IBAN) of an external counterparty
93
-     *
94
-     * @var string
95
-     */
96
-    public $iban;
97
-
98
-    /**
99
-     * The Business Identifier Code (BIC) of an external counterparty
100
-     *
101
-     * @var string
102
-     */
103
-    public $bic;
104
-
105
-    /**
106
-     * The 'Clave Bancaria Estandarizada' (CLABE) for an external counterparty
107
-     *
108
-     * @var string
109
-     */
110
-    public $clabe;
111
-
112
-    /**
113
-     * Create a 'personal' Revolut counterparty
114
-     *
115
-     * @param string $name The full name of the party
116
-     * @param string $phone The phone number of the party in international format, starting with '+'
117
-     * @return self
118
-     */
119
-    public function personal(string $name, string $phone)
120
-    {
121
-        return $this->profileType('personal')
122
-                    ->name($name)
123
-                    ->phone($phone);
124
-    }
125
-
126
-    /**
127
-     * Create a 'business' Revolut counterparty
128
-     *
129
-     * @param string $email The email address of the party
130
-     * @return self
131
-     */
132
-    public function business(string $email)
133
-    {
134
-        return $this->profileType('business')->email($email);
135
-    }
136
-
137
-
138
-    /**
139
-     * Set the profile type of a Revolut counterparty
140
-     *
141
-     * @param string $type
142
-     * @return self
143
-     */
144
-    public function profileType(string $type)
145
-    {
146
-        return $this->setAttribute('profile_type', $type);
147
-    }
148
-
149
-    /**
150
-     * Set the name of a 'personal' Revolut counterparty
151
-     *
152
-     * @param string $name
153
-     * @return self
154
-     */
155
-    public function name(string $name)
156
-    {
157
-        return $this->setAttribute('name', $name);
158
-    }
159
-
160
-    /**
161
-     * Set the phone number of a 'personal' Revolut counterparty
162
-     *
163
-     * @param string $phone
164
-     * @return self
165
-     */
166
-    public function phone(string $phone)
167
-    {
168
-        return $this->setAttribute('phone', $phone);
169
-    }
170
-
171
-    /**
172
-     * Set the email address of a 'business' Revolut counterparty
173
-     *
174
-     * @param string $email
175
-     * @return self
176
-     */
177
-    public function email(string $email)
178
-    {
179
-        return $this->setAttribute('email', $email);
180
-    }
181
-
182
-    /**
183
-     * Set the first and last name of an external Revolut counterparty
184
-     *
185
-     * @param string $first The first name
186
-     * @param string $last The last name
187
-     * @return self
188
-     */
189
-    public function individualName(string $first, string $last)
190
-    {
191
-        return $this->setAttribute('individual_name', [
192
-            'first_name' => $first,
193
-            'last_name' => $last,
194
-        ]);
195
-    }
196
-
197
-    /**
198
-     * Set the name of the company of an external Revolut counterparty
199
-     *
200
-     * @param string $name The company name
201
-     * @return self
202
-     */
203
-    public function companyName(string $name)
204
-    {
205
-        return $this->setAttribute('company_name', $name);
206
-    }
207
-
208
-    /**
209
-     * Set the bank country of an external Revolut counterparty
210
-     *
211
-     * @param string $country The country in 2-letter ISO format
212
-     * @return self
213
-     */
214
-    public function bankCountry(string $country)
215
-    {
216
-        return $this->setAttribute('bank_country', $country);
217
-    }
218
-
219
-    /**
220
-     * Set the currency for an external Revolut counterparty's account
221
-     *
222
-     * @param string $currency The currency in 3-leltter ISO format
223
-     * @return self
224
-     */
225
-    public function currency(string $currency)
226
-    {
227
-        return $this->setAttribute('currency', $currency);
228
-    }
229
-
230
-    /**
231
-     * Set the first line of the address for an external Revolut counterparty
232
-     *
233
-     * @param string $streetLine1
234
-     * @return self
235
-     */
236
-    public function streetLine1(string $streetLine1)
237
-    {
238
-        return $this->address(['street_line_1' => $streetLine1]);
239
-    }
240
-
241
-    /**
242
-     * Set the second line of the address for an external Revolut counterparty
243
-     *
244
-     * @param string $streetLine1
245
-     * @return self
246
-     */
247
-    public function streetLine2(string $streetLine2)
248
-    {
249
-        return $this->address(['street_line_2' => $streetLine2]);
250
-    }
251
-
252
-    /**
253
-     * Set the region of an external Revolut counterparty
254
-     *
255
-     * @param string $region
256
-     * @return self
257
-     */
258
-    public function region(string $region)
259
-    {
260
-        return $this->address(['region' => $region]);
261
-    }
262
-
263
-    /**
264
-     * Set the city of an external Revolut counterparty
265
-     *
266
-     * @param string $city
267
-     * @return self
268
-     */
269
-    public function city(string $city)
270
-    {
271
-        return $this->address(['city' => $city]);
272
-    }
273
-
274
-    /**
275
-     * Set the country of an external Revolut counterparty
276
-     *
277
-     * @param string $country The country in 2-letter ISO format
278
-     * @return self
279
-     */
280
-    public function country(string $country)
281
-    {
282
-        return $this->address(['country' => $country]);
283
-    }
284
-
285
-    /**
286
-     * Set the postcode of an external Revolut counterparty
287
-     *
288
-     * @param string $postcode
289
-     * @return self
290
-     */
291
-    public function postcode(string $postcode)
292
-    {
293
-        return $this->address(['postcode' => $postcode]);
294
-    }
295
-
296
-    /**
297
-     * Set the address of an external Revolut counterparty
298
-     *
299
-     * @param array $data
300
-     * @return self
301
-     */
302
-    public function address(array $data)
303
-    {
304
-        return $this->setAttribute('address', array_merge($this->address ?? [], $data));
305
-    }
306
-
307
-    /**
308
-     * Set the account number of an external Revolut counterparty
309
-     * Required for GBP, USD accounts
310
-     *
311
-     * @param string $accountNumber
312
-     * @return self
313
-     */
314
-    public function accountNumber(string $accountNumber)
315
-    {
316
-        return $this->setAttribute('account_no', $accountNumber);
317
-    }
318
-
319
-    /**
320
-     * Set the routing number of an external Revolut counterparty
321
-     * Required for USD accounts
322
-     *
323
-     * @param string $routingNumber
324
-     * @return self
325
-     */
326
-    public function routingNumber(string $routingNumber)
327
-    {
328
-        return $this->setAttribute('routing_number', $routingNumber);
329
-    }
330
-
331
-    /**
332
-     * Set the sort code of an external Revolut counterparty
333
-     * Required for USD accounts
334
-     *
335
-     * @param string $sortCode
336
-     * @return self
337
-     */
338
-    public function sortCode(string $sortCode)
339
-    {
340
-        return $this->setAttribute('sort_code', $sortCode);
341
-    }
342
-
343
-    /**
344
-     * Set the IBAN number of an external Revolut counterparty
345
-     * Required for IBAN countries
346
-     *
347
-     * @param string $iban
348
-     * @return self
349
-     */
350
-    public function iban(string $iban)
351
-    {
352
-        return $this->setAttribute('iban', $iban);
353
-    }
354
-
355
-    /**
356
-     * Set the BIC/SWIFT code of an external Revolut counterparty
357
-     * Required for SWIFT & SWIFT MX
358
-     *
359
-     * @param string $bic
360
-     * @return self
361
-     */
362
-    public function bic(string $bic)
363
-    {
364
-        return $this->setAttribute('bic', $bic);
365
-    }
366
-
367
-    /**
368
-     * Set the CLABE number of an external Revolut counterparty
369
-     * Required for SWIFT MX
370
-     *
371
-     * @param string $clabe
372
-     * @return self
373
-     */
374
-    public function clabe(string $clabe)
375
-    {
376
-        return $this->setAttribute('clabe', $clabe);
377
-    }
21
+	/**
22
+	 * The phone number of a counterparty
23
+	 *
24
+	 * @var string
25
+	 */
26
+	public $phone;
27
+
28
+	/**
29
+	 * The email address of a counterparty
30
+	 *
31
+	 * @var string
32
+	 */
33
+	public $email;
34
+
35
+	/**
36
+	 * The first and last name of an external counterparty
37
+	 *
38
+	 * @var array
39
+	 */
40
+	public $individual_name;
41
+
42
+	/**
43
+	 * The company name of an external counterparty
44
+	 *
45
+	 * @var string
46
+	 */
47
+	public $company_name;
48
+
49
+	/**
50
+	 * The bank country of an external counterparty
51
+	 *
52
+	 * @var string
53
+	 */
54
+	public $bank_country;
55
+
56
+	/**
57
+	 * The currency of an external counterparty's account
58
+	 *
59
+	 * @var string
60
+	 */
61
+	public $currency;
62
+
63
+	/**
64
+	 * The address of an external counterparty
65
+	 *
66
+	 * @var array
67
+	 */
68
+	public $address;
69
+
70
+	/**
71
+	 * The account number of an external counterparty
72
+	 *
73
+	 * @var string
74
+	 */
75
+	public $account_number;
76
+
77
+	/**
78
+	 * The routing number of an external counterparty
79
+	 *
80
+	 * @var string
81
+	 */
82
+	public $routing_number;
83
+
84
+	/**
85
+	 * The sort code of an external counterparty
86
+	 *
87
+	 * @var string
88
+	 */
89
+	public $sort_code;
90
+
91
+	/**
92
+	 * The International Bank Account Number (IBAN) of an external counterparty
93
+	 *
94
+	 * @var string
95
+	 */
96
+	public $iban;
97
+
98
+	/**
99
+	 * The Business Identifier Code (BIC) of an external counterparty
100
+	 *
101
+	 * @var string
102
+	 */
103
+	public $bic;
104
+
105
+	/**
106
+	 * The 'Clave Bancaria Estandarizada' (CLABE) for an external counterparty
107
+	 *
108
+	 * @var string
109
+	 */
110
+	public $clabe;
111
+
112
+	/**
113
+	 * Create a 'personal' Revolut counterparty
114
+	 *
115
+	 * @param string $name The full name of the party
116
+	 * @param string $phone The phone number of the party in international format, starting with '+'
117
+	 * @return self
118
+	 */
119
+	public function personal(string $name, string $phone)
120
+	{
121
+		return $this->profileType('personal')
122
+					->name($name)
123
+					->phone($phone);
124
+	}
125
+
126
+	/**
127
+	 * Create a 'business' Revolut counterparty
128
+	 *
129
+	 * @param string $email The email address of the party
130
+	 * @return self
131
+	 */
132
+	public function business(string $email)
133
+	{
134
+		return $this->profileType('business')->email($email);
135
+	}
136
+
137
+
138
+	/**
139
+	 * Set the profile type of a Revolut counterparty
140
+	 *
141
+	 * @param string $type
142
+	 * @return self
143
+	 */
144
+	public function profileType(string $type)
145
+	{
146
+		return $this->setAttribute('profile_type', $type);
147
+	}
148
+
149
+	/**
150
+	 * Set the name of a 'personal' Revolut counterparty
151
+	 *
152
+	 * @param string $name
153
+	 * @return self
154
+	 */
155
+	public function name(string $name)
156
+	{
157
+		return $this->setAttribute('name', $name);
158
+	}
159
+
160
+	/**
161
+	 * Set the phone number of a 'personal' Revolut counterparty
162
+	 *
163
+	 * @param string $phone
164
+	 * @return self
165
+	 */
166
+	public function phone(string $phone)
167
+	{
168
+		return $this->setAttribute('phone', $phone);
169
+	}
170
+
171
+	/**
172
+	 * Set the email address of a 'business' Revolut counterparty
173
+	 *
174
+	 * @param string $email
175
+	 * @return self
176
+	 */
177
+	public function email(string $email)
178
+	{
179
+		return $this->setAttribute('email', $email);
180
+	}
181
+
182
+	/**
183
+	 * Set the first and last name of an external Revolut counterparty
184
+	 *
185
+	 * @param string $first The first name
186
+	 * @param string $last The last name
187
+	 * @return self
188
+	 */
189
+	public function individualName(string $first, string $last)
190
+	{
191
+		return $this->setAttribute('individual_name', [
192
+			'first_name' => $first,
193
+			'last_name' => $last,
194
+		]);
195
+	}
196
+
197
+	/**
198
+	 * Set the name of the company of an external Revolut counterparty
199
+	 *
200
+	 * @param string $name The company name
201
+	 * @return self
202
+	 */
203
+	public function companyName(string $name)
204
+	{
205
+		return $this->setAttribute('company_name', $name);
206
+	}
207
+
208
+	/**
209
+	 * Set the bank country of an external Revolut counterparty
210
+	 *
211
+	 * @param string $country The country in 2-letter ISO format
212
+	 * @return self
213
+	 */
214
+	public function bankCountry(string $country)
215
+	{
216
+		return $this->setAttribute('bank_country', $country);
217
+	}
218
+
219
+	/**
220
+	 * Set the currency for an external Revolut counterparty's account
221
+	 *
222
+	 * @param string $currency The currency in 3-leltter ISO format
223
+	 * @return self
224
+	 */
225
+	public function currency(string $currency)
226
+	{
227
+		return $this->setAttribute('currency', $currency);
228
+	}
229
+
230
+	/**
231
+	 * Set the first line of the address for an external Revolut counterparty
232
+	 *
233
+	 * @param string $streetLine1
234
+	 * @return self
235
+	 */
236
+	public function streetLine1(string $streetLine1)
237
+	{
238
+		return $this->address(['street_line_1' => $streetLine1]);
239
+	}
240
+
241
+	/**
242
+	 * Set the second line of the address for an external Revolut counterparty
243
+	 *
244
+	 * @param string $streetLine1
245
+	 * @return self
246
+	 */
247
+	public function streetLine2(string $streetLine2)
248
+	{
249
+		return $this->address(['street_line_2' => $streetLine2]);
250
+	}
251
+
252
+	/**
253
+	 * Set the region of an external Revolut counterparty
254
+	 *
255
+	 * @param string $region
256
+	 * @return self
257
+	 */
258
+	public function region(string $region)
259
+	{
260
+		return $this->address(['region' => $region]);
261
+	}
262
+
263
+	/**
264
+	 * Set the city of an external Revolut counterparty
265
+	 *
266
+	 * @param string $city
267
+	 * @return self
268
+	 */
269
+	public function city(string $city)
270
+	{
271
+		return $this->address(['city' => $city]);
272
+	}
273
+
274
+	/**
275
+	 * Set the country of an external Revolut counterparty
276
+	 *
277
+	 * @param string $country The country in 2-letter ISO format
278
+	 * @return self
279
+	 */
280
+	public function country(string $country)
281
+	{
282
+		return $this->address(['country' => $country]);
283
+	}
284
+
285
+	/**
286
+	 * Set the postcode of an external Revolut counterparty
287
+	 *
288
+	 * @param string $postcode
289
+	 * @return self
290
+	 */
291
+	public function postcode(string $postcode)
292
+	{
293
+		return $this->address(['postcode' => $postcode]);
294
+	}
295
+
296
+	/**
297
+	 * Set the address of an external Revolut counterparty
298
+	 *
299
+	 * @param array $data
300
+	 * @return self
301
+	 */
302
+	public function address(array $data)
303
+	{
304
+		return $this->setAttribute('address', array_merge($this->address ?? [], $data));
305
+	}
306
+
307
+	/**
308
+	 * Set the account number of an external Revolut counterparty
309
+	 * Required for GBP, USD accounts
310
+	 *
311
+	 * @param string $accountNumber
312
+	 * @return self
313
+	 */
314
+	public function accountNumber(string $accountNumber)
315
+	{
316
+		return $this->setAttribute('account_no', $accountNumber);
317
+	}
318
+
319
+	/**
320
+	 * Set the routing number of an external Revolut counterparty
321
+	 * Required for USD accounts
322
+	 *
323
+	 * @param string $routingNumber
324
+	 * @return self
325
+	 */
326
+	public function routingNumber(string $routingNumber)
327
+	{
328
+		return $this->setAttribute('routing_number', $routingNumber);
329
+	}
330
+
331
+	/**
332
+	 * Set the sort code of an external Revolut counterparty
333
+	 * Required for USD accounts
334
+	 *
335
+	 * @param string $sortCode
336
+	 * @return self
337
+	 */
338
+	public function sortCode(string $sortCode)
339
+	{
340
+		return $this->setAttribute('sort_code', $sortCode);
341
+	}
342
+
343
+	/**
344
+	 * Set the IBAN number of an external Revolut counterparty
345
+	 * Required for IBAN countries
346
+	 *
347
+	 * @param string $iban
348
+	 * @return self
349
+	 */
350
+	public function iban(string $iban)
351
+	{
352
+		return $this->setAttribute('iban', $iban);
353
+	}
354
+
355
+	/**
356
+	 * Set the BIC/SWIFT code of an external Revolut counterparty
357
+	 * Required for SWIFT & SWIFT MX
358
+	 *
359
+	 * @param string $bic
360
+	 * @return self
361
+	 */
362
+	public function bic(string $bic)
363
+	{
364
+		return $this->setAttribute('bic', $bic);
365
+	}
366
+
367
+	/**
368
+	 * Set the CLABE number of an external Revolut counterparty
369
+	 * Required for SWIFT MX
370
+	 *
371
+	 * @param string $clabe
372
+	 * @return self
373
+	 */
374
+	public function clabe(string $clabe)
375
+	{
376
+		return $this->setAttribute('clabe', $clabe);
377
+	}
378 378
 }
Please login to merge, or discard this patch.
src/routes/web.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['namespace' => 'tbclla\Revolut\Controllers', 'middleware' => ['web']], function() {
17 17
 
18
-    $route = parse_url(config('revolut.redirect_uri'))['path'];
18
+	$route = parse_url(config('revolut.redirect_uri'))['path'];
19 19
 
20
-    Route::get($route . '/create', 'AuthorizationController@create')
21
-        ->middleware(config('revolut.auth_route.middleware'))
22
-        ->name(config('revolut.auth_route.name'));
20
+	Route::get($route . '/create', 'AuthorizationController@create')
21
+		->middleware(config('revolut.auth_route.middleware'))
22
+		->name(config('revolut.auth_route.name'));
23 23
 
24
-    Route::get($route, 'AuthorizationController@store');
24
+	Route::get($route, 'AuthorizationController@store');
25 25
 });
Please login to merge, or discard this patch.
src/Traits/Encryptable.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,28 +4,28 @@
 block discarded – undo
4 4
 
5 5
 trait Encryptable
6 6
 {
7
-    /**
8
-     * Set the value attribute
9
-     *
10
-     * @param string $value
11
-     * @return void
12
-     */
13
-    public function setValueAttribute(string $value)
14
-    {
15
-        $encrypt = config('revolut.tokens.encrypt', true);
7
+	/**
8
+	 * Set the value attribute
9
+	 *
10
+	 * @param string $value
11
+	 * @return void
12
+	 */
13
+	public function setValueAttribute(string $value)
14
+	{
15
+		$encrypt = config('revolut.tokens.encrypt', true);
16 16
         
17
-        $this->attributes['value'] = $encrypt ? encrypt($value) : $value;
18
-        $this->attributes['is_encrypted'] = $encrypt;
19
-    }
17
+		$this->attributes['value'] = $encrypt ? encrypt($value) : $value;
18
+		$this->attributes['is_encrypted'] = $encrypt;
19
+	}
20 20
 
21
-    /**
22
-     * Get the value attribute.
23
-     * 
24
-     * @param string|null $value
25
-     * @return string
26
-     */
27
-    public function getValueAttribute($value)
28
-    {
29
-        return (string) $this->is_encrypted ? decrypt($value) : $value;
30
-    }
21
+	/**
22
+	 * Get the value attribute.
23
+	 * 
24
+	 * @param string|null $value
25
+	 * @return string
26
+	 */
27
+	public function getValueAttribute($value)
28
+	{
29
+		return (string) $this->is_encrypted ? decrypt($value) : $value;
30
+	}
31 31
 }
Please login to merge, or discard this patch.
src/Interfaces/PersistableToken.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
 
5 5
 interface PersistableToken
6 6
 {
7
-    /**
8
-     * Get the type of the token
9
-     *
10
-     * @return string
11
-     */
12
-    public static function getType();
7
+	/**
8
+	 * Get the type of the token
9
+	 *
10
+	 * @return string
11
+	 */
12
+	public static function getType();
13 13
 
14
-    /**
15
-     * Get the expiration date
16
-     *
17
-     * @return \Carbon\Carbon|null
18
-     */
19
-    public static function getExpiration();
14
+	/**
15
+	 * Get the expiration date
16
+	 *
17
+	 * @return \Carbon\Carbon|null
18
+	 */
19
+	public static function getExpiration();
20 20
 }
Please login to merge, or discard this patch.
src/Interfaces/MakesHttpRequests.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@
 block discarded – undo
4 4
 
5 5
 interface MakesHttpRequests
6 6
 {
7
-    /**
8
-     * Make a 'POST' request
9
-     * 
10
-     * @param string $url The request url
11
-     * @param array $options The request options
12
-     * @return array The response body
13
-     * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
14
-     */
15
-    public function post(string $url, array $options = []);
7
+	/**
8
+	 * Make a 'POST' request
9
+	 * 
10
+	 * @param string $url The request url
11
+	 * @param array $options The request options
12
+	 * @return array The response body
13
+	 * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
14
+	 */
15
+	public function post(string $url, array $options = []);
16 16
 
17
-    /**
18
-     * Make a 'GET' request
19
-     * 
20
-     * @param string $url The request url
21
-     * @param array $options The request options
22
-     * @return array|null The response body
23
-     * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
24
-     */
25
-    public function get(string $url, array $options = []);
17
+	/**
18
+	 * Make a 'GET' request
19
+	 * 
20
+	 * @param string $url The request url
21
+	 * @param array $options The request options
22
+	 * @return array|null The response body
23
+	 * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
24
+	 */
25
+	public function get(string $url, array $options = []);
26 26
 
27
-    /**
28
-     * Make a 'DELETE' request
29
-     * 
30
-     * @param string $url The request url
31
-     * @param array $options The request options
32
-     * @return void
33
-     * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
34
-     */
35
-    public function delete(string $url, array $options = []);
27
+	/**
28
+	 * Make a 'DELETE' request
29
+	 * 
30
+	 * @param string $url The request url
31
+	 * @param array $options The request options
32
+	 * @return void
33
+	 * @throws \tbclla\Revolut\Exceptions\ApiException API returned a 4xx or 5xx response code
34
+	 */
35
+	public function delete(string $url, array $options = []);
36 36
 }
Please login to merge, or discard this patch.
src/Interfaces/Buildable.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -4,20 +4,20 @@
 block discarded – undo
4 4
 
5 5
 interface Buildable
6 6
 {
7
-    /**
8
-     * Create a resource
9
-     *
10
-     * @param array $json The request body
11
-     * @return array The response body
12
-     * @throws \tbclla\Revolut\Exceptions\ApiException if the client responded with a 4xx-5xx response
13
-     * @throws \tbclla\Revolut\Exceptions\AppUnauthorizedException if the app needs to be re-authorized
14
-     */
15
-    public function create(array $json);
7
+	/**
8
+	 * Create a resource
9
+	 *
10
+	 * @param array $json The request body
11
+	 * @return array The response body
12
+	 * @throws \tbclla\Revolut\Exceptions\ApiException if the client responded with a 4xx-5xx response
13
+	 * @throws \tbclla\Revolut\Exceptions\AppUnauthorizedException if the app needs to be re-authorized
14
+	 */
15
+	public function create(array $json);
16 16
 
17
-    /**
18
-     * Get a buildable instance
19
-     *
20
-     * @return \tbclla\Revolut\Builders\Builder
21
-     */
22
-    public function build();
17
+	/**
18
+	 * Get a buildable instance
19
+	 *
20
+	 * @return \tbclla\Revolut\Builders\Builder
21
+	 */
22
+	public function build();
23 23
 }
Please login to merge, or discard this patch.
src/Interfaces/GrantsAccessTokens.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -4,24 +4,24 @@
 block discarded – undo
4 4
 
5 5
 interface GrantsAccessTokens
6 6
 {
7
-    /**
8
-     * Get the token value
9
-     *
10
-     * @return string
11
-     */
12
-    public function getValue();
7
+	/**
8
+	 * Get the token value
9
+	 *
10
+	 * @return string
11
+	 */
12
+	public function getValue();
13 13
 
14
-    /**
15
-     * Get the token type
16
-     *
17
-     * @return string
18
-     */
19
-    public static function getType();
14
+	/**
15
+	 * Get the token type
16
+	 *
17
+	 * @return string
18
+	 */
19
+	public static function getType();
20 20
 
21
-    /**
22
-     * Get the grant type of the token
23
-     * 
24
-     * @return string
25
-     */
26
-    public static function getGrantType();
21
+	/**
22
+	 * Get the grant type of the token
23
+	 * 
24
+	 * @return string
25
+	 */
26
+	public static function getGrantType();
27 27
 }
Please login to merge, or discard this patch.
src/Interfaces/TokenRepository.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -4,33 +4,33 @@
 block discarded – undo
4 4
 
5 5
 interface TokenRepository
6 6
 {
7
-    /**
8
-     * Get the latest active access token
9
-     *
10
-     * @return \tbclla\Revolut\Auth\AccessToken|null
11
-     */
12
-    public function getAccessToken();
7
+	/**
8
+	 * Get the latest active access token
9
+	 *
10
+	 * @return \tbclla\Revolut\Auth\AccessToken|null
11
+	 */
12
+	public function getAccessToken();
13 13
 
14
-    /**
15
-     * Get the latest refresh token
16
-     *
17
-     * @return \tbclla\Revolut\Auth\RefreshToken|null
18
-     */
19
-    public function getRefreshToken();
14
+	/**
15
+	 * Get the latest refresh token
16
+	 *
17
+	 * @return \tbclla\Revolut\Auth\RefreshToken|null
18
+	 */
19
+	public function getRefreshToken();
20 20
 
21
-    /**
22
-     * Create a new access token
23
-     *
24
-     * @param string $value
25
-     * @return \tbclla\Revolut\Auth\AccessToken
26
-     */
27
-    public function createAccessToken(string $value);
21
+	/**
22
+	 * Create a new access token
23
+	 *
24
+	 * @param string $value
25
+	 * @return \tbclla\Revolut\Auth\AccessToken
26
+	 */
27
+	public function createAccessToken(string $value);
28 28
 
29
-    /**
30
-     * Create a new refresh token
31
-     *
32
-     * @param string $value
33
-     * @return \tbclla\Revolut\Auth\RefreshToken
34
-     */
35
-    public function createRefreshToken(string $value);
29
+	/**
30
+	 * Create a new refresh token
31
+	 *
32
+	 * @param string $value
33
+	 * @return \tbclla\Revolut\Auth\RefreshToken
34
+	 */
35
+	public function createRefreshToken(string $value);
36 36
 }
Please login to merge, or discard this patch.