Class: VendorsService::UpdateMemoService
- Inherits:
-
BaseOperationService
- Object
- BaseOperationService
- VendorsService::UpdateMemoService
- Includes:
- DefaultErrorContainer, MoneyRails::ActionViewExtension
- Defined in:
- app/services/vendors_service/update_memo_service.rb
Instance Attribute Summary collapse
-
#reservation ⇒ Object
readonly
Returns the value of attribute reservation.
Attributes inherited from BaseOperationService
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(reservation = nil) ⇒ UpdateMemoService
constructor
A new instance of UpdateMemoService.
Methods included from DefaultErrorContainer
#error, #error_message_simple, #merge_errors
Methods inherited from BaseOperationService
Constructor Details
#initialize(reservation = nil) ⇒ UpdateMemoService
Returns a new instance of UpdateMemoService.
7 8 9 |
# File 'app/services/vendors_service/update_memo_service.rb', line 7 def initialize(reservation = nil) @reservation = reservation end |
Instance Attribute Details
#reservation ⇒ Object (readonly)
Returns the value of attribute reservation.
5 6 7 |
# File 'app/services/vendors_service/update_memo_service.rb', line 5 def reservation @reservation end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/services/vendors_service/update_memo_service.rb', line 11 def execute BUSINESS_LOGGER.set_business_context(reservation_id: reservation&.id) BUSINESS_LOGGER.info("#{self.class}: execute called") if reservation.nil? BUSINESS_LOGGER.error("#{self.class}: reservation is nil") return '' end update_tablecheck_memo if reservation.by_tablecheck? update_sevenrooms_notes if reservation.by_seven_rooms? update_bistrochat_memo if reservation.by_bistrochat? if reservation. update_weeloy_memo if reservation.by_weeloy? rescue StandardError => e = "#{self.class}: #{e.}" BUSINESS_LOGGER.error(, error: e) APMErrorHandler.report(, reservation_id: reservation&.id, error: e) end |