class Wire4Client::MessageDepositReceived

Es el objeto del mensaje que se envía mediante webhook con la información de una transferencia de entrada recibida.

Attributes

amount[RW]

Es el monto de la transferencia.

beneficiary_account[RW]

Es la cuenta del beneficiario.

beneficiary_name[RW]

Es el nombre del beneficiario.

beneficiary_rfc[RW]

Es el Registro Federal de Contribuyentes (RFC) del beneficiario.

cep[RW]

Es el objeto que contiene la informacion del CEP.

clave_rastreo[RW]

Es la clave de rastreo de la transferencia.

confirm_date[RW]

Es la Fecha de confirmación de la transferencia.

currency_code[RW]

Es el código de divisa de la transferencia. Es en el formato estándar ISO 4217 y es de 3 dígitos. Puede ser "MXN" o "USD".

deposit_date[RW]

Es la fecha de recepción de la transferencia.

depositant[RW]

Es el nombre del depositante en caso de que la transferencia se reciba en una cuenta de depositante.

depositant_alias[RW]

Es el alias de la cuenta CLABE del depositante en caso que la transferencia se reciba de una cuenta de depositante

depositant_clabe[RW]

Es la cuenta CLABE del depositante en caso que la transferencia se reciba en una cuenta de depositante

depositant_email[RW]

Es el Correo electrónico (email) del depositante en caso que la transferencia se reciba en una cuenta de depositante

depositant_rfc[RW]

Es el Registro Federal de Contribuyentes (RFC) del depositante, en caso que la transferencia se reciba en una cuenta de depositante.

description[RW]

Es el concepto de la transferencia.

monex_description[RW]

Es la descripción de Monex para la transferencia.

monex_transaction_id[RW]

Es el identificador asignado por Monex a la transferencia.

reference[RW]

Es la referecia de la transferencia.

sender_account[RW]

Es la cuenta del ordenante que podría ser un número celular (10 dígitos), una tarjeta de débito (TDD, de 16 dígitos) o Cuenta CLABE interbancaria (18 dígitos).

sender_bank[RW]

Es el objeto con información del banco del ordenante.

sender_name[RW]

Es el nombre del ordenante.

sender_rfc[RW]

Es el Registro Federal de Contribuyente (RFC) del ordenante.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/wire4_client/models/message_deposit_received.rb, line 85
def self.attribute_map
  {
    :'amount' => :'amount',
    :'beneficiary_account' => :'beneficiary_account',
    :'beneficiary_name' => :'beneficiary_name',
    :'beneficiary_rfc' => :'beneficiary_rfc',
    :'cep' => :'cep',
    :'clave_rastreo' => :'clave_rastreo',
    :'confirm_date' => :'confirm_date',
    :'currency_code' => :'currency_code',
    :'deposit_date' => :'deposit_date',
    :'depositant' => :'depositant',
    :'depositant_alias' => :'depositant_alias',
    :'depositant_clabe' => :'depositant_clabe',
    :'depositant_email' => :'depositant_email',
    :'depositant_rfc' => :'depositant_rfc',
    :'description' => :'description',
    :'monex_description' => :'monex_description',
    :'monex_transaction_id' => :'monex_transaction_id',
    :'reference' => :'reference',
    :'sender_account' => :'sender_account',
    :'sender_bank' => :'sender_bank',
    :'sender_name' => :'sender_name',
    :'sender_rfc' => :'sender_rfc'
  }
end
new(attributes = {}) click to toggle source

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

# File lib/wire4_client/models/message_deposit_received.rb, line 142
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?(:'amount')
    self.amount = attributes[:'amount']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Attribute type mapping.

# File lib/wire4_client/models/message_deposit_received.rb, line 113
def self.swagger_types
  {
    :'amount' => :'Float',
    :'beneficiary_account' => :'String',
    :'beneficiary_name' => :'String',
    :'beneficiary_rfc' => :'String',
    :'cep' => :'MessageCEP',
    :'clave_rastreo' => :'String',
    :'confirm_date' => :'DateTime',
    :'currency_code' => :'String',
    :'deposit_date' => :'DateTime',
    :'depositant' => :'String',
    :'depositant_alias' => :'String',
    :'depositant_clabe' => :'String',
    :'depositant_email' => :'String',
    :'depositant_rfc' => :'String',
    :'description' => :'String',
    :'monex_description' => :'String',
    :'monex_transaction_id' => :'String',
    :'reference' => :'String',
    :'sender_account' => :'String',
    :'sender_bank' => :'MessageInstitution',
    :'sender_name' => :'String',
    :'sender_rfc' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

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

# File lib/wire4_client/models/message_deposit_received.rb, line 252
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      amount == o.amount &&
      beneficiary_account == o.beneficiary_account &&
      beneficiary_name == o.beneficiary_name &&
      beneficiary_rfc == o.beneficiary_rfc &&
      cep == o.cep &&
      clave_rastreo == o.clave_rastreo &&
      confirm_date == o.confirm_date &&
      currency_code == o.currency_code &&
      deposit_date == o.deposit_date &&
      depositant == o.depositant &&
      depositant_alias == o.depositant_alias &&
      depositant_clabe == o.depositant_clabe &&
      depositant_email == o.depositant_email &&
      depositant_rfc == o.depositant_rfc &&
      description == o.description &&
      monex_description == o.monex_description &&
      monex_transaction_id == o.monex_transaction_id &&
      reference == o.reference &&
      sender_account == o.sender_account &&
      sender_bank == o.sender_bank &&
      sender_name == o.sender_name &&
      sender_rfc == o.sender_rfc
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/wire4_client/models/message_deposit_received.rb, line 315
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 = Wire4Client.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/wire4_client/models/message_deposit_received.rb, line 381
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/wire4_client/models/message_deposit_received.rb, line 294
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 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/wire4_client/models/message_deposit_received.rb, line 281
def eql?(o)
  self == o
end
hash() click to toggle source

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

# File lib/wire4_client/models/message_deposit_received.rb, line 287
def hash
  [amount, beneficiary_account, beneficiary_name, beneficiary_rfc, cep, clave_rastreo, confirm_date, currency_code, deposit_date, depositant, depositant_alias, depositant_clabe, depositant_email, depositant_rfc, description, monex_description, monex_transaction_id, reference, sender_account, sender_bank, sender_name, sender_rfc].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/wire4_client/models/message_deposit_received.rb, line 239
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/wire4_client/models/message_deposit_received.rb, line 361
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/wire4_client/models/message_deposit_received.rb, line 367
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/wire4_client/models/message_deposit_received.rb, line 355
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/wire4_client/models/message_deposit_received.rb, line 246
def valid?
  true
end