Class: DocuSign_eSign::PowerForm

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

Overview

Contains details about a PowerForm.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PowerForm

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#created_byObject

Returns the value of attribute created_by.



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

def created_by
  @created_by
end

#created_date_timeObject

Indicates the date and time the item was created.



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

def created_date_time
  @created_date_time
end

#email_bodyObject

Specifies the email body of the message sent to the recipient. Maximum length: 10000 characters.



24
25
26
# File 'lib/docusign_esign/models/power_form.rb', line 24

def email_body
  @email_body
end

#email_subjectObject

Specifies the subject of the email that is sent to all recipients. See [ML:Template Email Subject Merge Fields] for information about adding merge field information to the email subject.



27
28
29
# File 'lib/docusign_esign/models/power_form.rb', line 27

def email_subject
  @email_subject
end

#envelopesObject

Returns the value of attribute envelopes.



30
31
32
# File 'lib/docusign_esign/models/power_form.rb', line 30

def envelopes
  @envelopes
end

#error_detailsObject

Array or errors.



33
34
35
# File 'lib/docusign_esign/models/power_form.rb', line 33

def error_details
  @error_details
end

#instructionsObject

Returns the value of attribute instructions.



36
37
38
# File 'lib/docusign_esign/models/power_form.rb', line 36

def instructions
  @instructions
end

#is_activeObject

Returns the value of attribute is_active.



39
40
41
# File 'lib/docusign_esign/models/power_form.rb', line 39

def is_active
  @is_active
end

#last_usedObject

Returns the value of attribute last_used.



42
43
44
# File 'lib/docusign_esign/models/power_form.rb', line 42

def last_used
  @last_used
end

#limit_use_intervalObject

Returns the value of attribute limit_use_interval.



45
46
47
# File 'lib/docusign_esign/models/power_form.rb', line 45

def limit_use_interval
  @limit_use_interval
end

#limit_use_interval_enabledObject

Returns the value of attribute limit_use_interval_enabled.



48
49
50
# File 'lib/docusign_esign/models/power_form.rb', line 48

def limit_use_interval_enabled
  @limit_use_interval_enabled
end

#limit_use_interval_unitsObject

Returns the value of attribute limit_use_interval_units.



51
52
53
# File 'lib/docusign_esign/models/power_form.rb', line 51

def limit_use_interval_units
  @limit_use_interval_units
end

#max_use_enabledObject

Returns the value of attribute max_use_enabled.



54
55
56
# File 'lib/docusign_esign/models/power_form.rb', line 54

def max_use_enabled
  @max_use_enabled
end

#nameObject

Returns the value of attribute name.



57
58
59
# File 'lib/docusign_esign/models/power_form.rb', line 57

def name
  @name
end

#power_form_idObject

Returns the value of attribute power_form_id.



60
61
62
# File 'lib/docusign_esign/models/power_form.rb', line 60

def power_form_id
  @power_form_id
end

#power_form_urlObject

Returns the value of attribute power_form_url.



63
64
65
# File 'lib/docusign_esign/models/power_form.rb', line 63

def power_form_url
  @power_form_url
end

#recipientsObject

An array of powerform recipients.



66
67
68
# File 'lib/docusign_esign/models/power_form.rb', line 66

def recipients
  @recipients
end

#sender_nameObject

Returns the value of attribute sender_name.



69
70
71
# File 'lib/docusign_esign/models/power_form.rb', line 69

def sender_name
  @sender_name
end

#sender_user_idObject

Returns the value of attribute sender_user_id.



72
73
74
# File 'lib/docusign_esign/models/power_form.rb', line 72

def sender_user_id
  @sender_user_id
end

#signing_modeObject

Returns the value of attribute signing_mode.



75
76
77
# File 'lib/docusign_esign/models/power_form.rb', line 75

def signing_mode
  @signing_mode
end

#template_idObject

The unique identifier of the template. If this is not provided, DocuSign will generate a value.



78
79
80
# File 'lib/docusign_esign/models/power_form.rb', line 78

def template_id
  @template_id
end

#template_nameObject

Returns the value of attribute template_name.



81
82
83
# File 'lib/docusign_esign/models/power_form.rb', line 81

def template_name
  @template_name
end

#times_usedObject

Returns the value of attribute times_used.



84
85
86
# File 'lib/docusign_esign/models/power_form.rb', line 84

def times_used
  @times_used
end

#uriObject

Returns the value of attribute uri.



87
88
89
# File 'lib/docusign_esign/models/power_form.rb', line 87

def uri
  @uri
end

#uses_remainingObject

Returns the value of attribute uses_remaining.



90
91
92
# File 'lib/docusign_esign/models/power_form.rb', line 90

def uses_remaining
  @uses_remaining
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'created_by' => :'createdBy',
    :'created_date_time' => :'createdDateTime',
    :'email_body' => :'emailBody',
    :'email_subject' => :'emailSubject',
    :'envelopes' => :'envelopes',
    :'error_details' => :'errorDetails',
    :'instructions' => :'instructions',
    :'is_active' => :'isActive',
    :'last_used' => :'lastUsed',
    :'limit_use_interval' => :'limitUseInterval',
    :'limit_use_interval_enabled' => :'limitUseIntervalEnabled',
    :'limit_use_interval_units' => :'limitUseIntervalUnits',
    :'max_use_enabled' => :'maxUseEnabled',
    :'name' => :'name',
    :'power_form_id' => :'powerFormId',
    :'power_form_url' => :'powerFormUrl',
    :'recipients' => :'recipients',
    :'sender_name' => :'senderName',
    :'sender_user_id' => :'senderUserId',
    :'signing_mode' => :'signingMode',
    :'template_id' => :'templateId',
    :'template_name' => :'templateName',
    :'times_used' => :'timesUsed',
    :'uri' => :'uri',
    :'uses_remaining' => :'usesRemaining'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'created_by' => :'String',
    :'created_date_time' => :'String',
    :'email_body' => :'String',
    :'email_subject' => :'String',
    :'envelopes' => :'Array<Envelope>',
    :'error_details' => :'ErrorDetails',
    :'instructions' => :'String',
    :'is_active' => :'String',
    :'last_used' => :'String',
    :'limit_use_interval' => :'String',
    :'limit_use_interval_enabled' => :'String',
    :'limit_use_interval_units' => :'String',
    :'max_use_enabled' => :'String',
    :'name' => :'String',
    :'power_form_id' => :'String',
    :'power_form_url' => :'String',
    :'recipients' => :'Array<PowerFormRecipient>',
    :'sender_name' => :'String',
    :'sender_user_id' => :'String',
    :'signing_mode' => :'String',
    :'template_id' => :'String',
    :'template_name' => :'String',
    :'times_used' => :'String',
    :'uri' => :'String',
    :'uses_remaining' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      created_by == o.created_by &&
      created_date_time == o.created_date_time &&
      email_body == o.email_body &&
      email_subject == o.email_subject &&
      envelopes == o.envelopes &&
      error_details == o.error_details &&
      instructions == o.instructions &&
      is_active == o.is_active &&
      last_used == o.last_used &&
      limit_use_interval == o.limit_use_interval &&
      limit_use_interval_enabled == o.limit_use_interval_enabled &&
      limit_use_interval_units == o.limit_use_interval_units &&
      max_use_enabled == o.max_use_enabled &&
      name == o.name &&
      power_form_id == o.power_form_id &&
      power_form_url == o.power_form_url &&
      recipients == o.recipients &&
      sender_name == o.sender_name &&
      sender_user_id == o.sender_user_id &&
      signing_mode == o.signing_mode &&
      template_id == o.template_id &&
      template_name == o.template_name &&
      times_used == o.times_used &&
      uri == o.uri &&
      uses_remaining == o.uses_remaining
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



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
375
376
377
378
379
380
381
382
383
384
# File 'lib/docusign_esign/models/power_form.rb', line 348

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



414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/docusign_esign/models/power_form.rb', line 414

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



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/docusign_esign/models/power_form.rb', line 327

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


314
315
316
# File 'lib/docusign_esign/models/power_form.rb', line 314

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



320
321
322
# File 'lib/docusign_esign/models/power_form.rb', line 320

def hash
  [created_by, created_date_time, email_body, email_subject, envelopes, error_details, instructions, is_active, last_used, limit_use_interval, limit_use_interval_enabled, limit_use_interval_units, max_use_enabled, name, power_form_id, power_form_url, recipients, sender_name, sender_user_id, signing_mode, template_id, template_name, times_used, uri, uses_remaining].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



269
270
271
272
# File 'lib/docusign_esign/models/power_form.rb', line 269

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



394
395
396
# File 'lib/docusign_esign/models/power_form.rb', line 394

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



400
401
402
403
404
405
406
407
408
# File 'lib/docusign_esign/models/power_form.rb', line 400

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



388
389
390
# File 'lib/docusign_esign/models/power_form.rb', line 388

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



276
277
278
# File 'lib/docusign_esign/models/power_form.rb', line 276

def valid?
  true
end