revolut 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +0 -13
- data/lib/revolut/client.rb +2 -0
- data/lib/revolut/clients/accounts.rb +2 -3
- data/lib/revolut/clients/counterparties.rb +8 -4
- data/lib/revolut/clients/payments.rb +59 -0
- data/lib/revolut/clients/webhooks.rb +5 -1
- data/lib/revolut/version.rb +1 -1
- data/revolut.gemspec +3 -0
- metadata +46 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93a7c7c932fddd54aa5d9efd549e656a9774a85d50b0c9e70201e360ab286106
|
4
|
+
data.tar.gz: 7342d283b3478a8e9992ca5aa95686a2c07c196d0f686205a7c0ffd722280d8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f184078e3ab12b7097e07029c4b21c1b1da32e3c0c320082d5288cea2d852ffb7a910e7af9073184d32ec120a6c2b6d2428ccc99b9edeadc497cbaf9ec3137
|
7
|
+
data.tar.gz: 95d50abe6412d7af520722fa112d0c1da9b6c93d8ad0be07c853271340e6bd5e12fb1dbd7552af36dfa4701baa02f0a7e22aa85c9d6027e5b98d6dab7066885d
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -2,18 +2,5 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
4
|
|
5
|
-
group :development do
|
6
|
-
gem 'rubocop', '~> 0.56'
|
7
|
-
end
|
8
|
-
|
9
|
-
group :development, :test do
|
10
|
-
gem 'pry'
|
11
|
-
end
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem 'rake' # For Travis CI
|
15
|
-
gem 'simplecov', '~> 0.16', require: false
|
16
|
-
end
|
17
|
-
|
18
5
|
# Specify your gem's dependencies in revolut.gemspec
|
19
6
|
gemspec
|
data/lib/revolut/client.rb
CHANGED
@@ -3,6 +3,7 @@ require 'revolut/configuration'
|
|
3
3
|
|
4
4
|
require 'revolut/clients/accounts'
|
5
5
|
require 'revolut/clients/counterparties'
|
6
|
+
require 'revolut/clients/payments'
|
6
7
|
require 'revolut/clients/webhooks'
|
7
8
|
|
8
9
|
module Revolut
|
@@ -10,6 +11,7 @@ module Revolut
|
|
10
11
|
class Client
|
11
12
|
include Revolut::Clients::Accounts
|
12
13
|
include Revolut::Clients::Counterparties
|
14
|
+
include Revolut::Clients::Payments
|
13
15
|
include Revolut::Clients::Webhooks
|
14
16
|
|
15
17
|
# Initialize client.
|
@@ -13,10 +13,9 @@ module Revolut
|
|
13
13
|
|
14
14
|
# Get account information.
|
15
15
|
#
|
16
|
-
# @see
|
17
|
-
# https://revolutdev.github.io/business-api/?shell--sandbox#get-account
|
16
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#get-account
|
18
17
|
#
|
19
|
-
# @param id [
|
18
|
+
# @param id [UUID] Id of account.
|
20
19
|
#
|
21
20
|
# @return [Hash] Response from API.
|
22
21
|
def account(id)
|
@@ -4,7 +4,7 @@ module Revolut
|
|
4
4
|
module Counterparties
|
5
5
|
# List counterparties
|
6
6
|
#
|
7
|
-
# @see https://revolutdev.github.io/business-api/?shell--
|
7
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#get-counterparties
|
8
8
|
#
|
9
9
|
# @return [Hash] Response from API.
|
10
10
|
def counterparties
|
@@ -13,7 +13,9 @@ module Revolut
|
|
13
13
|
|
14
14
|
# Get Counterparty
|
15
15
|
#
|
16
|
-
# @see https://revolutdev.github.io/business-api/?shell--
|
16
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#get-counterparty
|
17
|
+
#
|
18
|
+
# @param id [UUID] Id of counterparty.
|
17
19
|
#
|
18
20
|
# @return [Hash] Response from API.
|
19
21
|
def counterparty(id)
|
@@ -22,7 +24,7 @@ module Revolut
|
|
22
24
|
|
23
25
|
# Add Revolut Counterparty
|
24
26
|
#
|
25
|
-
# @see https://revolutdev.github.io/business-api/?shell--
|
27
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#add-revolut-counterparty
|
26
28
|
#
|
27
29
|
# @return [Hash] Response from API.
|
28
30
|
def add_counterparty(params = {})
|
@@ -31,7 +33,9 @@ module Revolut
|
|
31
33
|
|
32
34
|
# Delete Counterparty
|
33
35
|
#
|
34
|
-
# @see https://revolutdev.github.io/business-api/?shell--
|
36
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#delete-counterparty
|
37
|
+
#
|
38
|
+
# @param id [UUID] Id of counterparty.
|
35
39
|
#
|
36
40
|
# @return [Hash] Response from API.
|
37
41
|
def delete_counterparty(id)
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module Revolut
|
2
|
+
module Clients
|
3
|
+
# Revolut Accounts
|
4
|
+
module Payments
|
5
|
+
# Transfer payment
|
6
|
+
#
|
7
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#transfer
|
8
|
+
#
|
9
|
+
# @param params [Hash] A customizable set of params.
|
10
|
+
#
|
11
|
+
# @return [Hash] Response from API.
|
12
|
+
def transfer(params = {})
|
13
|
+
connection.post('transfer', params)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Create payment
|
17
|
+
#
|
18
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#create-payment
|
19
|
+
#
|
20
|
+
# @param params [Hash] A customizable set of params.
|
21
|
+
#
|
22
|
+
# @return [Hash] Response from API.
|
23
|
+
def pay(params = {})
|
24
|
+
connection.post('pay', params)
|
25
|
+
end
|
26
|
+
|
27
|
+
# List transactions
|
28
|
+
#
|
29
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#get-transactions
|
30
|
+
#
|
31
|
+
# @return [Hash] Response from API.
|
32
|
+
def transactions
|
33
|
+
connection.get('transactions')
|
34
|
+
end
|
35
|
+
|
36
|
+
# Get transaction
|
37
|
+
#
|
38
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#check-payment-status
|
39
|
+
#
|
40
|
+
# @param id [UUID] Id of transaction.
|
41
|
+
#
|
42
|
+
# @return [Hash] Response from API.
|
43
|
+
def transaction(id, params = {})
|
44
|
+
connection.get("transaction/#{id}", params)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Cancel transaction
|
48
|
+
#
|
49
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#cancel-payment
|
50
|
+
#
|
51
|
+
# @param id [UUID] Id of transaction.
|
52
|
+
#
|
53
|
+
# @return [Hash] Response from API.
|
54
|
+
def cancel_transaction(id)
|
55
|
+
connection.delete("transaction/#{id}")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -4,7 +4,11 @@ module Revolut
|
|
4
4
|
module Webhooks
|
5
5
|
# Create webhook
|
6
6
|
#
|
7
|
-
# @see https://revolutdev.github.io/business-api/?shell--
|
7
|
+
# @see https://revolutdev.github.io/business-api/?shell--production#setting-up-a-web-hook
|
8
|
+
#
|
9
|
+
# @param params [Hash] A customizable set of params.
|
10
|
+
# @option params [String] :url Call back endpoint of the client system,
|
11
|
+
# https is the supported protocol.
|
8
12
|
#
|
9
13
|
# @return [Hash] Response from API.
|
10
14
|
def create_webhook(params = {})
|
data/lib/revolut/version.rb
CHANGED
data/revolut.gemspec
CHANGED
@@ -37,7 +37,10 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_dependency 'hashie', '~> 3.5.5'
|
38
38
|
|
39
39
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
40
|
+
spec.add_development_dependency 'pry', '~> 0.11'
|
40
41
|
spec.add_development_dependency 'rake', '~> 10.0'
|
41
42
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
43
|
+
spec.add_development_dependency 'rubocop', '~> 0.56'
|
44
|
+
spec.add_development_dependency 'simplecov', '~> 0.16'
|
42
45
|
spec.add_development_dependency 'webmock', '~> 3.4'
|
43
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revolut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justas Palumickas
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.16'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.11'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.11'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +108,34 @@ dependencies:
|
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '3.7'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.56'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.56'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.16'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.16'
|
97
139
|
- !ruby/object:Gem::Dependency
|
98
140
|
name: webmock
|
99
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +172,7 @@ files:
|
|
130
172
|
- lib/revolut/client.rb
|
131
173
|
- lib/revolut/clients/accounts.rb
|
132
174
|
- lib/revolut/clients/counterparties.rb
|
175
|
+
- lib/revolut/clients/payments.rb
|
133
176
|
- lib/revolut/clients/webhooks.rb
|
134
177
|
- lib/revolut/configuration.rb
|
135
178
|
- lib/revolut/connection.rb
|
@@ -144,8 +187,8 @@ licenses:
|
|
144
187
|
- MIT
|
145
188
|
metadata:
|
146
189
|
bug_tracker_uri: https://github.com/jpalumickas/revolut-ruby/issues
|
147
|
-
source_code_uri: https://github.com/jpalumickas/revolut-ruby/tree/v0.
|
148
|
-
changelog_uri: https://github.com/jpalumickas/revolut-ruby/releases/tag/v0.
|
190
|
+
source_code_uri: https://github.com/jpalumickas/revolut-ruby/tree/v0.3.0
|
191
|
+
changelog_uri: https://github.com/jpalumickas/revolut-ruby/releases/tag/v0.3.0
|
149
192
|
post_install_message:
|
150
193
|
rdoc_options: []
|
151
194
|
require_paths:
|