Sha256: 681494d6f910bf4f46f437a720bf09615103c04642800ead49e6c43923cf27f8

Contents?: true

Size: 532 Bytes

Versions: 4

Compression:

Stored size: 532 Bytes

Contents

module InvestecOpenApi::Models
  class Account < Base
    attribute :id
    attribute :number
    attribute :name
    attribute :reference_name
    attribute :product_name

    def self.from_api(params = {})
      if params['accountId'].present?
        params['id'] = params['accountId']
      end

      if params['accountNumber'].present?
        params['number'] = params['accountNumber']
      end

      if params['accountName'].present?
        params['name'] = params['accountName']
      end

      super
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
investec_open_api-1.1.1 lib/investec_open_api/models/account.rb
investec_open_api-1.1.0 lib/investec_open_api/models/account.rb
investec_open_api-1.0.1 lib/investec_open_api/models/account.rb
investec_open_api-1.0.0 lib/investec_open_api/models/account.rb