onlia 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: 46c78102ce66972ceccae4611ec8066c37bb56608ee3d293b9d123b243710e0f
4
- data.tar.gz: 5bc1b99e20ee44e391289a591a9a932ac36bf39a94ed4ed320fcec976ba86576
3
+ metadata.gz: efb4abe872d6eab60b6815d5899a87cd903686bc2dc0f957ee64bc9c8bd9ccfa
4
+ data.tar.gz: dbfe2d746e858b67473663f3d16d28b758e1fc78496a38bfe061373e9c85a6b3
5
5
  SHA512:
6
- metadata.gz: 19e059ae9424093ab1a91b3887b64bb361c50c56373a0053df8d46f045e744c7c06e81198e8e087beb8c245cc9d10c77d80f53cb485f579be529c9ab6ae21d7f
7
- data.tar.gz: c9e3227b00436b90fd29d78ebcbc5cadced73d863d82a3791612e5c8dc5e4bb8a39d1c7b749cecaeef313cbc2aa1819911688e51c99e5444a4916323ab50affb
6
+ metadata.gz: 97a95affcde47ebea957e6b68ff36d44556a537afde627d41d065d92b34bc1697d0581cfaa4c6b316d7fbc332333c665c9d14cd1c3a1fd96a69bb370bee195d0
7
+ data.tar.gz: 669a2d9d104fd30d28bc8ac13fbebabdada67b49b201367489d820fa98cd29d06f579ff8335062d9125635843d54721f2ed81e5d2a7c40a516168af7baa77ec8
data/lib/onlia/client.rb CHANGED
@@ -18,9 +18,8 @@ module Onlia
18
18
  end
19
19
 
20
20
  def refresh_if_required
21
- if @decoded_token && @decoded_token["exp"] < Time.now.to_i
22
- self.refresh_token
23
- end
21
+ # TODO refresh only when required expiry < current time
22
+ self.refresh_token
24
23
  end
25
24
 
26
25
  def post(endpoint, body, token = nil)
@@ -58,18 +57,19 @@ module Onlia
58
57
 
59
58
  # TODO: Add more methods here
60
59
  def bind_agreement(params)
61
- puts "TODO: bind_agreement"
62
- # post("/Auto/bind", params, @api_token)
60
+ post("/Auto/bind", params, @api_token)
61
+ end
62
+
63
+ def property_address_validate(params)
64
+ post("/Property/address/validate", params, @api_token)
63
65
  end
64
66
 
65
- def start_agreement(params)
66
- puts "TODO: start_agreement"
67
- # post("/Auto/start", params, @api_token)
67
+ def activate_agreement(params)
68
+ post("/Auto/activate", params, @api_token)
68
69
  end
69
70
 
70
- def end_agreement(params)
71
- puts "TODO: end_agreement"
72
- # post("/Auto/end", params, @api_token)
71
+ def terminate_agreement(params)
72
+ post("/auto/terminate", params, @api_token)
73
73
  end
74
74
  end
75
75
  end
data/lib/onlia/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Onlia
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manpreet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-06 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry