Class: YousignClient::SignatureUiOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/yousign_client/models/signature_ui_output.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SignatureUiOutput

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/yousign_client/models/signature_ui_output.rb', line 178

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?(:'id')
    self.id = attributes[:'id']
  end

  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.enable_header_bar = attributes[:'enableHeaderBar']
  else
    self.enable_header_bar = true
  end

  if attributes.has_key?(:'enableHeaderBarSignAs')
    self.enable_header_bar_sign_as = attributes[:'enableHeaderBarSignAs']
  else
    self.enable_header_bar_sign_as = true
  end

  if attributes.has_key?(:'enableSidebar')
    self.enable_sidebar = attributes[:'enableSidebar']
  else
    self.enable_sidebar = 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. = 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

  if attributes.has_key?(:'creator')
    self.creator = attributes[:'creator']
  end

  if attributes.has_key?(:'workspace')
    self.workspace = attributes[:'workspace']
  end

  if attributes.has_key?(:'createdAt')
    self.created_at = attributes[:'createdAt']
  end

  if attributes.has_key?(:'updatedAt')
    self.updated_at = attributes[:'updatedAt']
  end
end

Instance Attribute Details

#authentication_popupObject

True for use a popup for enter the SMS code, false for use a fullscreen view.



47
48
49
# File 'lib/yousign_client/models/signature_ui_output.rb', line 47

def authentication_popup
  @authentication_popup
end

#created_atObject

Date of creation



85
86
87
# File 'lib/yousign_client/models/signature_ui_output.rb', line 85

def created_at
  @created_at
end

#creatorObject

Creator’s ID



79
80
81
# File 'lib/yousign_client/models/signature_ui_output.rb', line 79

def creator
  @creator
end

#default_languageObject

Default language of the view. Must be in "languages" field.



59
60
61
# File 'lib/yousign_client/models/signature_ui_output.rb', line 59

def default_language
  @default_language
end

#default_zoomObject

Default value for zoom of the PDF viewer. Default value is the adapted to the resolution of your screen.



50
51
52
# File 'lib/yousign_client/models/signature_ui_output.rb', line 50

def default_zoom
  @default_zoom
end

#descriptionObject

Returns the value of attribute description.



23
24
25
# File 'lib/yousign_client/models/signature_ui_output.rb', line 23

def description
  @description
end

#enable_activitiesObject

Toggle activity feed



44
45
46
# File 'lib/yousign_client/models/signature_ui_output.rb', line 44

def enable_activities
  @enable_activities
end

#enable_document_downloadObject

Toggle downloads buttons for documents



41
42
43
# File 'lib/yousign_client/models/signature_ui_output.rb', line 41

def enable_document_download
  @enable_document_download
end

#enable_document_listObject

Toggle list of documents in the procedure



38
39
40
# File 'lib/yousign_client/models/signature_ui_output.rb', line 38

def enable_document_list
  @enable_document_list
end

#enable_header_barObject

Toggle header bar of the app view



26
27
28
# File 'lib/yousign_client/models/signature_ui_output.rb', line 26

def enable_header_bar
  @enable_header_bar
end

#enable_header_bar_sign_asObject

Toggle "Sign as" band on the top of the app view



29
30
31
# File 'lib/yousign_client/models/signature_ui_output.rb', line 29

def enable_header_bar_sign_as
  @enable_header_bar_sign_as
end

#enable_member_listObject

Toggle list of members in the procedure



35
36
37
# File 'lib/yousign_client/models/signature_ui_output.rb', line 35

def enable_member_list
  @enable_member_list
end

#enable_sidebarObject

Toggle sidebar of the app view



32
33
34
# File 'lib/yousign_client/models/signature_ui_output.rb', line 32

def enable_sidebar
  @enable_sidebar
end

#fontsObject

List of fonts to load on the view. (Loaded via google fonts)



67
68
69
# File 'lib/yousign_client/models/signature_ui_output.rb', line 67

def fonts
  @fonts
end

#idObject

Resource’s ID



18
19
20
# File 'lib/yousign_client/models/signature_ui_output.rb', line 18

def id
  @id
end

#labelsObject

Returns the value of attribute labels.



64
65
66
# File 'lib/yousign_client/models/signature_ui_output.rb', line 64

def labels
  @labels
end

#languagesObject

Array of allowed languages, use country code



62
63
64
# File 'lib/yousign_client/models/signature_ui_output.rb', line 62

def languages
  @languages
end

#logoObject

Base64 of your logo



53
54
55
# File 'lib/yousign_client/models/signature_ui_output.rb', line 53

def 
  @logo
end

#nameObject

Resource’s name



21
22
23
# File 'lib/yousign_client/models/signature_ui_output.rb', line 21

def name
  @name
end

#redirect_cancelObject

Returns the value of attribute redirect_cancel.



72
73
74
# File 'lib/yousign_client/models/signature_ui_output.rb', line 72

def redirect_cancel
  @redirect_cancel
end

#redirect_errorObject

Returns the value of attribute redirect_error.



74
75
76
# File 'lib/yousign_client/models/signature_ui_output.rb', line 74

def redirect_error
  @redirect_error
end

#redirect_successObject

Returns the value of attribute redirect_success.



76
77
78
# File 'lib/yousign_client/models/signature_ui_output.rb', line 76

def redirect_success
  @redirect_success
end

#sign_image_types_availableObject

Allow sign images types available for signature.



56
57
58
# File 'lib/yousign_client/models/signature_ui_output.rb', line 56

def sign_image_types_available
  @sign_image_types_available
end

#styleObject

CSS for customize the view



70
71
72
# File 'lib/yousign_client/models/signature_ui_output.rb', line 70

def style
  @style
end

#updated_atObject

Date of last update



88
89
90
# File 'lib/yousign_client/models/signature_ui_output.rb', line 88

def updated_at
  @updated_at
end

#workspaceObject

Associated Workspace’s ID



82
83
84
# File 'lib/yousign_client/models/signature_ui_output.rb', line 82

def workspace
  @workspace
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/yousign_client/models/signature_ui_output.rb', line 113

def self.attribute_map
  {
    :'id' => :'id',
    :'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',
    :'creator' => :'creator',
    :'workspace' => :'workspace',
    :'created_at' => :'createdAt',
    :'updated_at' => :'updatedAt'
  }
end

.swagger_typesObject

Attribute type mapping.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/yousign_client/models/signature_ui_output.rb', line 145

def self.swagger_types
  {
    :'id' => :'String',
    :'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<SignatureUiLabelOutput>',
    :'fonts' => :'Array<String>',
    :'style' => :'String',
    :'redirect_cancel' => :'SignatureUiOutputRedirectCancel',
    :'redirect_error' => :'SignatureUiOutputRedirectError',
    :'redirect_success' => :'SignatureUiOutputRedirectSuccess',
    :'creator' => :'String',
    :'workspace' => :'String',
    :'created_at' => :'DateTime',
    :'updated_at' => :'DateTime'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/yousign_client/models/signature_ui_output.rb', line 333

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      name == o.name &&
      description == o.description &&
      enable_header_bar == o.enable_header_bar &&
      enable_header_bar_sign_as == o.enable_header_bar_sign_as &&
      enable_sidebar == o.enable_sidebar &&
      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 &&
       == o. &&
      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 &&
      creator == o.creator &&
      workspace == o.workspace &&
      created_at == o.created_at &&
      updated_at == o.updated_at
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/yousign_client/models/signature_ui_output.rb', line 400

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'lib/yousign_client/models/signature_ui_output.rb', line 466

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/yousign_client/models/signature_ui_output.rb', line 379

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


366
367
368
# File 'lib/yousign_client/models/signature_ui_output.rb', line 366

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



372
373
374
# File 'lib/yousign_client/models/signature_ui_output.rb', line 372

def hash
  [id, name, description, enable_header_bar, enable_header_bar_sign_as, enable_sidebar, enable_member_list, enable_document_list, enable_document_download, enable_activities, authentication_popup, default_zoom, , sign_image_types_available, default_language, languages, labels, fonts, style, redirect_cancel, redirect_error, redirect_success, creator, workspace, created_at, updated_at].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



315
316
317
318
319
320
321
322
# File 'lib/yousign_client/models/signature_ui_output.rb', line 315

def list_invalid_properties
  invalid_properties = Array.new
  if @name.nil?
    invalid_properties.push('invalid value for "name", name cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



446
447
448
# File 'lib/yousign_client/models/signature_ui_output.rb', line 446

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



452
453
454
455
456
457
458
459
460
# File 'lib/yousign_client/models/signature_ui_output.rb', line 452

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



440
441
442
# File 'lib/yousign_client/models/signature_ui_output.rb', line 440

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



326
327
328
329
# File 'lib/yousign_client/models/signature_ui_output.rb', line 326

def valid?
  return false if @name.nil?
  true
end