class YousignClient::CheckDocumentBankAccountsOutput

Attributes

birth_name[RW]

Birth name to check on document

birth_name_valid[RW]

Defines if birth name sent in the input is valid

company_name[RW]

Company name to check on document

company_name_valid[RW]

Defines if company name sent in the input is valid

created_at[RW]

Created date of the object

creator[RW]

Creator of the object

document_type[RW]

Type of document

extracted_iban[RW]

Extracted iban on the document

first_name[RW]

Firstname to check on document

first_name_valid[RW]

Defines if one firstname sent in the input is valid

iban[RW]

Iban to check on document

iban_valid[RW]

Defines if iban sent in the input is valid

id[RW]

Id of the object

last_name[RW]

Lastname to check on document

last_name_valid[RW]

Defines if lastname sent in the input is valid

updated_at[RW]

Updated date of the object

workspace[RW]

Workspace creator of the object

Public Class Methods

attribute_map() click to toggle source

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

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 91
def self.attribute_map
  {
    :'id' => :'id',
    :'created_at' => :'createdAt',
    :'updated_at' => :'updatedAt',
    :'first_name' => :'firstName',
    :'birth_name' => :'birthName',
    :'last_name' => :'lastName',
    :'iban' => :'iban',
    :'company_name' => :'companyName',
    :'document_type' => :'documentType',
    :'workspace' => :'workspace',
    :'creator' => :'creator',
    :'extracted_iban' => :'extractedIban',
    :'first_name_valid' => :'firstNameValid',
    :'birth_name_valid' => :'birthNameValid',
    :'last_name_valid' => :'lastNameValid',
    :'company_name_valid' => :'companyNameValid',
    :'iban_valid' => :'ibanValid'
  }
end
new(attributes = {}) click to toggle source

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

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 138
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?(:'id')
    self.id = attributes[:'id']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'ibanValid')
    self.iban_valid = attributes[:'ibanValid']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 114
def self.swagger_types
  {
    :'id' => :'String',
    :'created_at' => :'DateTime',
    :'updated_at' => :'DateTime',
    :'first_name' => :'String',
    :'birth_name' => :'String',
    :'last_name' => :'String',
    :'iban' => :'String',
    :'company_name' => :'String',
    :'document_type' => :'String',
    :'workspace' => :'String',
    :'creator' => :'String',
    :'extracted_iban' => :'String',
    :'first_name_valid' => :'BOOLEAN',
    :'birth_name_valid' => :'BOOLEAN',
    :'last_name_valid' => :'BOOLEAN',
    :'company_name_valid' => :'BOOLEAN',
    :'iban_valid' => :'BOOLEAN'
  }
end

Public Instance Methods

==(o) click to toggle source

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

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 240
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      created_at == o.created_at &&
      updated_at == o.updated_at &&
      first_name == o.first_name &&
      birth_name == o.birth_name &&
      last_name == o.last_name &&
      iban == o.iban &&
      company_name == o.company_name &&
      document_type == o.document_type &&
      workspace == o.workspace &&
      creator == o.creator &&
      extracted_iban == o.extracted_iban &&
      first_name_valid == o.first_name_valid &&
      birth_name_valid == o.birth_name_valid &&
      last_name_valid == o.last_name_valid &&
      company_name_valid == o.company_name_valid &&
      iban_valid == o.iban_valid
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/yousign_client/models/check_document_bank_accounts_output.rb, line 298
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 = YousignClient.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/yousign_client/models/check_document_bank_accounts_output.rb, line 364
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/yousign_client/models/check_document_bank_accounts_output.rb, line 277
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
document_type=(document_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] document_type Object to be assigned

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 230
def document_type=(document_type)
  validator = EnumAttributeValidator.new('String', ['RIB'])
  unless validator.valid?(document_type)
    fail ArgumentError, 'invalid value for "document_type", must be one of #{validator.allowable_values}.'
  end
  @document_type = document_type
end
eql?(o) click to toggle source

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

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 264
def eql?(o)
  self == o
end
hash() click to toggle source

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

# File lib/yousign_client/models/check_document_bank_accounts_output.rb, line 270
def hash
  [id, created_at, updated_at, first_name, birth_name, last_name, iban, company_name, document_type, workspace, creator, extracted_iban, first_name_valid, birth_name_valid, last_name_valid, company_name_valid, iban_valid].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/yousign_client/models/check_document_bank_accounts_output.rb, line 215
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/yousign_client/models/check_document_bank_accounts_output.rb, line 344
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/yousign_client/models/check_document_bank_accounts_output.rb, line 350
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/yousign_client/models/check_document_bank_accounts_output.rb, line 338
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/yousign_client/models/check_document_bank_accounts_output.rb, line 222
def valid?
  document_type_validator = EnumAttributeValidator.new('String', ['RIB'])
  return false unless document_type_validator.valid?(@document_type)
  true
end