Module: Vet360::Transactionable

Extended by:
ActiveSupport::Concern
Included in:
V0::Profile::PersonsController, V0::Profile::TransactionsController
Defined in:
app/controllers/concerns/vet360/transactionable.rb

Instance Method Summary collapse

Instance Method Details

#check_transaction_status!Object



11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/concerns/vet360/transactionable.rb', line 11

def check_transaction_status!
  transaction = AsyncTransaction::VAProfile::Base.refresh_transaction_status(
    @current_user,
    service,
    params[:transaction_id]
  )

  raise Common::Exceptions::RecordNotFound, transaction unless transaction

  render json: AsyncTransaction::BaseSerializer.new(transaction).serializable_hash
end

#serviceObject (private)



25
26
27
28
29
30
31
# File 'app/controllers/concerns/vet360/transactionable.rb', line 25

def service
  if Flipper.enabled?(:va_v3_contact_information_service, @current_user)
    VAProfile::V2::ContactInformation::Service.new @current_user
  else
    VAProfile::ContactInformation::Service.new @current_user
  end
end