Class: SignRequestClient::InlineSignRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/signrequest_client/models/inline_sign_request.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ InlineSignRequest

Initializes the object

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash



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
# File 'lib/signrequest_client/models/inline_sign_request.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?(:'from_email')
    self.from_email = attributes[:'from_email']
  end

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

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

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

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

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

  if attributes.has_key?(:'required_attachments')
    if (value = attributes[:'required_attachments']).is_a?(Array)
      self.required_attachments = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'signers')
    if (value = attributes[:'signers']).is_a?(Array)
      self.signers = value
    end
  end

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

Instance Attribute Details

#disable_attachmentsObject

Disable uploading/adding of attachments



37
38
39
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 37

def disable_attachments
  @disable_attachments
end

#disable_blockchain_proofObject

Disables storing timestamp proof hashes in blockchain integrations.



55
56
57
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 55

def disable_blockchain_proof
  @disable_blockchain_proof
end

#disable_dateObject

Disable adding of dates



46
47
48
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 46

def disable_date
  @disable_date
end

#disable_emailsObject

Disable all SignRequest status emails as well as the email that contains the signed documents



49
50
51
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 49

def disable_emails
  @disable_emails
end

#disable_textObject

Disable adding of text



43
44
45
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 43

def disable_text
  @disable_text
end

#disable_text_signaturesObject

Disable usage of signatures generated by typing (text)



40
41
42
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 40

def disable_text_signatures
  @disable_text_signatures
end

#disable_upload_signaturesObject

Disable usage of uploaded signatures (images)



52
53
54
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 52

def disable_upload_signatures
  @disable_upload_signatures
end

#from_emailObject

Email of user sending the SignRequest (must be a validated email)



18
19
20
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 18

def from_email
  @from_email
end

#from_email_nameObject

Name to be used in the From email header, e.g. ‘#from_email_name <[email protected]>`



21
22
23
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 21

def from_email_name
  @from_email_name
end

#is_being_preparedObject

Have the sender of a SignRequest prepare the document before sending the request out, see: [prepare using the web interface](#section/Preparing-a-document/Prepare-using-the-web-interface)



24
25
26
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 24

def is_being_prepared
  @is_being_prepared
end

#messageObject

Message to include in SignRequest email, may contain the following html tags: a, abbr, acronym, b, blockquote, code, em, i, ul, li, ol, and strong



64
65
66
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 64

def message
  @message
end

#prepare_urlObject

Returns the value of attribute prepare_url.



26
27
28
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 26

def prepare_url
  @prepare_url
end

#redirect_urlObject

URL at which SignRequest will redirect to when a document is signed



29
30
31
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 29

def redirect_url
  @redirect_url
end

#redirect_url_declinedObject

URL at which SignRequest will redirect to when a document is declined



32
33
34
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 32

def redirect_url_declined
  @redirect_url_declined
end

#required_attachmentsObject

Returns the value of attribute required_attachments.



34
35
36
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 34

def required_attachments
  @required_attachments
end

#send_remindersObject

Automatically remind signers to sign a document, see: [automatic reminders](#section/Working-with-a-SignRequest/Automatic-reminders)



70
71
72
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 70

def send_reminders
  @send_reminders
end

#signersObject

Returns the value of attribute signers.



72
73
74
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 72

def signers
  @signers
end

#subjectObject

Subject of SignRequest email



61
62
63
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 61

def subject
  @subject
end

#text_message_verification_lockedObject

When true a text message verification is needed before the signer can see the document



58
59
60
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 58

def text_message_verification_locked
  @text_message_verification_locked
end

#uuidObject

Returns the value of attribute uuid.



74
75
76
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 74

def uuid
  @uuid
end

#whoObject

m: only me, mo: me and others, o: only others



67
68
69
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 67

def who
  @who
end

Class Method Details

.attribute_mapObject

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/signrequest_client/models/inline_sign_request.rb', line 99

def self.attribute_map
  {
    :'from_email' => :'from_email',
    :'from_email_name' => :'from_email_name',
    :'is_being_prepared' => :'is_being_prepared',
    :'prepare_url' => :'prepare_url',
    :'redirect_url' => :'redirect_url',
    :'redirect_url_declined' => :'redirect_url_declined',
    :'required_attachments' => :'required_attachments',
    :'disable_attachments' => :'disable_attachments',
    :'disable_text_signatures' => :'disable_text_signatures',
    :'disable_text' => :'disable_text',
    :'disable_date' => :'disable_date',
    :'disable_emails' => :'disable_emails',
    :'disable_upload_signatures' => :'disable_upload_signatures',
    :'disable_blockchain_proof' => :'disable_blockchain_proof',
    :'text_message_verification_locked' => :'text_message_verification_locked',
    :'subject' => :'subject',
    :'message' => :'message',
    :'who' => :'who',
    :'send_reminders' => :'send_reminders',
    :'signers' => :'signers',
    :'uuid' => :'uuid'
  }
end

.swagger_typesObject

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/signrequest_client/models/inline_sign_request.rb', line 126

def self.swagger_types
  {
    :'from_email' => :'String',
    :'from_email_name' => :'String',
    :'is_being_prepared' => :'BOOLEAN',
    :'prepare_url' => :'String',
    :'redirect_url' => :'String',
    :'redirect_url_declined' => :'String',
    :'required_attachments' => :'Array<RequiredAttachment>',
    :'disable_attachments' => :'BOOLEAN',
    :'disable_text_signatures' => :'BOOLEAN',
    :'disable_text' => :'BOOLEAN',
    :'disable_date' => :'BOOLEAN',
    :'disable_emails' => :'BOOLEAN',
    :'disable_upload_signatures' => :'BOOLEAN',
    :'disable_blockchain_proof' => :'BOOLEAN',
    :'text_message_verification_locked' => :'BOOLEAN',
    :'subject' => :'String',
    :'message' => :'String',
    :'who' => :'String',
    :'send_reminders' => :'BOOLEAN',
    :'signers' => :'Array<Signer>',
    :'uuid' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • to be compared



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
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 381

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      from_email == o.from_email &&
      from_email_name == o.from_email_name &&
      is_being_prepared == o.is_being_prepared &&
      prepare_url == o.prepare_url &&
      redirect_url == o.redirect_url &&
      redirect_url_declined == o.redirect_url_declined &&
      required_attachments == o.required_attachments &&
      disable_attachments == o.disable_attachments &&
      disable_text_signatures == o.disable_text_signatures &&
      disable_text == o.disable_text &&
      disable_date == o.disable_date &&
      disable_emails == o.disable_emails &&
      disable_upload_signatures == o.disable_upload_signatures &&
      disable_blockchain_proof == o.disable_blockchain_proof &&
      text_message_verification_locked == o.text_message_verification_locked &&
      subject == o.subject &&
      message == o.message &&
      who == o.who &&
      send_reminders == o.send_reminders &&
      signers == o.signers &&
      uuid == o.uuid
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • type Data type

  • value Value to be deserialized

Returns:

  • Deserialized data



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 443

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 = SignRequestClient.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:

  • Any valid value

Returns:

  • Returns the value in the form of hash



509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 509

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:

  • Model attributes in the form of hash

Returns:

  • Returns the model itself



422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 422

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 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:

  • to be compared

Returns:

See Also:

  • `==` method


409
410
411
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 409

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • Hash code



415
416
417
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 415

def hash
  [from_email, from_email_name, is_being_prepared, prepare_url, redirect_url, redirect_url_declined, required_attachments, disable_attachments, disable_text_signatures, disable_text, disable_date, disable_emails, disable_upload_signatures, disable_blockchain_proof, text_message_verification_locked, subject, message, who, send_reminders, signers, uuid].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 251

def list_invalid_properties
  invalid_properties = Array.new
  if !@from_email_name.nil? && @from_email_name.to_s.length < 1
    invalid_properties.push('invalid value for "from_email_name", the character length must be great than or equal to 1.')
  end

  if !@prepare_url.nil? && @prepare_url.to_s.length < 1
    invalid_properties.push('invalid value for "prepare_url", the character length must be great than or equal to 1.')
  end

  if !@redirect_url.nil? && @redirect_url.to_s.length < 1
    invalid_properties.push('invalid value for "redirect_url", the character length must be great than or equal to 1.')
  end

  if !@redirect_url_declined.nil? && @redirect_url_declined.to_s.length < 1
    invalid_properties.push('invalid value for "redirect_url_declined", the character length must be great than or equal to 1.')
  end

  if !@subject.nil? && @subject.to_s.length < 1
    invalid_properties.push('invalid value for "subject", the character length must be great than or equal to 1.')
  end

  if !@message.nil? && @message.to_s.length < 1
    invalid_properties.push('invalid value for "message", the character length must be great than or equal to 1.')
  end

  if !@uuid.nil? && @uuid.to_s.length < 1
    invalid_properties.push('invalid value for "uuid", the character length must be great than or equal to 1.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • Returns the object in the form of hash



489
490
491
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 489

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • Returns the object in the form of hash



495
496
497
498
499
500
501
502
503
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 495

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 presentation of the object



483
484
485
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 483

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • true if the model is valid



286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/signrequest_client/models/inline_sign_request.rb', line 286

def valid?
  return false if !@from_email_name.nil? && @from_email_name.to_s.length < 1
  return false if !@prepare_url.nil? && @prepare_url.to_s.length < 1
  return false if !@redirect_url.nil? && @redirect_url.to_s.length < 1
  return false if !@redirect_url_declined.nil? && @redirect_url_declined.to_s.length < 1
  return false if !@subject.nil? && @subject.to_s.length < 1
  return false if !@message.nil? && @message.to_s.length < 1
  who_validator = EnumAttributeValidator.new('String', ['m', 'mo', 'o'])
  return false unless who_validator.valid?(@who)
  return false if !@uuid.nil? && @uuid.to_s.length < 1
  true
end