class DocuSign_eSign::PowerForm

Attributes

created_by[RW]
created_date_time[RW]

Indicates the date and time the item was created.

email_body[RW]

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

email_subject[RW]

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.

envelopes[RW]
error_details[RW]
instructions[RW]
is_active[RW]
last_used[RW]
limit_use_interval[RW]
limit_use_interval_enabled[RW]
limit_use_interval_units[RW]
max_use_enabled[RW]
name[RW]
power_form_id[RW]
power_form_url[RW]
recipients[RW]

An array of powerform recipients.

sender_name[RW]
sender_user_id[RW]
signing_mode[RW]
template_id[RW]

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

template_name[RW]
times_used[RW]
uri[RW]
uses_remaining[RW]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/docusign_esign/models/power_form.rb, line 91
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
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/docusign_esign/models/power_form.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?(:'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
swagger_types() click to toggle source

Attribute type mapping.

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

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/docusign_esign/models/power_form.rb, line 280
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) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/docusign_esign/models/power_form.rb, line 346
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) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/docusign_esign/models/power_form.rb, line 412
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) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/docusign_esign/models/power_form.rb, line 325
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) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/docusign_esign/models/power_form.rb, line 312
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/docusign_esign/models/power_form.rb, line 318
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_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/docusign_esign/models/power_form.rb, line 267
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/docusign_esign/models/power_form.rb, line 392
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/docusign_esign/models/power_form.rb, line 398
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() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/docusign_esign/models/power_form.rb, line 386
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/docusign_esign/models/power_form.rb, line 274
def valid?
  true
end