ponto 1.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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/gem-push.yml +29 -0
  3. data/.github/workflows/ruby-ci.yml +32 -0
  4. data/.rspec +1 -0
  5. data/.travis.yml +3 -3
  6. data/bin/irb.sh +1 -0
  7. data/lib/ponto/api/base_resource.rb +36 -9
  8. data/lib/ponto/api/bulk_payment.rb +30 -0
  9. data/lib/ponto/api/given_mandate.rb +19 -0
  10. data/lib/ponto/api/given_mandate_account.rb +17 -0
  11. data/lib/ponto/api/integration.rb +19 -0
  12. data/lib/ponto/api/integration_account.rb +33 -0
  13. data/lib/ponto/api/me.rb +8 -0
  14. data/lib/ponto/api/organization_account.rb +8 -0
  15. data/lib/ponto/api/payment_request.rb +30 -0
  16. data/lib/ponto/api/pending_transaction.rb +23 -0
  17. data/lib/ponto/api/received_mandate.rb +18 -0
  18. data/lib/ponto/api/received_mandate_account.rb +18 -0
  19. data/lib/ponto/api/received_mandate_integration.rb +19 -0
  20. data/lib/ponto/api/received_mandate_integration_account.rb +34 -0
  21. data/lib/ponto/api/sandbox/financial_institution.rb +15 -0
  22. data/lib/ponto/api/sandbox/financial_institution_account.rb +15 -0
  23. data/lib/ponto/api/sandbox/financial_institution_transaction.rb +37 -0
  24. data/lib/ponto/api/transaction.rb +10 -4
  25. data/lib/ponto/api/user.rb +8 -0
  26. data/lib/ponto/api/user_invitation.rb +25 -0
  27. data/lib/ponto/version.rb +1 -1
  28. data/lib/ponto.rb +19 -1
  29. data/ponto.gemspec +2 -1
  30. data/spec/lib/ponto/base_resource_spec.rb +32 -0
  31. data/spec/spec_helper.rb +103 -0
  32. data/spec/support/fixture.rb +8 -0
  33. data/spec/support/fixtures/json/relationships/data_with_type.json +21 -0
  34. data/spec/support/fixtures/json/relationships/data_without_type.json +20 -0
  35. data/spec/support/fixtures/json/relationships/meta_with_type.json +20 -0
  36. metadata +59 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72c51c8d524e4611174a8e1cc4a4d477f824555a740b7deb230f46ebff7e15df
4
- data.tar.gz: f8970d162c5ffd3679f3d1074df2fb05709024f5150b430715efd9cbb428e96b
3
+ metadata.gz: 3cae7677301659a820ece9e2694660cbe2defbdb1fa958ef127cd0b5df1e9bc6
4
+ data.tar.gz: b576bd35c554ba24dc4e733836393c727cc8e511535f6206994fcec5938d2de6
5
5
  SHA512:
6
- metadata.gz: 353f69bdb7f9e9de81c91535b64887563388a3c85f95036d4d7a752ba190b41cc2d139b722320546c4ce98ccbbfe053c1a333469377418e3c6451486b80ffadb
7
- data.tar.gz: 06ac1f093bcfcc6ae2e41a09f25e3996f52cdefe52193871687c2a07e7047e0c93d07f47fc48a0f3c1afb7481fde3b26587a0a6dd19c1ab2f2d84acf852ec849
6
+ metadata.gz: 9c0957c9d0d8635bba8bb551719b519233ac6abea69b1854627936e4a5add84f55dfdc45075f0da089d502b010db0fc585b10962b2a0a89f46c051a053ace95b
7
+ data.tar.gz: bbc26105bb802e30423c04c7b44223f6126e8b8f61c6b7d6a711a1e8aba98163cd46b21df51acf8ad407d3934e0784bd1c7cab960f3983aaef3561d4c8aaa32f
@@ -0,0 +1,29 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up Ruby 2.6
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: 2.6
18
+
19
+ - name: Publish to RubyGems
20
+ run: |
21
+ mkdir -p $HOME/.gem
22
+ touch $HOME/.gem/credentials
23
+ chmod 0600 $HOME/.gem/credentials
24
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
25
+ gem build *.gemspec
26
+ gem push *.gem
27
+ rm -rf $HOME/.gem/credentials
28
+ env:
29
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,32 @@
1
+ name: Ruby CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ test:
7
+
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby-version: ['2.6', '2.7', '3.0']
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby-version }}
19
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
20
+ - name: Install dependencies
21
+ run: bundle install
22
+ - name: Run tests
23
+ run: bundle exec rspec
24
+ - name: Notify slack failure on master branch
25
+ if: contains(github.ref, 'master') && failure()
26
+ env:
27
+ SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
28
+ uses: voxmedia/github-action-slack-notify-build@v1.1.2
29
+ with:
30
+ channel: ibanity-support-tech
31
+ status: FAILED
32
+ color: danger
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.travis.yml CHANGED
@@ -12,9 +12,9 @@ notifications:
12
12
  email: false
13
13
  slack:
14
14
  - rooms:
15
- - secure: Gnd8fTAuv30PF4GfUR9RVmEeJ9zyPJ+DS0LCuynDgnHZj8q3bV7TL7zGY39HNjn5C0GDhmVXy5ZbUj/VBo8wW69zrKTugqIzhu6FkVq7hOQIANkUWWqJ4bh13mX5LSS7F9klpBxMA9Q3dOPGSo1VTpJqGaCX1Jc0ffY4I2fK6IbdNAsoYV1/DQAjFAmzuqRYEmEfYO3brGvrhXHDtgfTVmNqRJIhYdstGmmIOhIC5zSgQrjXofxYtW+nZNifhW9KfknZJk2g2dwIZm271iJdx59JnDNB8nUGrPHBFMaux1Yc5TwQhamctYphNcnlBjztXvzIeOSmOZKekg0k06w1ySLYvJTkEpY+i2f7FU9VK2CTJR3SJwJN++iveQnispgEYUOxCdsXs7cGQPwsUymS7vw2h6qiHS1BFpyxpi1oP+g3ZagsA1CZOQcnagm0qyJ/A3twUGFG6p3PS9m3TrbIPN0aK0/t93jxKm8lbcC+OlpMJOMgMnajs86JU1s3I+8WDj3EKQzkg/zeZhzqyfW5BCvQxDgVLTca+WWNC+bLZLhDqvLrs23mNXFvKOKrt3j3hJjH0/JUxHImNMtInBCKxIpSOn8NiCUeiAl7O2vDRwqa0khbjc/nt0nJ6awf4ciqNMqCiUjX5NgLI4loTWU0V7mPANIa/eUCTTV5vmJHr3g=
16
- if: "(tag =~ ^v) AND (branch = master)"
15
+ - secure: "pF1OBIgb263ZwZMFOMbjNNriZcfEh6rTucoOQzmicMWeFhlSV4n7X4g2bSF6Haer7zdpWQTfrJPQgsCLr7uCZuGp1uDPjJ1EZy1B1+DA5jPQBL+XuQGtdy9lEfyze+in2K4TcOWuzQoCMLQwN9YcUJunbQg3D56jFmejy0vyfdR2aj5DzZT+7AExhWFa7bB8ZgH6gcagQu2W1woJ6l8VJvuORARqIbufG7bxD/QHUGjLE/R/VktxcdoZge3stlrUpTaDG5MVccdrDxHX+y9ySP5lvKkwn9zgqUy9VSedYAdoMsRWGQuoeyxJYTGDd2/ErKIdOVX/dUCyA58ZQizOX1itE6pCtU6eYkXAHIMGjcbiUgptQsEiiKw4dWuMBjTTfekSaoIP3S7aPsZx86hOEj4N5ZBohXBzu+xDVetBm71L1VVKdvmzTxJwa7aM9Ty+CWOfS4klT2cGUTXcxKEVgwa+Ig2IHYF4+tOmzAx18l3L+yjO45fd8VpAvdnGzKFInvvNAYnq1R0j3BHo4dT6arxOC2Sedh3hI/8mU5OEXeTGWQgmYP4u7x9YsIRkoHwf7uZXsr2OJR6QjGV3a86rtwW9koVYN6XOwxClomK9v1mx1uLyOUDz9VLTmvCHS3bupyjkfOqC5iCNfLW2g8rNabGQAMNaychX8zLVUIom950="
16
+ if: (tag =~ ^v) AND (branch = master)
17
17
  - rooms:
18
- - secure: Gnd8fTAuv30PF4GfUR9RVmEeJ9zyPJ+DS0LCuynDgnHZj8q3bV7TL7zGY39HNjn5C0GDhmVXy5ZbUj/VBo8wW69zrKTugqIzhu6FkVq7hOQIANkUWWqJ4bh13mX5LSS7F9klpBxMA9Q3dOPGSo1VTpJqGaCX1Jc0ffY4I2fK6IbdNAsoYV1/DQAjFAmzuqRYEmEfYO3brGvrhXHDtgfTVmNqRJIhYdstGmmIOhIC5zSgQrjXofxYtW+nZNifhW9KfknZJk2g2dwIZm271iJdx59JnDNB8nUGrPHBFMaux1Yc5TwQhamctYphNcnlBjztXvzIeOSmOZKekg0k06w1ySLYvJTkEpY+i2f7FU9VK2CTJR3SJwJN++iveQnispgEYUOxCdsXs7cGQPwsUymS7vw2h6qiHS1BFpyxpi1oP+g3ZagsA1CZOQcnagm0qyJ/A3twUGFG6p3PS9m3TrbIPN0aK0/t93jxKm8lbcC+OlpMJOMgMnajs86JU1s3I+8WDj3EKQzkg/zeZhzqyfW5BCvQxDgVLTca+WWNC+bLZLhDqvLrs23mNXFvKOKrt3j3hJjH0/JUxHImNMtInBCKxIpSOn8NiCUeiAl7O2vDRwqa0khbjc/nt0nJ6awf4ciqNMqCiUjX5NgLI4loTWU0V7mPANIa/eUCTTV5vmJHr3g=
18
+ - secure: "pF1OBIgb263ZwZMFOMbjNNriZcfEh6rTucoOQzmicMWeFhlSV4n7X4g2bSF6Haer7zdpWQTfrJPQgsCLr7uCZuGp1uDPjJ1EZy1B1+DA5jPQBL+XuQGtdy9lEfyze+in2K4TcOWuzQoCMLQwN9YcUJunbQg3D56jFmejy0vyfdR2aj5DzZT+7AExhWFa7bB8ZgH6gcagQu2W1woJ6l8VJvuORARqIbufG7bxD/QHUGjLE/R/VktxcdoZge3stlrUpTaDG5MVccdrDxHX+y9ySP5lvKkwn9zgqUy9VSedYAdoMsRWGQuoeyxJYTGDd2/ErKIdOVX/dUCyA58ZQizOX1itE6pCtU6eYkXAHIMGjcbiUgptQsEiiKw4dWuMBjTTfekSaoIP3S7aPsZx86hOEj4N5ZBohXBzu+xDVetBm71L1VVKdvmzTxJwa7aM9Ty+CWOfS4klT2cGUTXcxKEVgwa+Ig2IHYF4+tOmzAx18l3L+yjO45fd8VpAvdnGzKFInvvNAYnq1R0j3BHo4dT6arxOC2Sedh3hI/8mU5OEXeTGWQgmYP4u7x9YsIRkoHwf7uZXsr2OJR6QjGV3a86rtwW9koVYN6XOwxClomK9v1mx1uLyOUDz9VLTmvCHS3bupyjkfOqC5iCNfLW2g8rNabGQAMNaychX8zLVUIom950="
19
19
  on_success: change
20
20
  on_failure: always
data/bin/irb.sh ADDED
@@ -0,0 +1 @@
1
+ irb -Ilib -rponto
@@ -12,6 +12,18 @@ module Ponto
12
12
  new(raw_item["data"])
13
13
  end
14
14
 
15
+ def self.update_by_uri(uri:, resource_type:, attributes:, access_token:, meta: nil)
16
+ payload = {
17
+ data: {
18
+ type: resource_type,
19
+ attributes: attributes
20
+ }
21
+ }
22
+ payload[:data][:meta] = meta if meta
23
+ raw_item = Ponto.client.patch(uri: uri, payload: payload, access_token: access_token)
24
+ new(raw_item["data"])
25
+ end
26
+
15
27
  def self.list_by_uri(uri:, access_token:, query_params: {}, headers: nil)
16
28
  raw_response = Ponto.client.get(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
17
29
  items = raw_response["data"].map do |raw_item|
@@ -28,12 +40,17 @@ module Ponto
28
40
  end
29
41
 
30
42
  def self.find_by_uri(uri:, access_token:, headers: nil)
31
- new(find_raw_by_uri(uri: uri, headers: headers, access_token: access_token))
43
+ new(find_raw_by_uri(uri: uri, headers: headers, access_token: access_token), access_token)
32
44
  end
33
45
 
34
46
  def self.find_raw_by_uri(uri:, access_token:, headers: nil)
35
47
  raw_item = Ponto.client.get(uri: uri, headers: headers, access_token: access_token)
36
- raw_item["data"]
48
+
49
+ if raw_item["attributes"]
50
+ raw_item
51
+ else
52
+ raw_item["data"]
53
+ end
37
54
  end
38
55
 
39
56
  def self.destroy_by_uri(uri:, access_token:, headers: nil)
@@ -41,12 +58,12 @@ module Ponto
41
58
  new(raw_item["data"])
42
59
  end
43
60
 
44
- def initialize(raw)
61
+ def initialize(raw, access_token = nil)
45
62
  attributes = prepare_attributes(raw)
46
63
  super(attributes)
47
64
 
48
65
  relationships = raw["relationships"] || {}
49
- setup_relationships(relationships)
66
+ setup_relationships(relationships, access_token)
50
67
 
51
68
  links = raw["links"] || {}
52
69
  setup_links(links)
@@ -75,22 +92,28 @@ module Ponto
75
92
  Ponto::Util.underscorize_hash(params)
76
93
  end
77
94
 
78
- def setup_relationships(relationships)
95
+ def setup_relationships(relationships, access_token)
79
96
  relationships.each do |key, relationship|
80
97
  if relationship["data"]
81
- klass = Ponto.const_get(Ponto::Util.camelize(key))
98
+ resource = relationship.dig("data", "type") || key
82
99
  method_name = Ponto::Util.underscore(key)
83
100
  define_singleton_method(method_name) do |headers: nil|
84
- klass.find_by_uri(uri: relationship["links"]["related"], headers: headers)
101
+ get_klass(resource).find_by_uri(uri: relationship["links"]["related"], headers: headers, access_token: access_token)
85
102
  end
86
103
  self[Ponto::Util.underscore("#{key}_id")] = relationship["data"]["id"]
104
+ elsif relationship.dig("links", "meta", "type")
105
+ resource = relationship.dig("links", "meta", "type")
106
+ method_name = Ponto::Util.underscore(key)
107
+ define_singleton_method(method_name) do |headers: nil, **query_params|
108
+ uri = relationship["links"]["related"]
109
+ get_klass(resource).list_by_uri(uri: uri, headers: headers, query_params: query_params, access_token: access_token)
110
+ end
87
111
  else
88
112
  singular_key = key[0..-2]
89
- klass = Ponto.const_get(Ponto::Util.camelize(singular_key))
90
113
  method_name = Ponto::Util.underscore(key)
91
114
  define_singleton_method(method_name) do |headers: nil, **query_params|
92
115
  uri = relationship["links"]["related"]
93
- klass.list_by_uri(uri: uri, headers: headers, query_params: query_params)
116
+ get_klass(singular_key).list_by_uri(uri: uri, headers: headers, query_params: query_params, access_token: access_token)
94
117
  end
95
118
  end
96
119
  end
@@ -101,5 +124,9 @@ module Ponto
101
124
  self[Ponto::Util.underscore("#{key}_link")] = link
102
125
  end
103
126
  end
127
+
128
+ def get_klass(key)
129
+ Ponto.const_get(Ponto::Util.camelize(key))
130
+ end
104
131
  end
105
132
  end
@@ -0,0 +1,30 @@
1
+ module Ponto
2
+ class BulkPayment < Ponto::BaseResource
3
+ def self.create(account_id:, access_token: nil, **attributes)
4
+ path = Ponto.api_schema["account"]["bulkPayments"]
5
+ .gsub("{accountId}", account_id)
6
+ .gsub("{bulkPaymentId}", "")
7
+ uri = Ponto.client.build_uri(path)
8
+ create_by_uri(
9
+ uri: uri,
10
+ resource_type: "bulkPayment",
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"]["bulkPayments"]
18
+ .gsub("{accountId}", account_id)
19
+ .sub("{bulkPaymentId}", 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"]["bulkPayments"]
25
+ .gsub("{accountId}", account_id)
26
+ .sub("{bulkPaymentId}", id)
27
+ destroy_by_uri(uri: uri, access_token: access_token)
28
+ end
29
+ end
30
+ end
@@ -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
@@ -0,0 +1,8 @@
1
+ module Ponto
2
+ class Me < Ponto::BaseResource
3
+ def self.get(access_token: nil, headers: nil)
4
+ uri = Ponto.api_schema["me"]
5
+ result = find_by_uri(uri: uri, headers: headers, access_token: access_token)
6
+ end
7
+ end
8
+ end
@@ -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,15 @@
1
+ module Ponto
2
+ module Sandbox
3
+ class FinancialInstitution < Ponto::BaseResource
4
+ def self.list(access_token:, **query_params)
5
+ uri = Ponto.api_schema["sandbox"]["financialInstitutions"].sub("{financialInstitutionId}", "")
6
+ list_by_uri(uri: uri, query_params: query_params, access_token: access_token)
7
+ end
8
+
9
+ def self.find(id:, access_token:)
10
+ uri = Ponto.api_schema["sandbox"]["financialInstitutions"].sub("{financialInstitutionId}", id)
11
+ find_by_uri(uri: uri, access_token: access_token)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Ponto
2
+ module Sandbox
3
+ class FinancialInstitutionAccount < Ponto::BaseResource
4
+ def self.list(financial_institution_id:, access_token:, **query_params)
5
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccounts"].sub("{financialInstitutionId}", financial_institution_id).sub("{financialInstitutionAccountId}", "")
6
+ list_by_uri(uri: uri, query_params: query_params, access_token: access_token)
7
+ end
8
+
9
+ def self.find(id:, financial_institution_id:, access_token:)
10
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccounts"].sub("{financialInstitutionId}", financial_institution_id).sub("{financialInstitutionAccountId}", id)
11
+ find_by_uri(uri: uri, access_token: access_token)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,37 @@
1
+ module Ponto
2
+ module Sandbox
3
+ class FinancialInstitutionTransaction < Ponto::BaseResource
4
+ def self.list(access_token:, financial_institution_id:, financial_institution_account_id:, **query_params)
5
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccount"]["financialInstitutionTransactions"]
6
+ .sub("{financialInstitutionId}", financial_institution_id)
7
+ .sub("{financialInstitutionAccountId}", financial_institution_account_id)
8
+ .sub("{financialInstitutionTransactionId}", "")
9
+ list_by_uri(uri: uri, query_params: query_params, access_token: access_token)
10
+ end
11
+
12
+ def self.find(access_token:, id:, financial_institution_id:, financial_institution_account_id:)
13
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccount"]["financialInstitutionTransactions"]
14
+ .sub("{financialInstitutionId}", financial_institution_id)
15
+ .sub("{financialInstitutionAccountId}", financial_institution_account_id)
16
+ .sub("{financialInstitutionTransactionId}", id)
17
+ find_by_uri(uri: uri, access_token: access_token)
18
+ end
19
+
20
+ def self.create(access_token:, financial_institution_id:, financial_institution_account_id:, **attributes)
21
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccount"]["financialInstitutionTransactions"]
22
+ .sub("{financialInstitutionId}", financial_institution_id)
23
+ .sub("{financialInstitutionAccountId}", financial_institution_account_id)
24
+ .sub("{financialInstitutionTransactionId}", "")
25
+ create_by_uri(uri: uri, resource_type: "financialInstitutionTransaction", attributes: attributes, access_token: access_token)
26
+ end
27
+
28
+ def self.update(access_token:, id:, financial_institution_id:, financial_institution_account_id:, **attributes)
29
+ uri = Ponto.api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccount"]["financialInstitutionTransactions"]
30
+ .sub("{financialInstitutionId}", financial_institution_id)
31
+ .sub("{financialInstitutionAccountId}", financial_institution_account_id)
32
+ .sub("{financialInstitutionTransactionId}", id)
33
+ update_by_uri(uri: uri, resource_type: "financialInstitutionTransaction", attributes: attributes, access_token: access_token)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,9 +1,15 @@
1
1
  module Ponto
2
2
  class Transaction < Ponto::BaseResource
3
- def self.list(account_id:, access_token: nil, headers: nil, **query_params)
4
- uri = Ponto.api_schema["account"]["transactions"]
5
- .sub("{accountId}", account_id)
6
- .sub("{transactionId}", "")
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"]["updatedTransactions"]
6
+ .sub("{synchronizationId}", synchronization_id)
7
+ .sub("{transactionId}", "")
8
+ else
9
+ Ponto.api_schema["account"]["transactions"]
10
+ .sub("{accountId}", account_id)
11
+ .sub("{transactionId}", "")
12
+ end
7
13
  list_by_uri(uri: uri, query_params: query_params, headers: headers, access_token: access_token)
8
14
  end
9
15
 
@@ -0,0 +1,8 @@
1
+ module Ponto
2
+ class User < Ponto::BaseResource
3
+ def self.list(access_token: nil, headers: nil, **query_params)
4
+ uri = Ponto.api_schema["users"]
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,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
@@ -1,3 +1,3 @@
1
1
  module Ponto
2
- VERSION = "1.0"
2
+ VERSION = "2.1"
3
3
  end
data/lib/ponto.rb CHANGED
@@ -13,17 +13,35 @@ 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"
20
+ require_relative "ponto/api/bulk_payment"
21
+ require_relative "ponto/api/payment_request"
19
22
  require_relative "ponto/api/synchronization"
20
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"
36
+ require_relative "ponto/api/sandbox/financial_institution"
37
+ require_relative "ponto/api/sandbox/financial_institution_account"
38
+ require_relative "ponto/api/sandbox/financial_institution_transaction"
21
39
 
22
40
  module Ponto
23
41
  class << self
24
42
  def client
25
43
  options = configuration.to_h.delete_if { |_, v| v.nil? }
26
- @client ||= Ponto::Client.new(options)
44
+ @client ||= Ponto::Client.new(**options)
27
45
  end
28
46
 
29
47
  def configure
data/ponto.gemspec CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "rest-client", ">= 1.8.0"
22
- spec.add_development_dependency "rspec", "3.4.0"
22
+ spec.add_development_dependency "rspec", "3.9.0"
23
23
  spec.add_development_dependency "webmock", "1.24.2"
24
+ spec.add_development_dependency "byebug"
24
25
  end
@@ -0,0 +1,32 @@
1
+ require "ponto"
2
+
3
+ class Ponto::Car < Ponto::BaseResource; end
4
+ class Ponto::Manufacturer < Ponto::BaseResource; end
5
+
6
+ RSpec.describe Ponto::BaseResource do
7
+ describe "#relationship_klass" do
8
+ context "when 'data' attribute is present" do
9
+ it "retrieves the resource name from the 'type' attribute if it is present" do
10
+ car = Ponto::Car.new(Fixture.load_json("relationships/data_with_type.json"))
11
+
12
+ expect(car).to respond_to(:maker)
13
+ expect { car.maker }.to_not raise_error(NameError)
14
+ end
15
+
16
+ it "falls back to the element name otherwise" do
17
+ car = Ponto::Car.new(Fixture.load_json("relationships/data_without_type.json"))
18
+
19
+ expect(car).to respond_to(:manufacturer)
20
+ end
21
+ end
22
+
23
+ context "when the 'links' attribute is present" do
24
+ it "retrieves the resource name from the 'type' attribute within the 'links' attribute" do
25
+ car = Ponto::Car.new(Fixture.load_json("relationships/meta_with_type.json"))
26
+
27
+ expect(car).to respond_to(:makers)
28
+ expect { car.makers }.to_not raise_error(NameError)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,103 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
+
17
+ Pathname.glob(Pathname.pwd().join("spec", "support", "**/*.rb")).each do |f|
18
+ require f
19
+ end
20
+
21
+ RSpec.configure do |config|
22
+ # rspec-expectations config goes here. You can use an alternate
23
+ # assertion/expectation library such as wrong or the stdlib/minitest
24
+ # assertions if you prefer.
25
+ config.expect_with :rspec do |expectations|
26
+ # This option will default to `true` in RSpec 4. It makes the `description`
27
+ # and `failure_message` of custom matchers include text for helper methods
28
+ # defined using `chain`, e.g.:
29
+ # be_bigger_than(2).and_smaller_than(4).description
30
+ # # => "be bigger than 2 and smaller than 4"
31
+ # ...rather than:
32
+ # # => "be bigger than 2"
33
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
34
+ end
35
+
36
+ # rspec-mocks config goes here. You can use an alternate test double
37
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
38
+ config.mock_with :rspec do |mocks|
39
+ # Prevents you from mocking or stubbing a method that does not exist on
40
+ # a real object. This is generally recommended, and will default to
41
+ # `true` in RSpec 4.
42
+ mocks.verify_partial_doubles = true
43
+ end
44
+
45
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
46
+ # have no way to turn it off -- the option exists only for backwards
47
+ # compatibility in RSpec 3). It causes shared context metadata to be
48
+ # inherited by the metadata hash of host groups and examples, rather than
49
+ # triggering implicit auto-inclusion in groups with matching metadata.
50
+ config.shared_context_metadata_behavior = :apply_to_host_groups
51
+
52
+ # The settings below are suggested to provide a good initial experience
53
+ # with RSpec, but feel free to customize to your heart's content.
54
+ =begin
55
+ # This allows you to limit a spec run to individual examples or groups
56
+ # you care about by tagging them with `:focus` metadata. When nothing
57
+ # is tagged with `:focus`, all examples get run. RSpec also provides
58
+ # aliases for `it`, `describe`, and `context` that include `:focus`
59
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
60
+ config.filter_run_when_matching :focus
61
+
62
+ # Allows RSpec to persist some state between runs in order to support
63
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
64
+ # you configure your source control system to ignore this file.
65
+ config.example_status_persistence_file_path = "spec/examples.txt"
66
+
67
+ # Limits the available syntax to the non-monkey patched syntax that is
68
+ # recommended. For more details, see:
69
+ # https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode
70
+ config.disable_monkey_patching!
71
+
72
+ # This setting enables warnings. It's recommended, but in some cases may
73
+ # be too noisy due to issues in dependencies.
74
+ config.warnings = true
75
+
76
+ # Many RSpec users commonly either run the entire suite or an individual
77
+ # file, and it's useful to allow more verbose output when running an
78
+ # individual spec file.
79
+ if config.files_to_run.one?
80
+ # Use the documentation formatter for detailed output,
81
+ # unless a formatter has already been configured
82
+ # (e.g. via a command-line flag).
83
+ config.default_formatter = "doc"
84
+ end
85
+
86
+ # Print the 10 slowest examples and example groups at the
87
+ # end of the spec run, to help surface which specs are running
88
+ # particularly slow.
89
+ config.profile_examples = 10
90
+
91
+ # Run specs in random order to surface order dependencies. If you find an
92
+ # order dependency and want to debug it, you can fix the order by providing
93
+ # the seed, which is printed after each run.
94
+ # --seed 1234
95
+ config.order = :random
96
+
97
+ # Seed global randomization in this process using the `--seed` CLI option.
98
+ # Setting this allows you to use `--seed` to deterministically reproduce
99
+ # test failures related to randomization by passing the same `--seed` value
100
+ # as the one that triggered the failure.
101
+ Kernel.srand config.seed
102
+ =end
103
+ end
@@ -0,0 +1,8 @@
1
+ require "json"
2
+
3
+ module Fixture
4
+ def self.load_json(filename)
5
+ path = Pathname([File.dirname(__FILE__ ), "fixtures", "json", filename].join("/"))
6
+ JSON.parse(File.read(path))
7
+ end
8
+ end
@@ -0,0 +1,21 @@
1
+ {
2
+ "attributes": {
3
+ "color": "blue"
4
+ },
5
+ "id": "62ebd4687e",
6
+ "links": {
7
+ "self": "https://www.cardb.com/models/62ebd4687e"
8
+ },
9
+ "relationships": {
10
+ "maker": {
11
+ "data": {
12
+ "id": "c4ebf0f7",
13
+ "type": "manufacturer"
14
+ },
15
+ "links": {
16
+ "related": "https://www.cardb.com/manufacturers/c4ebf0f7"
17
+ }
18
+ }
19
+ },
20
+ "type": "car"
21
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "attributes": {
3
+ "color": "blue"
4
+ },
5
+ "id": "62ebd4687e",
6
+ "links": {
7
+ "self": "https://www.cardb.com/models/62ebd4687e"
8
+ },
9
+ "relationships": {
10
+ "manufacturer": {
11
+ "data": {
12
+ "id": "c4ebf0f7"
13
+ },
14
+ "links": {
15
+ "related": "https://www.cardb.com/manufacturers/c4ebf0f7"
16
+ }
17
+ }
18
+ },
19
+ "type": "car"
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "attributes": {
3
+ "color": "blue"
4
+ },
5
+ "id": "62ebd4687e",
6
+ "links": {
7
+ "self": "https://www.cardb.com/models/62ebd4687e"
8
+ },
9
+ "relationships": {
10
+ "makers": {
11
+ "links": {
12
+ "related": "https://www.cardb.com/manufacturers/c4ebf0f7",
13
+ "meta": {
14
+ "type": "manufacturer"
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "type": "car"
20
+ }
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: '1.0'
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: 2020-05-05 00:00:00.000000000 Z
11
+ date: 2025-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.4.0
33
+ version: 3.9.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.4.0
40
+ version: 3.9.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,40 +52,83 @@ 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:
77
+ - ".github/workflows/gem-push.yml"
78
+ - ".github/workflows/ruby-ci.yml"
62
79
  - ".gitignore"
63
80
  - ".gitkeep"
81
+ - ".rspec"
64
82
  - ".travis.yml"
65
83
  - Gemfile
66
84
  - LICENSE.txt
67
85
  - README.md
68
86
  - Rakefile
87
+ - bin/irb.sh
69
88
  - lib/ponto.rb
70
89
  - lib/ponto/api/access_token.rb
71
90
  - lib/ponto/api/account.rb
72
91
  - lib/ponto/api/base_resource.rb
92
+ - lib/ponto/api/bulk_payment.rb
73
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
74
99
  - lib/ponto/api/o_auth_resource.rb
100
+ - lib/ponto/api/organization_account.rb
75
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
108
+ - lib/ponto/api/sandbox/financial_institution.rb
109
+ - lib/ponto/api/sandbox/financial_institution_account.rb
110
+ - lib/ponto/api/sandbox/financial_institution_transaction.rb
76
111
  - lib/ponto/api/synchronization.rb
77
112
  - lib/ponto/api/transaction.rb
113
+ - lib/ponto/api/user.rb
114
+ - lib/ponto/api/user_invitation.rb
78
115
  - lib/ponto/client.rb
79
116
  - lib/ponto/collection.rb
80
117
  - lib/ponto/error.rb
81
118
  - lib/ponto/util.rb
82
119
  - lib/ponto/version.rb
83
120
  - ponto.gemspec
121
+ - spec/lib/ponto/base_resource_spec.rb
122
+ - spec/spec_helper.rb
123
+ - spec/support/fixture.rb
124
+ - spec/support/fixtures/json/relationships/data_with_type.json
125
+ - spec/support/fixtures/json/relationships/data_without_type.json
126
+ - spec/support/fixtures/json/relationships/meta_with_type.json
84
127
  homepage: https://documentation.myponto.com/api/ruby
85
128
  licenses:
86
129
  - MIT
87
130
  metadata: {}
88
- post_install_message:
131
+ post_install_message:
89
132
  rdoc_options: []
90
133
  require_paths:
91
134
  - lib
@@ -100,8 +143,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
143
  - !ruby/object:Gem::Version
101
144
  version: '0'
102
145
  requirements: []
103
- rubygems_version: 3.0.3
104
- signing_key:
146
+ rubygems_version: 3.0.3.1
147
+ signing_key:
105
148
  specification_version: 4
106
149
  summary: Ponto Ruby Client
107
- test_files: []
150
+ test_files:
151
+ - spec/lib/ponto/base_resource_spec.rb
152
+ - spec/spec_helper.rb
153
+ - spec/support/fixture.rb
154
+ - spec/support/fixtures/json/relationships/data_with_type.json
155
+ - spec/support/fixtures/json/relationships/data_without_type.json
156
+ - spec/support/fixtures/json/relationships/meta_with_type.json