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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f01e510405f0a0a984ef6a6439c025df0c2950c4
4
- data.tar.gz: 10ac092fda9d90ce4917ab37bf0d6766b2d4b032
3
+ metadata.gz: f286e9589d91443f37e13548fc7914d305285b0e
4
+ data.tar.gz: 0b8afadc2c1496d752102e04638e256d23a7ef76
5
5
  SHA512:
6
- metadata.gz: 8d9194934cb1dc11e2903b9189a53fbedd055197584191e08f2178deba3aac4e8e3c98b1f529d86afa80dda842288d06895b6154dddd8ac9564b90a3090d6b0e
7
- data.tar.gz: 97d6c525029fc5a6de2cf8ad47df17fc80fdedab00758ea22b1031ac845140687ac76edbf09d21aff8e1712be3b52b6bb637a804acb566ed4372c8713006a4be
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)
@@ -1,3 +1,3 @@
1
1
  class Gillbus
2
- VERSION = '0.18.2'.freeze
2
+ VERSION = '0.18.3'.freeze
3
3
  end
data/lib/gillbus.rb CHANGED
@@ -96,4 +96,5 @@ class Gillbus
96
96
  require 'gillbus/get_order_status'
97
97
  require 'gillbus/logout'
98
98
  require 'gillbus/return_position'
99
+ require 'gillbus/return_position_forced'
99
100
  end
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.2
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-05 00:00:00.000000000 Z
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.5.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: