Class: DocuSign_eSign::PrefillTabs
- Inherits:
-
Object
- Object
- DocuSign_eSign::PrefillTabs
- Defined in:
- lib/docusign_esign/models/prefill_tabs.rb
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
85 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 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 85 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.
17 18 19 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 17 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.
20 21 22 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 20 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.
23 24 25 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 23 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.
26 27 28 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 26 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.
29 30 31 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 29 def radio_group_tabs @radio_group_tabs end |
#sender_company_tabs ⇒ Object
Returns the value of attribute sender_company_tabs.
32 33 34 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 32 def sender_company_tabs @sender_company_tabs end |
#sender_name_tabs ⇒ Object
Returns the value of attribute sender_name_tabs.
35 36 37 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 35 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.
38 39 40 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 38 def ssn_tabs @ssn_tabs end |
#tab_groups ⇒ Object
Returns the value of attribute tab_groups.
41 42 43 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 41 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.
44 45 46 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 44 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.
47 48 49 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 47 def zip_tabs @zip_tabs end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 50 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.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 67 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.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 173 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
225 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 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 225 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
291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 291 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
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 204 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
191 192 193 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 191 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
197 198 199 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 197 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?
160 161 162 163 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 160 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
271 272 273 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 271 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
277 278 279 280 281 282 283 284 285 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 277 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
265 266 267 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 265 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
167 168 169 |
# File 'lib/docusign_esign/models/prefill_tabs.rb', line 167 def valid? true end |