예제 #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)));
        }
예제 #2
0
 public EventCreationParams(string key, TableBookingConfig tableBookingConfig)
 {
     Key = key;
     TableBookingConfig = tableBookingConfig;
 }
예제 #3
0
 public Event Create(string chartKey, string eventKey, TableBookingConfig tableBookingConfig, string socialDistancingRulesetKey)
 {
     return(Create(chartKey, eventKey, tableBookingConfig, socialDistancingRulesetKey, null));
 }
예제 #4
0
 public Event Create(string chartKey, string eventKey, TableBookingConfig tableBookingConfig)
 {
     return(Create(chartKey, eventKey, tableBookingConfig, null, null));
 }
예제 #5
0
 public void Update(string eventKey, string chartKey, string newEventKey, TableBookingConfig tableBookingConfig,
                    string socialDistancingRulesetKey)
 {
     Update(eventKey, chartKey, newEventKey, tableBookingConfig, socialDistancingRulesetKey, null);
 }
예제 #6
0
 public void Update(string eventKey, string chartKey, string newEventKey, TableBookingConfig tableBookingConfig)
 {
     Update(eventKey, chartKey, newEventKey, tableBookingConfig, null);
 }