gillbus 0.17.1 → 0.17.2

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: db5a6cb038ad9fe570ef699438a7a91405a53d3f
4
- data.tar.gz: 2e4a1be94f52db9cb4dba62d279dbf1272a721d7
3
+ metadata.gz: f1964451a59ff6d5aff1f51a60e50150b3aefd1e
4
+ data.tar.gz: 1ad833018f162e61615b52f34b8a72e22e83ed53
5
5
  SHA512:
6
- metadata.gz: 070b85b2fc0566c0c093860ccced6e1d499491ac65ba8c5992073d3ec3ea4ffe5b1584204329950479348d1ceb926ecbc517cc89440f8f562270d2a211cec1af
7
- data.tar.gz: 40eec3620c868a59316945791e810289b07be7f71445c89c9a2e0597cd58d7d66f8f80632f4ebb807589839ef79b8f314e08ee9b59848e6dd5d05978cd523cf3
6
+ metadata.gz: 58e88a70c20ee02e3b75996a68543c537dd324d74edada9d34719290c8f20269476cf8426071995945bf93b3169672876767ef94897392662122893df1adc351
7
+ data.tar.gz: 6df80b855bbb2c621781237fe1c60a88d3ca6b8fa58202235ca984b0aac86de656348fdc83f50b0a3a0f6687d73df915b4d83af16ba8a6a0047246188cc5a02c
@@ -53,6 +53,7 @@ class Gillbus
53
53
  require 'gillbus/structs/tariff'
54
54
  require 'gillbus/structs/segment'
55
55
  require 'gillbus/structs/timetable_segment'
56
+ require 'gillbus/structs/bus_photo'
56
57
  require 'gillbus/structs/trip'
57
58
  require 'gillbus/structs/timetable_trip'
58
59
 
@@ -0,0 +1,12 @@
1
+ class Gillbus
2
+ class BusPhoto
3
+ extend Fields
4
+ include UpdateAttrs
5
+
6
+ # => "https://busfor-gds-production.s3-eu-central-1.amazonaws.com/ImagesBuses/4764FC6955D3204EE0530300F00AF0E8/mercedes_aa_5939_aa.jpg"
7
+ field :original_url
8
+
9
+ # => "https://busfor-gds-production.s3-eu-central-1.amazonaws.com/ImagesBuses/4764FC6955D3204EE0530300F00AF0E8/Thumb/_mercedes_aa_5939_aa.jpg"
10
+ field :thumbnail_url
11
+ end
12
+ end
@@ -261,6 +261,9 @@ class Gillbus
261
261
  # Minutes to pay booked ticket
262
262
  field :minutes_for_buyout, :int
263
263
 
264
+ # Ticket type: i.e. bus ticket, insurance, etc
265
+ field :service_type
266
+
264
267
  parser do
265
268
  def ticket_status(value)
266
269
  {
@@ -158,6 +158,8 @@ class Gillbus
158
158
 
159
159
  field :options, TripOptions, key: 'OPTIONS'
160
160
 
161
+ field :bus_photos, [BusPhoto], key: 'BUS_PHOTO'
162
+
161
163
  def start_at
162
164
  timezone = data['START_TIMEZONE'] || 'Europe/Kiev'
163
165
  datetime_string = "#{data['START_DATE']} #{data['START_TIME']}"
@@ -148,9 +148,8 @@ class Gillbus
148
148
  attr_accessor :discount
149
149
 
150
150
 
151
- attr_accessor :insurance
152
-
153
151
  attr_accessor :insurance_id
152
+ attr_accessor :insurance_cost
154
153
 
155
154
  def params(prefix = '')
156
155
  compact(
@@ -167,8 +166,8 @@ class Gillbus
167
166
  citizenship: citizenship,
168
167
  gender: gender,
169
168
  discountValue: discount.to_f.to_s,
170
- insurance: insurance,
171
169
  insuranceId: insurance_id,
170
+ insurance: insurance_cost,
172
171
  ).map { |k, v| [:"#{prefix}#{k}", v] }.to_h
173
172
  end
174
173
 
@@ -1,3 +1,3 @@
1
1
  class Gillbus
2
- VERSION = '0.17.1'.freeze
2
+ VERSION = '0.17.2'.freeze
3
3
  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.17.1
4
+ version: 0.17.2
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-02-21 00:00:00.000000000 Z
12
+ date: 2018-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -198,6 +198,7 @@ files:
198
198
  - lib/gillbus/return_position.rb
199
199
  - lib/gillbus/search_trips.rb
200
200
  - lib/gillbus/session_login.rb
201
+ - lib/gillbus/structs/bus_photo.rb
201
202
  - lib/gillbus/structs/commission.rb
202
203
  - lib/gillbus/structs/item.rb
203
204
  - lib/gillbus/structs/passenger_discount.rb