Class: SpreeCmCommissioner::Integrations::VireakBuntham::Inventory::ExternalInventoryItemStatus
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Integrations::VireakBuntham::Inventory::ExternalInventoryItemStatus
- Includes:
- Spree::ServiceModule::Base
- Defined in:
- app/services/spree_cm_commissioner/integrations/vireak_buntham/inventory/external_inventory_item_status.rb
Overview
Fetches transaction-level status for a VET booking via GET /booking/checkTransaction. The caller passes ‘transaction_id` in options; this mirrors Larryta::ExternalInventoryItemStatus’s ‘session_token` contract.
Instance Method Summary collapse
Instance Method Details
#call(integration:, order:, options:) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/spree_cm_commissioner/integrations/vireak_buntham/inventory/external_inventory_item_status.rb', line 11 def call(integration:, order:, options:) @integration = integration @order = order @options = validate_params! item_status = fetch_item_status success(item_status: item_status) rescue SpreeCmCommissioner::Integrations::ExternalClientError => e failure(nil, e.) end |