Class: QuickbooksCustomersPollJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- QuickbooksCustomersPollJob
- Defined in:
- app/jobs/quickbooks_customers_poll_job.rb
Overview
QuickbooksCustomersPollJob fetches and processes customers from QuickBooks Online
This job connects to the QuickBooks API for a specific company, retrieves all customers, and enqueues individual resolver jobs to process each customer. It tracks the success or failure of the operation via reference events.
Example usage:
# Poll customers for a specific company with a suffix code
QuickbooksCustomersPollJob.perform_later(
company_id: 123,
suffix_code: 'QB'
)
Instance Attribute Summary collapse
-
#company_id ⇒ Object
readonly
Returns the value of attribute company_id.
-
#suffix_code ⇒ Object
readonly
Returns the value of attribute suffix_code.
Instance Method Summary collapse
-
#perform(company_id:, suffix_code:) ⇒ void
Performs the customer polling process.
Instance Attribute Details
#company_id ⇒ Object (readonly)
Returns the value of attribute company_id.
18 19 20 |
# File 'app/jobs/quickbooks_customers_poll_job.rb', line 18 def company_id @company_id end |
#suffix_code ⇒ Object (readonly)
Returns the value of attribute suffix_code.
18 19 20 |
# File 'app/jobs/quickbooks_customers_poll_job.rb', line 18 def suffix_code @suffix_code end |
Instance Method Details
#perform(company_id:, suffix_code:) ⇒ void
This method returns an undefined value.
Performs the customer polling process
25 26 27 28 29 |
# File 'app/jobs/quickbooks_customers_poll_job.rb', line 25 def perform(company_id:, suffix_code:) @company_id = company_id @suffix_code = suffix_code resolve_customers end |