gillbus 0.18.2 → 0.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gillbus/return_position_forced.rb +16 -0
- data/lib/gillbus/structs/ticket.rb +11 -9
- data/lib/gillbus/version.rb +1 -1
- data/lib/gillbus.rb +1 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f286e9589d91443f37e13548fc7914d305285b0e
|
4
|
+
data.tar.gz: 0b8afadc2c1496d752102e04638e256d23a7ef76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44c6c4108bbce6afada0e9a94c2a18231ec4671f9c9aff2b34aa1ed6995bf5560e105d2d8c5f5b4f1a047925b15b725663a1886a8b1c1aa0ba1eb3b64aab1a30
|
7
|
+
data.tar.gz: a2251447771903874d594ffbb7e29e286b6047c438407ed83508e0d25a6f5dd168202d4553aea117600ea4c2f4408d7d14542a22637269adae3881f358fcab6f
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Gillbus
|
2
|
+
module ReturnPositionForced
|
3
|
+
Gillbus.register self, :return_position_forced
|
4
|
+
|
5
|
+
class Request < ::Gillbus::ReturnPosition::Request
|
6
|
+
def path; '/online2/ReturnPositionForced'; end
|
7
|
+
end
|
8
|
+
|
9
|
+
class Response < ::Gillbus::ReturnPosition::Response
|
10
|
+
class ReturnPositionForced < ::Gillbus::ReturnPosition::Response::ReturnPosition
|
11
|
+
end
|
12
|
+
|
13
|
+
field :return_positions, [::Gillbus::ReturnPosition::Response::ReturnPosition], key: 'RETURN_POSITION'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,5 +1,15 @@
|
|
1
1
|
class Gillbus
|
2
2
|
class Ticket
|
3
|
+
STATUS_MAPPING = {
|
4
|
+
'1' => :reserved, # ticket booked;
|
5
|
+
'2' => :ticketed, # ticket sold;
|
6
|
+
'3' => :ordered, # the booking, that waiting for the confirmation;
|
7
|
+
'4' => :returned, # ticket returned;
|
8
|
+
'5' => :canceled, # booking cancelled;
|
9
|
+
'6' => :voided, # ticket cancelled;
|
10
|
+
'8' => :booked, # the sale, that waiting for the confirmation
|
11
|
+
}.freeze
|
12
|
+
|
3
13
|
extend Fields
|
4
14
|
include UpdateAttrs
|
5
15
|
|
@@ -273,15 +283,7 @@ class Gillbus
|
|
273
283
|
|
274
284
|
parser do
|
275
285
|
def ticket_status(value)
|
276
|
-
|
277
|
-
'1' => :reserved, # ticket booked;
|
278
|
-
'2' => :ticketed, # ticket sold;
|
279
|
-
'3' => :ordered, # the booking, that waiting for the confirmation;
|
280
|
-
'4' => :returned, # ticket returned;
|
281
|
-
'5' => :canceled, # booking cancelled;
|
282
|
-
'6' => :voided, # ticket cancelled;
|
283
|
-
'8' => :booked, # the sale, that waiting for the confirmation
|
284
|
-
}[value]
|
286
|
+
::Gillbus::Ticket::STATUS_MAPPING[value]
|
285
287
|
end
|
286
288
|
|
287
289
|
def money(val)
|
data/lib/gillbus/version.rb
CHANGED
data/lib/gillbus.rb
CHANGED
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.18.
|
4
|
+
version: 0.18.3
|
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: 2018-06-
|
12
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/gillbus/parse_error.rb
|
197
197
|
- lib/gillbus/reserve_tickets.rb
|
198
198
|
- lib/gillbus/return_position.rb
|
199
|
+
- lib/gillbus/return_position_forced.rb
|
199
200
|
- lib/gillbus/search_trips.rb
|
200
201
|
- lib/gillbus/session_login.rb
|
201
202
|
- lib/gillbus/structs/bus_photo.rb
|
@@ -295,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
296
|
version: '0'
|
296
297
|
requirements: []
|
297
298
|
rubyforge_project:
|
298
|
-
rubygems_version: 2.
|
299
|
+
rubygems_version: 2.6.13
|
299
300
|
signing_key:
|
300
301
|
specification_version: 4
|
301
302
|
summary: Driver for Gillbus IDS API
|
@@ -353,3 +354,4 @@ test_files:
|
|
353
354
|
- test/session_login_test.rb
|
354
355
|
- test/test_helper.rb
|
355
356
|
- test/tickets_booking_test.rb
|
357
|
+
has_rdoc:
|