persona_api 0.2.0 → 0.3.1

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: cc142f2d3d4b1ea4f61b57a549b47c1589ec6235b758f79dfc9a7425fce30d7e
4
- data.tar.gz: c5f2530ffc6c82964cea5bdbd1a70fd94d6f58872330900c2c0ab9570c2c4f1f
3
+ metadata.gz: 21804f1ba92f091e929df122f5e8b629d9b531aa28c1b97d7deb1087412b8993
4
+ data.tar.gz: 34b789f47efe266d02401b23af54a2dc82a8336c80b64bca9bfb23349e47cb1a
5
5
  SHA512:
6
- metadata.gz: b3dfb21662215e270f42b6e7c76e271fdd3795f132411ec7af9f419743204444c2bcee1412bccb420047150adce0bb1e2c63e9df46c0855ad78a4cd3b348b6c5
7
- data.tar.gz: a090952568e4010bf393b609b44e47971fe3bf5ef3af2fb5c3dd297e8a7e24190d00a79bea91a41b1525c23e7eeed7068ab360aaf6e4e9620847d4c1e6314d77
6
+ metadata.gz: 5d8ec8ddaf0a51367e54024dde0aa831950a85bc3154406c3107f527a2f6d7c1b2b33ccb368d7994bf2de275989c4607acb1509095511d60e406bb6b125a2cd6
7
+ data.tar.gz: b1059f4cad1a3023fa6f0f2adebce6efc81e61c9e32231f8a1256622980796431c35dd3a42c748a26cd78eec108106003d52625ba7afc00006e36c9ad599bafe
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ == [0.3.1] - 2022-12-06
2
+
3
+ * DB & GovID verification bug fixes
4
+
5
+ == [0.3.0] - 2022-11-07
6
+
7
+ * Add Transactions Endpoint
8
+ * Bug fixes
9
+
1
10
  == [0.2.0] - 2022-08-18
2
11
 
3
12
  * Update README.md
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- persona_api (0.1.7)
4
+ persona_api (0.3.0)
5
5
  faraday (~> 1.7)
6
6
  faraday_middleware (~> 1.1)
7
7
 
data/README.md CHANGED
@@ -194,6 +194,13 @@ client.tin_database_verifications.retrieve(ver_id: "id")
194
194
  client.tin_database_verifications.submit(ver_id: "id", {})
195
195
  ```
196
196
 
197
+ ### Transactions
198
+
199
+ ```ruby
200
+ client.transactions.create({})
201
+ client.transactions.retrieve(txn_id: "id")
202
+ ```
203
+
197
204
  ### User Audit Logs
198
205
 
199
206
  ```ruby
@@ -72,6 +72,10 @@ module PersonaApi
72
72
  TinDatabaseVerificationsResource.new(self)
73
73
  end
74
74
 
75
+ def transactions
76
+ TransactionsResource.new(self)
77
+ end
78
+
75
79
  def user_audit_logs
76
80
  UserAuditLogsResource.new(self)
77
81
  end
@@ -0,0 +1,4 @@
1
+ module PersonaApi
2
+ class Transaction < Object
3
+ end
4
+ end
@@ -10,7 +10,7 @@ module PersonaApi
10
10
  end
11
11
 
12
12
  def create(**attributes)
13
- Account.new post_request("inquiries", body: attributes).body.dig("data")
13
+ Account.new post_request("accounts", body: attributes).body.dig("data")
14
14
  end
15
15
 
16
16
  def list(**params)
@@ -10,8 +10,8 @@ module PersonaApi
10
10
  DatabaseVerification.new get_request("verification/databases/#{ver_id}").body.dig("data")
11
11
  end
12
12
 
13
- def submit(ver_id:, **attributes)
14
- DatabaseVerification.new post_request("verification/databases/#{ver_id}/submit", body: attributes).body.dig("data")
13
+ def submit(ver_id:)
14
+ DatabaseVerification.new post_request("verification/databases/#{ver_id}/submit").body.dig("data")
15
15
  end
16
16
  end
17
17
  end
@@ -10,8 +10,8 @@ module PersonaApi
10
10
  GovernmentIdVerification.new get_request("verification/government-ids/#{ver_id}").body.dig("data")
11
11
  end
12
12
 
13
- def submit(ver_id:, **attributes)
14
- GovernmentIdVerification.new post_request("verification/government-ids/#{ver_id}/submit", body: attributes).body.dig("data")
13
+ def submit(ver_id:)
14
+ GovernmentIdVerification.new post_request("verification/government-ids/#{ver_id}/submit").body.dig("data")
15
15
  end
16
16
  end
17
17
  end
@@ -0,0 +1,15 @@
1
+ module PersonaApi
2
+ class TransactionsResource < Resource
3
+ def create(**attributes)
4
+ Transaction.new post_request("transactions", body: attributes).body.dig("data")
5
+ end
6
+
7
+ def list(**params)
8
+ Collection.from_response get_request("transactions", params: params), key: "data", type: Transaction
9
+ end
10
+
11
+ def retrieve(txn_id:)
12
+ Transaction.new get_request("transactions/#{txn_id}").body.dig("data")
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PersonaApi
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.1"
5
5
  end
data/lib/persona_api.rb CHANGED
@@ -27,6 +27,7 @@ module PersonaApi
27
27
  autoload :PhoneNumberVerification, "persona_api/objects/phone_number_verification"
28
28
  autoload :PhoneCarrierVerification, "persona_api/objects/phone_carrier_verification"
29
29
  autoload :TinDatabaseVerification, "persona_api/objects/tin_database_verification"
30
+ autoload :Transaction, "persona_api/objects/transaction"
30
31
 
31
32
  # resources
32
33
  autoload :AccountsResource, "persona_api/resources/accounts"
@@ -46,4 +47,5 @@ module PersonaApi
46
47
  autoload :PhoneNumberVerificationsResource, "persona_api/resources/phone_number_verifications"
47
48
  autoload :PhoneCarrierVerificationsResource, "persona_api/resources/phone_carrier_verifications"
48
49
  autoload :TinDatabaseVerificationsResource, "persona_api/resources/tin_database_verifications"
50
+ autoload :TransactionsResource, "persona_api/resources/transactions"
49
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persona_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Griffith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -73,6 +73,7 @@ files:
73
73
  - lib/persona_api/objects/phone_number_verification.rb
74
74
  - lib/persona_api/objects/report.rb
75
75
  - lib/persona_api/objects/tin_database_verification.rb
76
+ - lib/persona_api/objects/transaction.rb
76
77
  - lib/persona_api/objects/user_audit_log.rb
77
78
  - lib/persona_api/objects/verification.rb
78
79
  - lib/persona_api/resource.rb
@@ -91,6 +92,7 @@ files:
91
92
  - lib/persona_api/resources/phone_number_verifications.rb
92
93
  - lib/persona_api/resources/reports.rb
93
94
  - lib/persona_api/resources/tin_database_verifications.rb
95
+ - lib/persona_api/resources/transactions.rb
94
96
  - lib/persona_api/resources/user_audit_logs.rb
95
97
  - lib/persona_api/resources/verifications.rb
96
98
  - lib/persona_api/version.rb