Class: DocuSign_eSign::PrefillTabs
- Inherits:
-
Object
- Object
- DocuSign_eSign::PrefillTabs
- Defined in:
- lib/docusign_esign/models/prefill_tabs.rb
Overview
Prefill tabs are tabs that the sender can fill in before the envelope is sent. They are sometimes called sender tags or pre-fill fields. Only the following tab types can be prefill tabs: - text - check boxes - radio buttons [Pre-Fill Your Own Document Fields] describes how prefill tabs work in the web application. [Customize your envelopes with pre-fill fields] shows how to use prefill tabs in your application using the eSignature SDKs. [app]: support.docusign.com/en/guides/ndse-user-guide-prefill-fields [catblog]: www.docusign.com/blog/developers/common-api-tasks-customize-your-envelopes-pre-fill-fields
Instance Attribute Summary collapse
-
#checkbox_tabs ⇒ Object
Specifies a tag on the document in a location where the recipient can select an option.
-
#date_tabs ⇒ Object
Specifies a tab on the document where you want the recipient to enter a date.
-
#email_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter an email.
-
#number_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a number.
-
#radio_group_tabs ⇒ Object
Specifies a tag on the document in a location where the recipient can select one option from a group of options using a radio button.
-
#sender_company_tabs ⇒ Object
Returns the value of attribute sender_company_tabs.
-
#sender_name_tabs ⇒ Object
Returns the value of attribute sender_name_tabs.
-
#ssn_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a Social Security Number (SSN).
-
#tab_groups ⇒ Object
Returns the value of attribute tab_groups.
-
#text_tabs ⇒ Object
Specifies a that that is an adaptable field that allows the recipient to enter different text information.
-
#zip_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a ZIP code.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PrefillTabs
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ PrefillTabs
Initializes the object
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 86 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'checkboxTabs') if (value = attributes[:'checkboxTabs']).is_a?(Array) self.checkbox_tabs = value end end if attributes.has_key?(:'dateTabs') if (value = attributes[:'dateTabs']).is_a?(Array) self.date_tabs = value end end if attributes.has_key?(:'emailTabs') if (value = attributes[:'emailTabs']).is_a?(Array) self.email_tabs = value end end if attributes.has_key?(:'numberTabs') if (value = attributes[:'numberTabs']).is_a?(Array) self.number_tabs = value end end if attributes.has_key?(:'radioGroupTabs') if (value = attributes[:'radioGroupTabs']).is_a?(Array) self.radio_group_tabs = value end end if attributes.has_key?(:'senderCompanyTabs') if (value = attributes[:'senderCompanyTabs']).is_a?(Array) self.sender_company_tabs = value end end if attributes.has_key?(:'senderNameTabs') if (value = attributes[:'senderNameTabs']).is_a?(Array) self.sender_name_tabs = value end end if attributes.has_key?(:'ssnTabs') if (value = attributes[:'ssnTabs']).is_a?(Array) self.ssn_tabs = value end end if attributes.has_key?(:'tabGroups') if (value = attributes[:'tabGroups']).is_a?(Array) self.tab_groups = value end end if attributes.has_key?(:'textTabs') if (value = attributes[:'textTabs']).is_a?(Array) self.text_tabs = value end end if attributes.has_key?(:'zipTabs') if (value = attributes[:'zipTabs']).is_a?(Array) self.zip_tabs = value end end end |
Instance Attribute Details
#checkbox_tabs ⇒ Object
Specifies a tag on the document in a location where the recipient can select an option.
18 19 20 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 18 def checkbox_tabs @checkbox_tabs end |
#date_tabs ⇒ Object
Specifies a tab on the document where you want the recipient to enter a date. Date tabs are single-line fields that allow date information to be entered in any format. The tooltip for this tab recommends entering the date as MM/DD/YYYY, but this is not enforced. The format entered by the signer is retained. If you need a particular date format enforced, DocuSign recommends using a Text tab with a Validation Pattern and Validation Message to enforce the format.
21 22 23 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 21 def date_tabs @date_tabs end |
#email_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter an email. Email tags are single-line fields that accept any characters. The system checks that a valid email format (i.e. [email protected]) is entered in the tag. It uses the same parameters as a Text tab, with the validation message and pattern set for email information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
24 25 26 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 24 def email_tabs @email_tabs end |
#number_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a number. It uses the same parameters as a Text tab, with the validation message and pattern set for number information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
27 28 29 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 27 def number_tabs @number_tabs end |
#radio_group_tabs ⇒ Object
Specifies a tag on the document in a location where the recipient can select one option from a group of options using a radio button. The radio buttons do not have to be on the same page in a document.
30 31 32 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 30 def radio_group_tabs @radio_group_tabs end |
#sender_company_tabs ⇒ Object
Returns the value of attribute sender_company_tabs.
33 34 35 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 33 def sender_company_tabs @sender_company_tabs end |
#sender_name_tabs ⇒ Object
Returns the value of attribute sender_name_tabs.
36 37 38 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 36 def sender_name_tabs @sender_name_tabs end |
#ssn_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a Social Security Number (SSN). A SSN can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for SSN information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
39 40 41 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 39 def ssn_tabs @ssn_tabs end |
#tab_groups ⇒ Object
Returns the value of attribute tab_groups.
42 43 44 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 42 def tab_groups @tab_groups end |
#text_tabs ⇒ Object
Specifies a that that is an adaptable field that allows the recipient to enter different text information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
45 46 47 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 45 def text_tabs @text_tabs end |
#zip_tabs ⇒ Object
Specifies a tag on the document where you want the recipient to enter a ZIP code. The ZIP code can be a five numbers or the ZIP+4 format with nine numbers. The zip code can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for ZIP code information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.
48 49 50 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 48 def zip_tabs @zip_tabs end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 51 def self.attribute_map { :'checkbox_tabs' => :'checkboxTabs', :'date_tabs' => :'dateTabs', :'email_tabs' => :'emailTabs', :'number_tabs' => :'numberTabs', :'radio_group_tabs' => :'radioGroupTabs', :'sender_company_tabs' => :'senderCompanyTabs', :'sender_name_tabs' => :'senderNameTabs', :'ssn_tabs' => :'ssnTabs', :'tab_groups' => :'tabGroups', :'text_tabs' => :'textTabs', :'zip_tabs' => :'zipTabs' } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 68 def self.swagger_types { :'checkbox_tabs' => :'Array<Checkbox>', :'date_tabs' => :'Array<DocuSign_eSign::Date>', :'email_tabs' => :'Array<Email>', :'number_tabs' => :'Array<Number>', :'radio_group_tabs' => :'Array<RadioGroup>', :'sender_company_tabs' => :'Array<SenderCompany>', :'sender_name_tabs' => :'Array<SenderName>', :'ssn_tabs' => :'Array<Ssn>', :'tab_groups' => :'Array<TabGroup>', :'text_tabs' => :'Array<Text>', :'zip_tabs' => :'Array<Zip>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 174 def ==(o) return true if self.equal?(o) self.class == o.class && checkbox_tabs == o.checkbox_tabs && date_tabs == o.date_tabs && email_tabs == o.email_tabs && number_tabs == o.number_tabs && radio_group_tabs == o.radio_group_tabs && sender_company_tabs == o.sender_company_tabs && sender_name_tabs == o.sender_name_tabs && ssn_tabs == o.ssn_tabs && tab_groups == o.tab_groups && text_tabs == o.text_tabs && zip_tabs == o.zip_tabs end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 226 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = DocuSign_eSign.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 292 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 205 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
192 193 194 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 192 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
198 199 200 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 198 def hash [checkbox_tabs, date_tabs, email_tabs, number_tabs, radio_group_tabs, sender_company_tabs, sender_name_tabs, ssn_tabs, tab_groups, text_tabs, zip_tabs].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
161 162 163 164 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 161 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
272 273 274 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 272 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
278 279 280 281 282 283 284 285 286 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 278 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
266 267 268 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 266 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
168 169 170 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 168 def valid? true end |