class DocuSign_eSign::PrefillTabs

Prefill tabs are tabs that the sender can fill in before the envelope is sent. They are sometimes called sender tags or pre-fill fields. Only the following tab types can be prefill tabs: - text - check boxes - radio buttons [Pre-Fill Your Own Document Fields] describes how prefill tabs work in the web application. [Customize your envelopes with pre-fill fields] shows how to use prefill tabs in your application using the eSignature SDKs. [app]: support.docusign.com/en/guides/ndse-user-guide-prefill-fields [catblog]: www.docusign.com/blog/developers/common-api-tasks-customize-your-envelopes-pre-fill-fields

Attributes

checkbox_tabs[RW]

Specifies a tag on the document in a location where the recipient can select an option.

date_tabs[RW]

Specifies a tab on the document where you want the recipient to enter a date. Date tabs are single-line fields that allow date information to be entered in any format. The tooltip for this tab recommends entering the date as MM/DD/YYYY, but this is not enforced. The format entered by the signer is retained. If you need a particular date format enforced, DocuSign recommends using a Text tab with a Validation Pattern and Validation Message to enforce the format.

email_tabs[RW]

Specifies a tag on the document where you want the recipient to enter an email. Email tags are single-line fields that accept any characters. The system checks that a valid email format (i.e. xxx@yyy.zzz) is entered in the tag. It uses the same parameters as a Text tab, with the validation message and pattern set for email information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.

number_tabs[RW]

Specifies a tag on the document where you want the recipient to enter a number. It uses the same parameters as a Text tab, with the validation message and pattern set for number information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.

radio_group_tabs[RW]

Specifies a tag on the document in a location where the recipient can select one option from a group of options using a radio button. The radio buttons do not have to be on the same page in a document.

sender_company_tabs[RW]
sender_name_tabs[RW]
ssn_tabs[RW]

Specifies a tag on the document where you want the recipient to enter a Social Security Number (SSN). A SSN can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for SSN information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.

tab_groups[RW]
text_tabs[RW]

Specifies a that that is an adaptable field that allows the recipient to enter different text information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.

zip_tabs[RW]

Specifies a tag on the document where you want the recipient to enter a ZIP code. The ZIP code can be a five numbers or the ZIP+4 format with nine numbers. The zip code can be typed with or without dashes. It uses the same parameters as a Text tab, with the validation message and pattern set for ZIP code information. When getting information that includes this tab type, the original value of the tab when the associated envelope was sent is included in the response.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/docusign_esign/models/prefill_tabs.rb, line 51
def self.attribute_map
  {
    :'checkbox_tabs' => :'checkboxTabs',
    :'date_tabs' => :'dateTabs',
    :'email_tabs' => :'emailTabs',
    :'number_tabs' => :'numberTabs',
    :'radio_group_tabs' => :'radioGroupTabs',
    :'sender_company_tabs' => :'senderCompanyTabs',
    :'sender_name_tabs' => :'senderNameTabs',
    :'ssn_tabs' => :'ssnTabs',
    :'tab_groups' => :'tabGroups',
    :'text_tabs' => :'textTabs',
    :'zip_tabs' => :'zipTabs'
  }
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/prefill_tabs.rb, line 86
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?(:'checkboxTabs')
    if (value = attributes[:'checkboxTabs']).is_a?(Array)
      self.checkbox_tabs = value
    end
  end

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'zipTabs')
    if (value = attributes[:'zipTabs']).is_a?(Array)
      self.zip_tabs = value
    end
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/docusign_esign/models/prefill_tabs.rb, line 68
def self.swagger_types
  {
    :'checkbox_tabs' => :'Array<Checkbox>',
    :'date_tabs' => :'Array<DocuSign_eSign::Date>',
    :'email_tabs' => :'Array<Email>',
    :'number_tabs' => :'Array<Number>',
    :'radio_group_tabs' => :'Array<RadioGroup>',
    :'sender_company_tabs' => :'Array<SenderCompany>',
    :'sender_name_tabs' => :'Array<SenderName>',
    :'ssn_tabs' => :'Array<Ssn>',
    :'tab_groups' => :'Array<TabGroup>',
    :'text_tabs' => :'Array<Text>',
    :'zip_tabs' => :'Array<Zip>'
  }
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/prefill_tabs.rb, line 174
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      checkbox_tabs == o.checkbox_tabs &&
      date_tabs == o.date_tabs &&
      email_tabs == o.email_tabs &&
      number_tabs == o.number_tabs &&
      radio_group_tabs == o.radio_group_tabs &&
      sender_company_tabs == o.sender_company_tabs &&
      sender_name_tabs == o.sender_name_tabs &&
      ssn_tabs == o.ssn_tabs &&
      tab_groups == o.tab_groups &&
      text_tabs == o.text_tabs &&
      zip_tabs == o.zip_tabs
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/prefill_tabs.rb, line 226
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/prefill_tabs.rb, line 292
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/prefill_tabs.rb, line 205
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/prefill_tabs.rb, line 192
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/prefill_tabs.rb, line 198
def hash
  [checkbox_tabs, date_tabs, email_tabs, number_tabs, radio_group_tabs, sender_company_tabs, sender_name_tabs, ssn_tabs, tab_groups, text_tabs, zip_tabs].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/prefill_tabs.rb, line 161
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/prefill_tabs.rb, line 272
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/prefill_tabs.rb, line 278
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/prefill_tabs.rb, line 266
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/prefill_tabs.rb, line 168
def valid?
  true
end