gillbus 0.15.7 → 0.16.1

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: 987e0c139eb7d412f86b57ab7f5fb852e13357c9
4
- data.tar.gz: 2fe58e2274bc45fd9f311226a6036d952d51c283
3
+ metadata.gz: 3e8a187bcce265bc812b02d607398af923acdb07
4
+ data.tar.gz: d955f55e0cb0bbe1e6a3f4e9531df41fd926a78e
5
5
  SHA512:
6
- metadata.gz: a44c7deb6a42d6e1d54a6b3d46ee31d28a2c925864dddcc3da3dbbc5ccc33070948f8b0ad1ee51973dc118edcd990ed15ccb2dc946ea6ada480226fd0e201bdc
7
- data.tar.gz: 563f28480613d33b3bf2dce7a6bd2898ff344ee67e0ca014a72bf91d03363549f53d5e508993de660da7db403b4d7c4a451d5ed65b77a43ae72f3071a2ad80f6
6
+ metadata.gz: 3c6c8cbbde3ac8884ef3dbb9b05e775bf9ef1e2495d369b339413d1e01161313c1892c5a6dc4519fa6264e4fb6fe64df678431d3492a7aa9e9b90f30bbf215ec
7
+ data.tar.gz: 3c5458b42c3a76c606e8c05601551297bdfa2bfbea05704e2d18a78d7265a5d2acd2156967352b2206d0eb727205ef69cbf5d5b49303b71de8539e68dae41e5a
@@ -22,11 +22,13 @@ class Gillbus
22
22
  end
23
23
  end
24
24
 
25
- def parse(doc, instance=new)
25
+ def parse(doc, instance = new, parent = nil)
26
+ instance ||= new
26
27
  parser_class.new(
27
28
  doc: doc,
28
29
  instance: instance,
29
- fields: field_definitions
30
+ fields: field_definitions,
31
+ parent: parent
30
32
  ).parse
31
33
  instance
32
34
  end
@@ -7,11 +7,13 @@ class Gillbus
7
7
  attr_accessor :doc
8
8
  attr_accessor :instance
9
9
  attr_accessor :fields
10
+ attr_accessor :parent
10
11
 
11
- def initialize(instance:, doc:, fields:)
12
+ def initialize(instance:, doc:, fields:, parent:)
12
13
  @instance = instance
13
14
  @doc = doc
14
15
  @fields = fields
16
+ @parent = parent
15
17
  end
16
18
 
17
19
  def parse
@@ -45,7 +47,7 @@ class Gillbus
45
47
  def make_one(type, val)
46
48
  return if val.nil?
47
49
  if type.is_a? Class
48
- type.parse(val)
50
+ type.parse(val, nil, instance)
49
51
  else
50
52
  send type, val
51
53
  end
@@ -15,13 +15,13 @@ class Gillbus
15
15
  field :description
16
16
 
17
17
  # Value of collecting in sale currency
18
- field :value, :money
18
+ field :value, :sale_money
19
19
 
20
20
  # VAT rate
21
21
  field :vat_value
22
22
 
23
23
  # Value of collecting VAT in sale currency
24
- field :vat, :money
24
+ field :vat, :sale_money
25
25
 
26
26
  # Collecting currency
27
27
  field :currency
@@ -30,25 +30,29 @@ class Gillbus
30
30
  field :rate
31
31
 
32
32
  # Value of collecting in currency in which it is brought
33
- field :value_in_currency, :money
33
+ field :value_in_currency, :collecting_money
34
34
 
35
35
  # Value of collecting VAT in currency in which it is brought
36
- field :vat_in_currency, :money
36
+ field :vat_in_currency, :collecting_money
37
37
 
38
38
  # The return amount from collecting in sale currency (w/o VAT)
39
- field :return_value, :money
39
+ field :return_value, :sale_money
40
40
 
41
41
  # The return amount from collecting VAT in sale currency
42
- field :return_vat, :money
42
+ field :return_vat, :sale_money
43
43
 
44
44
  # The return amount from collecting in currency in which it is brought (w/o VAT)
45
- field :return_value_in_currency, :money
45
+ field :return_value_in_currency, :collecting_money
46
46
 
47
47
  # The return amount from collecting VAT in currency in which it is brought.
48
- field :return_vat_in_currency, :money
48
+ field :return_vat_in_currency, :collecting_money
49
49
 
50
50
  parser do
51
- def money(val)
51
+ def sale_money(val)
52
+ Monetize.parse(val, @parent.sale_cur_code)
53
+ end
54
+
55
+ def collecting_money(val)
52
56
  Monetize.parse(val, doc['CURRENCY'])
53
57
  end
54
58
  end
@@ -156,7 +156,7 @@ class Gillbus
156
156
  # to hold unserialized data
157
157
  attr_accessor :data
158
158
 
159
- def self.parse(doc)
159
+ def self.parse(doc, _ = nil, _ = nil)
160
160
  instance = super
161
161
  instance.data = doc
162
162
  instance
@@ -9,7 +9,7 @@ class Gillbus
9
9
 
10
10
  field :cause, :string
11
11
 
12
- def self.parse(doc)
12
+ def self.parse(doc, _ = nil, _ = nil)
13
13
  instance = super
14
14
  if doc.kind_of? Hash
15
15
  instance.cause = doc['__content__']
@@ -173,7 +173,7 @@ class Gillbus
173
173
  # to hold unserialized data
174
174
  attr_accessor :data
175
175
 
176
- def self.parse(doc)
176
+ def self.parse(doc, _ = nil, _ = nil)
177
177
  instance = super
178
178
  instance.data = doc
179
179
  instance
@@ -1,3 +1,3 @@
1
1
  class Gillbus
2
- VERSION = "0.15.7"
2
+ VERSION = "0.16.1"
3
3
  end
@@ -6,6 +6,10 @@ class FindOrderTest < Minitest::Test
6
6
  Gillbus::FindOrder::Response.parse_string(File.read('test/responses/findOrder.xml'))
7
7
  end
8
8
 
9
+ def find_order2
10
+ Gillbus::FindOrder::Response.parse_string(File.read('test/responses/bookingDifferentCurrencies.xml'))
11
+ end
12
+
9
13
  def test_number
10
14
  assert_equal("14482", find_order.tickets.first.ticket_number)
11
15
  end
@@ -29,4 +33,8 @@ class FindOrderTest < Minitest::Test
29
33
  def test_vat_value
30
34
  assert_equal("0", find_order.tickets.first.vat_value)
31
35
  end
36
+
37
+ def test_comission_currency
38
+ assert_equal(Money.new(51_55, 'RUB'), find_order2.tickets.last.commissions.last.value)
39
+ end
32
40
  end
@@ -0,0 +1,466 @@
1
+ <DATA>
2
+ <TICKET>
3
+ <FINAL_PRICE_GREATER>true</FINAL_PRICE_GREATER>
4
+ <CREATED_DATE>05.10.2017 13:05:01</CREATED_DATE>
5
+ <UPDATED_DATE>05.10.2017 15:05:02</UPDATED_DATE>
6
+ <TICKET_NUMBER>2699912</TICKET_NUMBER>
7
+ <TICKET_SERIES>11111111</TICKET_SERIES>
8
+ <CARRIER_TICKET_NUMBER/>
9
+ <SYSTEM_NUMBER>2699912</SYSTEM_NUMBER>
10
+ <ORDER_NUMBER>2120248</ORDER_NUMBER>
11
+ <ORDER_ID>dev-82128222</ORDER_ID>
12
+ <TICKET_STATUS>5</TICKET_STATUS>
13
+ <IS_BAGGAGE>false</IS_BAGGAGE>
14
+ <POLICY_NUMBER/>
15
+ <EXCHANGE_BLANK>false</EXCHANGE_BLANK>
16
+ <ENABLE_CHANGE_TRIP_DATE>true</ENABLE_CHANGE_TRIP_DATE>
17
+ <PASSENGER_FULL_NAME>Аыва Ы.Ы.</PASSENGER_FULL_NAME>
18
+ <PASSENGER_FIRST_NAME>ываыва</PASSENGER_FIRST_NAME>
19
+ <PASSENGER_LAST_NAME>аыва</PASSENGER_LAST_NAME>
20
+ <PASSENGER_BIRTHDAY>12.02.2000</PASSENGER_BIRTHDAY>
21
+ <PASSENGER_STUDENT_TICKET/>
22
+ <PASSENGER_PHONE>+79161017268</PASSENGER_PHONE>
23
+ <PASSENGER_PASSPORT>1231243123</PASSENGER_PASSPORT>
24
+ <PASSENGER_DOCUMENT_TYPE>1</PASSENGER_DOCUMENT_TYPE>
25
+ <PASSENGER_PICKUPDROPOFF/>
26
+ <AGENT_NAME>Internal System Organisation</AGENT_NAME>
27
+ <AGENT_PHONE/>
28
+ <CARRIER_NAME>"Стрыбко В.М." ФЛП</CARRIER_NAME>
29
+ <CARRIER_PHONE>+79263439471</CARRIER_PHONE>
30
+ <BUS_MODEL>MAN</BUS_MODEL>
31
+ <PLATFORM/>
32
+ <BUS_CLASS/>
33
+ <CARRIAGE_NUMBER/>
34
+ <NUMBER_SEAT>11</NUMBER_SEAT>
35
+ <TOTAL>4920.64</TOTAL>
36
+ <TOTAL_CURRENCY>RUB</TOTAL_CURRENCY>
37
+ <TOTAL_CURRENCY_CODE>643</TOTAL_CURRENCY_CODE>
38
+ <TRIP_NUMBER>Москва-Косов</TRIP_NUMBER>
39
+ <TRIP_MODE>1</TRIP_MODE>
40
+ <INTERNATIONAL_TRIP>true</INTERNATIONAL_TRIP>
41
+ <START_TIMEZONE/>
42
+ <END_TIMEZONE/>
43
+ <START_CITY>Москва</START_CITY>
44
+ <START_DATE>24.10.2017</START_DATE>
45
+ <START_TIME>14:45</START_TIME>
46
+ <END_CITY>Киев</END_CITY>
47
+ <END_DATE>25.10.2017</END_DATE>
48
+ <END_TIME>06:00</END_TIME>
49
+ <STATION_ID>06B334B725544F6DE0508E5B35577759</STATION_ID>
50
+ <STATION_NAME>Автостанция "Теплый Стан"</STATION_NAME>
51
+ <STATION_END_NAME>Автостанция Киев</STATION_END_NAME>
52
+ <TYPE_TARIFF_NAME>Y</TYPE_TARIFF_NAME>
53
+ <TYPE_TARIFF_FULL_NAME>Базовый тариф</TYPE_TARIFF_FULL_NAME>
54
+ <TYPE_TARIFF_DESCRIPTION>Базовый тариф стоимости проезда одного пассажиров в одном направлении</TYPE_TARIFF_DESCRIPTION>
55
+ <TARIFF>0</TARIFF>
56
+ <VAT_VALUE>0</VAT_VALUE>
57
+ <TARIFF_VAT>0</TARIFF_VAT>
58
+ <FOREIGN_TARIFF>1700</FOREIGN_TARIFF>
59
+ <FOREIGN_TARIFF_VAT>0</FOREIGN_TARIFF_VAT>
60
+ <NOTE/>
61
+ <BARCODE>ФЛП002699912BSF</BARCODE>
62
+ <INSURANCE_NAME>RU СТК "Страховая группа "Ю.Би.Ай" ЧАО</INSURANCE_NAME>
63
+ <INSURANCE_PHONE/>
64
+ <AGENT_REG/>
65
+ <CARRIER_REG>21150000000001006</CARRIER_REG>
66
+ <INSURANCE_REG/>
67
+ <TOTAL_TARIFF>1700</TOTAL_TARIFF>
68
+ <TOTAL_TARIFF_IN_CURRENCY>1700</TOTAL_TARIFF_IN_CURRENCY>
69
+ <TOTAL_TARIFF_VAT>0</TOTAL_TARIFF_VAT>
70
+ <TOTAL_TARIFF_VAT_IN_CURRENCY>0</TOTAL_TARIFF_VAT_IN_CURRENCY>
71
+ <TARIFF_CUR_CODE>RUB</TARIFF_CUR_CODE>
72
+ <TARIFF_CUR_RATE/>
73
+ <TOTAL_AMOUNT>1700</TOTAL_AMOUNT>
74
+ <TOTAL_AGENT_INCOME>85</TOTAL_AGENT_INCOME>
75
+ <TOTAL_AMOUNT_VAT>0</TOTAL_AMOUNT_VAT>
76
+ <SALE_CUR_CODE>RUB</SALE_CUR_CODE>
77
+ <CUSTOMER_NAME/>
78
+ <CUSTOMER_PHONE/>
79
+ <CUSTOMER_ADDRESS/>
80
+ <AGENT_ADDRESS>г </AGENT_ADDRESS>
81
+ <CARRIER_ADDRESS>г Келихов</CARRIER_ADDRESS>
82
+ <STATION_ADDRESS>метро Теплый стан; проспект Новоясеневский; дом 4</STATION_ADDRESS>
83
+ <STATION_END_ADDRESS>Московская площадь, д. 3</STATION_END_ADDRESS>
84
+ <INSURANCE_ADDRESS>г Киев, ул Почайнинская, д 25/49, оф 30</INSURANCE_ADDRESS>
85
+ <AGENT_CODE>Internal System Organisation</AGENT_CODE>
86
+ <AGENT_CITY/>
87
+ <CARRIER_CODE>ФЛП</CARRIER_CODE>
88
+ <BEGIN_AVIACODE>MOW</BEGIN_AVIACODE>
89
+ <END_AVIACODE>IEV</END_AVIACODE>
90
+ <XT>0</XT>
91
+ <XT_VAT>0</XT_VAT>
92
+ <SERVICE_TYPE>Автобусный</SERVICE_TYPE>
93
+ <COMMISSION>
94
+ <TYPE>3</TYPE>
95
+ <CODE>XP2</CODE>
96
+ <DESCRIPTION>Агентский сбор №2</DESCRIPTION>
97
+ <VALUE>0</VALUE>
98
+ <VAT_VALUE>18</VAT_VALUE>
99
+ <VAT>0</VAT>
100
+ <CURRENCY>RUB</CURRENCY>
101
+ <RATE>0</RATE>
102
+ <VALUE_IN_CURRENCY>72.03</VALUE_IN_CURRENCY>
103
+ <VAT_IN_CURRENCY>12.97</VAT_IN_CURRENCY>
104
+ </COMMISSION>
105
+ </TICKET>
106
+ <TICKET>
107
+ <FINAL_PRICE_GREATER>true</FINAL_PRICE_GREATER>
108
+ <CREATED_DATE>05.10.2017 13:05:01</CREATED_DATE>
109
+ <UPDATED_DATE>05.10.2017 15:05:02</UPDATED_DATE>
110
+ <TICKET_NUMBER>2699913</TICKET_NUMBER>
111
+ <TICKET_SERIES>11111111</TICKET_SERIES>
112
+ <CARRIER_TICKET_NUMBER/>
113
+ <SYSTEM_NUMBER>2699913</SYSTEM_NUMBER>
114
+ <ORDER_NUMBER>2120248</ORDER_NUMBER>
115
+ <ORDER_ID>dev-82128222</ORDER_ID>
116
+ <TICKET_STATUS>5</TICKET_STATUS>
117
+ <IS_BAGGAGE>false</IS_BAGGAGE>
118
+ <POLICY_NUMBER/>
119
+ <EXCHANGE_BLANK>false</EXCHANGE_BLANK>
120
+ <ENABLE_CHANGE_TRIP_DATE>true</ENABLE_CHANGE_TRIP_DATE>
121
+ <PASSENGER_FULL_NAME>Аыва Ы.Ы.</PASSENGER_FULL_NAME>
122
+ <PASSENGER_FIRST_NAME>ываыва</PASSENGER_FIRST_NAME>
123
+ <PASSENGER_LAST_NAME>аыва</PASSENGER_LAST_NAME>
124
+ <PASSENGER_BIRTHDAY>12.02.2000</PASSENGER_BIRTHDAY>
125
+ <PASSENGER_STUDENT_TICKET/>
126
+ <PASSENGER_PHONE>+79161017268</PASSENGER_PHONE>
127
+ <PASSENGER_PASSPORT>1231243123</PASSENGER_PASSPORT>
128
+ <PASSENGER_DOCUMENT_TYPE>1</PASSENGER_DOCUMENT_TYPE>
129
+ <PASSENGER_PICKUPDROPOFF/>
130
+ <AGENT_NAME>Internal System Organisation</AGENT_NAME>
131
+ <AGENT_PHONE/>
132
+ <CARRIER_NAME>"Павлюк Лилия Ивановна" ФЛП</CARRIER_NAME>
133
+ <CARRIER_PHONE>+380988922882</CARRIER_PHONE>
134
+ <BUS_MODEL>Volkswagen</BUS_MODEL>
135
+ <PLATFORM>23</PLATFORM>
136
+ <BUS_CLASS/>
137
+ <CARRIAGE_NUMBER/>
138
+ <NUMBER_SEAT>СВ</NUMBER_SEAT>
139
+ <TOTAL>4920.64</TOTAL>
140
+ <TOTAL_CURRENCY>RUB</TOTAL_CURRENCY>
141
+ <TOTAL_CURRENCY_CODE>643</TOTAL_CURRENCY_CODE>
142
+ <TRIP_NUMBER>ПЛИ001 Киев - Львов</TRIP_NUMBER>
143
+ <TRIP_MODE>1</TRIP_MODE>
144
+ <INTERNATIONAL_TRIP>false</INTERNATIONAL_TRIP>
145
+ <START_TIMEZONE/>
146
+ <END_TIMEZONE/>
147
+ <START_CITY>Киев</START_CITY>
148
+ <START_DATE>25.10.2017</START_DATE>
149
+ <START_TIME>11:30</START_TIME>
150
+ <END_CITY>Львов</END_CITY>
151
+ <END_DATE>25.10.2017</END_DATE>
152
+ <END_TIME>19:30</END_TIME>
153
+ <STATION_ID>06B79BBEB6804BA5E0508E5B3557CF40</STATION_ID>
154
+ <STATION_NAME>Автостанция "Киев" (Центральный железнодорожный вокзал)</STATION_NAME>
155
+ <STATION_END_NAME>Железнодорожный вокзал "Центральный"</STATION_END_NAME>
156
+ <TYPE_TARIFF_NAME>Y</TYPE_TARIFF_NAME>
157
+ <TYPE_TARIFF_FULL_NAME>Базовый тариф</TYPE_TARIFF_FULL_NAME>
158
+ <TYPE_TARIFF_DESCRIPTION>Базовый тариф стоимости проезда одного пассажиров в одном направлении</TYPE_TARIFF_DESCRIPTION>
159
+ <TARIFF>644.33</TARIFF>
160
+ <VAT_VALUE>0</VAT_VALUE>
161
+ <TARIFF_VAT>0</TARIFF_VAT>
162
+ <FOREIGN_TARIFF>0</FOREIGN_TARIFF>
163
+ <FOREIGN_TARIFF_VAT>0</FOREIGN_TARIFF_VAT>
164
+ <NOTE/>
165
+ <BARCODE>ПЛИ002699913BSF</BARCODE>
166
+ <INSURANCE_NAME/>
167
+ <INSURANCE_PHONE/>
168
+ <AGENT_REG/>
169
+ <CARRIER_REG>3238011544</CARRIER_REG>
170
+ <INSURANCE_REG/>
171
+ <TOTAL_TARIFF>644.33</TOTAL_TARIFF>
172
+ <TOTAL_TARIFF_IN_CURRENCY>300</TOTAL_TARIFF_IN_CURRENCY>
173
+ <TOTAL_TARIFF_VAT>0</TOTAL_TARIFF_VAT>
174
+ <TOTAL_TARIFF_VAT_IN_CURRENCY>0</TOTAL_TARIFF_VAT_IN_CURRENCY>
175
+ <TARIFF_CUR_CODE>UAH</TARIFF_CUR_CODE>
176
+ <TARIFF_CUR_RATE>2.14776632302</TARIFF_CUR_RATE>
177
+ <TOTAL_AMOUNT>760.32</TOTAL_AMOUNT>
178
+ <TOTAL_AGENT_INCOME>83.77</TOTAL_AGENT_INCOME>
179
+ <TOTAL_AMOUNT_VAT>17.7</TOTAL_AMOUNT_VAT>
180
+ <SALE_CUR_CODE>RUB</SALE_CUR_CODE>
181
+ <CUSTOMER_NAME/>
182
+ <CUSTOMER_PHONE/>
183
+ <CUSTOMER_ADDRESS/>
184
+ <AGENT_ADDRESS>г </AGENT_ADDRESS>
185
+ <CARRIER_ADDRESS>г Сосновка</CARRIER_ADDRESS>
186
+ <STATION_ADDRESS>метро Вокзальная; улица Симона Петлюры; дом 32</STATION_ADDRESS>
187
+ <STATION_END_ADDRESS>площадь Дворцовая; дом 1</STATION_END_ADDRESS>
188
+ <INSURANCE_ADDRESS/>
189
+ <AGENT_CODE>Internal System Organisation</AGENT_CODE>
190
+ <AGENT_CITY/>
191
+ <CARRIER_CODE>ПЛИ</CARRIER_CODE>
192
+ <BEGIN_AVIACODE>IEV</BEGIN_AVIACODE>
193
+ <END_AVIACODE>LWO</END_AVIACODE>
194
+ <XT>0</XT>
195
+ <XT_VAT>0</XT_VAT>
196
+ <SERVICE_TYPE>Автобусный</SERVICE_TYPE>
197
+ <COMMISSION>
198
+ <TYPE>-1</TYPE>
199
+ <CODE>XP</CODE>
200
+ <DESCRIPTION>Агентский сбор</DESCRIPTION>
201
+ <VALUE>64.44</VALUE>
202
+ <VAT_VALUE>0</VAT_VALUE>
203
+ <VAT>9.84</VAT>
204
+ <CURRENCY>RUB</CURRENCY>
205
+ <RATE>0</RATE>
206
+ <VALUE_IN_CURRENCY>54.6</VALUE_IN_CURRENCY>
207
+ <VAT_IN_CURRENCY>9.84</VAT_IN_CURRENCY>
208
+ </COMMISSION>
209
+ <COMMISSION>
210
+ <TYPE>3</TYPE>
211
+ <CODE>XP2</CODE>
212
+ <DESCRIPTION>Агентский сбор №2</DESCRIPTION>
213
+ <VALUE>32.22</VALUE>
214
+ <VAT_VALUE>18</VAT_VALUE>
215
+ <VAT>4.92</VAT>
216
+ <CURRENCY>UAH</CURRENCY>
217
+ <RATE>2.14776632302</RATE>
218
+ <VALUE_IN_CURRENCY>12.71</VALUE_IN_CURRENCY>
219
+ <VAT_IN_CURRENCY>2.29</VAT_IN_CURRENCY>
220
+ </COMMISSION>
221
+ <COMMISSION>
222
+ <TYPE>6</TYPE>
223
+ <CODE>XP3</CODE>
224
+ <DESCRIPTION>Сервисный сбор</DESCRIPTION>
225
+ <VALUE>51.55</VALUE>
226
+ <VAT_VALUE>18</VAT_VALUE>
227
+ <VAT>7.86</VAT>
228
+ <CURRENCY>UAH</CURRENCY>
229
+ <RATE>2.14776632302</RATE>
230
+ <VALUE_IN_CURRENCY>20.34</VALUE_IN_CURRENCY>
231
+ <VAT_IN_CURRENCY>3.66</VAT_IN_CURRENCY>
232
+ </COMMISSION>
233
+ </TICKET>
234
+ <TICKET>
235
+ <FINAL_PRICE_GREATER>true</FINAL_PRICE_GREATER>
236
+ <CREATED_DATE>05.10.2017 13:05:01</CREATED_DATE>
237
+ <UPDATED_DATE>05.10.2017 15:05:02</UPDATED_DATE>
238
+ <TICKET_NUMBER>2699914</TICKET_NUMBER>
239
+ <TICKET_SERIES>11111111</TICKET_SERIES>
240
+ <CARRIER_TICKET_NUMBER/>
241
+ <SYSTEM_NUMBER>2699914</SYSTEM_NUMBER>
242
+ <ORDER_NUMBER>2120248</ORDER_NUMBER>
243
+ <ORDER_ID>dev-82128222</ORDER_ID>
244
+ <TICKET_STATUS>5</TICKET_STATUS>
245
+ <IS_BAGGAGE>false</IS_BAGGAGE>
246
+ <POLICY_NUMBER/>
247
+ <EXCHANGE_BLANK>false</EXCHANGE_BLANK>
248
+ <ENABLE_CHANGE_TRIP_DATE>true</ENABLE_CHANGE_TRIP_DATE>
249
+ <PASSENGER_FULL_NAME>Тест Т.Т.</PASSENGER_FULL_NAME>
250
+ <PASSENGER_FIRST_NAME>Тест</PASSENGER_FIRST_NAME>
251
+ <PASSENGER_LAST_NAME>Тест</PASSENGER_LAST_NAME>
252
+ <PASSENGER_BIRTHDAY>01.02.1980</PASSENGER_BIRTHDAY>
253
+ <PASSENGER_STUDENT_TICKET/>
254
+ <PASSENGER_PHONE>+79161017268</PASSENGER_PHONE>
255
+ <PASSENGER_PASSPORT>5656563533</PASSENGER_PASSPORT>
256
+ <PASSENGER_DOCUMENT_TYPE>1</PASSENGER_DOCUMENT_TYPE>
257
+ <PASSENGER_PICKUPDROPOFF/>
258
+ <AGENT_NAME>Internal System Organisation</AGENT_NAME>
259
+ <AGENT_PHONE/>
260
+ <CARRIER_NAME>"Стрыбко В.М." ФЛП</CARRIER_NAME>
261
+ <CARRIER_PHONE>+79263439471</CARRIER_PHONE>
262
+ <BUS_MODEL>MAN</BUS_MODEL>
263
+ <PLATFORM/>
264
+ <BUS_CLASS/>
265
+ <CARRIAGE_NUMBER/>
266
+ <NUMBER_SEAT>14</NUMBER_SEAT>
267
+ <TOTAL>4920.64</TOTAL>
268
+ <TOTAL_CURRENCY>RUB</TOTAL_CURRENCY>
269
+ <TOTAL_CURRENCY_CODE>643</TOTAL_CURRENCY_CODE>
270
+ <TRIP_NUMBER>Москва-Косов</TRIP_NUMBER>
271
+ <TRIP_MODE>1</TRIP_MODE>
272
+ <INTERNATIONAL_TRIP>true</INTERNATIONAL_TRIP>
273
+ <START_TIMEZONE/>
274
+ <END_TIMEZONE/>
275
+ <START_CITY>Москва</START_CITY>
276
+ <START_DATE>24.10.2017</START_DATE>
277
+ <START_TIME>14:45</START_TIME>
278
+ <END_CITY>Киев</END_CITY>
279
+ <END_DATE>25.10.2017</END_DATE>
280
+ <END_TIME>06:00</END_TIME>
281
+ <STATION_ID>06B334B725544F6DE0508E5B35577759</STATION_ID>
282
+ <STATION_NAME>Автостанция "Теплый Стан"</STATION_NAME>
283
+ <STATION_END_NAME>Автостанция Киев</STATION_END_NAME>
284
+ <TYPE_TARIFF_NAME>Y</TYPE_TARIFF_NAME>
285
+ <TYPE_TARIFF_FULL_NAME>Базовый тариф</TYPE_TARIFF_FULL_NAME>
286
+ <TYPE_TARIFF_DESCRIPTION>Базовый тариф стоимости проезда одного пассажиров в одном направлении</TYPE_TARIFF_DESCRIPTION>
287
+ <TARIFF>0</TARIFF>
288
+ <VAT_VALUE>0</VAT_VALUE>
289
+ <TARIFF_VAT>0</TARIFF_VAT>
290
+ <FOREIGN_TARIFF>1700</FOREIGN_TARIFF>
291
+ <FOREIGN_TARIFF_VAT>0</FOREIGN_TARIFF_VAT>
292
+ <NOTE/>
293
+ <BARCODE>ФЛП002699914BSF</BARCODE>
294
+ <INSURANCE_NAME>RU СТК "Страховая группа "Ю.Би.Ай" ЧАО</INSURANCE_NAME>
295
+ <INSURANCE_PHONE/>
296
+ <AGENT_REG/>
297
+ <CARRIER_REG>21150000000001006</CARRIER_REG>
298
+ <INSURANCE_REG/>
299
+ <TOTAL_TARIFF>1700</TOTAL_TARIFF>
300
+ <TOTAL_TARIFF_IN_CURRENCY>1700</TOTAL_TARIFF_IN_CURRENCY>
301
+ <TOTAL_TARIFF_VAT>0</TOTAL_TARIFF_VAT>
302
+ <TOTAL_TARIFF_VAT_IN_CURRENCY>0</TOTAL_TARIFF_VAT_IN_CURRENCY>
303
+ <TARIFF_CUR_CODE>RUB</TARIFF_CUR_CODE>
304
+ <TARIFF_CUR_RATE/>
305
+ <TOTAL_AMOUNT>1700</TOTAL_AMOUNT>
306
+ <TOTAL_AGENT_INCOME>85</TOTAL_AGENT_INCOME>
307
+ <TOTAL_AMOUNT_VAT>0</TOTAL_AMOUNT_VAT>
308
+ <SALE_CUR_CODE>RUB</SALE_CUR_CODE>
309
+ <CUSTOMER_NAME/>
310
+ <CUSTOMER_PHONE/>
311
+ <CUSTOMER_ADDRESS/>
312
+ <AGENT_ADDRESS>г </AGENT_ADDRESS>
313
+ <CARRIER_ADDRESS>г Келихов</CARRIER_ADDRESS>
314
+ <STATION_ADDRESS>метро Теплый стан; проспект Новоясеневский; дом 4</STATION_ADDRESS>
315
+ <STATION_END_ADDRESS>Московская площадь, д. 3</STATION_END_ADDRESS>
316
+ <INSURANCE_ADDRESS>г Киев, ул Почайнинская, д 25/49, оф 30</INSURANCE_ADDRESS>
317
+ <AGENT_CODE>Internal System Organisation</AGENT_CODE>
318
+ <AGENT_CITY/>
319
+ <CARRIER_CODE>ФЛП</CARRIER_CODE>
320
+ <BEGIN_AVIACODE>MOW</BEGIN_AVIACODE>
321
+ <END_AVIACODE>IEV</END_AVIACODE>
322
+ <XT>0</XT>
323
+ <XT_VAT>0</XT_VAT>
324
+ <SERVICE_TYPE>Автобусный</SERVICE_TYPE>
325
+ <COMMISSION>
326
+ <TYPE>3</TYPE>
327
+ <CODE>XP2</CODE>
328
+ <DESCRIPTION>Агентский сбор №2</DESCRIPTION>
329
+ <VALUE>0</VALUE>
330
+ <VAT_VALUE>18</VAT_VALUE>
331
+ <VAT>0</VAT>
332
+ <CURRENCY>RUB</CURRENCY>
333
+ <RATE>0</RATE>
334
+ <VALUE_IN_CURRENCY>72.03</VALUE_IN_CURRENCY>
335
+ <VAT_IN_CURRENCY>12.97</VAT_IN_CURRENCY>
336
+ </COMMISSION>
337
+ </TICKET>
338
+ <TICKET>
339
+ <FINAL_PRICE_GREATER>true</FINAL_PRICE_GREATER>
340
+ <CREATED_DATE>05.10.2017 13:05:01</CREATED_DATE>
341
+ <UPDATED_DATE>05.10.2017 15:05:02</UPDATED_DATE>
342
+ <TICKET_NUMBER>2699915</TICKET_NUMBER>
343
+ <TICKET_SERIES>11111111</TICKET_SERIES>
344
+ <CARRIER_TICKET_NUMBER/>
345
+ <SYSTEM_NUMBER>2699915</SYSTEM_NUMBER>
346
+ <ORDER_NUMBER>2120248</ORDER_NUMBER>
347
+ <ORDER_ID>dev-82128222</ORDER_ID>
348
+ <TICKET_STATUS>5</TICKET_STATUS>
349
+ <IS_BAGGAGE>false</IS_BAGGAGE>
350
+ <POLICY_NUMBER/>
351
+ <EXCHANGE_BLANK>false</EXCHANGE_BLANK>
352
+ <ENABLE_CHANGE_TRIP_DATE>true</ENABLE_CHANGE_TRIP_DATE>
353
+ <PASSENGER_FULL_NAME>Тест Т.Т.</PASSENGER_FULL_NAME>
354
+ <PASSENGER_FIRST_NAME>Тест</PASSENGER_FIRST_NAME>
355
+ <PASSENGER_LAST_NAME>Тест</PASSENGER_LAST_NAME>
356
+ <PASSENGER_BIRTHDAY>01.02.1980</PASSENGER_BIRTHDAY>
357
+ <PASSENGER_STUDENT_TICKET/>
358
+ <PASSENGER_PHONE>+79161017268</PASSENGER_PHONE>
359
+ <PASSENGER_PASSPORT>5656563533</PASSENGER_PASSPORT>
360
+ <PASSENGER_DOCUMENT_TYPE>1</PASSENGER_DOCUMENT_TYPE>
361
+ <PASSENGER_PICKUPDROPOFF/>
362
+ <AGENT_NAME>Internal System Organisation</AGENT_NAME>
363
+ <AGENT_PHONE/>
364
+ <CARRIER_NAME>"Павлюк Лилия Ивановна" ФЛП</CARRIER_NAME>
365
+ <CARRIER_PHONE>+380988922882</CARRIER_PHONE>
366
+ <BUS_MODEL>Volkswagen</BUS_MODEL>
367
+ <PLATFORM>23</PLATFORM>
368
+ <BUS_CLASS/>
369
+ <CARRIAGE_NUMBER/>
370
+ <NUMBER_SEAT>СВ</NUMBER_SEAT>
371
+ <TOTAL>4920.64</TOTAL>
372
+ <TOTAL_CURRENCY>RUB</TOTAL_CURRENCY>
373
+ <TOTAL_CURRENCY_CODE>643</TOTAL_CURRENCY_CODE>
374
+ <TRIP_NUMBER>ПЛИ001 Киев - Львов</TRIP_NUMBER>
375
+ <TRIP_MODE>1</TRIP_MODE>
376
+ <INTERNATIONAL_TRIP>false</INTERNATIONAL_TRIP>
377
+ <START_TIMEZONE/>
378
+ <END_TIMEZONE/>
379
+ <START_CITY>Киев</START_CITY>
380
+ <START_DATE>25.10.2017</START_DATE>
381
+ <START_TIME>11:30</START_TIME>
382
+ <END_CITY>Львов</END_CITY>
383
+ <END_DATE>25.10.2017</END_DATE>
384
+ <END_TIME>19:30</END_TIME>
385
+ <STATION_ID>06B79BBEB6804BA5E0508E5B3557CF40</STATION_ID>
386
+ <STATION_NAME>Автостанция "Киев" (Центральный железнодорожный вокзал)</STATION_NAME>
387
+ <STATION_END_NAME>Железнодорожный вокзал "Центральный"</STATION_END_NAME>
388
+ <TYPE_TARIFF_NAME>Y</TYPE_TARIFF_NAME>
389
+ <TYPE_TARIFF_FULL_NAME>Базовый тариф</TYPE_TARIFF_FULL_NAME>
390
+ <TYPE_TARIFF_DESCRIPTION>Базовый тариф стоимости проезда одного пассажиров в одном направлении</TYPE_TARIFF_DESCRIPTION>
391
+ <TARIFF>644.33</TARIFF>
392
+ <VAT_VALUE>0</VAT_VALUE>
393
+ <TARIFF_VAT>0</TARIFF_VAT>
394
+ <FOREIGN_TARIFF>0</FOREIGN_TARIFF>
395
+ <FOREIGN_TARIFF_VAT>0</FOREIGN_TARIFF_VAT>
396
+ <NOTE/>
397
+ <BARCODE>ПЛИ002699915BSF</BARCODE>
398
+ <INSURANCE_NAME/>
399
+ <INSURANCE_PHONE/>
400
+ <AGENT_REG/>
401
+ <CARRIER_REG>3238011544</CARRIER_REG>
402
+ <INSURANCE_REG/>
403
+ <TOTAL_TARIFF>644.33</TOTAL_TARIFF>
404
+ <TOTAL_TARIFF_IN_CURRENCY>300</TOTAL_TARIFF_IN_CURRENCY>
405
+ <TOTAL_TARIFF_VAT>0</TOTAL_TARIFF_VAT>
406
+ <TOTAL_TARIFF_VAT_IN_CURRENCY>0</TOTAL_TARIFF_VAT_IN_CURRENCY>
407
+ <TARIFF_CUR_CODE>UAH</TARIFF_CUR_CODE>
408
+ <TARIFF_CUR_RATE>2.14776632302</TARIFF_CUR_RATE>
409
+ <TOTAL_AMOUNT>760.32</TOTAL_AMOUNT>
410
+ <TOTAL_AGENT_INCOME>83.77</TOTAL_AGENT_INCOME>
411
+ <TOTAL_AMOUNT_VAT>17.7</TOTAL_AMOUNT_VAT>
412
+ <SALE_CUR_CODE>RUB</SALE_CUR_CODE>
413
+ <CUSTOMER_NAME/>
414
+ <CUSTOMER_PHONE/>
415
+ <CUSTOMER_ADDRESS/>
416
+ <AGENT_ADDRESS>г </AGENT_ADDRESS>
417
+ <CARRIER_ADDRESS>г Сосновка</CARRIER_ADDRESS>
418
+ <STATION_ADDRESS>метро Вокзальная; улица Симона Петлюры; дом 32</STATION_ADDRESS>
419
+ <STATION_END_ADDRESS>площадь Дворцовая; дом 1</STATION_END_ADDRESS>
420
+ <INSURANCE_ADDRESS/>
421
+ <AGENT_CODE>Internal System Organisation</AGENT_CODE>
422
+ <AGENT_CITY/>
423
+ <CARRIER_CODE>ПЛИ</CARRIER_CODE>
424
+ <BEGIN_AVIACODE>IEV</BEGIN_AVIACODE>
425
+ <END_AVIACODE>LWO</END_AVIACODE>
426
+ <XT>0</XT>
427
+ <XT_VAT>0</XT_VAT>
428
+ <SERVICE_TYPE>Автобусный</SERVICE_TYPE>
429
+ <COMMISSION>
430
+ <TYPE>-1</TYPE>
431
+ <CODE>XP</CODE>
432
+ <DESCRIPTION>Агентский сбор</DESCRIPTION>
433
+ <VALUE>64.44</VALUE>
434
+ <VAT_VALUE>0</VAT_VALUE>
435
+ <VAT>9.84</VAT>
436
+ <CURRENCY>RUB</CURRENCY>
437
+ <RATE>0</RATE>
438
+ <VALUE_IN_CURRENCY>54.6</VALUE_IN_CURRENCY>
439
+ <VAT_IN_CURRENCY>9.84</VAT_IN_CURRENCY>
440
+ </COMMISSION>
441
+ <COMMISSION>
442
+ <TYPE>3</TYPE>
443
+ <CODE>XP2</CODE>
444
+ <DESCRIPTION>Агентский сбор №2</DESCRIPTION>
445
+ <VALUE>32.22</VALUE>
446
+ <VAT_VALUE>18</VAT_VALUE>
447
+ <VAT>4.92</VAT>
448
+ <CURRENCY>UAH</CURRENCY>
449
+ <RATE>2.14776632302</RATE>
450
+ <VALUE_IN_CURRENCY>12.71</VALUE_IN_CURRENCY>
451
+ <VAT_IN_CURRENCY>2.29</VAT_IN_CURRENCY>
452
+ </COMMISSION>
453
+ <COMMISSION>
454
+ <TYPE>6</TYPE>
455
+ <CODE>XP3</CODE>
456
+ <DESCRIPTION>Сервисный сбор</DESCRIPTION>
457
+ <VALUE>51.55</VALUE>
458
+ <VAT_VALUE>18</VAT_VALUE>
459
+ <VAT>7.86</VAT>
460
+ <CURRENCY>UAH</CURRENCY>
461
+ <RATE>2.14776632302</RATE>
462
+ <VALUE_IN_CURRENCY>20.34</VALUE_IN_CURRENCY>
463
+ <VAT_IN_CURRENCY>3.66</VAT_IN_CURRENCY>
464
+ </COMMISSION>
465
+ </TICKET>
466
+ </DATA>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gillbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.7
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey "codesnik" Trofimenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-05 00:00:00.000000000 Z
12
+ date: 2017-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_xml
@@ -219,6 +219,7 @@ files:
219
219
  - test/get_trip_segments_test.rb
220
220
  - test/lock_seats_test.rb
221
221
  - test/reserve_tickets_test.rb
222
+ - test/responses/bookingDifferentCurrencies.xml
222
223
  - test/responses/buyBooking.xml
223
224
  - test/responses/buyTickets.xml
224
225
  - test/responses/cancelOrder.xml
@@ -285,6 +286,7 @@ test_files:
285
286
  - test/get_trip_segments_test.rb
286
287
  - test/lock_seats_test.rb
287
288
  - test/reserve_tickets_test.rb
289
+ - test/responses/bookingDifferentCurrencies.xml
288
290
  - test/responses/buyBooking.xml
289
291
  - test/responses/buyTickets.xml
290
292
  - test/responses/cancelOrder.xml