class Creditsafe::Models::CreditRating

Public Class Methods

build(json:) click to toggle source
Calls superclass method Creditsafe::BaseModel::build
# File lib/creditsafe/models/credit_rating.rb, line 13
def self.build(json:)
  super.tap do |record|
    record.credit_limit = CurrencyValue.build(json: json.fetch(:creditLimit, {}))
    record.provider_value = ProviderValue.build(json: json.fetch(:providerValue, {}))
  end
end