bridgeapi_client 1.0.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 +7 -0
- data/.env.example +2 -0
- data/.github/workflows/ci-analysis.yml +24 -0
- data/.github/workflows/rubocop-analysis.yml +24 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.yml +50 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +186 -0
- data/LICENSE.txt +21 -0
- data/README.md +229 -0
- data/Rakefile +12 -0
- data/bin/bundle +114 -0
- data/bin/coderay +27 -0
- data/bin/console +21 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/racc +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/bin/setup +8 -0
- data/bridge_api.gemspec +40 -0
- data/lib/bridge_api/account.rb +46 -0
- data/lib/bridge_api/api/client.rb +206 -0
- data/lib/bridge_api/api/error.rb +48 -0
- data/lib/bridge_api/api/resource.rb +25 -0
- data/lib/bridge_api/authorization.rb +44 -0
- data/lib/bridge_api/bank.rb +18 -0
- data/lib/bridge_api/bridge_object.rb +120 -0
- data/lib/bridge_api/category.rb +39 -0
- data/lib/bridge_api/configuration.rb +38 -0
- data/lib/bridge_api/connect.rb +59 -0
- data/lib/bridge_api/insight.rb +27 -0
- data/lib/bridge_api/item.rb +91 -0
- data/lib/bridge_api/object_types.rb +28 -0
- data/lib/bridge_api/payment.rb +260 -0
- data/lib/bridge_api/provider.rb +40 -0
- data/lib/bridge_api/resources.rb +15 -0
- data/lib/bridge_api/stock.rb +45 -0
- data/lib/bridge_api/transaction.rb +79 -0
- data/lib/bridge_api/transfer.rb +42 -0
- data/lib/bridge_api/user.rb +98 -0
- data/lib/bridge_api/version.rb +5 -0
- data/lib/bridge_api.rb +22 -0
- data/lib/bridgeapi_client.rb +3 -0
- metadata +97 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module BridgeApi
|
|
4
|
+
#
|
|
5
|
+
# User resource
|
|
6
|
+
#
|
|
7
|
+
class User < BridgeObject
|
|
8
|
+
RESOURCE_TYPE = "user"
|
|
9
|
+
|
|
10
|
+
class << self
|
|
11
|
+
include API::Resource
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# List all registered users
|
|
15
|
+
#
|
|
16
|
+
# @param [Hash] params any params that might be required (or optional) to communicate with the API
|
|
17
|
+
#
|
|
18
|
+
# @return [Array<User>] the registered users list
|
|
19
|
+
#
|
|
20
|
+
def list(**params)
|
|
21
|
+
data = api_client.get("/v3/aggregation/users", **params)
|
|
22
|
+
convert_to_bridge_object(**data)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#
|
|
26
|
+
# Retrieve a specific user
|
|
27
|
+
#
|
|
28
|
+
# @param [UUID] uuid the uuid of the requested resource
|
|
29
|
+
# @param [Hash] params any params that might be required (or optional) to communicate with the API
|
|
30
|
+
#
|
|
31
|
+
# @return [User] the requested user
|
|
32
|
+
#
|
|
33
|
+
def find(uuid:, **params)
|
|
34
|
+
data = api_client.get("/v3/aggregation/users/#{uuid}", **params)
|
|
35
|
+
convert_to_bridge_object(**data)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
#
|
|
39
|
+
# Create a new user
|
|
40
|
+
#
|
|
41
|
+
# @param [Hash] params any params that might be required (or optional) to communicate with the API
|
|
42
|
+
#
|
|
43
|
+
# @return [User] the newly created user
|
|
44
|
+
#
|
|
45
|
+
def create(**params)
|
|
46
|
+
data = api_client.post("/v3/aggregation/users", **params)
|
|
47
|
+
convert_to_bridge_object(**data)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
#
|
|
51
|
+
# Delete a specific user
|
|
52
|
+
#
|
|
53
|
+
# @param [UUID] uuid the uuid of the requested resource
|
|
54
|
+
# @param [Hash] params any params that might be required (or optional) to communicate with the API
|
|
55
|
+
#
|
|
56
|
+
# @return [Boolean] the request success status
|
|
57
|
+
#
|
|
58
|
+
def delete_user(uuid:, **params)
|
|
59
|
+
api_client.delete("/v3/aggregation/users/#{uuid}", **params)
|
|
60
|
+
true
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
#
|
|
64
|
+
# Delete all registered users
|
|
65
|
+
#
|
|
66
|
+
# @param [Hash] params any params that might be required (or optional) to communicate with the API
|
|
67
|
+
#
|
|
68
|
+
# @return [Boolean] the request success status
|
|
69
|
+
#
|
|
70
|
+
def delete_all_users(**params)
|
|
71
|
+
api_client.delete("/v3/aggregation/users", **params)
|
|
72
|
+
true
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Deprecated methods
|
|
76
|
+
|
|
77
|
+
def update_email(uuid:, **params)
|
|
78
|
+
warn "BridgeApi::User.update_email is deprecated and no longer available in v3 API."
|
|
79
|
+
{}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def update_password(uuid:, **params)
|
|
83
|
+
warn "BridgeApi::User.update_password is deprecated and no longer available in v3 API."
|
|
84
|
+
{}
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def check_email_confirmation(access_token:, **params)
|
|
88
|
+
warn "BridgeApi::User.check_email_confirmation is deprecated and no longer available in v3 API."
|
|
89
|
+
{}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def manage_accounts(access_token:, **params)
|
|
93
|
+
warn "BridgeApi::User.manage_accounts is deprecated and no longer available in v3 API."
|
|
94
|
+
{}
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
data/lib/bridge_api.rb
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Configurations
|
|
4
|
+
require "bridge_api/configuration"
|
|
5
|
+
require "bridge_api/version"
|
|
6
|
+
|
|
7
|
+
# API
|
|
8
|
+
require "bridge_api/api/client"
|
|
9
|
+
require "bridge_api/api/resource"
|
|
10
|
+
|
|
11
|
+
# Business logic
|
|
12
|
+
require "bridge_api/bridge_object"
|
|
13
|
+
require "bridge_api/object_types"
|
|
14
|
+
|
|
15
|
+
# Resources
|
|
16
|
+
require "bridge_api/resources"
|
|
17
|
+
|
|
18
|
+
#
|
|
19
|
+
# BridgeApi main module
|
|
20
|
+
#
|
|
21
|
+
module BridgeApi
|
|
22
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: bridgeapi_client
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Olivier Buffon
|
|
8
|
+
- Thomas Andrieu
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Thanks to a safe and automated access to bank data, Bridge powered by
|
|
14
|
+
Bankin' provides competitive and smart solutions to build conversion-driver financial
|
|
15
|
+
services.
|
|
16
|
+
email:
|
|
17
|
+
- olivier@buffon.dev
|
|
18
|
+
- t.andrieu@gmail.com
|
|
19
|
+
executables: []
|
|
20
|
+
extensions: []
|
|
21
|
+
extra_rdoc_files: []
|
|
22
|
+
files:
|
|
23
|
+
- ".env.example"
|
|
24
|
+
- ".github/workflows/ci-analysis.yml"
|
|
25
|
+
- ".github/workflows/rubocop-analysis.yml"
|
|
26
|
+
- ".gitignore"
|
|
27
|
+
- ".rspec"
|
|
28
|
+
- ".rubocop.yml"
|
|
29
|
+
- CHANGELOG.md
|
|
30
|
+
- Gemfile
|
|
31
|
+
- Gemfile.lock
|
|
32
|
+
- LICENSE.txt
|
|
33
|
+
- README.md
|
|
34
|
+
- Rakefile
|
|
35
|
+
- bin/bundle
|
|
36
|
+
- bin/coderay
|
|
37
|
+
- bin/console
|
|
38
|
+
- bin/htmldiff
|
|
39
|
+
- bin/ldiff
|
|
40
|
+
- bin/pry
|
|
41
|
+
- bin/racc
|
|
42
|
+
- bin/rake
|
|
43
|
+
- bin/rspec
|
|
44
|
+
- bin/rubocop
|
|
45
|
+
- bin/ruby-parse
|
|
46
|
+
- bin/ruby-rewrite
|
|
47
|
+
- bin/setup
|
|
48
|
+
- bridge_api.gemspec
|
|
49
|
+
- lib/bridge_api.rb
|
|
50
|
+
- lib/bridge_api/account.rb
|
|
51
|
+
- lib/bridge_api/api/client.rb
|
|
52
|
+
- lib/bridge_api/api/error.rb
|
|
53
|
+
- lib/bridge_api/api/resource.rb
|
|
54
|
+
- lib/bridge_api/authorization.rb
|
|
55
|
+
- lib/bridge_api/bank.rb
|
|
56
|
+
- lib/bridge_api/bridge_object.rb
|
|
57
|
+
- lib/bridge_api/category.rb
|
|
58
|
+
- lib/bridge_api/configuration.rb
|
|
59
|
+
- lib/bridge_api/connect.rb
|
|
60
|
+
- lib/bridge_api/insight.rb
|
|
61
|
+
- lib/bridge_api/item.rb
|
|
62
|
+
- lib/bridge_api/object_types.rb
|
|
63
|
+
- lib/bridge_api/payment.rb
|
|
64
|
+
- lib/bridge_api/provider.rb
|
|
65
|
+
- lib/bridge_api/resources.rb
|
|
66
|
+
- lib/bridge_api/stock.rb
|
|
67
|
+
- lib/bridge_api/transaction.rb
|
|
68
|
+
- lib/bridge_api/transfer.rb
|
|
69
|
+
- lib/bridge_api/user.rb
|
|
70
|
+
- lib/bridge_api/version.rb
|
|
71
|
+
- lib/bridgeapi_client.rb
|
|
72
|
+
homepage: https://github.com/neatops/bridgeapi
|
|
73
|
+
licenses:
|
|
74
|
+
- MIT
|
|
75
|
+
metadata:
|
|
76
|
+
homepage_uri: https://github.com/neatops/bridgeapi
|
|
77
|
+
source_code_uri: https://github.com/neatops/bridgeapi
|
|
78
|
+
changelog_uri: https://github.com/neatops/bridgeapi/blob/main/CHANGELOG.md
|
|
79
|
+
rubygems_mfa_required: 'true'
|
|
80
|
+
rdoc_options: []
|
|
81
|
+
require_paths:
|
|
82
|
+
- lib
|
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: 3.0.0
|
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
|
+
requirements:
|
|
90
|
+
- - ">="
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '0'
|
|
93
|
+
requirements: []
|
|
94
|
+
rubygems_version: 4.0.3
|
|
95
|
+
specification_version: 4
|
|
96
|
+
summary: Ruby client for the Bridge API
|
|
97
|
+
test_files: []
|