dropbox-sign 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +26 -9
- data/VERSION +1 -1
- data/docs/BulkSendJobApi.md +5 -3
- data/docs/SignatureRequestCreateEmbeddedRequest.md +1 -1
- data/docs/TeamResponse.md +1 -0
- data/docs/TemplateResponse.md +2 -2
- data/docs/TemplateResponseDocument.md +3 -3
- data/docs/{TemplateResponseCustomField.md → TemplateResponseDocumentCustomFieldBase.md} +5 -8
- data/docs/TemplateResponseDocumentCustomFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentCustomFieldText.md +14 -0
- data/docs/TemplateResponseDocumentFieldGroup.md +1 -1
- data/docs/TemplateResponseDocumentFieldGroupRule.md +11 -0
- data/docs/{TemplateResponseDocumentFormField.md → TemplateResponseDocumentFormFieldBase.md} +4 -8
- data/docs/TemplateResponseDocumentFormFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldDateSigned.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldDropdown.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldHyperlink.md +14 -0
- data/docs/TemplateResponseDocumentFormFieldInitials.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldRadio.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldSignature.md +10 -0
- data/docs/TemplateResponseDocumentFormFieldText.md +15 -0
- data/docs/{TemplateResponseDocumentStaticField.md → TemplateResponseDocumentStaticFieldBase.md} +5 -5
- data/docs/TemplateResponseDocumentStaticFieldCheckbox.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldDateSigned.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldDropdown.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldHyperlink.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldInitials.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldRadio.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldSignature.md +10 -0
- data/docs/TemplateResponseDocumentStaticFieldText.md +10 -0
- data/docs/TemplateResponseFieldAvgTextLength.md +1 -1
- data/lib/dropbox-sign/api/bulk_send_job_api.rb +6 -0
- data/lib/dropbox-sign/models/signature_request_create_embedded_request.rb +1 -1
- data/lib/dropbox-sign/models/team_response.rb +17 -4
- data/lib/dropbox-sign/models/template_response.rb +5 -5
- data/lib/dropbox-sign/models/template_response_document.rb +9 -9
- data/lib/dropbox-sign/models/{template_response_document_static_field.rb → template_response_document_custom_field_base.rb} +60 -39
- data/lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_custom_field_text.rb +306 -0
- data/lib/dropbox-sign/models/template_response_document_field_group.rb +2 -3
- data/lib/dropbox-sign/models/template_response_document_field_group_rule.rb +263 -0
- data/lib/dropbox-sign/models/{template_response_named_form_field.rb → template_response_document_form_field_base.rb} +78 -86
- data/lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb +306 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_initials.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_radio.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_form_field_signature.rb +263 -0
- data/lib/dropbox-sign/models/{template_response_document_form_field.rb → template_response_document_form_field_text.rb} +53 -132
- data/lib/dropbox-sign/models/{template_response_custom_field.rb → template_response_document_static_field_base.rb} +90 -119
- data/lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_initials.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_radio.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_signature.rb +263 -0
- data/lib/dropbox-sign/models/template_response_document_static_field_text.rb +263 -0
- data/lib/dropbox-sign/models/template_response_field_avg_text_length.rb +1 -1
- data/lib/dropbox-sign/version.rb +1 -1
- data/lib/dropbox-sign.rb +22 -5
- data/openapi-config.yaml +1 -1
- data/openapi-sdk.yaml +586 -182
- data/test_fixtures/AccountCreateResponse.json +1 -0
- data/test_fixtures/ApiAppGetResponse.json +1 -0
- data/test_fixtures/ApiAppListResponse.json +1 -0
- data/test_fixtures/BulkSendJobGetResponse.json +8 -3
- data/test_fixtures/SignatureRequestGetResponse.json +65 -65
- data/test_fixtures/SignatureRequestListResponse.json +11 -4
- data/test_fixtures/TemplateGetResponse.json +1002 -41
- data/test_fixtures/TemplateListResponse.json +483 -44
- metadata +52 -18
- data/docs/TemplateResponseDocumentCustomField.md +0 -25
- data/docs/TemplateResponseNamedFormField.md +0 -23
- data/lib/dropbox-sign/models/template_response_document_custom_field.rb +0 -454
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.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dropbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -212,14 +212,31 @@ files:
|
|
212
212
|
- docs/TemplateResponseAccount.md
|
213
213
|
- docs/TemplateResponseAccountQuota.md
|
214
214
|
- docs/TemplateResponseCCRole.md
|
215
|
-
- docs/TemplateResponseCustomField.md
|
216
215
|
- docs/TemplateResponseDocument.md
|
217
|
-
- docs/
|
216
|
+
- docs/TemplateResponseDocumentCustomFieldBase.md
|
217
|
+
- docs/TemplateResponseDocumentCustomFieldCheckbox.md
|
218
|
+
- docs/TemplateResponseDocumentCustomFieldText.md
|
218
219
|
- docs/TemplateResponseDocumentFieldGroup.md
|
219
|
-
- docs/
|
220
|
-
- docs/
|
220
|
+
- docs/TemplateResponseDocumentFieldGroupRule.md
|
221
|
+
- docs/TemplateResponseDocumentFormFieldBase.md
|
222
|
+
- docs/TemplateResponseDocumentFormFieldCheckbox.md
|
223
|
+
- docs/TemplateResponseDocumentFormFieldDateSigned.md
|
224
|
+
- docs/TemplateResponseDocumentFormFieldDropdown.md
|
225
|
+
- docs/TemplateResponseDocumentFormFieldHyperlink.md
|
226
|
+
- docs/TemplateResponseDocumentFormFieldInitials.md
|
227
|
+
- docs/TemplateResponseDocumentFormFieldRadio.md
|
228
|
+
- docs/TemplateResponseDocumentFormFieldSignature.md
|
229
|
+
- docs/TemplateResponseDocumentFormFieldText.md
|
230
|
+
- docs/TemplateResponseDocumentStaticFieldBase.md
|
231
|
+
- docs/TemplateResponseDocumentStaticFieldCheckbox.md
|
232
|
+
- docs/TemplateResponseDocumentStaticFieldDateSigned.md
|
233
|
+
- docs/TemplateResponseDocumentStaticFieldDropdown.md
|
234
|
+
- docs/TemplateResponseDocumentStaticFieldHyperlink.md
|
235
|
+
- docs/TemplateResponseDocumentStaticFieldInitials.md
|
236
|
+
- docs/TemplateResponseDocumentStaticFieldRadio.md
|
237
|
+
- docs/TemplateResponseDocumentStaticFieldSignature.md
|
238
|
+
- docs/TemplateResponseDocumentStaticFieldText.md
|
221
239
|
- docs/TemplateResponseFieldAvgTextLength.md
|
222
|
-
- docs/TemplateResponseNamedFormField.md
|
223
240
|
- docs/TemplateResponseSignerRole.md
|
224
241
|
- docs/TemplateUpdateFilesRequest.md
|
225
242
|
- docs/TemplateUpdateFilesResponse.md
|
@@ -436,14 +453,31 @@ files:
|
|
436
453
|
- lib/dropbox-sign/models/template_response_account.rb
|
437
454
|
- lib/dropbox-sign/models/template_response_account_quota.rb
|
438
455
|
- lib/dropbox-sign/models/template_response_cc_role.rb
|
439
|
-
- lib/dropbox-sign/models/template_response_custom_field.rb
|
440
456
|
- lib/dropbox-sign/models/template_response_document.rb
|
441
|
-
- lib/dropbox-sign/models/
|
457
|
+
- lib/dropbox-sign/models/template_response_document_custom_field_base.rb
|
458
|
+
- lib/dropbox-sign/models/template_response_document_custom_field_checkbox.rb
|
459
|
+
- lib/dropbox-sign/models/template_response_document_custom_field_text.rb
|
442
460
|
- lib/dropbox-sign/models/template_response_document_field_group.rb
|
443
|
-
- lib/dropbox-sign/models/
|
444
|
-
- lib/dropbox-sign/models/
|
461
|
+
- lib/dropbox-sign/models/template_response_document_field_group_rule.rb
|
462
|
+
- lib/dropbox-sign/models/template_response_document_form_field_base.rb
|
463
|
+
- lib/dropbox-sign/models/template_response_document_form_field_checkbox.rb
|
464
|
+
- lib/dropbox-sign/models/template_response_document_form_field_date_signed.rb
|
465
|
+
- lib/dropbox-sign/models/template_response_document_form_field_dropdown.rb
|
466
|
+
- lib/dropbox-sign/models/template_response_document_form_field_hyperlink.rb
|
467
|
+
- lib/dropbox-sign/models/template_response_document_form_field_initials.rb
|
468
|
+
- lib/dropbox-sign/models/template_response_document_form_field_radio.rb
|
469
|
+
- lib/dropbox-sign/models/template_response_document_form_field_signature.rb
|
470
|
+
- lib/dropbox-sign/models/template_response_document_form_field_text.rb
|
471
|
+
- lib/dropbox-sign/models/template_response_document_static_field_base.rb
|
472
|
+
- lib/dropbox-sign/models/template_response_document_static_field_checkbox.rb
|
473
|
+
- lib/dropbox-sign/models/template_response_document_static_field_date_signed.rb
|
474
|
+
- lib/dropbox-sign/models/template_response_document_static_field_dropdown.rb
|
475
|
+
- lib/dropbox-sign/models/template_response_document_static_field_hyperlink.rb
|
476
|
+
- lib/dropbox-sign/models/template_response_document_static_field_initials.rb
|
477
|
+
- lib/dropbox-sign/models/template_response_document_static_field_radio.rb
|
478
|
+
- lib/dropbox-sign/models/template_response_document_static_field_signature.rb
|
479
|
+
- lib/dropbox-sign/models/template_response_document_static_field_text.rb
|
445
480
|
- lib/dropbox-sign/models/template_response_field_avg_text_length.rb
|
446
|
-
- lib/dropbox-sign/models/template_response_named_form_field.rb
|
447
481
|
- lib/dropbox-sign/models/template_response_signer_role.rb
|
448
482
|
- lib/dropbox-sign/models/template_update_files_request.rb
|
449
483
|
- lib/dropbox-sign/models/template_update_files_response.rb
|
@@ -592,16 +626,16 @@ signing_key:
|
|
592
626
|
specification_version: 4
|
593
627
|
summary: Dropbox Sign API Ruby Gem
|
594
628
|
test_files:
|
595
|
-
- spec/api/signature_request_api_spec.rb
|
596
|
-
- spec/api/oauth_api_spec.rb
|
597
|
-
- spec/api/team_api_spec.rb
|
598
|
-
- spec/api/bulk_send_job_api_spec.rb
|
599
|
-
- spec/api/embedded_api_spec.rb
|
600
|
-
- spec/api/api_app_api_spec.rb
|
601
629
|
- spec/api/account_api_spec.rb
|
602
630
|
- spec/api/unclaimed_draft_api_spec.rb
|
631
|
+
- spec/api/signature_request_api_spec.rb
|
603
632
|
- spec/api/template_api_spec.rb
|
604
633
|
- spec/api/report_api_spec.rb
|
634
|
+
- spec/api/bulk_send_job_api_spec.rb
|
635
|
+
- spec/api/oauth_api_spec.rb
|
636
|
+
- spec/api/api_app_api_spec.rb
|
637
|
+
- spec/api/embedded_api_spec.rb
|
638
|
+
- spec/api/team_api_spec.rb
|
605
639
|
- spec/api_client_spec.rb
|
606
640
|
- spec/configuration_spec.rb
|
607
641
|
- spec/event_callback_helper_spec.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# Dropbox::Sign::TemplateResponseDocumentCustomField
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
## Properties
|
6
|
-
|
7
|
-
| Name | Type | Description | Notes |
|
8
|
-
| ---- | ---- | ----------- | ----- |
|
9
|
-
| `name` | ```String``` | The name of the Custom Field. | |
|
10
|
-
| `type` | ```String``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported. | |
|
11
|
-
| `signer` | ```String``` | The signer of the Custom Field. | |
|
12
|
-
| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | |
|
13
|
-
| `y` | ```Integer``` | The vertical offset in pixels for this form field. | |
|
14
|
-
| `width` | ```Integer``` | The width in pixels of this form field. | |
|
15
|
-
| `height` | ```Integer``` | The height in pixels of this form field. | |
|
16
|
-
| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | |
|
17
|
-
| `api_id` | ```String``` | The unique ID for this field. | |
|
18
|
-
| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | |
|
19
|
-
| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | |
|
20
|
-
| `is_multiline` | ```Boolean``` | Whether this form field is multiline text. | |
|
21
|
-
| `original_font_size` | ```Integer``` | Original font size used in this form field's text. | |
|
22
|
-
| `font_family` | ```String``` | Font family used in this form field's text. | |
|
23
|
-
| `named_form_fields` | ```Object``` | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | |
|
24
|
-
| `reusable_form_id` | ```String``` | | |
|
25
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Dropbox::Sign::TemplateResponseNamedFormField
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
## Properties
|
6
|
-
|
7
|
-
| Name | Type | Description | Notes |
|
8
|
-
| ---- | ---- | ----------- | ----- |
|
9
|
-
| `name` | ```String``` | The name of the Named Form Field. | |
|
10
|
-
| `type` | ```String``` | The type of this Named Form Field. Only `text` and `checkbox` are currently supported. | |
|
11
|
-
| `signer` | ```String``` | The signer of the Named Form Field. | |
|
12
|
-
| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | |
|
13
|
-
| `y` | ```Integer``` | The vertical offset in pixels for this form field. | |
|
14
|
-
| `width` | ```Integer``` | The width in pixels of this form field. | |
|
15
|
-
| `height` | ```Integer``` | The height in pixels of this form field. | |
|
16
|
-
| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | |
|
17
|
-
| `api_id` | ```String``` | The unique ID for this field. | |
|
18
|
-
| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | |
|
19
|
-
| `avg_text_length` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | |
|
20
|
-
| `is_multiline` | ```Boolean``` | Whether this form field is multiline text. | |
|
21
|
-
| `original_font_size` | ```Integer``` | Original font size used in this form field's text. | |
|
22
|
-
| `font_family` | ```String``` | Font family used in this form field's text. | |
|
23
|
-
|
@@ -1,454 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Dropbox Sign API
|
3
|
-
|
4
|
-
#Dropbox Sign v3 API
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 3.0.0
|
7
|
-
Contact: apisupport@hellosign.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.3.0
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
module Dropbox
|
17
|
-
end
|
18
|
-
|
19
|
-
module Dropbox::Sign
|
20
|
-
class TemplateResponseDocumentCustomField
|
21
|
-
# The name of the Custom Field.
|
22
|
-
# @return [String]
|
23
|
-
attr_accessor :name
|
24
|
-
|
25
|
-
# The type of this Custom Field. Only `text` and `checkbox` are currently supported.
|
26
|
-
# @return [String]
|
27
|
-
attr_accessor :type
|
28
|
-
|
29
|
-
# The signer of the Custom Field.
|
30
|
-
# @return [String]
|
31
|
-
attr_accessor :signer
|
32
|
-
|
33
|
-
# The horizontal offset in pixels for this form field.
|
34
|
-
# @return [Integer]
|
35
|
-
attr_accessor :x
|
36
|
-
|
37
|
-
# The vertical offset in pixels for this form field.
|
38
|
-
# @return [Integer]
|
39
|
-
attr_accessor :y
|
40
|
-
|
41
|
-
# The width in pixels of this form field.
|
42
|
-
# @return [Integer]
|
43
|
-
attr_accessor :width
|
44
|
-
|
45
|
-
# The height in pixels of this form field.
|
46
|
-
# @return [Integer]
|
47
|
-
attr_accessor :height
|
48
|
-
|
49
|
-
# Boolean showing whether or not this field is required.
|
50
|
-
# @return [Boolean]
|
51
|
-
attr_accessor :required
|
52
|
-
|
53
|
-
# The unique ID for this field.
|
54
|
-
# @return [String]
|
55
|
-
attr_accessor :api_id
|
56
|
-
|
57
|
-
# The name of the group this field is in. If this field is not a group, this defaults to `null`.
|
58
|
-
# @return [String, nil]
|
59
|
-
attr_accessor :group
|
60
|
-
|
61
|
-
# @return [TemplateResponseFieldAvgTextLength]
|
62
|
-
attr_accessor :avg_text_length
|
63
|
-
|
64
|
-
# Whether this form field is multiline text.
|
65
|
-
# @return [Boolean, nil]
|
66
|
-
attr_accessor :is_multiline
|
67
|
-
|
68
|
-
# Original font size used in this form field's text.
|
69
|
-
# @return [Integer, nil]
|
70
|
-
attr_accessor :original_font_size
|
71
|
-
|
72
|
-
# Font family used in this form field's text.
|
73
|
-
# @return [String, nil]
|
74
|
-
attr_accessor :font_family
|
75
|
-
|
76
|
-
# Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.
|
77
|
-
# @return [Object, nil]
|
78
|
-
attr_accessor :named_form_fields
|
79
|
-
|
80
|
-
# @return [String, nil]
|
81
|
-
attr_accessor :reusable_form_id
|
82
|
-
|
83
|
-
class EnumAttributeValidator
|
84
|
-
attr_reader :datatype
|
85
|
-
attr_reader :allowable_values
|
86
|
-
|
87
|
-
def initialize(datatype, allowable_values)
|
88
|
-
@allowable_values = allowable_values.map do |value|
|
89
|
-
case datatype.to_s
|
90
|
-
when /Integer/i
|
91
|
-
value.to_i
|
92
|
-
when /Float/i
|
93
|
-
value.to_f
|
94
|
-
else
|
95
|
-
value
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
def valid?(value)
|
101
|
-
!value || allowable_values.include?(value)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
106
|
-
def self.attribute_map
|
107
|
-
{
|
108
|
-
:'name' => :'name',
|
109
|
-
:'type' => :'type',
|
110
|
-
:'signer' => :'signer',
|
111
|
-
:'x' => :'x',
|
112
|
-
:'y' => :'y',
|
113
|
-
:'width' => :'width',
|
114
|
-
:'height' => :'height',
|
115
|
-
:'required' => :'required',
|
116
|
-
:'api_id' => :'api_id',
|
117
|
-
:'group' => :'group',
|
118
|
-
:'avg_text_length' => :'avg_text_length',
|
119
|
-
:'is_multiline' => :'isMultiline',
|
120
|
-
:'original_font_size' => :'originalFontSize',
|
121
|
-
:'font_family' => :'fontFamily',
|
122
|
-
:'named_form_fields' => :'named_form_fields',
|
123
|
-
:'reusable_form_id' => :'reusable_form_id'
|
124
|
-
}
|
125
|
-
end
|
126
|
-
|
127
|
-
# Returns all the JSON keys this model knows about
|
128
|
-
def self.acceptable_attributes
|
129
|
-
attribute_map.values
|
130
|
-
end
|
131
|
-
|
132
|
-
# Returns attribute map of this model + parent
|
133
|
-
def self.merged_attributes
|
134
|
-
self.attribute_map
|
135
|
-
end
|
136
|
-
|
137
|
-
# Attribute type mapping.
|
138
|
-
def self.openapi_types
|
139
|
-
{
|
140
|
-
:'name' => :'String',
|
141
|
-
:'type' => :'String',
|
142
|
-
:'signer' => :'String',
|
143
|
-
:'x' => :'Integer',
|
144
|
-
:'y' => :'Integer',
|
145
|
-
:'width' => :'Integer',
|
146
|
-
:'height' => :'Integer',
|
147
|
-
:'required' => :'Boolean',
|
148
|
-
:'api_id' => :'String',
|
149
|
-
:'group' => :'String',
|
150
|
-
:'avg_text_length' => :'TemplateResponseFieldAvgTextLength',
|
151
|
-
:'is_multiline' => :'Boolean',
|
152
|
-
:'original_font_size' => :'Integer',
|
153
|
-
:'font_family' => :'String',
|
154
|
-
:'named_form_fields' => :'Object',
|
155
|
-
:'reusable_form_id' => :'String'
|
156
|
-
}
|
157
|
-
end
|
158
|
-
|
159
|
-
# Attribute type mapping of this model + parent
|
160
|
-
def self.merged_types
|
161
|
-
self.openapi_types
|
162
|
-
end
|
163
|
-
|
164
|
-
# List of attributes with nullable: true
|
165
|
-
def self.openapi_nullable
|
166
|
-
Set.new([
|
167
|
-
:'group',
|
168
|
-
:'is_multiline',
|
169
|
-
:'original_font_size',
|
170
|
-
:'font_family',
|
171
|
-
:'named_form_fields',
|
172
|
-
:'reusable_form_id'
|
173
|
-
])
|
174
|
-
end
|
175
|
-
|
176
|
-
# Returns list of attributes with nullable: true of this model + parent
|
177
|
-
def self.merged_nullable
|
178
|
-
self.openapi_nullable
|
179
|
-
end
|
180
|
-
|
181
|
-
# Attempt to instantiate and hydrate a new instance of this class
|
182
|
-
# @param [Object] data Data to be converted
|
183
|
-
# @return [TemplateResponseDocumentCustomField]
|
184
|
-
def self.init(data)
|
185
|
-
return ApiClient.default.convert_to_type(
|
186
|
-
data,
|
187
|
-
"TemplateResponseDocumentCustomField"
|
188
|
-
) || TemplateResponseDocumentCustomField.new
|
189
|
-
end
|
190
|
-
|
191
|
-
# Initializes the object
|
192
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
-
def initialize(attributes = {})
|
194
|
-
if (!attributes.is_a?(Hash))
|
195
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::TemplateResponseDocumentCustomField` initialize method"
|
196
|
-
end
|
197
|
-
|
198
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
199
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
200
|
-
if (!self.class.merged_attributes.key?(k.to_sym))
|
201
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::TemplateResponseDocumentCustomField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
202
|
-
end
|
203
|
-
h[k.to_sym] = v
|
204
|
-
}
|
205
|
-
|
206
|
-
if attributes.key?(:'name')
|
207
|
-
self.name = attributes[:'name']
|
208
|
-
end
|
209
|
-
|
210
|
-
if attributes.key?(:'type')
|
211
|
-
self.type = attributes[:'type']
|
212
|
-
end
|
213
|
-
|
214
|
-
if attributes.key?(:'signer')
|
215
|
-
self.signer = attributes[:'signer']
|
216
|
-
end
|
217
|
-
|
218
|
-
if attributes.key?(:'x')
|
219
|
-
self.x = attributes[:'x']
|
220
|
-
end
|
221
|
-
|
222
|
-
if attributes.key?(:'y')
|
223
|
-
self.y = attributes[:'y']
|
224
|
-
end
|
225
|
-
|
226
|
-
if attributes.key?(:'width')
|
227
|
-
self.width = attributes[:'width']
|
228
|
-
end
|
229
|
-
|
230
|
-
if attributes.key?(:'height')
|
231
|
-
self.height = attributes[:'height']
|
232
|
-
end
|
233
|
-
|
234
|
-
if attributes.key?(:'required')
|
235
|
-
self.required = attributes[:'required']
|
236
|
-
end
|
237
|
-
|
238
|
-
if attributes.key?(:'api_id')
|
239
|
-
self.api_id = attributes[:'api_id']
|
240
|
-
end
|
241
|
-
|
242
|
-
if attributes.key?(:'group')
|
243
|
-
self.group = attributes[:'group']
|
244
|
-
end
|
245
|
-
|
246
|
-
if attributes.key?(:'avg_text_length')
|
247
|
-
self.avg_text_length = attributes[:'avg_text_length']
|
248
|
-
end
|
249
|
-
|
250
|
-
if attributes.key?(:'is_multiline')
|
251
|
-
self.is_multiline = attributes[:'is_multiline']
|
252
|
-
end
|
253
|
-
|
254
|
-
if attributes.key?(:'original_font_size')
|
255
|
-
self.original_font_size = attributes[:'original_font_size']
|
256
|
-
end
|
257
|
-
|
258
|
-
if attributes.key?(:'font_family')
|
259
|
-
self.font_family = attributes[:'font_family']
|
260
|
-
end
|
261
|
-
|
262
|
-
if attributes.key?(:'named_form_fields')
|
263
|
-
self.named_form_fields = attributes[:'named_form_fields']
|
264
|
-
end
|
265
|
-
|
266
|
-
if attributes.key?(:'reusable_form_id')
|
267
|
-
self.reusable_form_id = attributes[:'reusable_form_id']
|
268
|
-
end
|
269
|
-
end
|
270
|
-
|
271
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
272
|
-
# @return Array for valid properties with the reasons
|
273
|
-
def list_invalid_properties
|
274
|
-
invalid_properties = Array.new
|
275
|
-
invalid_properties
|
276
|
-
end
|
277
|
-
|
278
|
-
# Check to see if the all the properties in the model are valid
|
279
|
-
# @return true if the model is valid
|
280
|
-
def valid?
|
281
|
-
type_validator = EnumAttributeValidator.new('String', ["text", "checkbox"])
|
282
|
-
return false unless type_validator.valid?(@type)
|
283
|
-
true
|
284
|
-
end
|
285
|
-
|
286
|
-
# Custom attribute writer method checking allowed values (enum).
|
287
|
-
# @param [Object] type Object to be assigned
|
288
|
-
def type=(type)
|
289
|
-
validator = EnumAttributeValidator.new('String', ["text", "checkbox"])
|
290
|
-
unless validator.valid?(type)
|
291
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
292
|
-
end
|
293
|
-
@type = type
|
294
|
-
end
|
295
|
-
|
296
|
-
# Checks equality by comparing each attribute.
|
297
|
-
# @param [Object] Object to be compared
|
298
|
-
def ==(o)
|
299
|
-
return true if self.equal?(o)
|
300
|
-
self.class == o.class &&
|
301
|
-
name == o.name &&
|
302
|
-
type == o.type &&
|
303
|
-
signer == o.signer &&
|
304
|
-
x == o.x &&
|
305
|
-
y == o.y &&
|
306
|
-
width == o.width &&
|
307
|
-
height == o.height &&
|
308
|
-
required == o.required &&
|
309
|
-
api_id == o.api_id &&
|
310
|
-
group == o.group &&
|
311
|
-
avg_text_length == o.avg_text_length &&
|
312
|
-
is_multiline == o.is_multiline &&
|
313
|
-
original_font_size == o.original_font_size &&
|
314
|
-
font_family == o.font_family &&
|
315
|
-
named_form_fields == o.named_form_fields &&
|
316
|
-
reusable_form_id == o.reusable_form_id
|
317
|
-
end
|
318
|
-
|
319
|
-
# @see the `==` method
|
320
|
-
# @param [Object] Object to be compared
|
321
|
-
def eql?(o)
|
322
|
-
self == o
|
323
|
-
end
|
324
|
-
|
325
|
-
# Calculates hash code according to all attributes.
|
326
|
-
# @return [Integer] Hash code
|
327
|
-
def hash
|
328
|
-
[name, type, signer, x, y, width, height, required, api_id, group, avg_text_length, is_multiline, original_font_size, font_family, named_form_fields, reusable_form_id].hash
|
329
|
-
end
|
330
|
-
|
331
|
-
# Builds the object from hash
|
332
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
333
|
-
# @return [Object] Returns the model itself
|
334
|
-
def self.build_from_hash(attributes)
|
335
|
-
new.build_from_hash(attributes)
|
336
|
-
end
|
337
|
-
|
338
|
-
# Builds the object from hash
|
339
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
340
|
-
# @return [Object] Returns the model itself
|
341
|
-
def build_from_hash(attributes)
|
342
|
-
return nil unless attributes.is_a?(Hash)
|
343
|
-
attribute_map = self.class.merged_attributes
|
344
|
-
|
345
|
-
self.class.merged_types.each_pair do |key, type|
|
346
|
-
if type =~ /\AArray<(.*)>/i
|
347
|
-
# check to ensure the input is an array given that the attribute
|
348
|
-
# is documented as an array but the input is not
|
349
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
350
|
-
self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) })
|
351
|
-
end
|
352
|
-
elsif !attributes[attribute_map[key]].nil?
|
353
|
-
self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]]))
|
354
|
-
end
|
355
|
-
end
|
356
|
-
|
357
|
-
self
|
358
|
-
end
|
359
|
-
|
360
|
-
# Deserializes the data based on type
|
361
|
-
# @param string type Data type
|
362
|
-
# @param string value Value to be deserialized
|
363
|
-
# @return [Object] Deserialized data
|
364
|
-
def _deserialize(type, value)
|
365
|
-
case type.to_sym
|
366
|
-
when :Time
|
367
|
-
Time.parse(value)
|
368
|
-
when :Date
|
369
|
-
Date.parse(value)
|
370
|
-
when :String
|
371
|
-
value.to_s
|
372
|
-
when :Integer
|
373
|
-
value.to_i
|
374
|
-
when :Float
|
375
|
-
value.to_f
|
376
|
-
when :Boolean
|
377
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
378
|
-
true
|
379
|
-
else
|
380
|
-
false
|
381
|
-
end
|
382
|
-
when :File
|
383
|
-
value
|
384
|
-
when :Object
|
385
|
-
# generic object (usually a Hash), return directly
|
386
|
-
value
|
387
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
388
|
-
inner_type = Regexp.last_match[:inner_type]
|
389
|
-
value.map { |v| _deserialize(inner_type, v) }
|
390
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
391
|
-
k_type = Regexp.last_match[:k_type]
|
392
|
-
v_type = Regexp.last_match[:v_type]
|
393
|
-
{}.tap do |hash|
|
394
|
-
value.each do |k, v|
|
395
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
396
|
-
end
|
397
|
-
end
|
398
|
-
else # model
|
399
|
-
# models (e.g. Pet)
|
400
|
-
klass = Dropbox::Sign.const_get(type)
|
401
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
402
|
-
end
|
403
|
-
end
|
404
|
-
|
405
|
-
# Returns the string representation of the object
|
406
|
-
# @return [String] String presentation of the object
|
407
|
-
def to_s
|
408
|
-
to_hash.to_s
|
409
|
-
end
|
410
|
-
|
411
|
-
# to_body is an alias to to_hash (backward compatibility)
|
412
|
-
# @return [Hash] Returns the object in the form of hash
|
413
|
-
def to_body
|
414
|
-
to_hash
|
415
|
-
end
|
416
|
-
|
417
|
-
# Returns the object in the form of hash
|
418
|
-
# @return [Hash] Returns the object in the form of hash
|
419
|
-
def to_hash(include_nil = true)
|
420
|
-
hash = {}
|
421
|
-
self.class.merged_attributes.each_pair do |attr, param|
|
422
|
-
value = self.send(attr)
|
423
|
-
if value.nil?
|
424
|
-
next unless include_nil
|
425
|
-
is_nullable = self.class.merged_nullable.include?(attr)
|
426
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
427
|
-
end
|
428
|
-
|
429
|
-
hash[param] = _to_hash(value, include_nil)
|
430
|
-
end
|
431
|
-
hash
|
432
|
-
end
|
433
|
-
|
434
|
-
# Outputs non-array value in the form of hash
|
435
|
-
# For object, use to_hash. Otherwise, just return the value
|
436
|
-
# @param [Object] value Any valid value
|
437
|
-
# @return [Hash] Returns the value in the form of hash
|
438
|
-
def _to_hash(value, include_nil = true)
|
439
|
-
if value.is_a?(Array)
|
440
|
-
value.compact.map { |v| _to_hash(v, include_nil) }
|
441
|
-
elsif value.is_a?(Hash)
|
442
|
-
{}.tap do |hash|
|
443
|
-
value.each { |k, v| hash[k] = _to_hash(v, include_nil) }
|
444
|
-
end
|
445
|
-
elsif value.respond_to? :to_hash
|
446
|
-
value.to_hash(include_nil)
|
447
|
-
else
|
448
|
-
value
|
449
|
-
end
|
450
|
-
end
|
451
|
-
|
452
|
-
end
|
453
|
-
|
454
|
-
end
|