persona_api 0.2.0 → 0.3.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: cc142f2d3d4b1ea4f61b57a549b47c1589ec6235b758f79dfc9a7425fce30d7e
4
- data.tar.gz: c5f2530ffc6c82964cea5bdbd1a70fd94d6f58872330900c2c0ab9570c2c4f1f
3
+ metadata.gz: 22a3768e6cb6a14d5af54a64196e8c5f5df453967f7b5646a0692e6ffda3fcb2
4
+ data.tar.gz: ea457502f6813d80e7da46b965c846d806e14ea2b3e6597b6df0f8154eca95ad
5
5
  SHA512:
6
- metadata.gz: b3dfb21662215e270f42b6e7c76e271fdd3795f132411ec7af9f419743204444c2bcee1412bccb420047150adce0bb1e2c63e9df46c0855ad78a4cd3b348b6c5
7
- data.tar.gz: a090952568e4010bf393b609b44e47971fe3bf5ef3af2fb5c3dd297e8a7e24190d00a79bea91a41b1525c23e7eeed7068ab360aaf6e4e9620847d4c1e6314d77
6
+ metadata.gz: d27ac09c8a2fc5933af069fb71c6ec4fcf18dcdf1e234086f178bf9b9304b30ba9dd71bb2dcb71b68f38207e5462e47ebfbe7b78fa83f96af8ea0353310e3f53
7
+ data.tar.gz: aa922090b50b3007888abc6c786ba314fc829f9baa8bfec2bce081c7ebe25f65103b3142a6842edfafe36c1a17a8a2cd69997df219abdc221c35678477cf9235
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ == [0.3.0] - 2022-11-07
2
+
3
+ * Add Transactions Endpoint
4
+ * Bug fixes
5
+
1
6
  == [0.2.0] - 2022-08-18
2
7
 
3
8
  * 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)
@@ -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.0"
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.0
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-11-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