incognia_api 0.5.3 → 0.5.5

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
  SHA256:
3
- metadata.gz: e65736589513112ba598e22201a4d9b4e0bb7460e5dfde60371d35a063356e04
4
- data.tar.gz: 040dc0603ed81b4e413f18ef9505cbd6b08eb798a940307ded4f8f9195d95bbb
3
+ metadata.gz: 1c201a61c3bfa9be562b9cd6dcabac5024dc00ce1ea19a2ef2225461a8105609
4
+ data.tar.gz: fea3457b4ccbd0409178e97a2b07272e22dbb57ac448fa681d6c3bea59242e1e
5
5
  SHA512:
6
- metadata.gz: f905369c680c26ab5503d0ef54c636892c934dcb5e21bb18d2e0e635a55a96474594638a1cbbc868b9f9409685028db03a80dac240cd784cb9055547d0f49108
7
- data.tar.gz: 7a2bbb5d37e6668f71f4f63e1d2aee89f2b082fa02fe7d5545618792ccd0a8e61bb86fdea6a3886af279fde91ef1f5b415f443cd15dd0a9736cf1a80a9d021ac
6
+ metadata.gz: 956994d8de303073ac0ae555a5c335dadf38095632d63e2fbeae972bdd4f0b16488295d641028bfb1ab627e39955252d2b949da5bd8735f3a76d328ec1547a8d
7
+ data.tar.gz: 953be4e56175a2292ff63fea122dc668b5ad5efd62d958df5d08b2b262b33ca23fa7bcfc2c28db4eb3aaeeca174b22830b812eb4581617ea38649347603a2de8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.5] - 2024-04-01
4
+
5
+ - Fix datetime parcer to RFC3339 format
6
+
7
+ ## [0.5.4] - 2024-03-19
8
+
9
+ - Allow registering feedback with expires_at parameter
10
+
3
11
  ## [0.5.1] - 2023-07-13
4
12
 
5
13
  - Allow registering payments
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- incognia_api (0.5.3)
4
+ incognia_api (0.5.5)
5
5
  faraday (~> 1.10)
6
6
  faraday_middleware (~> 1.2)
7
7
 
data/README.md CHANGED
@@ -207,7 +207,10 @@ assessment = api.register_payment(
207
207
 
208
208
  This method registers a feedback event for the given identifiers (optional arguments), returning true when success.
209
209
 
210
- The `timestamp` argument should be a _Time_, _DateTime_ or an _Integer_ being the timestamp in milliseconds:
210
+ The `timestamp` argument should be a _Time_, _DateTime_ or an _Integer_ being the timestamp in milliseconds.
211
+
212
+ The `expires_at` argument should be a _Time_, _DateTime_ or an date in **RFC 3339** format.
213
+
211
214
 
212
215
  ```ruby
213
216
  account_id = "cdb2cfbb-8ad8-4668-b276-5fff9bbfdc96"
@@ -252,8 +255,11 @@ If you have found a bug or if you have a feature request, please report them at
252
255
  ### Development
253
256
 
254
257
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
258
+ To install this gem onto your local machine, run `bundle exec rake install`.
259
+
260
+ To release a new version, update the version number in `version.rb`, run `bundle` to update the `gemfile.lock`, add one description on `CHANGELOG.md` if necessary, and then after merging on master, run `bundle exec rake release`.
255
261
 
256
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
262
+ The `rake release` task will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
257
263
 
258
264
  ## License
259
265
 
@@ -15,7 +15,7 @@ module Incognia
15
15
  host: "https://api.incognia.com/api")
16
16
  end
17
17
 
18
- def register_signup(installation_id:, address: nil, **opts)
18
+ def register_signup(installation_id:, address: nil, **opts)
19
19
  params = { installation_id: installation_id }
20
20
  params.merge!(opts)
21
21
  params.merge!(address&.to_hash) if address
@@ -38,13 +38,13 @@ module Incognia
38
38
  SignupAssessment.from_hash(response.body) if response.success?
39
39
  end
40
40
 
41
- def register_login(installation_id:, account_id:, **opts)
42
- params = {
43
- type: :login,
44
- installation_id: installation_id,
45
- account_id: account_id,
46
- }
47
- params.merge!(opts)
41
+ def register_login(installation_id:, account_id:, **opts)
42
+ params = {
43
+ type: :login,
44
+ installation_id: installation_id,
45
+ account_id: account_id,
46
+ }
47
+ params.merge!(opts)
48
48
 
49
49
  response = connection.request(
50
50
  :post,
@@ -55,10 +55,11 @@ module Incognia
55
55
  LoginAssessment.from_hash(response.body) if response.success?
56
56
  end
57
57
 
58
- def register_feedback(event: , timestamp: nil, **ids)
58
+ def register_feedback(event:, timestamp: nil, expires_at: nil, **ids)
59
59
  timestamp = timestamp.strftime('%s%L') if timestamp.respond_to? :strftime
60
+ expires_at = expires_at.to_datetime.rfc3339 if expires_at.respond_to? :to_datetime
60
61
 
61
- params = { event: event, timestamp: timestamp&.to_i }.compact
62
+ params = { event: event, timestamp: timestamp&.to_i, expires_at: expires_at }.compact
62
63
  params.merge!(ids)
63
64
 
64
65
  response = connection.request(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Incognia
4
- VERSION = "0.5.3"
4
+ VERSION = "0.5.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incognia_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Cavalcanti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
11
+ date: 2024-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.3.7
95
+ rubygems_version: 3.1.6
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Official Ruby lib for communicating with Incognia API