modulr-api 0.0.19 → 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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +71 -77
- data/lib/modulr/resources/payments/destination.rb +7 -1
- data/lib/modulr/resources/payments/details/incoming/general.rb +2 -1
- data/lib/modulr/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b9400469d574755b4feb6f675d65b81a1d41c2212a67d4f4216e1a457ff8ed1
|
4
|
+
data.tar.gz: 0f8cf5c2fbc638125c3cbd9c1c281ba17cdaf8314c343205d891d2444500baab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9abb7f1d9e788c1b0a8ee583d13a7e8b43a85ac6acc34ebc6d78ba04a5d54aeedc7008126c009fcb34119479de7d8ee3c9c8ec955b50949ffbd83fe05b6633cd
|
7
|
+
data.tar.gz: f1681b33a6b390acafb75eff8dd844e63e2d0fc51af39459267f973984583ee5c98ca5af925805c4db25c72a5fe7015177da31f3c44281c2a2fbf7688edfde23
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -34,81 +34,56 @@ client.customers.find(id: "C2188C26")
|
|
34
34
|
|
35
35
|
# Create a customer
|
36
36
|
client.customers.create(
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
type: "LLC",
|
38
|
+
legalEntity: "IE",
|
39
|
+
name: "Your company SL.",
|
40
|
+
expectedMonthlySpend: 99999,
|
41
|
+
companyRegNumber: "TAXID",
|
42
|
+
industryCode: "64929",
|
43
|
+
tcsVersion: 1,
|
44
|
+
tradingAddress: {
|
45
|
+
addressLine1: "Fake Street 34",
|
46
|
+
postTown: "Madrid",
|
47
|
+
postCode: "28003",
|
48
|
+
country: "ES",
|
49
|
+
},
|
50
|
+
registeredAddress: {
|
51
|
+
addressLine1: "Fake Street 34",
|
52
|
+
postTown: "Madrid",
|
53
|
+
postCode: "28003",
|
54
|
+
country: "ES",
|
55
|
+
},
|
56
|
+
associates: [
|
57
|
+
{
|
58
|
+
applicant: true,
|
59
|
+
dateOfBirth: "1977-05-31",
|
60
|
+
firstName: "Director Name",
|
61
|
+
lastName: "Director Last Name",
|
62
|
+
email: "director@yourcompany.com",
|
63
|
+
phone: "+34677777777",
|
64
|
+
type: "DIRECTOR",
|
65
|
+
homeAddress: {
|
66
|
+
addressLine1: "Fake Street 34",
|
67
|
+
postTown: "Madrid",
|
68
|
+
postCode: "28003",
|
69
|
+
country: "ES",
|
70
|
+
},
|
49
71
|
},
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
72
|
+
{
|
73
|
+
applicant: false,
|
74
|
+
dateOfBirth: "1976-08-14",
|
75
|
+
firstName: "Owner Name",
|
76
|
+
lastName: "Owner Last Name",
|
77
|
+
type: "BENE_OWNER",
|
78
|
+
ownership: 60,
|
79
|
+
homeAddress: {
|
80
|
+
addressLine1: "Fake Street 34",
|
81
|
+
postTown: "Madrid",
|
82
|
+
postCode: "28003",
|
83
|
+
country: "ES",
|
84
|
+
},
|
57
85
|
},
|
58
|
-
|
59
|
-
tcs_version: 0,
|
60
|
-
expected_monthly_spend: 0,
|
61
|
-
associates: [
|
62
|
-
{
|
63
|
-
type: "DIRECTOR",
|
64
|
-
firstName: "string",
|
65
|
-
middleName: "string",
|
66
|
-
lastName: "string",
|
67
|
-
dateOfBirth: "string",
|
68
|
-
ownership: 0,
|
69
|
-
homeAddress: {
|
70
|
-
addressLine1: "string",
|
71
|
-
addressLine2: "string",
|
72
|
-
postTown: "string",
|
73
|
-
postCode: "string",
|
74
|
-
country: "GB",
|
75
|
-
countrySubDivision: "string"
|
76
|
-
},
|
77
|
-
applicant: true,
|
78
|
-
email: "string",
|
79
|
-
phone: "string",
|
80
|
-
documentInfo: [
|
81
|
-
{
|
82
|
-
path: "string",
|
83
|
-
fileName: "string",
|
84
|
-
uploadedDate: "2017-01-28T01:01:01+0000"
|
85
|
-
}
|
86
|
-
],
|
87
|
-
additionalIdentifiers: [
|
88
|
-
{
|
89
|
-
type: "BSN",
|
90
|
-
value: "string"
|
91
|
-
}
|
92
|
-
],
|
93
|
-
complianceData: {
|
94
|
-
relationship: "string"
|
95
|
-
}
|
96
|
-
}
|
97
|
-
],
|
98
|
-
document_info: [
|
99
|
-
{
|
100
|
-
path: "string",
|
101
|
-
fileName: "string",
|
102
|
-
uploadedDate: "2017-01-28T01:01:01+0000"
|
103
|
-
}
|
104
|
-
],
|
105
|
-
provisional_customer_id: "string",
|
106
|
-
customer_trust: {
|
107
|
-
trustNature: "BARE_TRUSTS"
|
108
|
-
},
|
109
|
-
tax_profile: {
|
110
|
-
taxIdentifier: "string"
|
111
|
-
}
|
86
|
+
]
|
112
87
|
)
|
113
88
|
```
|
114
89
|
|
@@ -171,6 +146,25 @@ Supported via email:
|
|
171
146
|
- BALANCE
|
172
147
|
- CUSTVSTAT
|
173
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
|
+
|
174
168
|
## Release
|
175
169
|
|
176
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.
|
@@ -180,12 +174,12 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
180
174
|
To release a new version, on main branch update the version number in `version.rb`, then:
|
181
175
|
|
182
176
|
```git
|
183
|
-
bundle
|
177
|
+
bundle install
|
184
178
|
git add .
|
185
|
-
git commit -m '
|
179
|
+
git commit -m 'feat(release): Bump to vX.X.X'
|
186
180
|
git push
|
187
|
-
git tag
|
188
|
-
git push origin
|
181
|
+
git tag vX.X.X main
|
182
|
+
git push origin vX.X.X
|
189
183
|
```
|
190
184
|
|
191
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
|
data/lib/modulr/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|