Class: Tablecheck::Blockages::Detail
- Inherits:
-
Object
- Object
- Tablecheck::Blockages::Detail
- Includes:
- DefaultErrorContainer, ApiHelpers
- Defined in:
- app/services/tablecheck/blockages/detail.rb
Instance Attribute Summary collapse
-
#blockage_id ⇒ Object
readonly
Returns the value of attribute blockage_id.
Instance Method Summary collapse
-
#initialize(blockage_id) ⇒ Detail
constructor
A new instance of Detail.
- #show ⇒ Object
Methods included from DefaultErrorContainer
#error, #error_message_simple, #merge_errors
Methods included from ApiHelpers
#api_call, #channel, #find_tablecheck_vendor_application, #get_purpose, #headers, #parse_phone_number, #parse_user_or_guest_full_name, #parsed_vendor_name, #reservation_start_at, #send_error_availability_notification_to_staff
Constructor Details
#initialize(blockage_id) ⇒ Detail
Returns a new instance of Detail.
9 10 11 |
# File 'app/services/tablecheck/blockages/detail.rb', line 9 def initialize(blockage_id) @blockage_id = blockage_id end |
Instance Attribute Details
#blockage_id ⇒ Object (readonly)
Returns the value of attribute blockage_id.
7 8 9 |
# File 'app/services/tablecheck/blockages/detail.rb', line 7 def blockage_id @blockage_id end |
Instance Method Details
#show ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/services/tablecheck/blockages/detail.rb', line 13 def show errors.clear result = show_blockage(blockage_id) unless result.success? = result. errors.add(:base, ) return ServiceResult.new errors: errors, message: end ServiceResult.new data: result.data end |