Class: YousignClient::SignatureUiInput
- Inherits:
-
Object
- Object
- YousignClient::SignatureUiInput
- Defined in:
- lib/yousign_client/models/signature_ui_input.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authentication_popup ⇒ Object
True for use a popup to enter the SMS code, false for use a fullscreen view.
-
#default_language ⇒ Object
Default selected language of the interface.
-
#default_zoom ⇒ Object
Default value for zoom of the PDF viewer.
-
#description ⇒ Object
Signature UI’s description.
-
#enable_activities ⇒ Object
Toggle activity feed.
-
#enable_document_download ⇒ Object
Toggle downloads buttons for documents.
-
#enable_document_list ⇒ Object
Toggle list of documents in the procedure.
-
#enable_header_bar ⇒ Object
Toggle header bar of the app view.
-
#enable_header_bar_sign_as ⇒ Object
Toggle "Sign as" band on the top of the app view.
-
#enable_member_list ⇒ Object
Toggle list of members in the procedure.
-
#enable_sidebar ⇒ Object
Toggle sidebar of the app view.
-
#fonts ⇒ Object
List of fonts to load on the view.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#languages ⇒ Object
Array of allowed languages, use country code.
-
#logo ⇒ Object
Base64 of your logo.
-
#name ⇒ Object
Signature UI’s name.
-
#redirect_cancel ⇒ Object
Returns the value of attribute redirect_cancel.
-
#redirect_error ⇒ Object
Returns the value of attribute redirect_error.
-
#redirect_success ⇒ Object
Returns the value of attribute redirect_success.
-
#sign_image_types_available ⇒ Object
Allow sign images types available for signature.
-
#style ⇒ Object
CSS for customize the view.
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 = {}) ⇒ SignatureUiInput
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 = {}) ⇒ SignatureUiInput
Initializes the object
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 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 262 263 264 265 266 267 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 154 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?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'enableHeaderBar') self. = attributes[:'enableHeaderBar'] else self. = true end if attributes.has_key?(:'enableHeaderBarSignAs') self. = attributes[:'enableHeaderBarSignAs'] else self. = true end if attributes.has_key?(:'enableSidebar') self. = attributes[:'enableSidebar'] else self. = true end if attributes.has_key?(:'enableMemberList') self.enable_member_list = attributes[:'enableMemberList'] else self.enable_member_list = true end if attributes.has_key?(:'enableDocumentList') self.enable_document_list = attributes[:'enableDocumentList'] else self.enable_document_list = true end if attributes.has_key?(:'enableDocumentDownload') self.enable_document_download = attributes[:'enableDocumentDownload'] else self.enable_document_download = true end if attributes.has_key?(:'enableActivities') self.enable_activities = attributes[:'enableActivities'] else self.enable_activities = true end if attributes.has_key?(:'authenticationPopup') self.authentication_popup = attributes[:'authenticationPopup'] else self.authentication_popup = false end if attributes.has_key?(:'defaultZoom') self.default_zoom = attributes[:'defaultZoom'] end if attributes.has_key?(:'logo') self.logo = attributes[:'logo'] end if attributes.has_key?(:'signImageTypesAvailable') if (value = attributes[:'signImageTypesAvailable']).is_a?(Array) self.sign_image_types_available = value end end if attributes.has_key?(:'defaultLanguage') self.default_language = attributes[:'defaultLanguage'] end if attributes.has_key?(:'languages') if (value = attributes[:'languages']).is_a?(Array) self.languages = value end end if attributes.has_key?(:'labels') if (value = attributes[:'labels']).is_a?(Array) self.labels = value end end if attributes.has_key?(:'fonts') if (value = attributes[:'fonts']).is_a?(Array) self.fonts = value end end if attributes.has_key?(:'style') self.style = attributes[:'style'] end if attributes.has_key?(:'redirectCancel') self.redirect_cancel = attributes[:'redirectCancel'] end if attributes.has_key?(:'redirectError') self.redirect_error = attributes[:'redirectError'] end if attributes.has_key?(:'redirectSuccess') self.redirect_success = attributes[:'redirectSuccess'] end end |
Instance Attribute Details
#authentication_popup ⇒ Object
True for use a popup to enter the SMS code, false for use a fullscreen view.
45 46 47 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 45 def authentication_popup @authentication_popup end |
#default_language ⇒ Object
Default selected language of the interface. Must be present in "languages" field.
57 58 59 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 57 def default_language @default_language end |
#default_zoom ⇒ Object
Default value for zoom of the PDF viewer. Default value is the adapted to the resolution of your screen.
48 49 50 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 48 def default_zoom @default_zoom end |
#description ⇒ Object
Signature UI’s description
21 22 23 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 21 def description @description end |
#enable_activities ⇒ Object
Toggle activity feed
42 43 44 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 42 def enable_activities @enable_activities end |
#enable_document_download ⇒ Object
Toggle downloads buttons for documents
39 40 41 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 39 def enable_document_download @enable_document_download end |
#enable_document_list ⇒ Object
Toggle list of documents in the procedure
36 37 38 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 36 def enable_document_list @enable_document_list end |
#enable_header_bar ⇒ Object
Toggle header bar of the app view
24 25 26 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 24 def @enable_header_bar end |
#enable_header_bar_sign_as ⇒ Object
Toggle "Sign as" band on the top of the app view
27 28 29 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 27 def @enable_header_bar_sign_as end |
#enable_member_list ⇒ Object
Toggle list of members in the procedure
33 34 35 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 33 def enable_member_list @enable_member_list end |
#enable_sidebar ⇒ Object
Toggle sidebar of the app view
30 31 32 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 30 def @enable_sidebar end |
#fonts ⇒ Object
List of fonts to load on the view. (Loaded via Google fonts)
65 66 67 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 65 def fonts @fonts end |
#labels ⇒ Object
Returns the value of attribute labels.
62 63 64 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 62 def labels @labels end |
#languages ⇒ Object
Array of allowed languages, use country code
60 61 62 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 60 def languages @languages end |
#logo ⇒ Object
Base64 of your logo
51 52 53 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 51 def logo @logo end |
#name ⇒ Object
Signature UI’s name
18 19 20 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 18 def name @name end |
#redirect_cancel ⇒ Object
Returns the value of attribute redirect_cancel.
70 71 72 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 70 def redirect_cancel @redirect_cancel end |
#redirect_error ⇒ Object
Returns the value of attribute redirect_error.
72 73 74 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 72 def redirect_error @redirect_error end |
#redirect_success ⇒ Object
Returns the value of attribute redirect_success.
74 75 76 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 74 def redirect_success @redirect_success end |
#sign_image_types_available ⇒ Object
Allow sign images types available for signature. The first type of the list will be selected as default for the signer.
54 55 56 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 54 def sign_image_types_available @sign_image_types_available end |
#style ⇒ Object
CSS for customize the view
68 69 70 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 68 def style @style end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 99 def self.attribute_map { :'name' => :'name', :'description' => :'description', :'enable_header_bar' => :'enableHeaderBar', :'enable_header_bar_sign_as' => :'enableHeaderBarSignAs', :'enable_sidebar' => :'enableSidebar', :'enable_member_list' => :'enableMemberList', :'enable_document_list' => :'enableDocumentList', :'enable_document_download' => :'enableDocumentDownload', :'enable_activities' => :'enableActivities', :'authentication_popup' => :'authenticationPopup', :'default_zoom' => :'defaultZoom', :'logo' => :'logo', :'sign_image_types_available' => :'signImageTypesAvailable', :'default_language' => :'defaultLanguage', :'languages' => :'languages', :'labels' => :'labels', :'fonts' => :'fonts', :'style' => :'style', :'redirect_cancel' => :'redirectCancel', :'redirect_error' => :'redirectError', :'redirect_success' => :'redirectSuccess' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 126 def self.swagger_types { :'name' => :'String', :'description' => :'String', :'enable_header_bar' => :'BOOLEAN', :'enable_header_bar_sign_as' => :'BOOLEAN', :'enable_sidebar' => :'BOOLEAN', :'enable_member_list' => :'BOOLEAN', :'enable_document_list' => :'BOOLEAN', :'enable_document_download' => :'BOOLEAN', :'enable_activities' => :'BOOLEAN', :'authentication_popup' => :'BOOLEAN', :'default_zoom' => :'Float', :'logo' => :'String', :'sign_image_types_available' => :'Array<String>', :'default_language' => :'String', :'languages' => :'Array<String>', :'labels' => :'Array<SignatureUiLabelInputIncluded>', :'fonts' => :'Array<String>', :'style' => :'String', :'redirect_cancel' => :'SignatureUiInputRedirectCancel', :'redirect_error' => :'SignatureUiInputRedirectError', :'redirect_success' => :'SignatureUiInputRedirectSuccess' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 313 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && description == o.description && == o. && == o. && == o. && enable_member_list == o.enable_member_list && enable_document_list == o.enable_document_list && enable_document_download == o.enable_document_download && enable_activities == o.enable_activities && authentication_popup == o.authentication_popup && default_zoom == o.default_zoom && logo == o.logo && sign_image_types_available == o.sign_image_types_available && default_language == o.default_language && languages == o.languages && labels == o.labels && fonts == o.fonts && style == o.style && redirect_cancel == o.redirect_cancel && redirect_error == o.redirect_error && redirect_success == o.redirect_success end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 375 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 = YousignClient.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
441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 441 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
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 354 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
341 342 343 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 341 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
347 348 349 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 347 def hash [name, description, , , , enable_member_list, enable_document_list, enable_document_download, enable_activities, authentication_popup, default_zoom, logo, sign_image_types_available, default_language, languages, labels, fonts, style, redirect_cancel, redirect_error, redirect_success].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 271 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if !@default_zoom.nil? && @default_zoom > 500 invalid_properties.push('invalid value for "default_zoom", must be smaller than or equal to 500.') end if !@default_zoom.nil? && @default_zoom < 1 invalid_properties.push('invalid value for "default_zoom", must be greater than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
421 422 423 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 421 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
427 428 429 430 431 432 433 434 435 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 427 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
415 416 417 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 415 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
290 291 292 293 294 295 |
# File 'lib/yousign_client/models/signature_ui_input.rb', line 290 def valid? return false if @name.nil? return false if !@default_zoom.nil? && @default_zoom > 500 return false if !@default_zoom.nil? && @default_zoom < 1 true end |