gillbus 0.22.8 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gillbus/structs/ticket.rb +9 -0
- data/lib/gillbus/structs/trip.rb +3 -0
- data/lib/gillbus/version.rb +1 -1
- data/test/find_order_test.rb +12 -0
- data/test/parse_trip_test.rb +11 -0
- data/test/responses/findOrder.xml +6 -0
- data/test/responses/legacy_trip.yml +1 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e8ed5ef5b87a0c94701d4f69508dc02fdef5926020e6eaafbe546f2f8d8a731
|
4
|
+
data.tar.gz: bd54a5348b8e3e26dd4fb8c6c0faa92c9f8d675a3b5f01a5cb9d04ba0c768f45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a340f90c4ba3df79cd8d4ae4a861b204454ef2bbe1d53907609d78efccd5f987dda6218ef56eb270777a90e0d599d4e9a2b3d4f46e028406239378bf4eb3478
|
7
|
+
data.tar.gz: 0a9b56dfa5e9a6fabcfd6d8248f7fafed3cd91de9c4f49b0670ae47abb573a1ba7551c7b9a71d01ed858ffce45913874d853c21f4cae5289823d595582d87740
|
@@ -287,6 +287,15 @@ class Gillbus
|
|
287
287
|
|
288
288
|
field :is_luggage, :bool, key: 'IS_BAGGAGE'
|
289
289
|
|
290
|
+
# => '3257025789'
|
291
|
+
field :supplier_inn
|
292
|
+
|
293
|
+
# => '"Клен 2" ООО'
|
294
|
+
field :supplier_name
|
295
|
+
|
296
|
+
# => "+79065002926"
|
297
|
+
field :supplier_phone
|
298
|
+
|
290
299
|
parser do
|
291
300
|
def ticket_status(value)
|
292
301
|
::Gillbus::Ticket::STATUS_MAPPING[value]
|
data/lib/gillbus/structs/trip.rb
CHANGED
data/lib/gillbus/version.rb
CHANGED
data/test/find_order_test.rb
CHANGED
@@ -40,4 +40,16 @@ class FindOrderTest < Minitest::Test
|
|
40
40
|
def test_online_refund
|
41
41
|
assert_equal(true, find_order.tickets.first.is_online_refund)
|
42
42
|
end
|
43
|
+
|
44
|
+
def test_supplier_inn
|
45
|
+
assert_equal('3257025789', find_order.tickets.last.supplier_inn)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_supplier_name
|
49
|
+
assert_equal('"Клен 2" ООО', find_order.tickets.last.supplier_name)
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_supplier_phone
|
53
|
+
assert_equal('+79065002926', find_order.tickets.last.supplier_phone)
|
54
|
+
end
|
43
55
|
end
|
data/test/parse_trip_test.rb
CHANGED
@@ -22,4 +22,15 @@ class ParseTripYAML < Minitest::Test
|
|
22
22
|
"Добровольно, более чем за 2 ч., до отправления рейса. Ориентировочная сумма возврата 783.71RUB",
|
23
23
|
"не менше ніж за 24 години до відправлення рейсу. Ориентировочная сумма возврата 888.2RUB"], response.tariffs.first.return_cause.map(&:cause)
|
24
24
|
end
|
25
|
+
|
26
|
+
def deeplink_test_1
|
27
|
+
response = Gillbus::Trip.parse(YAML.load(File.read('test/responses/legacy_trip.yml')))
|
28
|
+
expected_causes = 'https://www.blablacar.com.ua/trip?source=PRO_PARTNER&id=...'
|
29
|
+
assert_equal expected_causes, response.deep_link
|
30
|
+
end
|
31
|
+
|
32
|
+
def deeplink_test_2
|
33
|
+
response = Gillbus::Trip.parse(YAML.load(File.read('test/responses/legacy_trip_2.yml')))
|
34
|
+
assert_equal nil, response.deep_link
|
35
|
+
end
|
25
36
|
end
|
@@ -147,6 +147,9 @@
|
|
147
147
|
<VALUE_IN_CURRENCY>0.05</VALUE_IN_CURRENCY>
|
148
148
|
<VAT_IN_CURRENCY>0.01</VAT_IN_CURRENCY>
|
149
149
|
</COMMISSION>
|
150
|
+
<SUPPLIER_INN>3257025789</SUPPLIER_INN>
|
151
|
+
<SUPPLIER_NAME>"Клен 2" ООО</SUPPLIER_NAME>
|
152
|
+
<SUPPLIER_PHONE>+79065002926</SUPPLIER_PHONE>
|
150
153
|
</TICKET>
|
151
154
|
<TICKET>
|
152
155
|
<TICKET_NUMBER>14483</TICKET_NUMBER>
|
@@ -298,5 +301,8 @@
|
|
298
301
|
<VALUE_IN_CURRENCY>0.05</VALUE_IN_CURRENCY>
|
299
302
|
<VAT_IN_CURRENCY>0.01</VAT_IN_CURRENCY>
|
300
303
|
</COMMISSION>
|
304
|
+
<SUPPLIER_INN>3257025789</SUPPLIER_INN>
|
305
|
+
<SUPPLIER_NAME>"Клен 2" ООО</SUPPLIER_NAME>
|
306
|
+
<SUPPLIER_PHONE>+79065002926</SUPPLIER_PHONE>
|
301
307
|
</TICKET>
|
302
308
|
</DATA>
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gillbus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey "codesnik" Trofimenko
|
8
8
|
- Kirill Platonov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-10-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: 0.51.0
|
154
|
-
description:
|
154
|
+
description:
|
155
155
|
email:
|
156
156
|
- aronaxis@gmail.com
|
157
157
|
- mail@kirillplatonov.com
|
@@ -299,7 +299,7 @@ homepage: http://gillbus.com/
|
|
299
299
|
licenses:
|
300
300
|
- MIT
|
301
301
|
metadata: {}
|
302
|
-
post_install_message:
|
302
|
+
post_install_message:
|
303
303
|
rdoc_options: []
|
304
304
|
require_paths:
|
305
305
|
- lib
|
@@ -315,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
315
|
version: '0'
|
316
316
|
requirements: []
|
317
317
|
rubygems_version: 3.0.3
|
318
|
-
signing_key:
|
318
|
+
signing_key:
|
319
319
|
specification_version: 4
|
320
320
|
summary: Driver for Gillbus IDS API
|
321
321
|
test_files:
|