smartcar 3.6.0 → 3.7.0

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
  SHA256:
3
- metadata.gz: 8b73275a395285b7814ea6a00e15ba722b34c04e93f04f911558243cd906fb85
4
- data.tar.gz: 46a585c74ab00a8c61fb3493a1f4cff476cbbbcae525be27124c5fdffb5be64b
3
+ metadata.gz: e1c4483d2719b243be93876bec15f34de1d2787308bb6a44383a9e0bbf0db00a
4
+ data.tar.gz: f4774a7225f67e3ddae7d4d935fbddf9cf772994ba5a7d236c3c2e8daf5ed222
5
5
  SHA512:
6
- metadata.gz: 448a25c995db755a1b5d198d4843bb46da8c58512c8c42d83e9efcd81c68b8e57e8586fc0eba401936da85b64392aa95f8f05f3d9b1d80843764cae42ee6cd04
7
- data.tar.gz: 4a3aa2472759eec45741c9d842cb336fccb5e1b4fc98859400aba6f526ac6a89c8ae0f1aedb9f87486e18e15e34c80a15855361aa1f909d9d83bebb21bc7ada6
6
+ metadata.gz: 1a3c96cb014e4ad5b5797e0a8a4d74599f849f861fccee1739c916a02e77c53c105853a496a3f87b7e94e34c66046e0b49c0bc1e63b13da4a8fac6cf82c2c961
7
+ data.tar.gz: 4a3d22bb0334c947b39dcd43c2950e35c1b8453ddd3f731ae589f1dfbdbbd254cae671668f712387b455328fc0e15c25e925603e90be8fff2330ff31c9412936
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smartcar (3.6.0)
4
+ smartcar (3.7.0)
5
5
  oauth2 (~> 1.4)
6
6
  recursive-open-struct (~> 1.1.3)
7
7
 
@@ -20,25 +20,25 @@ GEM
20
20
  rexml
21
21
  diff-lcs (1.5.0)
22
22
  docile (1.4.0)
23
- faraday (2.4.0)
24
- faraday-net_http (~> 2.0)
23
+ faraday (2.7.10)
24
+ faraday-net_http (>= 2.0, < 3.1)
25
25
  ruby2_keywords (>= 0.0.4)
26
- faraday-net_http (2.1.0)
26
+ faraday-net_http (3.0.2)
27
27
  hashdiff (1.0.1)
28
- jwt (2.4.1)
28
+ jwt (2.7.1)
29
29
  multi_json (1.15.0)
30
30
  multi_xml (0.6.0)
31
- oauth2 (1.4.10)
31
+ oauth2 (1.4.11)
32
32
  faraday (>= 0.17.3, < 3.0)
33
33
  jwt (>= 1.0, < 3.0)
34
34
  multi_json (~> 1.3)
35
35
  multi_xml (~> 0.5)
36
- rack (>= 1.2, < 3)
36
+ rack (>= 1.2, < 4)
37
37
  parallel (1.21.0)
38
38
  parser (3.1.0.0)
39
39
  ast (~> 2.4.1)
40
40
  public_suffix (4.0.6)
41
- rack (2.2.3)
41
+ rack (3.0.8)
42
42
  rainbow (3.1.1)
43
43
  rake (12.3.3)
44
44
  readapt (1.4.3)
@@ -125,6 +125,8 @@ module Smartcar
125
125
  # Adding this because else it would become tires_pressure
126
126
  return :tire_pressure if path == '/tires/pressure'
127
127
 
128
+ return :lock_status if path == '/security'
129
+
128
130
  path.split('/').reject(&:empty?).join('_').to_sym
129
131
  end
130
132
 
@@ -54,6 +54,13 @@ module Smartcar
54
54
  vin: { path: proc { |id| "/vehicles/#{id}/vin" } },
55
55
  get_charge_limit: { path: proc { |id| "/vehicles/#{id}/charge/limit" } },
56
56
  disconnect!: { type: :delete, path: proc { |id| "/vehicles/#{id}/application" } },
57
+ lock_status: {
58
+ path: proc { |id| "/vehicles/#{id}/security" },
59
+ aliases: {
60
+ 'isLocked' => 'is_locked',
61
+ 'chargingPort' => 'charging_port'
62
+ }
63
+ },
57
64
  lock!: { type: :post, path: proc { |id| "/vehicles/#{id}/security" }, body: { action: 'LOCK' } },
58
65
  unlock!: { type: :post, path: proc { |id| "/vehicles/#{id}/security" }, body: { action: 'UNLOCK' } },
59
66
  start_charge!: { type: :post, path: proc { |id| "/vehicles/#{id}/charge" }, body: { action: 'START' } },
@@ -172,6 +179,17 @@ module Smartcar
172
179
  # @return [OpenStruct] And object representing the JSON response mentioned in https://smartcar.com/docs/api#get-vin
173
180
  # and a meta attribute with the relevant items from response headers.
174
181
 
182
+ # @!method lock_status()
183
+ # Returns the lock status for a vehicle and the open status of its doors, windows, storage units,
184
+ # sunroof and charging port where available. The open status array(s) will be empty if a vehicle
185
+ # has partial support. The request will error if lock status can not be retrieved from the vehicle or
186
+ # the brand is not supported.
187
+ #
188
+ # API Documentation https://smartcar.com/docs/api#get-security
189
+ #
190
+ # @return [OpenStruct] And object representing the JSON response mentioned in https://smartcar.com/docs/api#get-security
191
+ # and a meta attribute with the relevant items from response headers.
192
+
175
193
  # NOTES :
176
194
  # - We only generate the methods where there is no query string or additional options considering thats
177
195
  # the majority, for all the ones that require parameters, write them separately.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Smartcar
4
4
  # Gem current version number
5
- VERSION = '3.6.0'
5
+ VERSION = '3.7.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashwin Subramanian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-23 00:00:00.000000000 Z
11
+ date: 2023-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler