dropbox-sign 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +12 -4
  4. data/VERSION +1 -1
  5. data/docs/BulkSendJobGetResponseSignatureRequests.md +1 -0
  6. data/docs/EventCallbackRequestEvent.md +1 -1
  7. data/docs/SignatureRequestApi.md +415 -0
  8. data/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +1 -1
  9. data/docs/SignatureRequestBulkSendWithTemplateRequest.md +1 -1
  10. data/docs/SignatureRequestEditEmbeddedRequest.md +33 -0
  11. data/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md +24 -0
  12. data/docs/SignatureRequestEditRequest.md +35 -0
  13. data/docs/SignatureRequestEditWithTemplateRequest.md +26 -0
  14. data/docs/SignatureRequestResponse.md +2 -0
  15. data/docs/SubFormFieldsPerDocumentDateSigned.md +1 -1
  16. data/docs/SubFormFieldsPerDocumentDropdown.md +1 -1
  17. data/docs/SubFormFieldsPerDocumentHyperlink.md +1 -1
  18. data/docs/SubFormFieldsPerDocumentText.md +1 -1
  19. data/docs/SubFormFieldsPerDocumentTextMerge.md +1 -1
  20. data/docs/SubSignatureRequestSigner.md +1 -1
  21. data/docs/SubSignatureRequestTemplateSigner.md +1 -1
  22. data/examples/SignatureRequestEdit.rb +58 -0
  23. data/examples/SignatureRequestEditEmbedded.rb +48 -0
  24. data/examples/SignatureRequestEditEmbeddedWithTemplate.rb +41 -0
  25. data/examples/SignatureRequestEditWithTemplate.rb +52 -0
  26. data/lib/dropbox-sign/api/api_app_api.rb +1 -1
  27. data/lib/dropbox-sign/api/signature_request_api.rb +460 -0
  28. data/lib/dropbox-sign/api/team_api.rb +1 -1
  29. data/lib/dropbox-sign/event_callback_helper.rb +1 -1
  30. data/lib/dropbox-sign/models/bulk_send_job_get_response_signature_requests.rb +13 -1
  31. data/lib/dropbox-sign/models/event_callback_request_event.rb +2 -7
  32. data/lib/dropbox-sign/models/signature_request_bulk_create_embedded_with_template_request.rb +1 -1
  33. data/lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb +1 -1
  34. data/lib/dropbox-sign/models/signature_request_edit_embedded_request.rb +593 -0
  35. data/lib/dropbox-sign/models/signature_request_edit_embedded_with_template_request.rb +490 -0
  36. data/lib/dropbox-sign/models/signature_request_edit_request.rb +612 -0
  37. data/lib/dropbox-sign/models/signature_request_edit_with_template_request.rb +509 -0
  38. data/lib/dropbox-sign/models/signature_request_response.rb +28 -4
  39. data/lib/dropbox-sign/models/sub_form_fields_per_document_date_signed.rb +2 -0
  40. data/lib/dropbox-sign/models/sub_form_fields_per_document_dropdown.rb +2 -0
  41. data/lib/dropbox-sign/models/sub_form_fields_per_document_hyperlink.rb +2 -0
  42. data/lib/dropbox-sign/models/sub_form_fields_per_document_text.rb +2 -0
  43. data/lib/dropbox-sign/models/sub_form_fields_per_document_text_merge.rb +2 -0
  44. data/lib/dropbox-sign/models/sub_signature_request_signer.rb +1 -1
  45. data/lib/dropbox-sign/models/sub_signature_request_template_signer.rb +1 -1
  46. data/lib/dropbox-sign/version.rb +1 -1
  47. data/lib/dropbox-sign.rb +4 -0
  48. data/openapi-config.yaml +1 -1
  49. data/openapi-sdk.yaml +2321 -1264
  50. data/spec/event_callback_helper_spec.rb +17 -3
  51. data/templates/event_callback_helper.mustache +1 -1
  52. data/test_fixtures/EventCallbackHelper_AccountCallbacks.json +82 -0
  53. data/test_fixtures/{EventCallbackHelper.json → EventCallbackHelper_AppCallbacks.json} +8 -4
  54. data/test_fixtures/SignatureRequestSendRequest.json +12 -6
  55. data/test_fixtures/SubFormFieldsPerDocument.json +8 -4
  56. metadata +23 -10
@@ -6,16 +6,30 @@ api_client = Dropbox::Sign::ApiClient.new(config)
6
6
 
7
7
  describe Dropbox::Sign::EventCallbackHelper do
8
8
  context 'EventCallbackHelper' do
9
- fixture_data = get_fixture_data('EventCallbackHelper')
10
9
  api_key = '324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782'
11
10
  api_key_rev = api_key.reverse
12
11
 
13
- fixture_data.each do |key, data|
14
- it "event callback for type #{key} is valid" do
12
+ account_data = get_fixture_data('EventCallbackHelper_AccountCallbacks')
13
+ account_data.each do |key, data|
14
+ it "account event callback for type #{key} is valid" do
15
15
  obj = Dropbox::Sign::EventCallbackRequest.init(data)
16
16
 
17
17
  expect(Dropbox::Sign::EventCallbackHelper.is_valid(api_key, obj)).to eq(true)
18
18
  expect(Dropbox::Sign::EventCallbackHelper.is_valid(api_key_rev, obj)).to eq(false)
19
+ expect(Dropbox::Sign::EventCallbackHelper.get_callback_type(obj))
20
+ .to eq(Dropbox::Sign::EventCallbackHelper::EVENT_TYPE_ACCOUNT_CALLBACK)
21
+ end
22
+ end
23
+
24
+ app_data = get_fixture_data('EventCallbackHelper_AppCallbacks')
25
+ app_data.each do |key, data|
26
+ it "app event callback for type #{key} is valid" do
27
+ obj = Dropbox::Sign::EventCallbackRequest.init(data)
28
+
29
+ expect(Dropbox::Sign::EventCallbackHelper.is_valid(api_key, obj)).to eq(true)
30
+ expect(Dropbox::Sign::EventCallbackHelper.is_valid(api_key_rev, obj)).to eq(false)
31
+ expect(Dropbox::Sign::EventCallbackHelper.get_callback_type(obj))
32
+ .to eq(Dropbox::Sign::EventCallbackHelper::EVENT_TYPE_APP_CALLBACK)
19
33
  end
20
34
  end
21
35
  end
@@ -36,7 +36,7 @@ module Dropbox::Sign
36
36
  def self.get_callback_type(event_callback)
37
37
  metadata = event_callback.event.event_metadata || EventCallbackRequestEventMetadata.new
38
38
 
39
- if metadata.reported_for_app_id.nil? || metadata.reported_for_app_id.empty?
39
+ if metadata.nil? || metadata.reported_for_app_id.nil? || metadata.reported_for_app_id.empty?
40
40
  return EVENT_TYPE_ACCOUNT_CALLBACK
41
41
  end
42
42
 
@@ -0,0 +1,82 @@
1
+ {
2
+ "base": {
3
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
4
+ "event": {
5
+ "event_time": "1348177752",
6
+ "event_type": "unknown_error",
7
+ "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371",
8
+ "event_metadata": {
9
+ "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
10
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
11
+ }
12
+ }
13
+ },
14
+ "base_no_metadata": {
15
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
16
+ "event": {
17
+ "event_time": "1348177752",
18
+ "event_type": "unknown_error",
19
+ "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371"
20
+ }
21
+ },
22
+ "account": {
23
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
24
+ "event": {
25
+ "event_time": "1348177752",
26
+ "event_type": "account_confirmed",
27
+ "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848",
28
+ "event_metadata": {
29
+ "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
30
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
31
+ }
32
+ }
33
+ },
34
+ "account_no_metadata": {
35
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
36
+ "event": {
37
+ "event_time": "1348177752",
38
+ "event_type": "account_confirmed",
39
+ "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848"
40
+ }
41
+ },
42
+ "signature_request": {
43
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
44
+ "event": {
45
+ "event_time": "1348177752",
46
+ "event_type": "signature_request_sent",
47
+ "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756",
48
+ "event_metadata": {
49
+ "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
50
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
51
+ }
52
+ }
53
+ },
54
+ "signature_request_no_metadata": {
55
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
56
+ "event": {
57
+ "event_time": "1348177752",
58
+ "event_type": "signature_request_sent",
59
+ "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756"
60
+ }
61
+ },
62
+ "template": {
63
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
64
+ "event": {
65
+ "event_time": "1348177752",
66
+ "event_type": "template_created",
67
+ "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d",
68
+ "event_metadata": {
69
+ "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
70
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
71
+ }
72
+ }
73
+ },
74
+ "template_no_metadata": {
75
+ "account_guid": "63522885f9261e2b04eea043933ee7313eb674fd",
76
+ "event": {
77
+ "event_time": "1348177752",
78
+ "event_type": "template_created",
79
+ "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d"
80
+ }
81
+ }
82
+ }
@@ -7,7 +7,8 @@
7
7
  "event_hash": "c574f5d3090c2936360b4e36cf6835cf3e2206b84fdc6347e6b28ca721ae1371",
8
8
  "event_metadata": {
9
9
  "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
10
- "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
10
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd",
11
+ "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0"
11
12
  }
12
13
  }
13
14
  },
@@ -19,7 +20,8 @@
19
20
  "event_hash": "6dc5b7aad93cf54915e0089d6c31d61b3833f66f51459171c69f8fa211308848",
20
21
  "event_metadata": {
21
22
  "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
22
- "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
23
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd",
24
+ "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0"
23
25
  }
24
26
  }
25
27
  },
@@ -31,7 +33,8 @@
31
33
  "event_hash": "08d45a6b7677492b78be030cef18cfeaece8fe67e163cc8e526ee638ad483756",
32
34
  "event_metadata": {
33
35
  "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
34
- "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
36
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd",
37
+ "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0"
35
38
  }
36
39
  }
37
40
  },
@@ -43,7 +46,8 @@
43
46
  "event_hash": "4a9b22fa68d5addb8b6313eea9d42ecb393903a4240b71503ef78e9dac6c100d",
44
47
  "event_metadata": {
45
48
  "related_signature_id": "ad4d8a769b555fa5ef38691465d426682bf2c992",
46
- "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd"
49
+ "reported_for_account_id": "63522885f9261e2b04eea043933ee7313eb674fd",
50
+ "reported_for_app_id": "98891a1b59f312d04cd88e4e0c498d75e0ce0ce0"
47
51
  }
48
52
  }
49
53
  }
@@ -122,7 +122,8 @@
122
122
  "height": 30,
123
123
  "required": true,
124
124
  "signer": "1",
125
- "page": 1
125
+ "page": 1,
126
+ "font_size": 12
126
127
  },
127
128
  {
128
129
  "document_index": 0,
@@ -140,7 +141,8 @@
140
141
  "height": 30,
141
142
  "required": true,
142
143
  "signer": "1",
143
- "page": 1
144
+ "page": 1,
145
+ "font_size": 12
144
146
  },
145
147
  {
146
148
  "document_index": 0,
@@ -153,7 +155,8 @@
153
155
  "height": 30,
154
156
  "required": true,
155
157
  "signer": "1",
156
- "page": 1
158
+ "page": 1,
159
+ "font_size": 12
157
160
  },
158
161
  {
159
162
  "document_index": 0,
@@ -352,7 +355,8 @@
352
355
  "height": 30,
353
356
  "required": true,
354
357
  "signer": "1",
355
- "page": 1
358
+ "page": 1,
359
+ "font_size": 12
356
360
  },
357
361
  {
358
362
  "document_index": 0,
@@ -370,7 +374,8 @@
370
374
  "height": 30,
371
375
  "required": true,
372
376
  "signer": "1",
373
- "page": 1
377
+ "page": 1,
378
+ "font_size": 12
374
379
  },
375
380
  {
376
381
  "document_index": 0,
@@ -383,7 +388,8 @@
383
388
  "height": 30,
384
389
  "required": true,
385
390
  "signer": "1",
386
- "page": 1
391
+ "page": 1,
392
+ "font_size": 12
387
393
  },
388
394
  {
389
395
  "document_index": 0,
@@ -32,7 +32,8 @@
32
32
  "height": 16,
33
33
  "x": 112,
34
34
  "y": 328,
35
- "options": ["foo"]
35
+ "options": ["foo"],
36
+ "font_size": 12
36
37
  },
37
38
  "SubFormFieldsPerDocumentHyperlink": {
38
39
  "type" : "hyperlink",
@@ -45,7 +46,8 @@
45
46
  "x": 112,
46
47
  "y": 328,
47
48
  "content": "Dropbox Sign",
48
- "content_url": "https://dropboxsign.com"
49
+ "content_url": "https://dropboxsign.com",
50
+ "font_size": 12
49
51
  },
50
52
  "SubFormFieldsPerDocumentInitials": {
51
53
  "type" : "initials",
@@ -91,7 +93,8 @@
91
93
  "width": 100,
92
94
  "height": 16,
93
95
  "x": 112,
94
- "y": 328
96
+ "y": 328,
97
+ "font_size": 12
95
98
  },
96
99
  "SubFormFieldsPerDocumentTextMerge": {
97
100
  "type" : "text-merge",
@@ -102,6 +105,7 @@
102
105
  "width": 100,
103
106
  "height": 16,
104
107
  "x": 112,
105
- "y": 328
108
+ "y": 328,
109
+ "font_size": 12
106
110
  }
107
111
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropbox-sign
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dropbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-29 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -125,6 +125,10 @@ files:
125
125
  - docs/SignatureRequestBulkSendWithTemplateRequest.md
126
126
  - docs/SignatureRequestCreateEmbeddedRequest.md
127
127
  - docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md
128
+ - docs/SignatureRequestEditEmbeddedRequest.md
129
+ - docs/SignatureRequestEditEmbeddedWithTemplateRequest.md
130
+ - docs/SignatureRequestEditRequest.md
131
+ - docs/SignatureRequestEditWithTemplateRequest.md
128
132
  - docs/SignatureRequestGetResponse.md
129
133
  - docs/SignatureRequestListResponse.md
130
134
  - docs/SignatureRequestRemindRequest.md
@@ -276,6 +280,10 @@ files:
276
280
  - examples/SignatureRequestCancel.rb
277
281
  - examples/SignatureRequestCreateEmbedded.rb
278
282
  - examples/SignatureRequestCreateEmbeddedWithTemplate.rb
283
+ - examples/SignatureRequestEdit.rb
284
+ - examples/SignatureRequestEditEmbedded.rb
285
+ - examples/SignatureRequestEditEmbeddedWithTemplate.rb
286
+ - examples/SignatureRequestEditWithTemplate.rb
279
287
  - examples/SignatureRequestFiles.rb
280
288
  - examples/SignatureRequestFilesAsDataUri.rb
281
289
  - examples/SignatureRequestFilesAsFileUrl.rb
@@ -373,6 +381,10 @@ files:
373
381
  - lib/dropbox-sign/models/signature_request_bulk_send_with_template_request.rb
374
382
  - lib/dropbox-sign/models/signature_request_create_embedded_request.rb
375
383
  - lib/dropbox-sign/models/signature_request_create_embedded_with_template_request.rb
384
+ - lib/dropbox-sign/models/signature_request_edit_embedded_request.rb
385
+ - lib/dropbox-sign/models/signature_request_edit_embedded_with_template_request.rb
386
+ - lib/dropbox-sign/models/signature_request_edit_request.rb
387
+ - lib/dropbox-sign/models/signature_request_edit_with_template_request.rb
376
388
  - lib/dropbox-sign/models/signature_request_get_response.rb
377
389
  - lib/dropbox-sign/models/signature_request_list_response.rb
378
390
  - lib/dropbox-sign/models/signature_request_remind_request.rb
@@ -572,7 +584,8 @@ files:
572
584
  - test_fixtures/EmbeddedEditUrlResponse.json
573
585
  - test_fixtures/EmbeddedSignUrlResponse.json
574
586
  - test_fixtures/ErrorResponse.json
575
- - test_fixtures/EventCallbackHelper.json
587
+ - test_fixtures/EventCallbackHelper_AccountCallbacks.json
588
+ - test_fixtures/EventCallbackHelper_AppCallbacks.json
576
589
  - test_fixtures/FileResponse.json
577
590
  - test_fixtures/OAuthTokenGenerateRequest.json
578
591
  - test_fixtures/OAuthTokenRefreshRequest.json
@@ -637,16 +650,16 @@ signing_key:
637
650
  specification_version: 4
638
651
  summary: Dropbox Sign API Ruby Gem
639
652
  test_files:
640
- - spec/api/bulk_send_job_api_spec.rb
641
- - spec/api/account_api_spec.rb
642
- - spec/api/embedded_api_spec.rb
643
- - spec/api/signature_request_api_spec.rb
644
653
  - spec/api/template_api_spec.rb
645
- - spec/api/team_api_spec.rb
646
- - spec/api/report_api_spec.rb
647
654
  - spec/api/oauth_api_spec.rb
648
- - spec/api/api_app_api_spec.rb
649
655
  - spec/api/unclaimed_draft_api_spec.rb
656
+ - spec/api/signature_request_api_spec.rb
657
+ - spec/api/account_api_spec.rb
658
+ - spec/api/api_app_api_spec.rb
659
+ - spec/api/team_api_spec.rb
660
+ - spec/api/report_api_spec.rb
661
+ - spec/api/embedded_api_spec.rb
662
+ - spec/api/bulk_send_job_api_spec.rb
650
663
  - spec/api_client_spec.rb
651
664
  - spec/configuration_spec.rb
652
665
  - spec/event_callback_helper_spec.rb