finapps 5.0.45 → 5.0.46

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c79a7e77e6c6496121b61c0b2d37324ec7ca7aa9ff7f8c4153ebf4cb5a4d764b
4
- data.tar.gz: 2016bac07309e1817c0236ddb5b69f5cfb0577ff6c3af27d28ea195b9a56356e
3
+ metadata.gz: 4501dd349460d436671d161a817432d9336cdb1722d2465baef3d65a7bb4d10f
4
+ data.tar.gz: cea911d0e0449e505aa4fd6229f0ca446fc45519a69b8955f22e8789a5b94132
5
5
  SHA512:
6
- metadata.gz: ce58b007e2b3122c2bb4b6ac8e1fd435da08c69e81de23e566488ca52ac4d626d57a814c14dcec667a92d413f93cf746380aeb487ea3b31b7c9fcea048adaa33
7
- data.tar.gz: 8642f81a12d89676bb95458a20d0eaa4ac1cc1be30d6384e2ba7a4a3960472f849aca73927bf11ac45045617904ec3a2cfafec48a7c3f34316e2df603b8447e1
6
+ metadata.gz: e4e89f43a67412901a05f0cd420973e7c87d2e14fb86191b966ca2381d2af0ee8de1df43a3db2b1a3b2b22df616eab186c49fde9f2373f156e9f8e5f3cbdfad7
7
+ data.tar.gz: bac2c749e5c60e123dfb02d5d767b1e8930ae9ef2178a3c9e1be6aff2fa55c596b12d9e64817c228839eb0c1b7aab1a9534ecabee90f1ab5ab667c0d87257910
data/README.md CHANGED
@@ -60,18 +60,20 @@ company_token = 'my-company-token'
60
60
  @client = FinApps::REST::Client.new company_identifier, company_token
61
61
  ```
62
62
 
63
- ## More Information
63
+ ### Release
64
64
 
65
- Please check the [FinApps wiki][wiki] for extended documentation.
65
+ For approved Pull Requests against the master branch, an aggregated release draft will be generated. This draft by default bumps the patch number of previous version.
66
+ Please refer to the [Release Drafter] action documentation for information on this process, specifically how to bump the major or minor numbers of the gem version.
66
67
 
68
+ As soon as this draft is converted into an actual release, an automated process also running on GitHub actions will be triggered to build the gem and release it to rubygems.org.
67
69
 
68
- [FinancialApps.com][financialapps]
69
70
 
71
+ [FinancialApps.com][financialapps]
70
72
 
71
73
  [bundler]: http://bundler.io
72
74
  [financialapps]: https://financialapps.com
73
- [wiki]: https://github.com/finapps/ruby-client/wiki
74
75
  [builder]: http://builder.rubyforge.org/
75
76
  [bundler]: http://bundler.io
76
77
  [rubygems]: http://rubygems.org
77
78
  [build_status]: http://teamciti.powerwallet.com/viewType.html?buildTypeId=FaRuby_BuildMaster&guest=1
79
+ [Release Drafter]: https://github.com/release-drafter/release-drafter
@@ -17,7 +17,12 @@ module FinApps
17
17
 
18
18
  def show(id)
19
19
  not_blank(id, :order_id)
20
- super(id, "documents/orders/#{id}")
20
+
21
+ if matches_token_format?(id)
22
+ show_by_token id
23
+ else
24
+ show_by_id id
25
+ end
21
26
  end
22
27
 
23
28
  def create(params)
@@ -45,6 +50,20 @@ module FinApps
45
50
 
46
51
  private
47
52
 
53
+ def show_by_id(id)
54
+ path = "documents/orders/#{id}"
55
+ send_request path, :get
56
+ end
57
+
58
+ def show_by_token(jwt)
59
+ path = "documents/retrieve_order?token=#{jwt}"
60
+ send_request path, :get
61
+ end
62
+
63
+ def matches_token_format?(str)
64
+ str.match(/^.+\..+\..+$/)
65
+ end
66
+
48
67
  def build_filter(params)
49
68
  search_query(params[:searchTerm])
50
69
  .merge(consumer_query(params[:consumer]))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.45'
4
+ VERSION = '5.0.46'
5
5
  end
@@ -134,14 +134,28 @@ RSpec.describe FinApps::REST::DocumentsOrders do
134
134
  let(:error_messages) { show[1] }
135
135
 
136
136
  context 'with valid id' do
137
- let(:id) { :valid_order_id }
137
+ context 'when id is an identifier' do
138
+ let(:id) { :valid_order_id }
138
139
 
139
- it_behaves_like 'an API request'
140
- it_behaves_like 'a successful request'
141
- it('results is a Hash') { expect(results).to be_a(Hash) }
140
+ it_behaves_like 'an API request'
141
+ it_behaves_like 'a successful request'
142
+ it('has an order_id node in the response') do
143
+ expect(results).to have_key(:order_id)
144
+ end
145
+ end
142
146
 
143
- it('performs a get and returns the response') do
144
- expect(results).to have_key(:order_id)
147
+ context 'when id is a token' do
148
+ let(:id) { '0123456abc.0123456abc.0123456abc' }
149
+
150
+ it_behaves_like 'an API request'
151
+ it_behaves_like 'a successful request'
152
+ it('has an order node in the response') do
153
+ expect(results).to have_key(:order)
154
+ end
155
+
156
+ it('has a consumer node in the response') do
157
+ expect(results).to have_key(:consumer)
158
+ end
145
159
  end
146
160
  end
147
161
 
@@ -214,6 +214,9 @@ module Fake
214
214
  get("/#{version}/documents/orders/valid_order_id") do
215
215
  json_response 200, 'documents_order.json'
216
216
  end
217
+ get("/#{version}/documents/retrieve_order") do
218
+ json_response 200, 'documents/retrieve_order.json'
219
+ end
217
220
  get("/#{version}/documents/orders/invalid_order_id") do
218
221
  json_response 404, 'resource_not_found.json'
219
222
  end
@@ -0,0 +1,97 @@
1
+ {
2
+ "order": {
3
+ "order_id": "2eaf91ab-fdc3-4e0e-a614-5bc790771dcc",
4
+ "consumer_id": "4040e594-a1c7-4a9a-7a85-d78b915b5ac8",
5
+ "applicant": {
6
+ "public_id": "4040e594-a1c7-4a9a-7a85-d78b915b5ac8",
7
+ "email": "erich+202012301310@financialapps.com",
8
+ "first_name": "Erich",
9
+ "last_name": "Quintero",
10
+ "phone": "",
11
+ "external_id": ""
12
+ },
13
+ "reference_no": "20201230",
14
+ "esign_documents": [
15
+ {
16
+ "signature_request_id": "1fb7b6ad7ad31cff806c66da1ab449f1ed0f8e2a",
17
+ "completed": false,
18
+ "completed_date": null,
19
+ "declined": false,
20
+ "declined_date": null,
21
+ "declined_reason": null,
22
+ "declined_role": null,
23
+ "date_requested": "2020-12-30T18:11:41.907Z",
24
+ "template_name": "Un-Ordered Signing w/ Sender Field",
25
+ "template_id": "aefba323382586b15ede625b055243d94feb0693",
26
+ "is_ordered": false,
27
+ "custom_field": [
28
+ {
29
+ "api_id": "5ffc1866-c2fb-454c-ac60-37f87cc4fe3f",
30
+ "value": ""
31
+ }
32
+ ],
33
+ "signers": [
34
+ {
35
+ "public_id": "1031ae95-73c2-437d-7d89-b0834866ea63",
36
+ "role_name": "signer_1",
37
+ "signed": false,
38
+ "signed_date": null,
39
+ "signature_id": "6b5b8c3f0b7ab3a14a9a560c156a85f6"
40
+ },
41
+ {
42
+ "public_id": "032d6613-baa8-4419-60fd-28a3593cbd7a",
43
+ "role_name": "signer_2",
44
+ "signed": false,
45
+ "signed_date": null,
46
+ "signature_id": "0ef748f8ac3d1c80c0132097eb3a7af5"
47
+ }
48
+ ]
49
+ }
50
+ ],
51
+ "co_applicants": [
52
+ {
53
+ "public_id": "1031ae95-73c2-437d-7d89-b0834866ea63",
54
+ "email": "erich+202012301310-s1@financialapps.com",
55
+ "first_name": "Signer",
56
+ "last_name": "Uno",
57
+ "phone": "",
58
+ "external_id": ""
59
+ },
60
+ {
61
+ "public_id": "032d6613-baa8-4419-60fd-28a3593cbd7a",
62
+ "email": "erich+202012301310-s2@financialapps.com",
63
+ "first_name": "Signer",
64
+ "last_name": "Dos",
65
+ "phone": "",
66
+ "external_id": ""
67
+ }
68
+ ],
69
+ "upload_documents": [],
70
+ "tag": "new",
71
+ "status": 1,
72
+ "history": [
73
+ {
74
+ "date": "2020-12-30T18:11:44Z",
75
+ "event": "signature_request_sent",
76
+ "signature_request_id": "1fb7b6ad7ad31cff806c66da1ab449f1ed0f8e2a"
77
+ }
78
+ ],
79
+ "created_by": "erich@financialapps.com",
80
+ "date_created": "2020-12-30T18:11:40.156Z",
81
+ "date_modified": "2020-12-30T18:11:40.156Z",
82
+ "date_last_completed": null
83
+ },
84
+ "consumer": {
85
+ "public_id": "4040e594-a1c7-4a9a-7a85-d78b915b5ac8",
86
+ "email": "erich+202012301310@financialapps.com",
87
+ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdWJsaWNfaWQiOiI0MDQwZTU5NC1hMWM3LTRhOWEtN2E4NS1kNzhiOTE1YjVhYzgiLCJzZXNzaW9uX2lkIjoiMzljNWJiZWYtMmRlMy00YTM1LTRiMjYtNDk1NThhYWFjMjcwIiwidXNlcl90eXBlIjoxLCJ0ZW5hbnRfaWQiOiI0ZGQ2MDdiMS01NjVmLTRkYTQtNzIyYy0yZTg0YzVjODdmNDMiLCJleHAiOjE2MDk0NDI5MDAsImlhdCI6MTYwOTM1NjUwMCwiaXNzIjoiRmluYW5jaWFsQXBwcyIsIm5iZiI6MTYwOTM1NjUwMH0.j66bynp-bVNIvrhv1AQO-mZgERu365BoyMMoppGGJo0",
88
+ "first_name": "Erich",
89
+ "last_name": "Quintero",
90
+ "memo": "",
91
+ "tenant_id": "4dd607b1-565f-4da4-722c-2e84c5c87f43",
92
+ "date_modified": "2020-12-30T18:11:40.167Z",
93
+ "date_created": "2020-12-30T18:11:40.167Z",
94
+ "locked": false,
95
+ "postal_code": "00000"
96
+ }
97
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.45
4
+ version: 5.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -374,6 +374,7 @@ files:
374
374
  - spec/support/fixtures/alert_definition.json
375
375
  - spec/support/fixtures/alert_definitions.json
376
376
  - spec/support/fixtures/alert_occurrences.json
377
+ - spec/support/fixtures/documents/retrieve_order.json
377
378
  - spec/support/fixtures/documents_order.json
378
379
  - spec/support/fixtures/documents_orders.json
379
380
  - spec/support/fixtures/documents_orders_none.json
@@ -465,49 +466,49 @@ signing_key:
465
466
  specification_version: 4
466
467
  summary: FinApps REST API ruby client.
467
468
  test_files:
469
+ - spec/spec_helpers/client.rb
470
+ - spec/spec_helper.rb
471
+ - spec/utils/query_builder_spec.rb
468
472
  - spec/support/fake_api.rb
469
473
  - spec/support/documents_uploads_routes.rb
470
- - spec/spec_helpers/client.rb
471
- - spec/rest/operators_password_resets_spec.rb
474
+ - spec/rest/documents_uploads_spec.rb
475
+ - spec/rest/order_tokens_spec.rb
476
+ - spec/rest/version_spec.rb
472
477
  - spec/rest/products_spec.rb
473
- - spec/rest/alert_definitions_spec.rb
474
- - spec/rest/verix/verix_pdf_documents_spec.rb
478
+ - spec/rest/client_spec.rb
479
+ - spec/rest/password_resets_spec.rb
480
+ - spec/rest/tenant_settings_spec.rb
481
+ - spec/rest/documents_orders_spec.rb
475
482
  - spec/rest/verix/verix_metadata_spec.rb
476
- - spec/rest/verix/verix_documents_spec.rb
477
483
  - spec/rest/verix/verix_records_spec.rb
478
- - spec/rest/portfolios_available_consumers_spec.rb
484
+ - spec/rest/verix/verix_documents_spec.rb
485
+ - spec/rest/verix/verix_pdf_documents_spec.rb
486
+ - spec/rest/orders_spec.rb
487
+ - spec/rest/documents_upload_types_spec.rb
488
+ - spec/rest/documents_orders_notifications_spec.rb
489
+ - spec/rest/consumers_spec.rb
490
+ - spec/rest/order_reports_spec.rb
479
491
  - spec/rest/sessions_spec.rb
480
- - spec/rest/portfolios_consumers_spec.rb
481
- - spec/rest/tenant_app_settings_spec.rb
492
+ - spec/rest/operators_password_resets_spec.rb
493
+ - spec/rest/esign_templates_spec.rb
482
494
  - spec/rest/alert_occurrences_spec.rb
483
- - spec/rest/client_spec.rb
495
+ - spec/rest/portfolios_available_consumers_spec.rb
496
+ - spec/rest/tenant_app_settings_spec.rb
497
+ - spec/rest/portfolios_spec.rb
498
+ - spec/rest/order_assignments_spec.rb
499
+ - spec/rest/alert_definitions_spec.rb
484
500
  - spec/rest/portfolio_reports_spec.rb
485
- - spec/rest/order_statuses_spec.rb
486
- - spec/rest/order_tokens_spec.rb
487
- - spec/rest/documents_orders_spec.rb
488
- - spec/rest/order_notifications_spec.rb
489
- - spec/rest/operators_spec.rb
490
- - spec/rest/order_reports_spec.rb
491
- - spec/rest/orders_spec.rb
492
- - spec/rest/password_resets_spec.rb
493
- - spec/rest/order_refreshes_spec.rb
494
- - spec/rest/documents_uploads_spec.rb
495
- - spec/rest/tenant_settings_spec.rb
496
501
  - spec/rest/consumers_portfolios_spec.rb
497
- - spec/rest/signed_documents_downloads_spec.rb
498
- - spec/rest/order_assignments_spec.rb
499
502
  - spec/rest/portfolios_alerts_spec.rb
500
- - spec/rest/esign_templates_spec.rb
501
- - spec/rest/plaid/plaid_accounts_spec.rb
503
+ - spec/rest/operators_spec.rb
504
+ - spec/rest/signed_documents_downloads_spec.rb
505
+ - spec/rest/api_request.rb
506
+ - spec/rest/order_notifications_spec.rb
507
+ - spec/rest/portfolios_consumers_spec.rb
502
508
  - spec/rest/plaid/plaid_webhooks_spec.rb
509
+ - spec/rest/plaid/plaid_accounts_spec.rb
503
510
  - spec/rest/plaid/plaid_account_permissions_spec.rb
504
- - spec/rest/plaid/plaid_institution_logos_spec.rb
505
511
  - spec/rest/plaid/plaid_consumer_institutions_spec.rb
506
- - spec/rest/documents_upload_types_spec.rb
507
- - spec/rest/consumers_spec.rb
508
- - spec/rest/api_request.rb
509
- - spec/rest/version_spec.rb
510
- - spec/rest/documents_orders_notifications_spec.rb
511
- - spec/rest/portfolios_spec.rb
512
- - spec/utils/query_builder_spec.rb
513
- - spec/spec_helper.rb
512
+ - spec/rest/plaid/plaid_institution_logos_spec.rb
513
+ - spec/rest/order_statuses_spec.rb
514
+ - spec/rest/order_refreshes_spec.rb