adding order redirect entity and action proto samples
diff --git a/order-redirect/php/ActionFeedExample.php b/order-redirect/php/ActionFeedExample.php
new file mode 100644
index 0000000..83558d2
--- /dev/null
+++ b/order-redirect/php/ActionFeedExample.php
@@ -0,0 +1,59 @@
+<?php
+/*
+Example Action feed for Google Order Redirect.
+*/
+
+require dirname(__FILE__).'/vendor/autoload.php';
+
+use Madden\Ingestion\ActionFeed;
+use Madden\Ingestion\ActionDetail;
+use Madden\Ingestion\Action;
+use Madden\Ingestion\FoodOrderingInfo;
+use Madden\Ingestion\FoodOrderingInfo\ServiceType;
+
+function createFeed() {
+ // Create ActionDetail by passing the fields to the constructor
+ $actions = array(
+ // Example using one link for both takeout and delivery
+ new ActionDetail([
+ 'entity_id' => 'merchant-1',
+ 'link_id' => 'merchant-1-takeout-delivery-action',
+ 'actions' => array(
+ new Action([
+ 'food_ordering_info' => new FoodOrderingInfo([
+ 'service_type' => ServiceType::DELIVERY
+ ])
+ ]),
+ new Action([
+ 'food_ordering_info' => new FoodOrderingInfo([
+ 'service_type' => ServiceType::TAKEOUT
+ ])
+ ])
+ ),
+ 'url' => 'http://provider.com/merchant-1'
+ ]),
+ // Example using a separate link for delivery
+ new ActionDetail([
+ 'entity_id' => 'merchant-2',
+ 'link_id' => 'merchant-2-delivery-action',
+ 'actions' => array(
+ new Action([
+ 'food_ordering_info' => new FoodOrderingInfo([
+ 'service_type' => ServiceType::DELIVERY
+ ])
+ ])
+ ),
+ 'url' => 'http://provider.com/merchant-2/delivery'
+ ])
+ );
+
+ // Add ActionDetail array to feed data
+ $feed = new ActionFeed();
+ $feed->setData($actions);
+
+ // Serialize to JSON
+ return $feed->serializeToJsonString();
+}
+
+$feedJSON = createFeed();
+echo $feedJSON;
diff --git a/order-redirect/php/EntityFeedExample.php b/order-redirect/php/EntityFeedExample.php
new file mode 100644
index 0000000..f6ac3c8
--- /dev/null
+++ b/order-redirect/php/EntityFeedExample.php
@@ -0,0 +1,43 @@
+<?php
+/*
+Example Entity feed for Google Order Redirect.
+*/
+
+require dirname(__FILE__).'/vendor/autoload.php';
+
+use Madden\Ingestion\EntityFeed;
+use Madden\Ingestion\Entity;
+use Madden\Ingestion\GeoCoordinates;
+use Madden\Ingestion\PostalAddress;
+
+
+function createFeed() {
+ // Create Entity by using setter methods
+ $entity = new Entity();
+ $entity->setEntityId("merchant-1");
+ $entity->setName("Mo's Dinner");
+ $entity->setTelephone("+14567891234");
+ $entity->setUrl("http://moesdinner.com");
+ $entityLocation = new GeoCoordinates();
+ $entityLocation->setLatitude(41.525588);
+ $entityLocation->setLongitude(-90.507067);
+ $entity->setLocation($entityLocation);
+ $entityAddress = new PostalAddress();
+ $entityAddress->setCountry("US");
+ $entityAddress->setLocality("Mountain View");
+ $entityAddress->setRegion("CA");
+ $entityAddress->setPostalCode("94043");
+ $entityAddress->setStreetAddress("1600 Amphitheatre Pkwy");
+ $entityLocation->setAddress($entityAddress);
+
+ # Add Entity to feed data
+ $feed = new EntityFeed();
+ $feed->setData(array($entity));
+
+ # Serialize to JSON
+ return $feed->serializeToJsonString();
+}
+
+$feedJSON = createFeed();
+echo $feedJSON;
+
diff --git a/order-redirect/php/composer.json b/order-redirect/php/composer.json
new file mode 100644
index 0000000..8798557
--- /dev/null
+++ b/order-redirect/php/composer.json
@@ -0,0 +1,15 @@
+{
+ "name": "google-order-redirect/php-demo",
+ "description": "proto example for PHP",
+ "require": {
+ "google/protobuf": "^v3.12.2"
+ },
+ "autoload": {
+ "psr-4": {
+ "Madden\\": "build/gen/Madden",
+ "GPBMetadata\\": "build/gen/GPBMetadata/",
+ "Food\\": "build/gen/Food",
+ "Google\\": "build/gen/Google"
+ }
+ }
+ }
\ No newline at end of file
diff --git a/order-redirect/php/composer.lock b/order-redirect/php/composer.lock
new file mode 100644
index 0000000..0eba1e6
--- /dev/null
+++ b/order-redirect/php/composer.lock
@@ -0,0 +1,63 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "724b35a1604b000b76542b5f31d8cb69",
+ "packages": [
+ {
+ "name": "google/protobuf",
+ "version": "v3.25.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/protocolbuffers/protobuf-php.git",
+ "reference": "1fb247e72df401c863ed239c1660f981644af5db"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/1fb247e72df401c863ed239c1660f981644af5db",
+ "reference": "1fb247e72df401c863ed239c1660f981644af5db",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": ">=5.0.0"
+ },
+ "suggest": {
+ "ext-bcmath": "Need to support JSON deserialization"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Google\\Protobuf\\": "src/Google/Protobuf",
+ "GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "proto library for PHP",
+ "homepage": "https://developers.google.com/protocol-buffers/",
+ "keywords": [
+ "proto"
+ ],
+ "support": {
+ "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.1"
+ },
+ "time": "2023-11-15T21:36:03+00:00"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.6.0"
+}