Class: CloverSandboxSimulator::Services::BaseService
- Inherits:
-
Object
- Object
- CloverSandboxSimulator::Services::BaseService
- Defined in:
- lib/clover_sandbox_simulator/services/base_service.rb
Overview
Base service for all API interactions Provides HTTP client, logging, and error handling
Direct Known Subclasses
Clover::CashEventService, Clover::CustomerService, Clover::DiscountService, Clover::EcommerceService, Clover::EmployeeService, Clover::GiftCardService, Clover::InventoryService, Clover::OauthService, Clover::OrderService, Clover::OrderTypeService, Clover::PaymentService, Clover::RefundService, Clover::ServiceChargeService, Clover::ShiftService, Clover::TaxService, Clover::TenderService
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(config: nil) ⇒ BaseService
constructor
A new instance of BaseService.
Constructor Details
#initialize(config: nil) ⇒ BaseService
Returns a new instance of BaseService.
10 11 12 13 14 |
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 10 def initialize(config: nil) @config = config || CloverSandboxSimulator.configuration @config.validate! @logger = @config.logger end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 8 def config @config end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/clover_sandbox_simulator/services/base_service.rb', line 8 def logger @logger end |