Class: DocuSign_eSign::ConsumerDisclosure

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/models/consumer_disclosure.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ConsumerDisclosure

Initializes the object

Parameters:

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

    Model attributes in the form of hash


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
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 189

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_esign_idObject

A GUID identifying the account associated with the consumer disclosure


18
19
20
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 18

def 
  @account_esign_id
end

#allow_cd_withdrawObject

Indicates whether the customer can withdraw their acceptance of the consumer disclosure.


21
22
23
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 21

def allow_cd_withdraw
  @allow_cd_withdraw
end

#allow_cd_withdraw_metadataObject

Returns the value of attribute allow_cd_withdraw_metadata


23
24
25
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 23

def 
  @allow_cd_withdraw_metadata
end

#change_emailObject

Returns the value of attribute change_email


26
27
28
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 26

def change_email
  @change_email
end

#change_email_otherObject

Returns the value of attribute change_email_other


29
30
31
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 29

def change_email_other
  @change_email_other
end

#company_nameObject

The name of the company associated with the consumer disclosure.


32
33
34
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 32

def company_name
  @company_name
end

#company_phoneObject

The phone number of the company associated with the consumer disclosure.


35
36
37
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 35

def company_phone
  @company_phone
end

#copy_cost_per_pageObject

Returns the value of attribute copy_cost_per_page


38
39
40
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 38

def copy_cost_per_page
  @copy_cost_per_page
end

#copy_fee_collection_methodObject

Specifies the fee collection method for cases in which the customer requires paper copies of the document. Maximum Length: 255 characters


41
42
43
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 41

def copy_fee_collection_method
  @copy_fee_collection_method
end

#copy_request_emailObject

Returns the value of attribute copy_request_email


44
45
46
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 44

def copy_request_email
  @copy_request_email
end

#customObject

Returns the value of attribute custom


47
48
49
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 47

def custom
  @custom
end

#enable_esignObject

Returns the value of attribute enable_esign


50
51
52
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 50

def enable_esign
  @enable_esign
end

#esign_agreementObject

The Electronic Record and Signature Disclosure text. The disclosure text includes the html formatting.


53
54
55
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 53

def esign_agreement
  @esign_agreement
end

#esign_textObject

Returns the value of attribute esign_text


56
57
58
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 56

def esign_text
  @esign_text
end

#language_codeObject

Returns the value of attribute language_code


59
60
61
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 59

def language_code
  @language_code
end

#must_agree_to_esignObject

Returns the value of attribute must_agree_to_esign


62
63
64
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 62

def must_agree_to_esign
  @must_agree_to_esign
end

#pdf_idObject

Returns the value of attribute pdf_id


65
66
67
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 65

def pdf_id
  @pdf_id
end

#use_brandObject

Returns the value of attribute use_brand


68
69
70
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 68

def use_brand
  @use_brand
end

#use_consumer_disclosure_within_accountObject

Returns the value of attribute use_consumer_disclosure_within_account


71
72
73
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 71

def 
  @use_consumer_disclosure_within_account
end

#use_consumer_disclosure_within_account_metadataObject

Returns the value of attribute use_consumer_disclosure_within_account_metadata


73
74
75
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 73

def 
  @use_consumer_disclosure_within_account_metadata
end

#withdraw_address_line1Object

Contains the first address line of the postal address to which a customer can send a consent withdrawal notification. Maximum length: 100 characters.


76
77
78
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 76

def withdraw_address_line1
  @withdraw_address_line1
end

#withdraw_address_line2Object

Contains the second address line of the postal address to which a customer can send a consent withdrawal notification. Maximum length: 100 characters.


79
80
81
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 79

def withdraw_address_line2
  @withdraw_address_line2
end

#withdraw_by_emailObject

Indicates whether the customer can withdraw consent by email.


82
83
84
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 82

def withdraw_by_email
  @withdraw_by_email
end

#withdraw_by_mailObject

Indicates whether the customer can withdraw consent by postal mail.


85
86
87
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 85

def withdraw_by_mail
  @withdraw_by_mail
end

#withdraw_by_phoneObject

Indicates whether the customer can withdraw consent by phone.


88
89
90
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 88

def withdraw_by_phone
  @withdraw_by_phone
end

#withdraw_cityObject

Contains the city of the postal address to which a customer can send a consent withdrawal notification. Maximum length: 50 characters.


91
92
93
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 91

def withdraw_city
  @withdraw_city
end

#withdraw_consequencesObject

Indicates the consequences of withdrawing consent.


94
95
96
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 94

def withdraw_consequences
  @withdraw_consequences
end

#withdraw_emailObject

Contains the email address to which a customer can send a consent withdrawal notification. Maximum length: 100 characters.


97
98
99
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 97

def withdraw_email
  @withdraw_email
end

#withdraw_otherObject

Indicates other information need to withdraw consent. Maximum length: 255 characters.


100
101
102
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 100

def withdraw_other
  @withdraw_other
end

#withdraw_phoneObject

Contains the phone number which a customer can call to register consent withdrawal notification. Maximum length: 20 characters.


103
104
105
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 103

def withdraw_phone
  @withdraw_phone
end

#withdraw_postal_codeObject

Contains the postal code of the postal address to which a customer can send a consent withdrawal notification. Maximum length: 20 characters.


106
107
108
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 106

def withdraw_postal_code
  @withdraw_postal_code
end

#withdraw_stateObject

Contains the state of the postal address to which a customer can send a consent withdrawal notification.


109
110
111
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 109

def withdraw_state
  @withdraw_state
end

Class Method Details

.attribute_mapObject

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


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
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 112

def self.attribute_map
  {
    :'account_esign_id' => :'accountEsignId',
    :'allow_cd_withdraw' => :'allowCDWithdraw',
    :'allow_cd_withdraw_metadata' => :'allowCDWithdrawMetadata',
    :'change_email' => :'changeEmail',
    :'change_email_other' => :'changeEmailOther',
    :'company_name' => :'companyName',
    :'company_phone' => :'companyPhone',
    :'copy_cost_per_page' => :'copyCostPerPage',
    :'copy_fee_collection_method' => :'copyFeeCollectionMethod',
    :'copy_request_email' => :'copyRequestEmail',
    :'custom' => :'custom',
    :'enable_esign' => :'enableEsign',
    :'esign_agreement' => :'esignAgreement',
    :'esign_text' => :'esignText',
    :'language_code' => :'languageCode',
    :'must_agree_to_esign' => :'mustAgreeToEsign',
    :'pdf_id' => :'pdfId',
    :'use_brand' => :'useBrand',
    :'use_consumer_disclosure_within_account' => :'useConsumerDisclosureWithinAccount',
    :'use_consumer_disclosure_within_account_metadata' => :'useConsumerDisclosureWithinAccountMetadata',
    :'withdraw_address_line1' => :'withdrawAddressLine1',
    :'withdraw_address_line2' => :'withdrawAddressLine2',
    :'withdraw_by_email' => :'withdrawByEmail',
    :'withdraw_by_mail' => :'withdrawByMail',
    :'withdraw_by_phone' => :'withdrawByPhone',
    :'withdraw_city' => :'withdrawCity',
    :'withdraw_consequences' => :'withdrawConsequences',
    :'withdraw_email' => :'withdrawEmail',
    :'withdraw_other' => :'withdrawOther',
    :'withdraw_phone' => :'withdrawPhone',
    :'withdraw_postal_code' => :'withdrawPostalCode',
    :'withdraw_state' => :'withdrawState'
  }
end

.swagger_typesObject

Attribute type mapping.


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
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 150

def self.swagger_types
  {
    :'account_esign_id' => :'String',
    :'allow_cd_withdraw' => :'String',
    :'allow_cd_withdraw_metadata' => :'SettingsMetadata',
    :'change_email' => :'String',
    :'change_email_other' => :'String',
    :'company_name' => :'String',
    :'company_phone' => :'String',
    :'copy_cost_per_page' => :'String',
    :'copy_fee_collection_method' => :'String',
    :'copy_request_email' => :'String',
    :'custom' => :'String',
    :'enable_esign' => :'String',
    :'esign_agreement' => :'String',
    :'esign_text' => :'String',
    :'language_code' => :'String',
    :'must_agree_to_esign' => :'String',
    :'pdf_id' => :'String',
    :'use_brand' => :'String',
    :'use_consumer_disclosure_within_account' => :'String',
    :'use_consumer_disclosure_within_account_metadata' => :'SettingsMetadata',
    :'withdraw_address_line1' => :'String',
    :'withdraw_address_line2' => :'String',
    :'withdraw_by_email' => :'String',
    :'withdraw_by_mail' => :'String',
    :'withdraw_by_phone' => :'String',
    :'withdraw_city' => :'String',
    :'withdraw_consequences' => :'String',
    :'withdraw_email' => :'String',
    :'withdraw_other' => :'String',
    :'withdraw_phone' => :'String',
    :'withdraw_postal_code' => :'String',
    :'withdraw_state' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared


339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 339

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
      allow_cd_withdraw == o.allow_cd_withdraw &&
       == o. &&
      change_email == o.change_email &&
      change_email_other == o.change_email_other &&
      company_name == o.company_name &&
      company_phone == o.company_phone &&
      copy_cost_per_page == o.copy_cost_per_page &&
      copy_fee_collection_method == o.copy_fee_collection_method &&
      copy_request_email == o.copy_request_email &&
      custom == o.custom &&
      enable_esign == o.enable_esign &&
      esign_agreement == o.esign_agreement &&
      esign_text == o.esign_text &&
      language_code == o.language_code &&
      must_agree_to_esign == o.must_agree_to_esign &&
      pdf_id == o.pdf_id &&
      use_brand == o.use_brand &&
       == o. &&
       == o. &&
      withdraw_address_line1 == o.withdraw_address_line1 &&
      withdraw_address_line2 == o.withdraw_address_line2 &&
      withdraw_by_email == o.withdraw_by_email &&
      withdraw_by_mail == o.withdraw_by_mail &&
      withdraw_by_phone == o.withdraw_by_phone &&
      withdraw_city == o.withdraw_city &&
      withdraw_consequences == o.withdraw_consequences &&
      withdraw_email == o.withdraw_email &&
      withdraw_other == o.withdraw_other &&
      withdraw_phone == o.withdraw_phone &&
      withdraw_postal_code == o.withdraw_postal_code &&
      withdraw_state == o.withdraw_state
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


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
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 412

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash


478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 478

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


391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 391

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

378
379
380
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 378

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code


384
385
386
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 384

def hash
  [, allow_cd_withdraw, , change_email, change_email_other, company_name, company_phone, copy_cost_per_page, copy_fee_collection_method, copy_request_email, custom, enable_esign, esign_agreement, esign_text, language_code, must_agree_to_esign, pdf_id, use_brand, , , withdraw_address_line1, withdraw_address_line2, withdraw_by_email, withdraw_by_mail, withdraw_by_phone, withdraw_city, withdraw_consequences, withdraw_email, withdraw_other, withdraw_phone, withdraw_postal_code, withdraw_state].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons


326
327
328
329
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 326

def list_invalid_properties
  invalid_properties = Array.new
  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


458
459
460
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 458

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


464
465
466
467
468
469
470
471
472
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 464

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


452
453
454
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 452

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


333
334
335
# File 'lib/docusign_esign/models/consumer_disclosure.rb', line 333

def valid?
  true
end