Class: Spree::Admin::TransactionSyncBatchesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/transaction_sync_batches_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



12
13
14
15
# File 'app/controllers/spree/admin/transaction_sync_batches_controller.rb', line 12

def create
  batch = ::SuperGood::SolidusTaxjar::BackfillTransactions.new.call(start_date: params[:start_date], end_date: params[:end_date])
  redirect_to spree.admin_transaction_sync_batch_path(batch)
end

#indexObject



4
5
6
# File 'app/controllers/spree/admin/transaction_sync_batches_controller.rb', line 4

def index
  @batches = SuperGood::SolidusTaxjar::TransactionSyncBatch.all.page(params[:page]).per(params[:per_page])
end

#showObject



8
9
10
# File 'app/controllers/spree/admin/transaction_sync_batches_controller.rb', line 8

def show
  @batch = SuperGood::SolidusTaxjar::TransactionSyncBatch.find(params[:id])
end