Class: CreditGateway::BankSubject

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/credit_gateway/bank_subject.rb

Class Method Summary collapse

Methods inherited from BaseModel

#as_json, attribute_aliases, attributes, #initialize, key_transformer

Constructor Details

This class inherits a constructor from CreditGateway::BaseModel

Class Method Details

.build(json:) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/credit_gateway/bank_subject.rb', line 10

def self.build(json:)
  super.tap do |record|
    if record.creation_date_time
      record.creation_date_time = Time.parse(record.creation_date_time)
    end
    if record.status_update_date_time
      record.status_update_date_time = Time.parse(record.status_update_date_time)
    end
  end
end