Module: SuperGood::SolidusTaxjar::Spree::OrderOverride

Defined in:
app/overrides/super_good/solidus_taxjar/spree/order_override.rb

Class Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/overrides/super_good/solidus_taxjar/spree/order_override.rb', line 5

def self.prepended(base)
  base.has_many :taxjar_order_transactions,
    class_name: "SuperGood::SolidusTaxjar::OrderTransaction",
    dependent: :destroy,
    inverse_of: :order

  base.has_many :taxjar_transaction_sync_logs,
    -> { order(:created_at) },
    class_name: "SuperGood::SolidusTaxjar::TransactionSyncLog",
    inverse_of: :order
end