コード例 #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);
 }