alfa_insurance 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/alfa_insurance/insurance.rb +20 -4
- data/lib/alfa_insurance/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 327fc246f136f035e1af994457c57cff16005aa13222b4dff318deac30f47106
|
4
|
+
data.tar.gz: 883756c8414cfd2942bfad5a00c9521a5c454d6de144874b192800d8b5e1e242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e23adf4a9a5397d03eb67cd3a41781ace6afd9d7a61fa73fb0fc99246abffef25318e2373b4b95db0663046a3e554be47681a9c421a0c2c59885b82c411dac6
|
7
|
+
data.tar.gz: '0994d079e0bb9b72420f5fe2c9d10c23eedfb2fa96f9b78b1ef50bf6177aecfadd9b36780429e75e7474bfe4989a38a3158979c4cc06f290ec4def44e8abab94'
|
@@ -13,6 +13,22 @@ module AlfaInsurance
|
|
13
13
|
instance_variable_set("@#{attr}", value)
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
def departure_date
|
18
|
+
departure_at && departure_at.to_date.iso8601
|
19
|
+
end
|
20
|
+
|
21
|
+
def departure_time
|
22
|
+
departure_at && departure_at.strftime("%H:%M:%S")
|
23
|
+
end
|
24
|
+
|
25
|
+
def arrival_date
|
26
|
+
arrival_at && arrival_at.to_date.iso8601
|
27
|
+
end
|
28
|
+
|
29
|
+
def arrival_time
|
30
|
+
arrival_at && arrival_at.strftime("%H:%M:%S")
|
31
|
+
end
|
16
32
|
end
|
17
33
|
|
18
34
|
class BusInsuranceRequest
|
@@ -54,19 +70,19 @@ module AlfaInsurance
|
|
54
70
|
xml.value(segment.departure_station)
|
55
71
|
}
|
56
72
|
xml.busSegmentDepartureDate(seqNo: index) {
|
57
|
-
xml.value(segment.
|
73
|
+
xml.value(segment.departure_date)
|
58
74
|
}
|
59
75
|
xml.busSegmentDepartureTime(seqNo: index) {
|
60
|
-
xml.value(segment.
|
76
|
+
xml.value(segment.departure_time)
|
61
77
|
}
|
62
78
|
xml.busSegmentArrivalStation(seqNo: index) {
|
63
79
|
xml.value(segment.arrival_station)
|
64
80
|
}
|
65
81
|
xml.busSegmentArrivalDate(seqNo: index) {
|
66
|
-
xml.value(segment.
|
82
|
+
xml.value(segment.arrival_date)
|
67
83
|
}
|
68
84
|
xml.busSegmentArrivalTime(seqNo: index) {
|
69
|
-
xml.value(segment.
|
85
|
+
xml.value(segment.arrival_time)
|
70
86
|
}
|
71
87
|
xml.busSegmentNumber(seqNo: index) {
|
72
88
|
xml.value(segment.number)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alfa_insurance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Sviridov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.7.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Ruby wrapper for ALfaInsurance SOAP API
|