Sha256: 86218238f6f12bf499c004b2df8709059dcfe3c686a32f3fcd7218de98b6b1cd
Contents?: true
Size: 1.28 KB
Versions: 5
Compression:
Stored size: 1.28 KB
Contents
# frozen_string_literal: true require 'creditsafe/base_model' require 'creditsafe/models/company_summary' require 'creditsafe/models/company_identification' require 'creditsafe/models/credit_score' require 'creditsafe/models/contact_information' module Creditsafe module Models class Report < BaseModel attributes :company_id, :language, :company_summary, :company_identification, :credit_score, :contact_information, :share_capital_structure, :directors, :directorships, :financial_statements, :local_financial_statements, :payment_data, :payment_data_extra, :negative_information, :additional_information, :other_information def self.build(json:) super.tap do |record| record.company_summary = CompanySummary.build(json: json.fetch(:companySummary, {})) record.company_identification = CompanyIdentification.build( json: json.fetch(:companyIdentification, {}) ) record.credit_score = CreditScore.build(json: json.fetch(:creditScore, {})) record.contact_information = ContactInformation.build( json: json.fetch(:contactInformation, {}) ) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems