ponto 2.0 → 2.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 +4 -4
- data/bin/irb.sh +1 -0
- data/lib/ponto/api/base_resource.rb +6 -1
- data/lib/ponto/api/given_mandate.rb +19 -0
- data/lib/ponto/api/given_mandate_account.rb +17 -0
- data/lib/ponto/api/integration.rb +19 -0
- data/lib/ponto/api/integration_account.rb +33 -0
- data/lib/ponto/api/me.rb +8 -0
- data/lib/ponto/api/organization_account.rb +8 -0
- data/lib/ponto/api/payment_request.rb +30 -0
- data/lib/ponto/api/pending_transaction.rb +23 -0
- data/lib/ponto/api/received_mandate.rb +18 -0
- data/lib/ponto/api/received_mandate_account.rb +18 -0
- data/lib/ponto/api/received_mandate_integration.rb +19 -0
- data/lib/ponto/api/received_mandate_integration_account.rb +34 -0
- data/lib/ponto/api/user.rb +8 -0
- data/lib/ponto/api/user_invitation.rb +25 -0
- data/lib/ponto/version.rb +1 -1
- data/lib/ponto.rb +14 -0
- data/ponto.gemspec +1 -0
- metadata +36 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cae7677301659a820ece9e2694660cbe2defbdb1fa958ef127cd0b5df1e9bc6
|
4
|
+
data.tar.gz: b576bd35c554ba24dc4e733836393c727cc8e511535f6206994fcec5938d2de6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0957c9d0d8635bba8bb551719b519233ac6abea69b1854627936e4a5add84f55dfdc45075f0da089d502b010db0fc585b10962b2a0a89f46c051a053ace95b
|
7
|
+
data.tar.gz: bbc26105bb802e30423c04c7b44223f6126e8b8f61c6b7d6a711a1e8aba98163cd46b21df51acf8ad407d3934e0784bd1c7cab960f3983aaef3561d4c8aaa32f
|
data/bin/irb.sh
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
irb -Ilib -rponto
|
@@ -45,7 +45,12 @@ module Ponto
|
|
45
45
|
|
46
46
|
def self.find_raw_by_uri(uri:, access_token:, headers: nil)
|
47
47
|
raw_item = Ponto.client.get(uri: uri, headers: headers, access_token: access_token)
|
48
|
-
|
48
|
+
|
49
|
+
if raw_item["attributes"]
|
50
|
+
raw_item
|
51
|
+
else
|
52
|
+
raw_item["data"]
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
def self.destroy_by_uri(uri:, access_token:, headers: nil)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Ponto
|
2
|
+
class GivenMandate < Ponto::BaseResource
|
3
|
+
def self.list(access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["givenMandates"].sub("{mandateId}", "")
|
5
|
+
|
6
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.find(id:, access_token:)
|
10
|
+
uri = Ponto.api_schema["givenMandates"].sub("{mandateId}", id)
|
11
|
+
find_by_uri(uri: uri, access_token: access_token)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.delete(id:, access_token:)
|
15
|
+
uri = Ponto.api_schema["givenMandates"].gsub("{mandateId}", id)
|
16
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Ponto
|
2
|
+
class GivenMandateAccount < Ponto::BaseResource
|
3
|
+
def self.list(mandate_id:, access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["givenMandate"]["accounts"]
|
5
|
+
.sub("{mandateId}", mandate_id)
|
6
|
+
.sub("{accountId}", "")
|
7
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.delete(mandate_id:, id:, access_token:)
|
11
|
+
uri = Ponto.api_schema["givenMandate"]["accounts"]
|
12
|
+
.sub("{mandateId}", mandate_id)
|
13
|
+
.sub("{accountId}", id)
|
14
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Ponto
|
2
|
+
class Integration < Ponto::BaseResource
|
3
|
+
def self.list(access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["integrations"].sub("{integrationId}", "")
|
5
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.create(access_token: nil, **attributes)
|
9
|
+
path = Ponto.api_schema["integrations"].sub("{integrationId}", "")
|
10
|
+
uri = Ponto.client.build_uri(path)
|
11
|
+
create_by_uri(
|
12
|
+
uri: uri,
|
13
|
+
resource_type: "integration",
|
14
|
+
attributes: attributes,
|
15
|
+
access_token: access_token
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Ponto
|
2
|
+
class IntegrationAccount < Ponto::BaseResource
|
3
|
+
def self.list(integration_id:, access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["integration"]["accounts"]
|
5
|
+
.sub("{integrationId}", integration_id)
|
6
|
+
.sub("{accountId}", "")
|
7
|
+
|
8
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.create(integration_id:, access_token: nil, **attributes)
|
12
|
+
path = Ponto.api_schema["integration"]["accounts"]
|
13
|
+
.sub("{integrationId}", integration_id)
|
14
|
+
.sub("{accountId}", "")
|
15
|
+
|
16
|
+
uri = Ponto.client.build_uri(path)
|
17
|
+
create_by_uri(
|
18
|
+
uri: uri,
|
19
|
+
resource_type: "integrationAccount",
|
20
|
+
attributes: attributes,
|
21
|
+
access_token: access_token
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.delete(integration_id:, id:, access_token:)
|
26
|
+
uri = Ponto.api_schema["integration"]["accounts"]
|
27
|
+
.gsub("{integrationId}", integration_id)
|
28
|
+
.gsub("{accountId}", id)
|
29
|
+
|
30
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/ponto/api/me.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
module Ponto
|
2
|
+
class OrganizationAccount < Ponto::BaseResource
|
3
|
+
def self.list(access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["organizationAccounts"]
|
5
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Ponto
|
2
|
+
class PaymentRequest < Ponto::BaseResource
|
3
|
+
def self.create(account_id:, access_token: nil, **attributes)
|
4
|
+
path = Ponto.api_schema["account"]["paymentRequests"]
|
5
|
+
.gsub("{accountId}", account_id)
|
6
|
+
.gsub("{paymentRequestId}", "")
|
7
|
+
uri = Ponto.client.build_uri(path)
|
8
|
+
create_by_uri(
|
9
|
+
uri: uri,
|
10
|
+
resource_type: "payment_request",
|
11
|
+
attributes: attributes,
|
12
|
+
access_token: access_token
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find(id:, account_id:, access_token:)
|
17
|
+
uri = Ponto.api_schema["account"]["paymentRequests"]
|
18
|
+
.gsub("{accountId}", account_id)
|
19
|
+
.sub("{paymentRequestId}", id)
|
20
|
+
find_by_uri(uri: uri, access_token: access_token)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.delete(id:, account_id:, access_token:)
|
24
|
+
uri = Ponto.api_schema["account"]["paymentRequests"]
|
25
|
+
.gsub("{accountId}", account_id)
|
26
|
+
.sub("{paymentRequestId}", id)
|
27
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Ponto
|
2
|
+
class PendingTransaction < Ponto::BaseResource
|
3
|
+
def self.list(account_id: nil, synchronization_id: nil, access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = if synchronization_id
|
5
|
+
Ponto.api_schema["synchronization"]["updatedPendingTransactions"]
|
6
|
+
.sub("{synchronizationId}", synchronization_id)
|
7
|
+
.sub("{pendingTransactionId}", "")
|
8
|
+
else
|
9
|
+
Ponto.api_schema["account"]["pendingTransactions"]
|
10
|
+
.sub("{accountId}", account_id)
|
11
|
+
.sub("{pendingTransactionId}", "")
|
12
|
+
end
|
13
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find(id:, access_token: nil, account_id:)
|
17
|
+
uri = Ponto.api_schema["account"]["pendingTransactions"]
|
18
|
+
.sub("{accountId}", account_id)
|
19
|
+
.sub("{pendingTransactionId}", id)
|
20
|
+
find_by_uri(uri: uri, access_token: access_token)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Ponto
|
2
|
+
class ReceivedMandate < Ponto::BaseResource
|
3
|
+
def self.list(access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["receivedMandates"].sub("{mandateId}", "")
|
5
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.find(id:, access_token:)
|
9
|
+
uri = Ponto.api_schema["receivedMandates"].sub("{mandateId}", id)
|
10
|
+
find_by_uri(uri: uri, access_token: access_token)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.delete(id:, access_token:)
|
14
|
+
uri = Ponto.api_schema["receivedMandates"].sub("{mandateId}", id)
|
15
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Ponto
|
2
|
+
class ReceivedMandateAccount < Ponto::BaseResource
|
3
|
+
def self.find(mandate_id:, account_id:, access_token: nil, headers: nil)
|
4
|
+
uri = Ponto.api_schema["receivedMandate"]["accounts"]
|
5
|
+
.sub("{mandateId}", mandate_id)
|
6
|
+
.sub("{accountId}", account_id)
|
7
|
+
puts uri
|
8
|
+
find_by_uri(uri: uri, headers: headers, access_token: access_token)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.list(mandate_id:, access_token: nil, headers: nil, **query_params)
|
12
|
+
uri = Ponto.api_schema["receivedMandate"]["accounts"]
|
13
|
+
.sub("{mandateId}", mandate_id)
|
14
|
+
.sub("{accountId}", "")
|
15
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Ponto
|
2
|
+
class ReceivedMandateIntegration < Ponto::BaseResource
|
3
|
+
def self.list(mandate_id:, access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["receivedMandate"]["integrations"].sub("{mandateId}", mandate_id)
|
5
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.create(mandate_id:, access_token: nil, **attributes)
|
9
|
+
path = Ponto.api_schema["receivedMandate"]["integrations"].sub("{mandateId}", mandate_id)
|
10
|
+
uri = Ponto.client.build_uri(path)
|
11
|
+
create_by_uri(
|
12
|
+
uri: uri,
|
13
|
+
resource_type: "integration",
|
14
|
+
attributes: attributes,
|
15
|
+
access_token: access_token
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Ponto
|
2
|
+
class ReceivedMandateIntegrationAccount < Ponto::BaseResource
|
3
|
+
def self.list(mandate_id:, integration_id:, access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["receivedMandate"]["integration"]["accounts"]
|
5
|
+
.sub("{mandateId}", mandate_id)
|
6
|
+
.sub("{integrationId}", integration_id)
|
7
|
+
.sub("{accountId}", "")
|
8
|
+
|
9
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.create(mandate_id:, integration_id:, access_token: nil, **attributes)
|
13
|
+
uri = Ponto.api_schema["receivedMandate"]["integration"]["accounts"]
|
14
|
+
.sub("{mandateId}", mandate_id)
|
15
|
+
.sub("{integrationId}", integration_id)
|
16
|
+
.sub("{accountId}", "")
|
17
|
+
|
18
|
+
create_by_uri(
|
19
|
+
uri: uri,
|
20
|
+
resource_type: "receivedMandateIntegrationAccount",
|
21
|
+
attributes: attributes,
|
22
|
+
access_token: access_token
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.delete(mandate_id:, integration_id:, id:, access_token:)
|
27
|
+
uri = Ponto.api_schema["receivedMandate"]["integration"]["accounts"]
|
28
|
+
.sub("{mandateId}", mandate_id)
|
29
|
+
.sub("{integrationId}", integration_id)
|
30
|
+
.sub("{accountId}", id)
|
31
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Ponto
|
2
|
+
class UserInvitation < Ponto::BaseResource
|
3
|
+
def self.list(access_token: nil, headers: nil, **query_params)
|
4
|
+
uri = Ponto.api_schema["userInvitations"].sub("{invitationId}", "")
|
5
|
+
|
6
|
+
list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.create(access_token: nil, **attributes)
|
10
|
+
path = Ponto.api_schema["userInvitations"].sub("{invitationId}", "")
|
11
|
+
uri = Ponto.client.build_uri(path)
|
12
|
+
create_by_uri(
|
13
|
+
uri: uri,
|
14
|
+
resource_type: "userInvitation",
|
15
|
+
attributes: attributes,
|
16
|
+
access_token: access_token
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.delete(id:, access_token:)
|
21
|
+
uri = Ponto.api_schema["userInvitations"].gsub("{invitationId}", id)
|
22
|
+
destroy_by_uri(uri: uri, access_token: access_token)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/ponto/version.rb
CHANGED
data/lib/ponto.rb
CHANGED
@@ -13,12 +13,26 @@ require_relative "ponto/client"
|
|
13
13
|
require_relative "ponto/api/base_resource"
|
14
14
|
require_relative "ponto/api/o_auth_resource"
|
15
15
|
require_relative "ponto/api/account"
|
16
|
+
require_relative "ponto/api/pending_transaction"
|
16
17
|
require_relative "ponto/api/transaction"
|
17
18
|
require_relative "ponto/api/financial_institution"
|
18
19
|
require_relative "ponto/api/payment"
|
19
20
|
require_relative "ponto/api/bulk_payment"
|
21
|
+
require_relative "ponto/api/payment_request"
|
20
22
|
require_relative "ponto/api/synchronization"
|
21
23
|
require_relative "ponto/api/access_token"
|
24
|
+
require_relative "ponto/api/me"
|
25
|
+
require_relative "ponto/api/organization_account"
|
26
|
+
require_relative "ponto/api/user"
|
27
|
+
require_relative "ponto/api/user_invitation"
|
28
|
+
require_relative "ponto/api/given_mandate"
|
29
|
+
require_relative "ponto/api/given_mandate_account"
|
30
|
+
require_relative "ponto/api/integration"
|
31
|
+
require_relative "ponto/api/integration_account"
|
32
|
+
require_relative "ponto/api/received_mandate"
|
33
|
+
require_relative "ponto/api/received_mandate_account"
|
34
|
+
require_relative "ponto/api/received_mandate_integration"
|
35
|
+
require_relative "ponto/api/received_mandate_integration_account"
|
22
36
|
require_relative "ponto/api/sandbox/financial_institution"
|
23
37
|
require_relative "ponto/api/sandbox/financial_institution_account"
|
24
38
|
require_relative "ponto/api/sandbox/financial_institution_transaction"
|
data/ponto.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ponto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ponto
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -52,10 +52,25 @@ dependencies:
|
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.24.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: A Ruby wrapper for the Ponto API.
|
56
70
|
email:
|
57
71
|
- info@ibanity.com
|
58
|
-
executables:
|
72
|
+
executables:
|
73
|
+
- irb.sh
|
59
74
|
extensions: []
|
60
75
|
extra_rdoc_files: []
|
61
76
|
files:
|
@@ -69,19 +84,34 @@ files:
|
|
69
84
|
- LICENSE.txt
|
70
85
|
- README.md
|
71
86
|
- Rakefile
|
87
|
+
- bin/irb.sh
|
72
88
|
- lib/ponto.rb
|
73
89
|
- lib/ponto/api/access_token.rb
|
74
90
|
- lib/ponto/api/account.rb
|
75
91
|
- lib/ponto/api/base_resource.rb
|
76
92
|
- lib/ponto/api/bulk_payment.rb
|
77
93
|
- lib/ponto/api/financial_institution.rb
|
94
|
+
- lib/ponto/api/given_mandate.rb
|
95
|
+
- lib/ponto/api/given_mandate_account.rb
|
96
|
+
- lib/ponto/api/integration.rb
|
97
|
+
- lib/ponto/api/integration_account.rb
|
98
|
+
- lib/ponto/api/me.rb
|
78
99
|
- lib/ponto/api/o_auth_resource.rb
|
100
|
+
- lib/ponto/api/organization_account.rb
|
79
101
|
- lib/ponto/api/payment.rb
|
102
|
+
- lib/ponto/api/payment_request.rb
|
103
|
+
- lib/ponto/api/pending_transaction.rb
|
104
|
+
- lib/ponto/api/received_mandate.rb
|
105
|
+
- lib/ponto/api/received_mandate_account.rb
|
106
|
+
- lib/ponto/api/received_mandate_integration.rb
|
107
|
+
- lib/ponto/api/received_mandate_integration_account.rb
|
80
108
|
- lib/ponto/api/sandbox/financial_institution.rb
|
81
109
|
- lib/ponto/api/sandbox/financial_institution_account.rb
|
82
110
|
- lib/ponto/api/sandbox/financial_institution_transaction.rb
|
83
111
|
- lib/ponto/api/synchronization.rb
|
84
112
|
- lib/ponto/api/transaction.rb
|
113
|
+
- lib/ponto/api/user.rb
|
114
|
+
- lib/ponto/api/user_invitation.rb
|
85
115
|
- lib/ponto/client.rb
|
86
116
|
- lib/ponto/collection.rb
|
87
117
|
- lib/ponto/error.rb
|
@@ -98,7 +128,7 @@ homepage: https://documentation.myponto.com/api/ruby
|
|
98
128
|
licenses:
|
99
129
|
- MIT
|
100
130
|
metadata: {}
|
101
|
-
post_install_message:
|
131
|
+
post_install_message:
|
102
132
|
rdoc_options: []
|
103
133
|
require_paths:
|
104
134
|
- lib
|
@@ -114,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
144
|
version: '0'
|
115
145
|
requirements: []
|
116
146
|
rubygems_version: 3.0.3.1
|
117
|
-
signing_key:
|
147
|
+
signing_key:
|
118
148
|
specification_version: 4
|
119
149
|
summary: Ponto Ruby Client
|
120
150
|
test_files:
|