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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -0
- data/lib/persona_api/client.rb +4 -0
- data/lib/persona_api/objects/transaction.rb +4 -0
- data/lib/persona_api/resources/accounts.rb +1 -1
- data/lib/persona_api/resources/transactions.rb +15 -0
- data/lib/persona_api/version.rb +1 -1
- data/lib/persona_api.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22a3768e6cb6a14d5af54a64196e8c5f5df453967f7b5646a0692e6ffda3fcb2
|
|
4
|
+
data.tar.gz: ea457502f6813d80e7da46b965c846d806e14ea2b3e6597b6df0f8154eca95ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d27ac09c8a2fc5933af069fb71c6ec4fcf18dcdf1e234086f178bf9b9304b30ba9dd71bb2dcb71b68f38207e5462e47ebfbe7b78fa83f96af8ea0353310e3f53
|
|
7
|
+
data.tar.gz: aa922090b50b3007888abc6c786ba314fc829f9baa8bfec2bce081c7ebe25f65103b3142a6842edfafe36c1a17a8a2cd69997df219abdc221c35678477cf9235
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
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
|
data/lib/persona_api/client.rb
CHANGED
|
@@ -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
|
data/lib/persona_api/version.rb
CHANGED
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.
|
|
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-
|
|
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
|