Class: Externals::Omise::Customer

Inherits:
ApplicationRecord show all
Defined in:
app/models/externals/omise/customer.rb

Overview

typed: ignore frozen_string_literal: true

Instance Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Instance Method Details

#charged_amount(charged_reservation) ⇒ Object

validates :reservation, presence: true



17
18
19
# File 'app/models/externals/omise/customer.rb', line 17

def charged_amount(charged_reservation)
  charges.where(reservation: charged_reservation).map(&:amount).sum
end