modulr-api 0.0.20 → 0.0.21

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: fc934335d82433526a4054148d3ce46e50d44c79dea1cdef2098f5abb2a4f60e
4
- data.tar.gz: 80bdac56af67a7fd4235b9bab3926068e95ecba9c350b2b735da0d61ceb9f953
3
+ metadata.gz: 5b9400469d574755b4feb6f675d65b81a1d41c2212a67d4f4216e1a457ff8ed1
4
+ data.tar.gz: 0f8cf5c2fbc638125c3cbd9c1c281ba17cdaf8314c343205d891d2444500baab
5
5
  SHA512:
6
- metadata.gz: 455a7987afd8f7a2857c99d868ce6758f354779542ead2588abbcb13bf23b5a8b85d4c0f3cc6b6ffebae291a661dafdc67c71cc2e154af395a3ad78722560f4e
7
- data.tar.gz: cc3502de65b28d99bae494ac1ca985f1c9b6fbc32c20cc56d7eaa2c325fc6f2ad37590e39563010fb05877ccf9cf60e4acbadadeb0aa33e1148ae50006d3aa40
6
+ metadata.gz: 9abb7f1d9e788c1b0a8ee583d13a7e8b43a85ac6acc34ebc6d78ba04a5d54aeedc7008126c009fcb34119479de7d8ee3c9c8ec955b50949ffbd83fe05b6633cd
7
+ data.tar.gz: f1681b33a6b390acafb75eff8dd844e63e2d0fc51af39459267f973984583ee5c98ca5af925805c4db25c72a5fe7015177da31f3c44281c2a2fbf7688edfde23
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modulr-api (0.0.20)
4
+ modulr-api (0.0.21)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
data/README.md CHANGED
@@ -146,6 +146,25 @@ Supported via email:
146
146
  - BALANCE
147
147
  - CUSTVSTAT
148
148
 
149
+ ```rb
150
+ # List setup notifications for a customer
151
+ client.notifications.list(customer_id: "C2188C26")
152
+
153
+ # Create a notification
154
+ client.notifications.create(
155
+ customer_id: "C2188C26",
156
+ type: "PAYOUT",
157
+ channel: "WEBHOOK",
158
+ destinations: [
159
+ "https://yourwebsite.com/webhooks/endpoint"
160
+ ],
161
+ config: {
162
+ retry: true,
163
+ secret: "00000000000000000000000000000000",
164
+ hmacAlgorithm: "hmac-sha512"
165
+ })
166
+ ```
167
+
149
168
  ## Release
150
169
 
151
170
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -155,12 +174,12 @@ To install this gem onto your local machine, run `bundle exec rake install`.
155
174
  To release a new version, on main branch update the version number in `version.rb`, then:
156
175
 
157
176
  ```git
158
- bundle exec rake install
177
+ bundle install
159
178
  git add .
160
- git commit -m 'Update version file and gemfile'
179
+ git commit -m 'feat(release): Bump to vX.X.X'
161
180
  git push
162
- git tag vx.x.x main
163
- git push origin vx.x.x
181
+ git tag vX.X.X main
182
+ git push origin vX.X.X
164
183
  ```
165
184
 
166
185
  The tagging will trigger the GitHub action defined in `release.yml`, pushing the gem to [rubygems.org](https://rubygems.org).
@@ -4,9 +4,15 @@ module Modulr
4
4
  module Resources
5
5
  module Payments
6
6
  class Destination < Base
7
+ attr_reader :identifier
8
+
7
9
  map :type
8
- map :iban
9
10
  map :name
11
+
12
+ def initialize(raw_response, attributes = {})
13
+ super(raw_response, attributes)
14
+ @identifier = Accounts::Identifier.new(nil, attributes)
15
+ end
10
16
  end
11
17
  end
12
18
  end
@@ -6,7 +6,7 @@ module Modulr
6
6
  module Details
7
7
  module Incoming
8
8
  class General < Base
9
- attr_reader :payer, :payee
9
+ attr_reader :payer, :payee, :destination
10
10
 
11
11
  map :created, :created_at
12
12
  map :posted, :posted_at
@@ -31,6 +31,7 @@ module Modulr
31
31
  super(raw_response, attributes)
32
32
  @payer = Counterparty.new(nil, attributes[:payer])
33
33
  @payee = Counterparty.new(nil, attributes[:payee])
34
+ @destination = Destination.new(nil, attributes[:payee][:identifier])
34
35
  end
35
36
  end
36
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulr
4
- VERSION = "0.0.20"
4
+ VERSION = "0.0.21"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulr-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aitor García Rey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday