Exemplo n.º 1
0
        public Event Create(string chartKey, string eventKey, TableBookingConfig tableBookingConfig, string socialDistancingRulesetKey, Dictionary <string, object> objectCategories)
        {
            Dictionary <string, object> requestBody = new Dictionary <string, object>();

            requestBody.Add("chartKey", chartKey);

            if (eventKey != null)
            {
                requestBody.Add("eventKey", eventKey);
            }

            if (tableBookingConfig != null)
            {
                requestBody.Add("tableBookingConfig", tableBookingConfig.AsJsonObject());
            }

            if (socialDistancingRulesetKey != null)
            {
                requestBody.Add("socialDistancingRulesetKey", socialDistancingRulesetKey);
            }

            if (objectCategories != null)
            {
                requestBody.Add("objectCategories", objectCategories);
            }

            var restRequest = new RestRequest("/events", Method.POST).AddJsonBody(requestBody);

            return(AssertOk(_restClient.Execute <Event>(restRequest)));
        }
Exemplo n.º 2
0
 public EventCreationParams(string key, TableBookingConfig tableBookingConfig)
 {
     Key = key;
     TableBookingConfig = tableBookingConfig;
 }
Exemplo n.º 3
0
 public Event Create(string chartKey, string eventKey, TableBookingConfig tableBookingConfig, string socialDistancingRulesetKey)
 {
     return(Create(chartKey, eventKey, tableBookingConfig, socialDistancingRulesetKey, null));
 }
Exemplo n.º 4
0
 public Event Create(string chartKey, string eventKey, TableBookingConfig tableBookingConfig)
 {
     return(Create(chartKey, eventKey, tableBookingConfig, null, null));
 }
Exemplo n.º 5
0
 public void Update(string eventKey, string chartKey, string newEventKey, TableBookingConfig tableBookingConfig,
                    string socialDistancingRulesetKey)
 {
     Update(eventKey, chartKey, newEventKey, tableBookingConfig, socialDistancingRulesetKey, null);
 }
Exemplo n.º 6
0
 public void Update(string eventKey, string chartKey, string newEventKey, TableBookingConfig tableBookingConfig)
 {
     Update(eventKey, chartKey, newEventKey, tableBookingConfig, null);
 }