/// <summary> /// Operation: Update Switch /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/emergency-address-auto-update/switches/{switchId} /// Rate Limit Group: Heavy /// App Permission: EditAccounts /// User Permission: ConfigureEmergencyMaps /// </summary> public async Task <RingCentral.SwitchInfo> Put(RingCentral.UpdateSwitchInfo updateSwitchInfo, RestRequestConfig restRequestConfig = null) { if (this.switchId == null) { throw new System.ArgumentNullException("switchId"); } return(await rc.Put <RingCentral.SwitchInfo>(this.Path(), updateSwitchInfo, null, restRequestConfig)); }
/// <summary> /// Operation: Get Device /// HTTP Method: GET /// Endpoint: /restapi/v1.0/account/{accountId}/device/{deviceId} /// Rate Limit Group: Light /// App Permission: ReadAccounts /// User Permission: ReadCompanyDevices /// </summary> public async Task <RingCentral.GetDeviceInfoResponse> Get(ReadDeviceParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.deviceId == null) { throw new System.ArgumentNullException("deviceId"); } return(await rc.Get <RingCentral.GetDeviceInfoResponse>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Update IVR Menu /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/ivr-menus/{ivrMenuId} /// Rate Limit Group: Medium /// App Permission: ReadAccounts /// User Permission: AutoReceptionist /// </summary> public async Task <RingCentral.IVRMenuInfo> Put(RingCentral.IVRMenuInfo iVRMenuInfo, RestRequestConfig restRequestConfig = null) { if (this.ivrMenuId == null) { throw new System.ArgumentNullException("ivrMenuId"); } return(await rc.Put <RingCentral.IVRMenuInfo>(this.Path(), iVRMenuInfo, null, restRequestConfig)); }
/// <summary> /// Operation: Update Network /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/emergency-address-auto-update/networks/{networkId} /// Rate Limit Group: Heavy /// App Permission: EditAccounts /// User Permission: ConfigureEmergencyMaps /// </summary> public async Task <string> Put(RingCentral.UpdateNetworkRequest updateNetworkRequest, RestRequestConfig restRequestConfig = null) { if (this.networkId == null) { throw new System.ArgumentNullException("networkId"); } return(await rc.Put <string>(this.Path(), updateNetworkRequest, null, restRequestConfig)); }
/// <summary> /// Updates blocked or allowed phone number(s) by their ID(s). Batch request is supported. /// HTTP Method: put /// Endpoint: /// /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: EditBlockedNumbers /// </summary> public async Task <BlockedAllowedPhoneNumberInfo> Put(AddBlockedAllowedPhoneNumber addBlockedAllowedPhoneNumber, RestRequestConfig restRequestConfig = null) { if (blockedNumberId == null) { throw new ArgumentException("Parameter cannot be null", nameof(blockedNumberId)); } return(await rc.Put <BlockedAllowedPhoneNumberInfo>(Path(), addBlockedAllowedPhoneNumber, null, restRequestConfig)); }
/// <summary> /// Operation: Update Event /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/glip/events/{eventId} /// Rate Limit Group: Medium /// App Permission: Glip /// User Permission: Glip /// </summary> public async Task <RingCentral.GlipEventInfo> Put(RingCentral.GlipEventCreate glipEventCreate, RestRequestConfig restRequestConfig = null) { if (this.eventId == null) { throw new System.ArgumentNullException("eventId"); } return(await rc.Put <RingCentral.GlipEventInfo>(this.Path(), glipEventCreate, null, restRequestConfig)); }
/// <summary> /// Operation: Update Team /// HTTP Method: PATCH /// Endpoint: /restapi/v1.0/glip/teams/{chatId} /// Rate Limit Group: Medium /// App Permission: Glip /// User Permission: Glip /// </summary> public async Task <RingCentral.GlipTeamInfo> Patch(RingCentral.GlipPatchTeamBody glipPatchTeamBody, RestRequestConfig restRequestConfig = null) { if (this.chatId == null) { throw new System.ArgumentNullException("chatId"); } return(await rc.Patch <RingCentral.GlipTeamInfo>(this.Path(), glipPatchTeamBody, null, restRequestConfig)); }
/// <summary> /// Operation: Get Company Call Log Record(s) /// HTTP Method: GET /// Endpoint: /restapi/v1.0/account/{accountId}/call-log/{callRecordId} /// Rate Limit Group: Heavy /// App Permission: ReadCallLog /// User Permission: FullCompanyCallLog /// </summary> public async Task <RingCentral.CompanyCallLogRecord> Get(ReadCompanyCallRecordParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.callRecordId == null) { throw new System.ArgumentNullException("callRecordId"); } return(await rc.Get <RingCentral.CompanyCallLogRecord>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Update IVR Prompt /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts/{promptId} /// Rate Limit Group: Medium /// App Permission: EditAccounts /// User Permission: EditCompanyGreetings /// </summary> public async Task <RingCentral.PromptInfo> Put(RingCentral.UpdateIVRPromptRequest updateIVRPromptRequest, RestRequestConfig restRequestConfig = null) { if (this.promptId == null) { throw new System.ArgumentNullException("promptId"); } return(await rc.Put <RingCentral.PromptInfo>(this.Path(), updateIVRPromptRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Get Message Content /// HTTP Method: GET /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/{messageId}/content/{attachmentId} /// Rate Limit Group: Medium /// App Permission: ReadMessages /// User Permission: ReadMessageContent /// </summary> public async Task <byte[]> Get(ReadMessageContentParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.attachmentId == null) { throw new System.ArgumentNullException("attachmentId"); } return(await rc.Get <byte[]>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Update Note /// HTTP Method: PATCH /// Endpoint: /restapi/v1.0/glip/notes/{noteId} /// Rate Limit Group: Medium /// App Permission: Glip /// User Permission: Glip /// </summary> public async Task <RingCentral.GlipNoteInfo> Patch(RingCentral.GlipNoteCreate glipNoteCreate, RestRequestConfig restRequestConfig = null) { if (this.noteId == null) { throw new System.ArgumentNullException("noteId"); } return(await rc.Patch <RingCentral.GlipNoteInfo>(this.Path(), glipNoteCreate, null, restRequestConfig)); }
/// <summary> /// Operation: Patch Task /// HTTP Method: PATCH /// Endpoint: /restapi/v1.0/glip/tasks/{taskId} /// Rate Limit Group: Medium /// App Permission: undefined /// User Permission: undefined /// </summary> public async Task <RingCentral.GlipTaskList> Patch(RingCentral.GlipUpdateTask glipUpdateTask, RestRequestConfig restRequestConfig = null) { if (this.taskId == null) { throw new System.ArgumentNullException("taskId"); } return(await rc.Patch <RingCentral.GlipTaskList>(this.Path(), glipUpdateTask, null, restRequestConfig)); }
/// <summary> /// Operation: Delete Extension /// HTTP Method: DELETE /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId} /// Rate Limit Group: Medium /// App Permission: EditAccounts /// User Permission: AddRemoveUsers /// </summary> public async Task <string> Delete(DeleteExtensionParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.extensionId == null) { throw new System.ArgumentNullException("extensionId"); } return(await rc.Delete <string>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Get Token /// HTTP Method: POST /// Endpoint: /restapi/oauth/token /// Rate Limit Group: Auth /// App Permission: undefined /// User Permission: undefined /// </summary> public async Task <RingCentral.TokenInfo> Post(GetTokenRequest getTokenRequest, RestRequestConfig restRequestConfig = null) { var dict = new System.Collections.Generic.Dictionary <string, string>(); Utils.GetPairs(getTokenRequest) .ToList().ForEach(t => dict.Add(t.name, t.value.ToString())); return(await rc.Post <RingCentral.TokenInfo>(this.Path(), new FormUrlEncodedContent(dict), null, restRequestConfig)); }
/// <summary> /// Operation: Update Call Party /// HTTP Method: PATCH /// Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId} /// Rate Limit Group: Light /// App Permission: CallControl /// User Permission: undefined /// </summary> public async Task <RingCentral.CallParty> Patch(RingCentral.PartyUpdateRequest partyUpdateRequest, RestRequestConfig restRequestConfig = null) { if (this.partyId == null) { throw new System.ArgumentNullException("partyId"); } return(await rc.Patch <RingCentral.CallParty>(this.Path(), partyUpdateRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Get Call Handling Rule /// HTTP Method: GET /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/answering-rule/{ruleId} /// Rate Limit Group: Light /// App Permission: ReadAccounts /// User Permission: ReadUserAnsweringRules /// </summary> public async Task <RingCentral.AnsweringRuleInfo> Get(ReadAnsweringRuleParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.ruleId == null) { throw new System.ArgumentNullException("ruleId"); } return(await rc.Get <RingCentral.AnsweringRuleInfo>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Update Call Queue /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/call-queues/{groupId} /// Rate Limit Group: Light /// App Permission: EditExtensions /// User Permission: EditUserInfo /// </summary> public async Task <RingCentral.CallQueueDetails> Put(RingCentral.CallQueueUpdateDetails callQueueUpdateDetails, RestRequestConfig restRequestConfig = null) { if (this.groupId == null) { throw new System.ArgumentNullException("groupId"); } return(await rc.Put <RingCentral.CallQueueDetails>(this.Path(), callQueueUpdateDetails, null, restRequestConfig)); }
/// <summary> /// Operation: Update Meeting /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/meeting/{meetingId} /// Rate Limit Group: Medium /// App Permission: Meetings /// User Permission: Meetings /// </summary> public async Task <RingCentral.MeetingResponseResource> Put( RingCentral.MeetingRequestResource meetingRequestResource, RestRequestConfig restRequestConfig = null) { if (this.meetingId == null) { throw new System.ArgumentNullException("meetingId"); } return(await rc.Put <RingCentral.MeetingResponseResource>(this.Path(), meetingRequestResource, null, restRequestConfig)); }
/// <summary> /// Operation: Update Extension /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: EditUserInfo OR EditUserCredentials /// </summary> public async Task <RingCentral.GetExtensionInfoResponse> Put( RingCentral.ExtensionUpdateRequest extensionUpdateRequest, RestRequestConfig restRequestConfig = null) { if (this.extensionId == null) { throw new System.ArgumentNullException("extensionId"); } return(await rc.Put <RingCentral.GetExtensionInfoResponse>(this.Path(), extensionUpdateRequest, null, restRequestConfig)); }
public async Task <BatchResponse <RingCentral.GlipPersonInfo>[]> BatchGet( RestRequestConfig restRequestConfig = null) { if (!this.Path().Contains(",")) { throw new System.ArgumentException( "In order to make a BatchGet, please specify multiple IDs delimited by ','"); } return(await rc.BatchGet <RingCentral.GlipPersonInfo>(this.Path(), null, restRequestConfig)); }
/// <summary> /// Operation: Update Сustom Field /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/custom-fields/{fieldId} /// Rate Limit Group: Light /// App Permission: EditAccounts /// User Permission: Users /// </summary> public async Task <RingCentral.CustomFieldResource> Put( RingCentral.CustomFieldUpdateRequest customFieldUpdateRequest, RestRequestConfig restRequestConfig = null) { if (this.fieldId == null) { throw new System.ArgumentNullException("fieldId"); } return(await rc.Put <RingCentral.CustomFieldResource>(this.Path(), customFieldUpdateRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Update Subscription /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/subscription/{subscriptionId} /// Rate Limit Group: Medium /// App Permission: undefined /// User Permission: undefined /// </summary> public async Task <RingCentral.SubscriptionInfo> Put( RingCentral.ModifySubscriptionRequest modifySubscriptionRequest, RestRequestConfig restRequestConfig = null) { if (this.subscriptionId == null) { throw new System.ArgumentNullException("subscriptionId"); } return(await rc.Put <RingCentral.SubscriptionInfo>(this.Path(), modifySubscriptionRequest, null, restRequestConfig)); }
public async Task <BatchResponse <RingCentral.CompanyCallLogRecord>[]> BatchGet( ReadCompanyCallRecordParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (!this.Path().Contains(",")) { throw new System.ArgumentException( "In order to make a BatchGet, please specify multiple IDs delimited by ','"); } return(await rc.BatchGet <RingCentral.CompanyCallLogRecord>(this.Path(), queryParams, restRequestConfig)); }
/// <summary> /// Operation: Update Emergency Location /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/emergency-locations/{locationId} /// Rate Limit Group: Heavy /// App Permission: EditAccounts /// User Permission: ConfigureEmergencyMaps /// </summary> public async Task <RingCentral.EmergencyLocationInfo> Put( RingCentral.EmergencyLocationInfoRequest emergencyLocationInfoRequest, RestRequestConfig restRequestConfig = null) { if (this.locationId == null) { throw new System.ArgumentNullException("locationId"); } return(await rc.Put <RingCentral.EmergencyLocationInfo>(this.Path(), emergencyLocationInfoRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Updates Call Monitoring Group /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/call-monitoring-groups/{groupId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: Groups /// </summary> public async Task <RingCentral.CallMonitoringGroup> Put( RingCentral.CreateCallMonitoringGroupRequest createCallMonitoringGroupRequest, RestRequestConfig restRequestConfig = null) { if (this.groupId == null) { throw new System.ArgumentNullException("groupId"); } return(await rc.Put <RingCentral.CallMonitoringGroup>(this.Path(), createCallMonitoringGroupRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Update Forwarding Number /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number/{forwardingNumberId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: EditUserForwardingFlipNumbers /// </summary> public async Task <RingCentral.ForwardingNumberInfo> Put( RingCentral.UpdateForwardingNumberRequest updateForwardingNumberRequest, RestRequestConfig restRequestConfig = null) { if (this.forwardingNumberId == null) { throw new System.ArgumentNullException("forwardingNumberId"); } return(await rc.Put <RingCentral.ForwardingNumberInfo>(this.Path(), updateForwardingNumberRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Update Blocked/Allowed Number /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: EditBlockedNumbers /// </summary> public async Task <RingCentral.BlockedAllowedPhoneNumberInfo> Put( RingCentral.AddBlockedAllowedPhoneNumber addBlockedAllowedPhoneNumber, RestRequestConfig restRequestConfig = null) { if (this.blockedNumberId == null) { throw new System.ArgumentNullException("blockedNumberId"); } return(await rc.Put <RingCentral.BlockedAllowedPhoneNumberInfo>(this.Path(), addBlockedAllowedPhoneNumber, null, restRequestConfig)); }
/// <summary> /// Operation: Update Call Handling Rule /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/answering-rule/{ruleId} /// Rate Limit Group: Medium /// App Permission: EditExtensions /// User Permission: EditUserAnsweringRules /// </summary> public async Task <RingCentral.AnsweringRuleInfo> Put( RingCentral.UpdateAnsweringRuleRequest updateAnsweringRuleRequest, RestRequestConfig restRequestConfig = null) { if (this.ruleId == null) { throw new System.ArgumentNullException("ruleId"); } return(await rc.Put <RingCentral.AnsweringRuleInfo>(this.Path(), updateAnsweringRuleRequest, null, restRequestConfig)); }
/// <summary> /// Operation: Update Contact /// HTTP Method: PUT /// Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/address-book/contact/{contactId} /// Rate Limit Group: Heavy /// App Permission: Contacts /// User Permission: EditPersonalContacts /// </summary> public async Task <RingCentral.PersonalContactResource> Put( RingCentral.PersonalContactRequest personalContactRequest, UpdateContactParameters queryParams = null, RestRequestConfig restRequestConfig = null) { if (this.contactId == null) { throw new System.ArgumentNullException("contactId"); } return(await rc.Put <RingCentral.PersonalContactResource>(this.Path(), personalContactRequest, queryParams, restRequestConfig)); }
public async Task <IEnumerable <University> > GetUniversities() { var universityAssetName = TrackerAssetCategoriesMap.Map[TrackerAssetCategories.UNIVERSITY]; var universityRequest = new RestRequestConfig { Body = new { AssetDisplayNames = universityAssetName } }; var universityAsset = (await _mantleRestClient.SendRequestAsync <IEnumerable <TrackerAsset> >($"/tracker/{_trackerProductId}/assets?limit=1000", HttpMethod.Get, universityRequest)).FirstOrDefault(); if (universityAsset == null) { return(Enumerable.Empty <University>()); } var multiAssetRequest = new RestRequestConfig { Body = new { AssetIds = universityAsset.Id } }; var multiAssets = await _mantleRestClient.SendRequestAsync <IEnumerable <TrackerMultiAsset> >($"/tracker/{_trackerProductId}/multiassets?limit=1000", HttpMethod.Get, multiAssetRequest); return(multiAssets.Select(x => new University(x))); }