class NucleusApi::AggregationAccount

Aggregation Account Object

Attributes

account_category_id[RW]

accountCategoryId

account_holder[RW]

accountHolder

account_name[RW]

accountName

account_number[RW]
apr[RW]

apr

apy[RW]

apy

business_id[RW]

businessId

category[RW]

category

client_id[RW]

clientId

create_date[RW]
credit_limit[RW]

creditLimit

currency_code[RW]

currencyCode

death_benefit[RW]

deathBenefit

financial_offer_id[RW]

financialOfferId

id[RW]
institution_id[RW]

institutionId

institution_name[RW]

institutionName

interest_rate[RW]

interestRate

is_active[RW]

isActive

is_asset[RW]
is_business[RW]
is_cash[RW]
is_investment[RW]
is_manual[RW]

isManual

last_payment[RW]

lastPayment

last_payment_date[RW]

lastPaymentDate

mask[RW]

mask

maturity_date[RW]

maturityDate

metadata[RW]
minimum_payment[RW]

minimumPayment

next_payment_date[RW]

nextPaymentDate

secondary_id[RW]
subcategory[RW]

subcategory

update_date[RW]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/nucleus_api/models/aggregation_account.rb, line 117
def self.attribute_map
  {
    :'account_category_id' => :'account_category_id',
    :'account_holder' => :'account_holder',
    :'account_name' => :'account_name',
    :'account_number' => :'account_number',
    :'apr' => :'apr',
    :'apy' => :'apy',
    :'bank_link_id' => :'bank_link_id',
    :'business_id' => :'business_id',
    :'category' => :'category',
    :'client_id' => :'client_id',
    :'create_date' => :'create_date',
    :'credit_limit' => :'credit_limit',
    :'currency_code' => :'currency_code',
    :'death_benefit' => :'death_benefit',
    :'financial_offer_id' => :'financial_offer_id',
    :'id' => :'id',
    :'institution_id' => :'institution_id',
    :'institution_name' => :'institution_name',
    :'interest_rate' => :'interest_rate',
    :'is_active' => :'is_active',
    :'is_asset' => :'is_asset',
    :'is_business' => :'is_business',
    :'is_cash' => :'is_cash',
    :'is_investment' => :'is_investment',
    :'is_link_verified' => :'is_link_verified',
    :'is_manual' => :'is_manual',
    :'last_payment' => :'last_payment',
    :'last_payment_date' => :'last_payment_date',
    :'mask' => :'mask',
    :'maturity_date' => :'maturity_date',
    :'metadata' => :'metadata',
    :'minimum_payment' => :'minimum_payment',
    :'next_payment_date' => :'next_payment_date',
    :'secondary_id' => :'secondary_id',
    :'subcategory' => :'subcategory',
    :'update_date' => :'update_date'
  }
end
new(attributes = {}) click to toggle source

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

# File lib/nucleus_api/models/aggregation_account.rb, line 202
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?(:'account_category_id')
    self.account_category_id = attributes[:'account_category_id']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Attribute type mapping.

# File lib/nucleus_api/models/aggregation_account.rb, line 159
def self.swagger_types
  {
    :'account_category_id' => :'String',
    :'account_holder' => :'String',
    :'account_name' => :'String',
    :'account_number' => :'String',
    :'apr' => :'Float',
    :'apy' => :'Float',
    :'bank_link_id' => :'String',
    :'business_id' => :'String',
    :'category' => :'String',
    :'client_id' => :'String',
    :'create_date' => :'DateTime',
    :'credit_limit' => :'Float',
    :'currency_code' => :'String',
    :'death_benefit' => :'Float',
    :'financial_offer_id' => :'String',
    :'id' => :'String',
    :'institution_id' => :'String',
    :'institution_name' => :'String',
    :'interest_rate' => :'Float',
    :'is_active' => :'BOOLEAN',
    :'is_asset' => :'BOOLEAN',
    :'is_business' => :'BOOLEAN',
    :'is_cash' => :'BOOLEAN',
    :'is_investment' => :'BOOLEAN',
    :'is_link_verified' => :'BOOLEAN',
    :'is_manual' => :'BOOLEAN',
    :'last_payment' => :'Float',
    :'last_payment_date' => :'DateTime',
    :'mask' => :'String',
    :'maturity_date' => :'DateTime',
    :'metadata' => :'Hash<String, String>',
    :'minimum_payment' => :'Float',
    :'next_payment_date' => :'DateTime',
    :'secondary_id' => :'String',
    :'subcategory' => :'String',
    :'update_date' => :'DateTime'
  }
end

Public Instance Methods

==(o) click to toggle source

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

# File lib/nucleus_api/models/aggregation_account.rb, line 381
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      account_category_id == o.account_category_id &&
      account_holder == o.account_holder &&
      account_name == o.account_name &&
      account_number == o.account_number &&
      apr == o.apr &&
      apy == o.apy &&
      bank_link_id == o.bank_link_id &&
      business_id == o.business_id &&
      category == o.category &&
      client_id == o.client_id &&
      create_date == o.create_date &&
      credit_limit == o.credit_limit &&
      currency_code == o.currency_code &&
      death_benefit == o.death_benefit &&
      financial_offer_id == o.financial_offer_id &&
      id == o.id &&
      institution_id == o.institution_id &&
      institution_name == o.institution_name &&
      interest_rate == o.interest_rate &&
      is_active == o.is_active &&
      is_asset == o.is_asset &&
      is_business == o.is_business &&
      is_cash == o.is_cash &&
      is_investment == o.is_investment &&
      is_link_verified == o.is_link_verified &&
      is_manual == o.is_manual &&
      last_payment == o.last_payment &&
      last_payment_date == o.last_payment_date &&
      mask == o.mask &&
      maturity_date == o.maturity_date &&
      metadata == o.metadata &&
      minimum_payment == o.minimum_payment &&
      next_payment_date == o.next_payment_date &&
      secondary_id == o.secondary_id &&
      subcategory == o.subcategory &&
      update_date == o.update_date
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/nucleus_api/models/aggregation_account.rb, line 456
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    (value)
  when :Date
    (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 = NucleusApi.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/nucleus_api/models/aggregation_account.rb, line 522
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/nucleus_api/models/aggregation_account.rb, line 437
def build_from_hash(attributes)
  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/nucleus_api/models/aggregation_account.rb, line 424
def eql?(o)
  self == o
end
hash() click to toggle source

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

# File lib/nucleus_api/models/aggregation_account.rb, line 430
def hash
  [account_category_id, account_holder, account_name, account_number, apr, apy, bank_link_id, business_id, category, client_id, create_date, credit_limit, currency_code, death_benefit, financial_offer_id, id, institution_id, institution_name, interest_rate, is_active, is_asset, is_business, is_cash, is_investment, is_link_verified, is_manual, last_payment, last_payment_date, mask, maturity_date, metadata, minimum_payment, next_payment_date, secondary_id, subcategory, update_date].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/nucleus_api/models/aggregation_account.rb, line 357
def list_invalid_properties
  invalid_properties = Array.new
  if @account_name.nil?
    invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
  end

  if @institution_name.nil?
    invalid_properties.push('invalid value for "institution_name", institution_name cannot be nil.')
  end

  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/nucleus_api/models/aggregation_account.rb, line 503
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/nucleus_api/models/aggregation_account.rb, line 509
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    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/nucleus_api/models/aggregation_account.rb, line 497
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/nucleus_api/models/aggregation_account.rb, line 372
def valid?
  return false if @account_name.nil?
  return false if @category.nil?
  return false if @institution_name.nil?
  true
end