booker_ruby 1.5.3 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ada20f967b821761080cf01d3ec56924d11b0e70
4
- data.tar.gz: 6cb726f537404610e6f3251a576c6c52ed33b8f9
3
+ metadata.gz: 329f16686262551179852881c6063b6b19613d60
4
+ data.tar.gz: 00ebe6313441d15298066fee05207370406db6d1
5
5
  SHA512:
6
- metadata.gz: a49ea7065e749ee9880d86b936453d46b7e85b74a1cf327c626545782b3565245cafde2161827b22121788ae691b8b319d27046d1c359e2afce4e759e37514a2
7
- data.tar.gz: 5b6ee6134422e14951941822a4af0f03ed3e47019c4d4c04f7ec4eca7ca5c8bccad4df2256f7fca075a2b8a2855613c264ab11ad1a817c6d1e183ec024ae012e
6
+ metadata.gz: dbba1a0e9b8adbe28cf82883df7736c3863428d77a454131ab76a4845a464fe55d095ec82826e92a6c45bb2e2fe6935f66903debfff11d09192af9b27bf4e169
7
+ data.tar.gz: 93a166aeb4055b8bfcd8ef462e0f81c22e36d0f155e0d83a34be9d2371848dd930b72a05635bba139c251de585790a6e37220c48974e4c0a04baca8f06f4f528
@@ -0,0 +1,269 @@
1
+ ---
2
+ United States: US
3
+ Canada: CA
4
+ Albania: AL
5
+ Algeria: DZ
6
+ American Samoa: AS
7
+ Andorra: AD
8
+ Angola: AO
9
+ Anguilla: AI
10
+ Antigua and Barbuda: AG
11
+ Argentina: AR
12
+ Armenia: AM
13
+ Aruba: AW
14
+ Australia: AU
15
+ Austria: AT
16
+ Azerbaijan: AZ
17
+ Azores: AP
18
+ Bahamas: BS
19
+ Bahrain: BH
20
+ Bangladesh: BD
21
+ Barbados: BB
22
+ Belarus: BY
23
+ Belgium: BE
24
+ Belize: BZ
25
+ Benin: BJ
26
+ Bermuda: BM
27
+ Bhutan: BT
28
+ Bolivia: BO
29
+ Bonaire: BL
30
+ Bosnia and Herzegovina: BA
31
+ Botswana: BW
32
+ Bouvet Island: BV
33
+ Brazil: BR
34
+ British Indian Ocean Territory: IO
35
+ Brunei Darussalam: BN
36
+ Bulgaria: BG
37
+ Burkina Faso: BF
38
+ Burundi: BI
39
+ Cambodia: KH
40
+ Cameroon: CM
41
+ Canary Islands: IC
42
+ Cape Verde: CV
43
+ Cayman Islands: KY
44
+ Central African Republic: CF
45
+ Chad: TD
46
+ Channel Islands: CD
47
+ Chile: CL
48
+ China: CN
49
+ Christmas Island: CX
50
+ Cocos (Keeling) Islands: CC
51
+ Colombia: CO
52
+ Comoros: KM
53
+ Congo (Democratic Republic of): ZP
54
+ Cook Islands: CK
55
+ Costa Rica: CR
56
+ Cote D'Ivoire (Ivory Coast): CI
57
+ Croatia: HR
58
+ Curacao: CB
59
+ Cyprus: CY
60
+ Czech Republic: CZ
61
+ Denmark: DK
62
+ Djibouti: DJ
63
+ Dominica: DM
64
+ Dominican Republic: DO
65
+ East Timor: TP
66
+ Ecuador: EC
67
+ Egypt: EG
68
+ El Salvador: SV
69
+ United Kingdom: UK
70
+ Equatorial Guinea: GQ
71
+ Eritrea: ER
72
+ Estonia: EE
73
+ Ethiopia: ET
74
+ Faeroe Islands: FO
75
+ Falkland Islands (Malvinas): FK
76
+ Fiji: FJ
77
+ Finland: FI
78
+ France: FR
79
+ French Guiana: GF
80
+ French Polynesia: PF
81
+ French Southern Territories: TF
82
+ Gabon: GA
83
+ Gambia: GM
84
+ Georgia: GE
85
+ Germany: DE
86
+ Ghana: GH
87
+ Gibraltar: GI
88
+ Greece: GR
89
+ Greenland: GL
90
+ Grenada: GD
91
+ Guadeloupe: GP
92
+ Guam: GU
93
+ Guatemala: GT
94
+ Guinea: GN
95
+ Guinea-Bissau: GW
96
+ Guyana: GY
97
+ Haiti: HT
98
+ Heard Island and McDonald Islands: HM
99
+ Honduras: HN
100
+ Hong Kong: HK
101
+ Hungary: HU
102
+ Iceland: IS
103
+ India: IN
104
+ Indonesia: ID
105
+ Ireland: IE
106
+ Israel: IL
107
+ Italy: IT
108
+ Jamaica: JM
109
+ Japan: JP
110
+ Jordan: JO
111
+ Kazakhstan: KZ
112
+ Kenya: KE
113
+ Kiribati: KI
114
+ Kosrae: KO
115
+ Kuwait: KW
116
+ Kyrgyzstan: KG
117
+ Laos: LA
118
+ Latvia: LV
119
+ Lebanon: LB
120
+ Lesotho: LS
121
+ Liberia: LR
122
+ Libya: LY
123
+ Liechtenstein: LI
124
+ Lithuania: LT
125
+ Luxembourg: LU
126
+ Macau: MO
127
+ Macedonia: MK
128
+ Madagascar: MG
129
+ Montenegro: ME
130
+ Malawi: MW
131
+ Malaysia: MY
132
+ Maldives: MV
133
+ Mali: ML
134
+ Malta: MT
135
+ Marshall Islands: MH
136
+ Martinique: MQ
137
+ Mauritania: MR
138
+ Mauritius: MU
139
+ Mayotte: YT
140
+ Mexico: MX
141
+ Micronesia: FM
142
+ Moldova: MD
143
+ Monaco: MC
144
+ Mongolia: MN
145
+ Montserrat: MS
146
+ Morocco: MA
147
+ Mozambique: MZ
148
+ Myanmar: MM
149
+ Namibia: NA
150
+ Nauru: NR
151
+ Nepal: NP
152
+ Netherlands: NL
153
+ Netherlands Antilles: AN
154
+ Neutral Zone: NT
155
+ New Caledonia: NC
156
+ New Zealand (Aotearoa): NZ
157
+ Nicaragua: NI
158
+ Niger: NE
159
+ Nigeria: NG
160
+ Niue: NU
161
+ Norfolk Island: NF
162
+ North Korea: KP
163
+ Northern Ireland: NB
164
+ Northern Mariana Islands: MP
165
+ Norway: NO
166
+ Oman: OM
167
+ Pakistan: PK
168
+ Palau: PW
169
+ Panama: PA
170
+ Papua New Guinea: PG
171
+ Paraguay: PY
172
+ Peru: PE
173
+ Philippines: PH
174
+ Pitcairn: PN
175
+ Poland: PL
176
+ Ponape: PO
177
+ Portugal: PT
178
+ Puerto Rico: PR
179
+ Qatar: QA
180
+ Reunion: RE
181
+ Romania: RO
182
+ Rota: RT
183
+ Russian Federation: RU
184
+ Rwanda: RW
185
+ Saba: SS
186
+ Saint Kitts and Nevis: KN
187
+ Saint Lucia: LC
188
+ Saint Vincent and the Grenadines: VC
189
+ Saipan: SP
190
+ Samoa: WS
191
+ San Marino: SM
192
+ Sao Tome and Principe: ST
193
+ Saudi Arabia: SA
194
+ Scotland: SF
195
+ Senegal: SN
196
+ Seychelles: SC
197
+ Sierra Leone: SL
198
+ Singapore: SG
199
+ Slovak Republic: SK
200
+ Slovenia: SI
201
+ Solomon Islands: SB
202
+ Somalia: SO
203
+ South Africa: ZA
204
+ South Georgia and South Sandwich Islands.: GS
205
+ South Korea: KR
206
+ Spain: ES
207
+ Sri Lanka: LK
208
+ St. Barthelemy: NT
209
+ St. Christopher: SW
210
+ St. Croix: VI
211
+ St. Eustatius: EU
212
+ St. Helena: SH
213
+ St. John: UV
214
+ St. Kitts and Nevis: KN
215
+ St. Lucia: LC
216
+ St. Maarten: MB
217
+ St. Martin: TB
218
+ St. Pierre and Miquelon: PM
219
+ St. Thomas: VL
220
+ St. Vincent/Grenadine: VC
221
+ Sudan: SD
222
+ Suriname: SR
223
+ Svalbard and Jan Mayen Islands: SJ
224
+ Swaziland: SZ
225
+ Sweden: SE
226
+ Switzerland: CH
227
+ Syria: SY
228
+ Tahiti: TA
229
+ Taiwan: TW
230
+ Tajikistan: TJ
231
+ Tanzania: TZ
232
+ Thailand: TH
233
+ Tinian: TI
234
+ Togo: TG
235
+ Tokelau: TK
236
+ Tonga: TO
237
+ Tortola: TL
238
+ Trinidad and Tobago: TT
239
+ Truk: TU
240
+ Tunisia: TN
241
+ Turkey: TR
242
+ Turkmenistan: TM
243
+ Turks and Caicos Islands: TC
244
+ Tuvalu: TV
245
+ Uganda: UG
246
+ Ukraine: UA
247
+ Union Island: UI
248
+ United Arab Emirates: AE
249
+ Uruguay: UY
250
+ US Minor Outlying Islands: UM
251
+ USSR (former): SU
252
+ Uzbekistan: UZ
253
+ Vanuatu: VU
254
+ Vatican City State (Holy See): VA
255
+ Venezuela: VE
256
+ Vietnam: VN
257
+ Virgin Gorda: VR
258
+ Virgin Islands (British): VG
259
+ Virgin Islands (U.S.): VI
260
+ Wales: WL
261
+ Wallis and Futuna Islands: WF
262
+ Western Samoa: WS
263
+ Yap: YA
264
+ Yemen: YE
265
+ Yugoslavia: YU
266
+ Zaire: ZR
267
+ Zambia: ZM
268
+ Zimbabwe: ZW
269
+ Serbia: RS
@@ -1,5 +1,9 @@
1
1
  module Booker
2
2
  module Models
3
- class Country < Type; end
3
+ class Country < Type
4
+ NAMES_TO_CODES = YAML::load_file(File.join(__dir__, '..', 'config', 'booker_countries.yml')).freeze
5
+
6
+ def country_code; NAMES_TO_CODES[self.Name]; end
7
+ end
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '1.5.3'
2
+ VERSION = '1.6.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -120,6 +120,7 @@ files:
120
120
  - lib/booker/business_rest.rb
121
121
  - lib/booker/client.rb
122
122
  - lib/booker/common_rest.rb
123
+ - lib/booker/config/booker_countries.yml
123
124
  - lib/booker/customer_client.rb
124
125
  - lib/booker/customer_rest.rb
125
126
  - lib/booker/errors.rb