Skip to content

Commit fe707e0

Browse files
committed
Added constant classes to improve clarity, avoid typos and be informed of possible values
1 parent 2ccbd4f commit fe707e0

24 files changed

+357
-8
lines changed

MangoPay/Address.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Address extends Libraries\Dto
4040
/**
4141
* Country.
4242
* @var string
43+
* @see \MangoPay\CountryIso
4344
*/
4445
public $Country;
4546

MangoPay/BankAccountDetailsOTHER.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class BankAccountDetailsOTHER extends Libraries\Dto implements BankAccountDetail
1717
* The Country associate to the BankAccount,
1818
* ISO 3166-1 alpha-2 format is expected
1919
* @var string
20+
* @see \MangoPay\CountryIso
2021
*/
2122
public $Country;
2223

MangoPay/BankingAliasIBAN.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class BankingAliasIBAN extends BankingAlias
2828
/**
2929
* The country
3030
* @var string
31+
* @see \MangoPay\CountryIso
3132
*/
3233
public $Country;
3334
}

MangoPay/BankingAliasOTHER.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class BankingAliasOTHER extends BankingAlias
2121

2222
/**
2323
* Country
24+
* @see \MangoPay\CountryIso
2425
*/
2526
public $Country;
2627
}

MangoPay/Card.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Card extends Libraries\EntityBase
3434
/**
3535
* Card type
3636
* @var string
37+
* @see \MangoPay\CardType
3738
*/
3839
public $CardType;
3940

@@ -52,6 +53,7 @@ class Card extends Libraries\EntityBase
5253
/**
5354
* Country
5455
* @var string
56+
* @see \MangoPay\CountryIso
5557
*/
5658
public $Country;
5759

MangoPay/CardPreAuthorization.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,14 @@ class CardPreAuthorization extends Libraries\EntityBase
163163
/**
164164
* Requested3DSVersion
165165
* @var string
166+
* @see \MangoPay\Supported3DSVersion
166167
*/
167168
public $Requested3DSVersion;
168169

169170
/**
170171
* Applied3DSVersion
171172
* @var string
173+
* @see \MangoPay\Supported3DSVersion
172174
*/
173175
public $Applied3DSVersion;
174176

MangoPay/CardRegistration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class CardRegistration extends Libraries\EntityBase
1616
/**
1717
* CardType
1818
* @var string
19+
* @see \MangoPay\CardType
1920
*/
2021
public $CardType;
2122

MangoPay/CardType.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace MangoPay;
4+
5+
class CardType
6+
{
7+
const CbVisaMastercard = 'CB_VISA_MASTERCARD';
8+
const Amex = 'AMEX';
9+
const Diners = 'DINERS';
10+
const Masterpass = 'MASTERPASS';
11+
const Maestro = 'MAESTRO';
12+
const P24 = 'P24';
13+
const Ideal = 'IDEAL';
14+
const Bcmc = 'BCMC';
15+
const Paylib = 'PAYLIB';
16+
}

MangoPay/CountryAuthorization.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class CountryAuthorization extends Libraries\EntityBase
1010
/**
1111
* The code of the country in the ISO 3166-1 alpha-2 format.
1212
* @var string
13+
* @see \MangoPay\CountryIso
1314
*/
1415
public $CountryCode;
1516

MangoPay/CountryIso.php

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
<?php
2+
3+
namespace MangoPay;
4+
5+
/**
6+
* Countries, in valid ISO 3166-1 alpha-2 format
7+
*/
8+
class CountryIso
9+
{
10+
const AD = 'AD';
11+
const AE = 'AE';
12+
const AF = 'AF';
13+
const AG = 'AG';
14+
const AI = 'AI';
15+
const AL = 'AL';
16+
const AM = 'AM';
17+
const AO = 'AO';
18+
const AQ = 'AQ';
19+
const AR = 'AR';
20+
const AS = 'AS';
21+
const AT = 'AT';
22+
const AU = 'AU';
23+
const AW = 'AW';
24+
const AX = 'AX';
25+
const AZ = 'AZ';
26+
const BA = 'BA';
27+
const BB = 'BB';
28+
const BD = 'BD';
29+
const BE = 'BE';
30+
const BF = 'BF';
31+
const BG = 'BG';
32+
const BH = 'BH';
33+
const BI = 'BI';
34+
const BJ = 'BJ';
35+
const BL = 'BL';
36+
const BM = 'BM';
37+
const BN = 'BN';
38+
const BO = 'BO';
39+
const BQ = 'BQ';
40+
const BR = 'BR';
41+
const BS = 'BS';
42+
const BT = 'BT';
43+
const BV = 'BV';
44+
const BW = 'BW';
45+
const BY = 'BY';
46+
const BZ = 'BZ';
47+
const CA = 'CA';
48+
const CC = 'CC';
49+
const CD = 'CD';
50+
const CF = 'CF';
51+
const CG = 'CG';
52+
const CH = 'CH';
53+
const CI = 'CI';
54+
const CK = 'CK';
55+
const CL = 'CL';
56+
const CM = 'CM';
57+
const CN = 'CN';
58+
const CO = 'CO';
59+
const CR = 'CR';
60+
const CU = 'CU';
61+
const CV = 'CV';
62+
const CW = 'CW';
63+
const CX = 'CX';
64+
const CY = 'CY';
65+
const CZ = 'CZ';
66+
const DE = 'DE';
67+
const DJ = 'DJ';
68+
const DK = 'DK';
69+
const DM = 'DM';
70+
const DO = 'DO';
71+
const DZ = 'DZ';
72+
const EC = 'EC';
73+
const EE = 'EE';
74+
const EG = 'EG';
75+
const EH = 'EH';
76+
const ER = 'ER';
77+
const ES = 'ES';
78+
const ET = 'ET';
79+
const FI = 'FI';
80+
const FJ = 'FJ';
81+
const FK = 'FK';
82+
const FM = 'FM';
83+
const FO = 'FO';
84+
const FR = 'FR';
85+
const GA = 'GA';
86+
const GB = 'GB';
87+
const GD = 'GD';
88+
const GE = 'GE';
89+
const GF = 'GF';
90+
const GG = 'GG';
91+
const GH = 'GH';
92+
const GI = 'GI';
93+
const GL = 'GL';
94+
const GM = 'GM';
95+
const GN = 'GN';
96+
const GP = 'GP';
97+
const GQ = 'GQ';
98+
const GR = 'GR';
99+
const GS = 'GS';
100+
const GT = 'GT';
101+
const GU = 'GU';
102+
const GW = 'GW';
103+
const GY = 'GY';
104+
const HK = 'HK';
105+
const HM = 'HM';
106+
const HN = 'HN';
107+
const HR = 'HR';
108+
const HT = 'HT';
109+
const HU = 'HU';
110+
const ID = 'ID';
111+
const IE = 'IE';
112+
const IL = 'IL';
113+
const IM = 'IM';
114+
const IN = 'IN';
115+
const IO = 'IO';
116+
const IQ = 'IQ';
117+
const IR = 'IR';
118+
const IS = 'IS';
119+
const IT = 'IT';
120+
const JE = 'JE';
121+
const JM = 'JM';
122+
const JO = 'JO';
123+
const JP = 'JP';
124+
const KE = 'KE';
125+
const KG = 'KG';
126+
const KH = 'KH';
127+
const KI = 'KI';
128+
const KM = 'KM';
129+
const KN = 'KN';
130+
const KP = 'KP';
131+
const KR = 'KR';
132+
const KW = 'KW';
133+
const KY = 'KY';
134+
const KZ = 'KZ';
135+
const LA = 'LA';
136+
const LB = 'LB';
137+
const LC = 'LC';
138+
const LI = 'LI';
139+
const LK = 'LK';
140+
const LR = 'LR';
141+
const LS = 'LS';
142+
const LT = 'LT';
143+
const LU = 'LU';
144+
const LV = 'LV';
145+
const LY = 'LY';
146+
const MA = 'MA';
147+
const MC = 'MC';
148+
const MD = 'MD';
149+
const ME = 'ME';
150+
const MF = 'MF';
151+
const MG = 'MG';
152+
const MH = 'MH';
153+
const MK = 'MK';
154+
const ML = 'ML';
155+
const MM = 'MM';
156+
const MN = 'MN';
157+
const MO = 'MO';
158+
const MP = 'MP';
159+
const MQ = 'MQ';
160+
const MR = 'MR';
161+
const MS = 'MS';
162+
const MT = 'MT';
163+
const MU = 'MU';
164+
const MV = 'MV';
165+
const MW = 'MW';
166+
const MX = 'MX';
167+
const MY = 'MY';
168+
const MZ = 'MZ';
169+
const NA = 'NA';
170+
const NC = 'NC';
171+
const NE = 'NE';
172+
const NF = 'NF';
173+
const NG = 'NG';
174+
const NI = 'NI';
175+
const NL = 'NL';
176+
const NO = 'NO';
177+
const NP = 'NP';
178+
const NR = 'NR';
179+
const NU = 'NU';
180+
const NZ = 'NZ';
181+
const OM = 'OM';
182+
const PA = 'PA';
183+
const PE = 'PE';
184+
const PF = 'PF';
185+
const PG = 'PG';
186+
const PH = 'PH';
187+
const PK = 'PK';
188+
const PL = 'PL';
189+
const PM = 'PM';
190+
const PN = 'PN';
191+
const PR = 'PR';
192+
const PS = 'PS';
193+
const PT = 'PT';
194+
const PW = 'PW';
195+
const PY = 'PY';
196+
const QA = 'QA';
197+
const RE = 'RE';
198+
const RO = 'RO';
199+
const RS = 'RS';
200+
const RU = 'RU';
201+
const RW = 'RW';
202+
const SA = 'SA';
203+
const SB = 'SB';
204+
const SC = 'SC';
205+
const SD = 'SD';
206+
const SE = 'SE';
207+
const SG = 'SG';
208+
const SH = 'SH';
209+
const SI = 'SI';
210+
const SJ = 'SJ';
211+
const SK = 'SK';
212+
const SL = 'SL';
213+
const SM = 'SM';
214+
const SN = 'SN';
215+
const SO = 'SO';
216+
const SR = 'SR';
217+
const SS = 'SS';
218+
const ST = 'ST';
219+
const SV = 'SV';
220+
const SX = 'SX';
221+
const SY = 'SY';
222+
const SZ = 'SZ';
223+
const TC = 'TC';
224+
const TD = 'TD';
225+
const TF = 'TF';
226+
const TG = 'TG';
227+
const TH = 'TH';
228+
const TJ = 'TJ';
229+
const TK = 'TK';
230+
const TL = 'TL';
231+
const TM = 'TM';
232+
const TN = 'TN';
233+
const TO = 'TO';
234+
const TR = 'TR';
235+
const TT = 'TT';
236+
const TV = 'TV';
237+
const TW = 'TW';
238+
const TZ = 'TZ';
239+
const UA = 'UA';
240+
const UG = 'UG';
241+
const UM = 'UM';
242+
const US = 'US';
243+
const UY = 'UY';
244+
const UZ = 'UZ';
245+
const VA = 'VA';
246+
const VC = 'VC';
247+
const VE = 'VE';
248+
const VG = 'VG';
249+
const VI = 'VI';
250+
const VN = 'VN';
251+
const VU = 'VU';
252+
const WF = 'WF';
253+
const WS = 'WS';
254+
const YE = 'YE';
255+
const YT = 'YT';
256+
const ZA = 'ZA';
257+
const ZM = 'ZM';
258+
const ZW = 'ZW';
259+
}

0 commit comments

Comments
 (0)