1
|
|
|
<?php namespace Arcanedev\Stripe\Resources; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Stripe\Contracts\Resources\CountrySpec as CountrySpecContract; |
4
|
|
|
use Arcanedev\Stripe\StripeResource; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class CountrySpec |
8
|
|
|
* |
9
|
|
|
* @package Arcanedev\Stripe\Resources |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
* @link https://stripe.com/docs/api/php#country_spec_object |
12
|
|
|
* |
13
|
|
|
* @property string id |
14
|
|
|
* @property string object // 'country_spec' |
15
|
|
|
* @property \Arcanedev\Stripe\StripeObject supported_bank_account_currencies |
16
|
|
|
* @property array supported_payment_currencies |
17
|
|
|
* @property array supported_payment_methods |
18
|
|
|
* @property \Arcanedev\Stripe\StripeObject verification_fields |
19
|
|
|
*/ |
20
|
|
|
class CountrySpec extends StripeResource implements CountrySpecContract |
21
|
|
|
{ |
22
|
|
|
/* ------------------------------------------------------------------------------------------------ |
23
|
|
|
| Getters & Setters |
24
|
|
|
| ------------------------------------------------------------------------------------------------ |
25
|
|
|
*/ |
26
|
|
|
/** |
27
|
|
|
* This is a special case because the country specs endpoint has an underscore in it. |
28
|
|
|
* The parent `className` function strips underscores. |
29
|
|
|
* |
30
|
|
|
* @param string $class |
31
|
|
|
* |
32
|
|
|
* @return string |
33
|
|
|
*/ |
34
|
|
|
public static function className($class = '') |
35
|
|
|
{ |
36
|
|
|
return 'country_spec'; |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/* ------------------------------------------------------------------------------------------------ |
40
|
|
|
| Main Functions |
41
|
|
|
| ------------------------------------------------------------------------------------------------ |
42
|
|
|
*/ |
43
|
|
|
/** |
44
|
|
|
* Get the Country Spec for a given Country code. |
45
|
|
|
* @link https://stripe.com/docs/api/php#retrieve_country_spec |
46
|
|
|
* |
47
|
|
|
* @param string $country |
48
|
|
|
* @param array|string|null $options |
49
|
|
|
* |
50
|
|
|
* @return self |
51
|
|
|
*/ |
52
|
2 |
|
public static function retrieve($country, $options = null) |
53
|
|
|
{ |
54
|
2 |
|
return self::scopedRetrieve($country, $options); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Lists all Country Specs. |
59
|
|
|
* @link https://stripe.com/docs/api/php#list_country_specs |
60
|
|
|
* |
61
|
|
|
* @param array|null $params |
62
|
|
|
* @param array|string|null $options |
63
|
|
|
* |
64
|
|
|
* @return \Arcanedev\Stripe\Collection|array |
65
|
|
|
*/ |
66
|
2 |
|
public static function all($params = [], $options = null) |
67
|
|
|
{ |
68
|
2 |
|
return self::scopedAll($params, $options); |
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|