PHP code example of sapioweb / omnivore
1. Go to this page and download the library: Download sapioweb/omnivore library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sapioweb / omnivore example snippets
function locationList()
{
$this->omnivoreGeneral = new OmnivoreGeneral;
$this->omnivoreTickets = new OmnivoreTickets;
$this->omnivoreTables = new OmnivoreTables;
}
$ticketList = $this->omnivoreTickets->ticketList($locationId)
return response()->json($ticketList);
$ticketOpen = $this->omnivoreTickets->ticketOpen($locationId, $content)
return response()->json($ticketOpen);
$ticketRetrieve = $this->omnivoreTickets->ticketRetrieve($locationId, $ticketId);
return response()->json($ticketRetrieve);
$ticketVoid = $this->omnivoreTickets->ticketVoid($locationId, $ticketId)
return response()->json($ticketVoid);
$ticketDiscountList = $this->omnivoreTickets->ticketDiscountList($locationId, $ticketId)
return response()->json($ticketDiscountList);
$ticketDiscountApply = $this->omnivoreTickets->ticketDiscountApply($locationId, $ticketId, $discount, $value)
return response()->json($ticketDiscountApply);
$ticketDiscountRetrieve = $this->omnivoreTickets->ticketDiscountRetrieve($locationId, $ticketId, $ticketDiscountId)
return response()->json($ticketDiscountRetrieve);
$ticketItemList = $this->omnivoreTickets->ticketItemList($locationId, $ticketId)
return response()->json($ticketItemList);
$ticketItemAdd = $this->omnivoreTickets->ticketItemAdd($locationId, $ticketId, $content)
return response()->json($ticketItemAdd);
$ticketItemRetrieve = $this->omnivoreTickets->ticketItemRetrieve($locationId, $ticketId, $ticketItemId)
return response()->json($ticketItemRetrieve);
$ticketItemVoid = $this->omnivoreTickets->ticketItemVoid($locationId, $ticketId, $ticketItemId)
return response()->json($ticketItemVoid);
$ticketItemModifierList = $this->omnivoreTickets->ticketItemModifierList($locationId, $ticketId, $ticketItemId)
return response()->json($ticketItemModifierList);
$ticketItemModifierRetrieve = $this->omnivoreTickets->ticketItemModifierRetrieve($locationId, $ticketId, $ticketItemId, $ticketItemModifierId)
return response()->json($ticketItemModifierRetrieve);
$ticketItemDiscountList = $this->omnivoreTickets->ticketItemDiscountList($locationId, $ticketId, $ticketItemId)
return response()->json($ticketItemDiscountList);
$ticketItemDiscountRetrieve = $this->omnivoreTickets->ticketItemDiscountRetrieve($locationId, $ticketId, $ticketItemId, $ticketItemDiscountId)
return response()->json($ticketItemDiscountRetrieve);
$paymentList = $this->omnivoreTickets->paymentList($locationId, $ticketId)
return response()->json($paymentList);
$paymentRetrieve = $this->omnivoreTickets->paymentRetrieve($locationId, $ticketId, $paymentId)
return response()->json($paymentRetrieve);
$paymentCardNotPresent = $this->omnivoreTickets->paymentCardNotPresent($locationId, $ticketId, $content)
return response()->json($paymentCardNotPresent);
$paymentCardPresent = $this->omnivoreTickets->paymentCardPresent($locationId, $ticketId, $content)
return response()->json($paymentCardPresent);
$payment3rdParty = $this->omnivoreTickets->payment3rdParty($locationId, $ticketId, $content)
return response()->json($payment3rdParty);
$paymentGiftCard = $this->omnivoreTickets->paymentGiftCard($locationId, $ticketId, $content)
return response()->json($paymentGiftCard);
$paymentCash = $this->omnivoreTickets->paymentCash($locationId, $ticketId, $content)
return response()->json($paymentCash);
$tableList = $this->omnivoreTables->tableList($locationId)
return response()->json($tableList);
$tableRetrieve = $this->omnivoreTables->tableRetrieve($locationId, $tableId)
return response()->json($tableRetrieve);
$locations = $this->omnivoreGeneral->locationList();
return response()->json($locations);
$locationRetrieve = $this->omnivoreGeneral->locationRetrieve($locationId)
return response()->json($locationRetrieve);
$employeeList = $this->omnivoreGeneral->employeeList($locationId)
return response()->json($employeeList);
$employeeRetrieve = $this->omnivoreGeneral->employeeRetrieve($locationId, $employeeId)
return response()->json($employeeRetrieve);
$orderTypeList = $this->omnivoreGeneral->orderTypeList($locationId)
return response()->json($orderTypeList);
$orderTypeRetrieve = $this->omnivoreGeneral->orderTypeRetrieve($locationId, $orderTypeId)
return response()->json($orderTypeRetrieve);
$tenderTypeList = $this->omnivoreGeneral->tenderTypeList($locationId)
return response()->json($tenderTypeList);
$tenderTypeRetrieve = $this->omnivoreGeneral->tenderTypeRetrieve($locationId, $tenderTypeId)
return response()->json($tenderTypeRetrieve);
$revenueCenterList = $this->omnivoreGeneral->revenueCenterList($locationId)
return response()->json($revenueCenterList);
$revenueCenterRetrieve = $this->omnivoreGeneral->revenueCenterRetrieve($locationId, $revenueCenterId)
return response()->json($revenueCenterRetrieve);
$discountList = $this->omnivoreGeneral->discountList($locationId)
return response()->json($discountList);
$discountRetrieve = $this->omnivoreGeneral->discountRetrieve($locationId, $discountId)
return response()->json($discountRetrieve);
$menu = $this->omnivoreGeneral->menu($locationId)
return response()->json($menu);
$categoryList = $this->omnivoreGeneral->categoryList($locationId)
return response()->json($categoryList);
$categoryRetrieve = $this->omnivoreGeneral->categoryRetrieve($locationId, $categoryId)
return response()->json($categoryRetrieve);
$menuItemList = $this->omnivoreGeneral->menuItemList($locationId)
return response()->json($menuItemList);
$menuItemRetrieve = $this->omnivoreGeneral->menuItemRetrieve($locationId, $menuItemId)
return response()->json($menuItemRetrieve);
$modifierList = $this->omnivoreGeneral->modifierList($locationId)
return response()->json($modifierList);
$modifierRetrieve = $this->omnivoreGeneral->modifierRetrieve($locationId, $modifierId)
return response()->json($modifierRetrieve);
$modifierGroupList = $this->omnivoreGeneral->modifierGroupList($locationId, $menuItemId)
return response()->json($modifierGroupList);
$modifierGroupRetrieve = $this->omnivoreGeneral->modifierGroupRetrieve($locationId, $menuItemId, $modifierGroupId)
return response()->json($modifierGroupRetrieve);