Class: QuickbooksCustomerInvoicesPollJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- QuickbooksCustomerInvoicesPollJob
- Defined in:
- app/jobs/quickbooks_customer_invoices_poll_job.rb
Overview
QuickbooksCustomerInvoicesPollJob fetches and processes invoices for a specific customer from QuickBooks
This job retrieves all invoices for a given customer from QuickBooks and then enqueues a QuickbooksInvoiceHeaderResolverJob for each invoice to process it asynchronously. It also handles error conditions and logs information about the polling process.
This job is typically triggered after a customer is synchronized or as part of a scheduled polling process.
Instance Attribute Summary collapse
-
#company_id ⇒ Object
readonly
Returns the value of attribute company_id.
-
#customer_code ⇒ Object
readonly
Returns the value of attribute customer_code.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
Instance Method Summary collapse
-
#perform(company_id:, customer_id:, customer_code:) ⇒ void
Performs the invoice polling process for a specific customer.
Instance Attribute Details
#company_id ⇒ Object (readonly)
Returns the value of attribute company_id.
21 22 23 |
# File 'app/jobs/quickbooks_customer_invoices_poll_job.rb', line 21 def company_id @company_id end |
#customer_code ⇒ Object (readonly)
Returns the value of attribute customer_code.
21 22 23 |
# File 'app/jobs/quickbooks_customer_invoices_poll_job.rb', line 21 def customer_code @customer_code end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
21 22 23 |
# File 'app/jobs/quickbooks_customer_invoices_poll_job.rb', line 21 def customer_id @customer_id end |
Instance Method Details
#perform(company_id:, customer_id:, customer_code:) ⇒ void
This method returns an undefined value.
Performs the invoice polling process for a specific customer
29 30 31 32 33 34 35 |
# File 'app/jobs/quickbooks_customer_invoices_poll_job.rb', line 29 def perform(company_id:, customer_id:, customer_code:) @company_id = company_id @customer_id = customer_id @customer_code = customer_code resolve_invoices end |