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 +4 -4
- data/lib/gillbus.rb +1 -0
- data/lib/gillbus/structs/bus_photo.rb +12 -0
- data/lib/gillbus/structs/ticket.rb +3 -0
- data/lib/gillbus/structs/trip.rb +2 -0
- data/lib/gillbus/tickets_booking.rb +2 -3
- data/lib/gillbus/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1964451a59ff6d5aff1f51a60e50150b3aefd1e
|
4
|
+
data.tar.gz: 1ad833018f162e61615b52f34b8a72e22e83ed53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e88a70c20ee02e3b75996a68543c537dd324d74edada9d34719290c8f20269476cf8426071995945bf93b3169672876767ef94897392662122893df1adc351
|
7
|
+
data.tar.gz: 6df80b855bbb2c621781237fe1c60a88d3ca6b8fa58202235ca984b0aac86de656348fdc83f50b0a3a0f6687d73df915b4d83af16ba8a6a0047246188cc5a02c
|
data/lib/gillbus.rb
CHANGED
@@ -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
|
data/lib/gillbus/structs/trip.rb
CHANGED
@@ -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
|
|
data/lib/gillbus/version.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.17.
|
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
|
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
|