finapps 5.0.31 → 5.0.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yaml +37 -0
- data/.rubocop.yml +139 -59
- data/.rubocop_todo.yml +29 -0
- data/.tmuxinator.yml +1 -0
- data/.travis.yml +3 -1
- data/README.md +1 -0
- data/RELEASES.md +29 -0
- data/finapps.gemspec +4 -4
- data/lib/finapps.rb +2 -0
- data/lib/finapps/rest/alert_definitions.rb +1 -1
- data/lib/finapps/rest/alert_occurrences.rb +1 -1
- data/lib/finapps/rest/client.rb +8 -5
- data/lib/finapps/rest/consumers.rb +10 -5
- data/lib/finapps/rest/consumers_portfolios.rb +1 -1
- data/lib/finapps/rest/documents_orders.rb +30 -26
- data/lib/finapps/rest/documents_upload_types.rb +11 -0
- data/lib/finapps/rest/documents_uploads.rb +23 -0
- data/lib/finapps/rest/operators.rb +5 -5
- data/lib/finapps/rest/operators_password_resets.rb +1 -1
- data/lib/finapps/rest/order_assignments.rb +1 -1
- data/lib/finapps/rest/order_reports.rb +1 -1
- data/lib/finapps/rest/orders.rb +33 -22
- data/lib/finapps/rest/plaid/plaid_consumer_institutions.rb +1 -1
- data/lib/finapps/rest/portfolio_reports.rb +1 -1
- data/lib/finapps/rest/portfolios.rb +1 -1
- data/lib/finapps/rest/portfolios_available_consumers.rb +1 -1
- data/lib/finapps/rest/portfolios_consumers.rb +1 -1
- data/lib/finapps/rest/sessions.rb +11 -9
- data/lib/finapps/rest/signed_documents_downloads.rb +3 -1
- data/lib/finapps/utils/query_builder.rb +13 -4
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/alert_definitions_spec.rb +10 -6
- data/spec/rest/alert_occurrences_spec.rb +6 -1
- data/spec/rest/api_request.rb +1 -0
- data/spec/rest/client_spec.rb +33 -41
- data/spec/rest/consumers_portfolios_spec.rb +7 -2
- data/spec/rest/consumers_spec.rb +236 -207
- data/spec/rest/documents_orders_notifications_spec.rb +4 -2
- data/spec/rest/documents_orders_spec.rb +85 -23
- data/spec/rest/documents_upload_types_spec.rb +21 -0
- data/spec/rest/documents_uploads_spec.rb +104 -0
- data/spec/rest/esign_templates_spec.rb +2 -1
- data/spec/rest/operators_password_resets_spec.rb +50 -52
- data/spec/rest/operators_spec.rb +181 -172
- data/spec/rest/order_assignments_spec.rb +6 -1
- data/spec/rest/order_notifications_spec.rb +4 -2
- data/spec/rest/order_refreshes_spec.rb +8 -5
- data/spec/rest/order_reports_spec.rb +21 -15
- data/spec/rest/order_statuses_spec.rb +14 -10
- data/spec/rest/order_tokens_spec.rb +37 -30
- data/spec/rest/orders_spec.rb +121 -73
- data/spec/rest/password_resets_spec.rb +46 -36
- data/spec/rest/plaid/plaid_account_permissions_spec.rb +5 -4
- data/spec/rest/plaid/plaid_accounts_spec.rb +9 -4
- data/spec/rest/plaid/plaid_consumer_institutions_spec.rb +11 -11
- data/spec/rest/plaid/plaid_institution_logos_spec.rb +1 -1
- data/spec/rest/plaid/plaid_webhooks_spec.rb +3 -1
- data/spec/rest/portfolio_reports_spec.rb +7 -2
- data/spec/rest/portfolios_alerts_spec.rb +9 -4
- data/spec/rest/portfolios_available_consumers_spec.rb +7 -2
- data/spec/rest/portfolios_consumers_spec.rb +15 -4
- data/spec/rest/portfolios_spec.rb +20 -17
- data/spec/rest/products_spec.rb +17 -14
- data/spec/rest/sessions_spec.rb +63 -58
- data/spec/rest/signed_documents_downloads_spec.rb +10 -6
- data/spec/rest/tenant_app_settings_spec.rb +9 -3
- data/spec/rest/tenant_settings_spec.rb +9 -3
- data/spec/rest/verix/verix_documents_spec.rb +15 -22
- data/spec/rest/verix/verix_metadata_spec.rb +1 -1
- data/spec/rest/verix/verix_pdf_documents_spec.rb +14 -19
- data/spec/rest/verix/verix_records_spec.rb +31 -10
- data/spec/rest/version_spec.rb +6 -4
- data/spec/spec_helper.rb +2 -2
- data/spec/support/fake_api.rb +24 -3
- data/spec/support/fixtures/documents_orders_none.json +6 -0
- data/spec/support/fixtures/upload_types.json +9 -0
- data/spec/utils/query_builder_spec.rb +40 -14
- metadata +26 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d502756b01180a324db1ab9e232bd71810d1e9f950bcaf9f47df667c3bd2d7ed
|
4
|
+
data.tar.gz: b1a9723d9944b250ff1d57917e66c903647929b3161ecb718dde62b9804f7d36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 643b7f796405c8d6d06f2f414098b23f4295627702c03d119599827f8977866c8ffc8f62ab7b60330ae679ef35be0247440d16f938686c75f1426be3fec3a068
|
7
|
+
data.tar.gz: cb58c991c8b188221f9900d057e03d2394eaa7baaf712edf4f1f029a722436afe2e424e4562176778e00d294d9ebaac609ab7d578d57110162889e5b56a9ed2a
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Main
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
ci:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: true
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v1
|
14
|
+
|
15
|
+
- name: Use Ruby 2.6
|
16
|
+
uses: actions/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: '2.6'
|
19
|
+
|
20
|
+
- uses: actions/cache@v1
|
21
|
+
with:
|
22
|
+
path: vendor/bundle
|
23
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
24
|
+
restore-keys: |
|
25
|
+
${{ runner.os }}-gems-
|
26
|
+
|
27
|
+
- name: Install gems
|
28
|
+
run: |
|
29
|
+
gem install bundler
|
30
|
+
bundle config path vendor/bundle
|
31
|
+
bundle install --jobs 4 --retry 3
|
32
|
+
|
33
|
+
- name: Run rubocop
|
34
|
+
run: bundle exec rubocop
|
35
|
+
|
36
|
+
- name: Run tests
|
37
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
@@ -1,26 +1,60 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-rspec
|
5
|
+
- rubocop-performance
|
6
|
+
|
1
7
|
AllCops:
|
2
|
-
|
8
|
+
TargetRubyVersion: 2.6
|
3
9
|
Exclude:
|
4
|
-
|
5
|
-
|
10
|
+
- "vendor/**/*"
|
11
|
+
- "bin/**/*"
|
12
|
+
CacheRootDirectory: tmp
|
13
|
+
NewCops: enable
|
6
14
|
|
7
|
-
|
15
|
+
Layout/SpaceAroundMethodCallOperator:
|
16
|
+
Enabled: true
|
17
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
18
|
+
Enabled: true
|
19
|
+
Layout/SpaceInsideBlockBraces:
|
20
|
+
# The space here provides no real gain in readability while consuming
|
21
|
+
# horizontal space that could be used for a better parameter name.
|
22
|
+
# Also {| differentiates better from a hash than { | does.
|
23
|
+
SpaceBeforeBlockParameters: false
|
24
|
+
Layout/SpaceInsideHashLiteralBraces:
|
25
|
+
EnforcedStyle: no_space
|
26
|
+
Layout/DotPosition:
|
27
|
+
Description: Checks the position of the dot in multi-line method calls.
|
28
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
29
|
+
Enabled: true
|
30
|
+
EnforcedStyle: leading
|
31
|
+
SupportedStyles:
|
32
|
+
- leading
|
33
|
+
- trailing
|
8
34
|
Layout/LineLength:
|
9
|
-
Max:
|
35
|
+
Max: 110
|
10
36
|
|
11
|
-
|
12
|
-
Description: Preferred collection methods.
|
13
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
37
|
+
Lint/DeprecatedOpenSSLConstant:
|
14
38
|
Enabled: true
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
39
|
+
Lint/MixedRegexpCaptureTypes:
|
40
|
+
Enabled: true
|
41
|
+
Lint/RaiseException:
|
42
|
+
Enabled: true
|
43
|
+
Lint/StructNewOverride:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
Metrics/ClassLength:
|
47
|
+
Exclude:
|
48
|
+
- app/controllers/orders_controller.rb
|
49
|
+
- app/models/order.rb
|
50
|
+
Metrics/BlockLength:
|
51
|
+
ExcludedMethods: ['describe', 'context']
|
52
|
+
Exclude:
|
53
|
+
- config/environments/**/**
|
54
|
+
- Guardfile
|
55
|
+
- config/routes.rb
|
56
|
+
- config/Guardfile
|
57
|
+
|
24
58
|
Naming/PredicateName:
|
25
59
|
Description: Check the names of predicate methods.
|
26
60
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
@@ -33,54 +67,100 @@ Naming/PredicateName:
|
|
33
67
|
- is_
|
34
68
|
Exclude:
|
35
69
|
- spec/**/*
|
36
|
-
|
37
|
-
|
38
|
-
conditions.
|
39
|
-
Enabled: false
|
40
|
-
Max: 15
|
41
|
-
Metrics/BlockLength:
|
42
|
-
ExcludedMethods: ['describe', 'context']
|
43
|
-
Metrics/ClassLength:
|
44
|
-
Description: Avoid classes longer than 100 lines of code.
|
45
|
-
Enabled: false
|
46
|
-
CountComments: false
|
47
|
-
Max: 100
|
48
|
-
Metrics/ModuleLength:
|
49
|
-
CountComments: false
|
50
|
-
Max: 100
|
51
|
-
Description: Avoid modules longer than 100 lines of code.
|
52
|
-
Enabled: false
|
53
|
-
Metrics/CyclomaticComplexity:
|
54
|
-
Description: A complexity metric that is strongly correlated to the number of test
|
55
|
-
cases needed to validate a method.
|
70
|
+
|
71
|
+
RSpec/FilePath:
|
56
72
|
Enabled: false
|
57
|
-
|
58
|
-
Metrics/MethodLength:
|
59
|
-
Description: Avoid methods longer than 10 lines of code.
|
60
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
73
|
+
Gemspec/RequiredRubyVersion:
|
61
74
|
Enabled: false
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
75
|
+
|
76
|
+
Style/RedundantRegexpCharacterClass:
|
77
|
+
Enabled: true
|
78
|
+
Style/RedundantRegexpEscape:
|
79
|
+
Enabled: true
|
80
|
+
Style/CollectionMethods:
|
81
|
+
Description: Preferred collection methods.
|
82
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
83
|
+
Enabled: true
|
84
|
+
PreferredMethods:
|
85
|
+
collect: map
|
86
|
+
collect!: map!
|
87
|
+
find: detect
|
88
|
+
find_all: select
|
89
|
+
reduce: inject
|
90
|
+
Style/GuardClause:
|
91
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
92
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
93
|
+
Enabled: true
|
94
|
+
MinBodyLength: 1
|
95
|
+
Style/OptionHash:
|
96
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
67
97
|
Enabled: false
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
Description: A complexity metric geared towards measuring complexity for a human
|
72
|
-
reader.
|
98
|
+
Style/PercentLiteralDelimiters:
|
99
|
+
Description: Use `%`-literal delimiters consistently
|
100
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
73
101
|
Enabled: false
|
74
|
-
|
102
|
+
PreferredDelimiters:
|
103
|
+
"%": "()"
|
104
|
+
"%i": "()"
|
105
|
+
"%q": "()"
|
106
|
+
"%Q": "()"
|
107
|
+
"%r": "{}"
|
108
|
+
"%s": "()"
|
109
|
+
"%w": "()"
|
110
|
+
"%W": "()"
|
111
|
+
"%x": "()"
|
112
|
+
Style/SignalException:
|
113
|
+
Description: Checks for proper usage of fail and raise.
|
114
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
115
|
+
Enabled: true
|
116
|
+
EnforcedStyle: semantic
|
117
|
+
SupportedStyles:
|
118
|
+
- only_raise
|
119
|
+
- only_fail
|
120
|
+
- semantic
|
121
|
+
Style/StringLiterals:
|
122
|
+
Description: Checks if uses of quotes match the configured preference.
|
123
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
124
|
+
Enabled: true
|
125
|
+
EnforcedStyle: single_quotes
|
126
|
+
SupportedStyles:
|
127
|
+
- single_quotes
|
128
|
+
- double_quotes
|
129
|
+
Style/StringLiteralsInInterpolation:
|
130
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
131
|
+
match the configured preference.
|
132
|
+
Enabled: true
|
133
|
+
EnforcedStyle: single_quotes
|
134
|
+
SupportedStyles:
|
135
|
+
- single_quotes
|
136
|
+
- double_quotes
|
75
137
|
Style/Documentation:
|
76
138
|
Description: Document classes and non-namespace modules.
|
77
139
|
Enabled: false
|
78
|
-
Style/
|
79
|
-
Description:
|
80
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#
|
140
|
+
Style/OneLineConditional:
|
141
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
142
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
81
143
|
Enabled: false
|
82
|
-
Style/
|
83
|
-
|
84
|
-
|
85
|
-
|
144
|
+
Style/ExponentialNotation:
|
145
|
+
Enabled: true
|
146
|
+
Style/HashEachMethods:
|
147
|
+
Enabled: true
|
148
|
+
Style/HashTransformKeys:
|
149
|
+
Enabled: true
|
150
|
+
Style/HashTransformValues:
|
151
|
+
Enabled: true
|
152
|
+
Style/RedundantFetchBlock:
|
153
|
+
Enabled: true
|
154
|
+
Style/SlicingWithRange:
|
155
|
+
Enabled: true
|
156
|
+
Style/OptionalBooleanParameter:
|
157
|
+
Enabled: false
|
158
|
+
Style/StringConcatenation:
|
86
159
|
Enabled: false
|
160
|
+
|
161
|
+
RSpec/NestedGroups:
|
162
|
+
Max: 5
|
163
|
+
RSpec/DescribeClass:
|
164
|
+
Exclude:
|
165
|
+
- spec/system/*
|
166
|
+
- spec/factories_spec.rb
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2020-06-24 14:28:46 UTC using RuboCop version 0.86.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
11
|
+
# ExcludedMethods: refine
|
12
|
+
# finapps.gemspec - leaving as is intentionally
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Max: 28
|
15
|
+
|
16
|
+
# Offense count: 1
|
17
|
+
# Configuration parameters: CountComments.
|
18
|
+
# fake_api.rb - leaving as is intentionally
|
19
|
+
Metrics/ClassLength:
|
20
|
+
Max: 442
|
21
|
+
|
22
|
+
# Offense count: 5
|
23
|
+
# Configuration parameters: Max.
|
24
|
+
# Leaving as is intentionally - url being tested takes up as many lines
|
25
|
+
RSpec/ExampleLength:
|
26
|
+
Exclude:
|
27
|
+
- 'spec/rest/consumers_spec.rb'
|
28
|
+
- 'spec/rest/documents_orders_spec.rb'
|
29
|
+
- 'spec/rest/orders_spec.rb'
|
data/.tmuxinator.yml
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,7 @@ FinApps Ruby-Client
|
|
3
3
|
===================
|
4
4
|
|
5
5
|
[![Gem Version](https://img.shields.io/gem/v/finapps.svg)](https://rubygems.org/gems/finapps)
|
6
|
+
![Main](https://github.com/finapps/ruby-client/workflows/Main/badge.svg)
|
6
7
|
[![Build Status](https://travis-ci.org/finapps/ruby-client.svg?branch=master)](https://travis-ci.org/finapps/ruby-client)
|
7
8
|
[![Code Climate](https://codeclimate.com/github/finapps/ruby-client/badges/gpa.svg)](https://codeclimate.com/github/finapps/ruby-client)
|
8
9
|
[![Test Coverage](https://codeclimate.com/github/finapps/ruby-client/badges/coverage.svg)](https://codeclimate.com/github/finapps/ruby-client/coverage)
|
data/RELEASES.md
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
## [5.0.36] - 2020-08-05
|
2
|
+
|
3
|
+
### Changed
|
4
|
+
* Add upload endpoints to support dashboard ([#309][i309])
|
5
|
+
|
6
|
+
[i309]: https://github.com/finapps/tenant-dashboard-react/issues/309
|
7
|
+
|
8
|
+
[5.0.36]: https://github.com/finapps/ruby-client/compare/5.0.35...5.0.36
|
9
|
+
|
10
|
+
## [5.0.35] - 2020-07-09
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
* Change code to match rubocop suggestions ([#232][i232])
|
14
|
+
* Add support for first name order search with space ([#404][i404])
|
15
|
+
|
16
|
+
[i232]: https://github.com/finapps/ruby-client/issues/232
|
17
|
+
[i404]: https://github.com/finapps/tenant-dashboard-react/issues/404
|
18
|
+
|
19
|
+
[5.0.35]: https://github.com/finapps/ruby-client/compare/5.0.34...5.0.35
|
20
|
+
|
21
|
+
## [5.0.32] - 2020-06-11
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
* Argument error resulting from space search ([#225][i225])
|
25
|
+
|
26
|
+
[i225]: https://github.com/finapps/ruby-client/issues/225
|
27
|
+
|
28
|
+
[5.0.32]: https://github.com/finapps/ruby-client/compare/5.0.31...5.0.32
|
29
|
+
|
1
30
|
## [5.0.31] - 2020-06-11
|
2
31
|
|
3
32
|
### Changed
|
data/finapps.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.test_files = Dir['spec/**/*.rb']
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.
|
23
|
+
spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.10'
|
24
24
|
|
25
25
|
spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
|
26
26
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
|
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
|
30
30
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.1'
|
31
31
|
spec.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
|
32
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
33
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.
|
34
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 1.
|
32
|
+
spec.add_development_dependency 'rubocop', '~> 0.86', '>= 0.86.0'
|
33
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.6', '>= 1.6.1'
|
34
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.40', '>= 1.40.0'
|
35
35
|
spec.add_development_dependency 'sinatra', '~> 2.0', '>= 2.0.8'
|
36
36
|
spec.add_development_dependency 'webmock', '~> 3.8', '>= 3.8.0'
|
37
37
|
|
data/lib/finapps.rb
CHANGED
@@ -30,7 +30,9 @@ require 'finapps/rest/portfolios_consumers'
|
|
30
30
|
require 'finapps/rest/consumers_portfolios'
|
31
31
|
require 'finapps/rest/portfolio_reports'
|
32
32
|
require 'finapps/rest/documents_orders'
|
33
|
+
require 'finapps/rest/documents_uploads'
|
33
34
|
require 'finapps/rest/esign_templates'
|
35
|
+
require 'finapps/rest/documents_upload_types'
|
34
36
|
require 'finapps/rest/signed_documents_downloads'
|
35
37
|
require 'finapps/rest/documents_orders_notifications'
|
36
38
|
|
@@ -8,7 +8,7 @@ module FinApps
|
|
8
8
|
|
9
9
|
def list(params = nil)
|
10
10
|
return super END_POINT if params.nil?
|
11
|
-
|
11
|
+
fail FinAppsCore::InvalidArgumentsError, 'Invalid argument: params' unless params.is_a? Hash
|
12
12
|
|
13
13
|
super build_query_path(END_POINT, params)
|
14
14
|
end
|
@@ -8,7 +8,7 @@ module FinApps
|
|
8
8
|
|
9
9
|
def list(params = nil)
|
10
10
|
return super END_POINT if params.nil?
|
11
|
-
|
11
|
+
fail FinAppsCore::InvalidArgumentsError, 'Invalid argument: params' unless params.is_a? Hash
|
12
12
|
|
13
13
|
super build_query_path(END_POINT, params)
|
14
14
|
end
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -13,6 +13,8 @@ module FinApps
|
|
13
13
|
consumers_portfolios
|
14
14
|
documents_orders
|
15
15
|
documents_orders_notifications
|
16
|
+
documents_upload_types
|
17
|
+
documents_uploads
|
16
18
|
esign_templates
|
17
19
|
orders
|
18
20
|
order_assignments
|
@@ -60,17 +62,18 @@ module FinApps
|
|
60
62
|
if RESOURCES.include? symbol
|
61
63
|
class_name = camelize(symbol.to_s)
|
62
64
|
variable = "@#{class_name.downcase}"
|
63
|
-
unless instance_variable_defined? variable
|
64
|
-
klass =
|
65
|
-
Object.const_get('FinApps').const_get('REST').const_get class_name
|
66
|
-
instance_variable_set(variable, klass.new(self))
|
67
|
-
end
|
65
|
+
set_variable(class_name, variable) unless instance_variable_defined? variable
|
68
66
|
instance_variable_get(variable)
|
69
67
|
else
|
70
68
|
super
|
71
69
|
end
|
72
70
|
end
|
73
71
|
|
72
|
+
def set_variable(class_name, variable)
|
73
|
+
klass = Object.const_get('FinApps').const_get('REST').const_get class_name
|
74
|
+
instance_variable_set(variable, klass.new(self))
|
75
|
+
end
|
76
|
+
|
74
77
|
def respond_to_missing?(method_sym, include_private = false)
|
75
78
|
RESOURCES.include?(method_sym) ? true : super
|
76
79
|
end
|