Exemple #1
0
 /// <summary>
 /// A function that returns a JObject based on the storeID, and orderKey
 /// </summary>
 /// <param name="storeID">The store ID of our Store</param>
 /// <param name="orderKey">The order key of our Order</param>
 /// <param name="c">The country our store is in for the API</param>
 /// <returns>A JObject representation of the XML returned by the tracker.</returns>
 public static JObject trackByOrder(string storeID, string orderKey, URLs.Country c)
 {
     return(Utils.request_XML(
                URLs.trackOrder(c)
                .Replace("{store_id}", storeID)
                .Replace("{order_key}", orderKey)));
 }
Exemple #2
0
 /// <summary>
 /// A menu object based on our data
 /// </summary>
 /// <param name="data">A JObject of all of our data gathered</param>
 /// <param name="country">The country of our Store</param>
 public Menu(JObject data, URLs.Country country)
 {
     this.variants      = JObject.Parse(data["Variants"].ToString());
     this.products      = JObject.Parse(data["Products"].ToString());
     this.coupons       = JObject.Parse(data["Coupons"].ToString());
     this.preconfigured = JObject.Parse(data["PreconfiguredProducts"].ToString());
     this.country       = country;
 }
Exemple #3
0
 /// <summary>
 /// Creates a new Address object based on all of the parameters.
 /// </summary>
 /// <param name="street">The street of this address</param>
 /// <param name="city">The city of this address</param>
 /// <param name="region">The region of this address</param>
 /// <param name="zip">The ZIP Code of this address</param>
 /// <param name="country">The Country of this address</param>
 /// <param name="method">The DeliveryMethod for this Address</param>
 public Address(string street, string city, string region, string zip, URLs.Country country, Order.deliveryMethod method)
 {
     this.Street   = street;
     this.City     = city;
     this.Region   = region;
     this.ZIP      = zip;
     this.Country  = country;
     this.delivery = method;
 }
Exemple #4
0
 /// <summary>
 /// Creates a new Store() object
 /// </summary>
 /// <param name="ID">The ID by Dominos for the store</param>
 /// <param name="array">The JObject of data about the store</param>
 /// <param name="c">The country of the story</param>
 public Store(string ID, JObject array, URLs.Country c)
 {
     this.ID      = ID;
     this.data    = array;
     this.country = c;
 }
Exemple #5
0
 /// <summary>
 /// A function that returns a JObject based on the phone number returned by the API as XML.
 /// </summary>
 /// <param name="phoneNumber">The phone number linked to the order</param>
 /// <param name="c">The country associated with the order</param>
 /// <returns>A JObject representation of the XML returned by the tracker.</returns>
 public static JObject trackByPhone(string phoneNumber, URLs.Country c)
 {
     return(Utils.request_XML(URLs.trackPhone(c).Replace("{phone}", phoneNumber)));
 }