Skip to content

Commit a06ef0e

Browse files
committed
Add paths
1 parent b533ab8 commit a06ef0e

152 files changed

Lines changed: 5972 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
package com.ringcentral.paths.restapi
2+
3+
class Index(val rc: com.ringcentral.RestClient, val apiVersion: String? = "v1.0") {
4+
5+
6+
fun path(withParameter: Boolean = true): String {
7+
if (withParameter && apiVersion != null) {
8+
return "/restapi/${apiVersion}"
9+
}
10+
11+
return "/restapi"
12+
}
13+
14+
/**
15+
* Operation: Get API Versions
16+
* Http Get /restapi
17+
*/
18+
fun list(): com.ringcentral.definitions.GetVersionsResponse? {
19+
val rb: okhttp3.ResponseBody = rc.get(this.path(false))
20+
21+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.GetVersionsResponse::class.java)
22+
23+
}
24+
25+
26+
/**
27+
* Operation: Get Version Info
28+
* Http Get /restapi/{apiVersion}
29+
*/
30+
fun get(): com.ringcentral.definitions.GetVersionResponse? {
31+
if (this.apiVersion == null) {
32+
throw NullPointerException("apiVersion")
33+
}
34+
35+
val rb: okhttp3.ResponseBody = rc.get(this.path())
36+
37+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.GetVersionResponse::class.java)
38+
39+
}
40+
41+
42+
fun oauth(): com.ringcentral.paths.restapi.oauth.Index {
43+
return com.ringcentral.paths.restapi.oauth.Index(this)
44+
}
45+
46+
47+
fun status(): com.ringcentral.paths.restapi.status.Index {
48+
return com.ringcentral.paths.restapi.status.Index(this)
49+
}
50+
51+
52+
@JvmOverloads
53+
fun account(accountId: String? = "~"): com.ringcentral.paths.restapi.account.Index {
54+
return com.ringcentral.paths.restapi.account.Index(this, accountId)
55+
}
56+
57+
58+
fun dictionary(): com.ringcentral.paths.restapi.dictionary.Index {
59+
return com.ringcentral.paths.restapi.dictionary.Index(this)
60+
}
61+
62+
63+
fun glip(): com.ringcentral.paths.restapi.glip.Index {
64+
return com.ringcentral.paths.restapi.glip.Index(this)
65+
}
66+
67+
68+
@JvmOverloads
69+
fun subscription(subscriptionId: String? = null): com.ringcentral.paths.restapi.subscription.Index {
70+
return com.ringcentral.paths.restapi.subscription.Index(this, subscriptionId)
71+
}
72+
73+
74+
fun clientinfo(): com.ringcentral.paths.restapi.clientinfo.Index {
75+
return com.ringcentral.paths.restapi.clientinfo.Index(this)
76+
}
77+
78+
79+
fun numberparser(): com.ringcentral.paths.restapi.numberparser.Index {
80+
return com.ringcentral.paths.restapi.numberparser.Index(this)
81+
}
82+
83+
84+
fun numberporting(): com.ringcentral.paths.restapi.numberporting.Index {
85+
return com.ringcentral.paths.restapi.numberporting.Index(this)
86+
}
87+
88+
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
package com.ringcentral.paths.restapi.account
2+
3+
class Index(val parent: com.ringcentral.paths.restapi.Index, val accountId: String? = "~") {
4+
var rc: com.ringcentral.RestClient = parent.rc
5+
6+
7+
fun path(withParameter: Boolean = true): String {
8+
if (withParameter && accountId != null) {
9+
return "${parent.path()}/account/${accountId}"
10+
}
11+
12+
return "${parent.path()}/account"
13+
}
14+
15+
/**
16+
* Operation: Get Account Info
17+
* Http Get /restapi/v1.0/account/{accountId}
18+
*/
19+
fun get(): com.ringcentral.definitions.GetAccountInfoResponse? {
20+
if (this.accountId == null) {
21+
throw NullPointerException("accountId")
22+
}
23+
24+
val rb: okhttp3.ResponseBody = rc.get(this.path())
25+
26+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.GetAccountInfoResponse::class.java)
27+
28+
}
29+
30+
31+
@JvmOverloads
32+
fun extension(extensionId: String? = "~"): com.ringcentral.paths.restapi.account.extension.Index {
33+
return com.ringcentral.paths.restapi.account.extension.Index(this, extensionId)
34+
}
35+
36+
37+
@JvmOverloads
38+
fun calllog(callRecordId: String? = null): com.ringcentral.paths.restapi.account.calllog.Index {
39+
return com.ringcentral.paths.restapi.account.calllog.Index(this, callRecordId)
40+
}
41+
42+
43+
fun activecalls(): com.ringcentral.paths.restapi.account.activecalls.Index {
44+
return com.ringcentral.paths.restapi.account.activecalls.Index(this)
45+
}
46+
47+
48+
@JvmOverloads
49+
fun recording(recordingId: String? = null): com.ringcentral.paths.restapi.account.recording.Index {
50+
return com.ringcentral.paths.restapi.account.recording.Index(this, recordingId)
51+
}
52+
53+
54+
fun messagestoreconfiguration(): com.ringcentral.paths.restapi.account.messagestoreconfiguration.Index {
55+
return com.ringcentral.paths.restapi.account.messagestoreconfiguration.Index(this)
56+
}
57+
58+
59+
fun directory(): com.ringcentral.paths.restapi.account.directory.Index {
60+
return com.ringcentral.paths.restapi.account.directory.Index(this)
61+
}
62+
63+
64+
fun presence(): com.ringcentral.paths.restapi.account.presence.Index {
65+
return com.ringcentral.paths.restapi.account.presence.Index(this)
66+
}
67+
68+
69+
fun businesshours(): com.ringcentral.paths.restapi.account.businesshours.Index {
70+
return com.ringcentral.paths.restapi.account.businesshours.Index(this)
71+
}
72+
73+
74+
@JvmOverloads
75+
fun answeringrule(ruleId: String? = null): com.ringcentral.paths.restapi.account.answeringrule.Index {
76+
return com.ringcentral.paths.restapi.account.answeringrule.Index(this, ruleId)
77+
}
78+
79+
80+
fun greeting(): com.ringcentral.paths.restapi.account.greeting.Index {
81+
return com.ringcentral.paths.restapi.account.greeting.Index(this)
82+
}
83+
84+
85+
@JvmOverloads
86+
fun ivrprompts(promptId: String? = null): com.ringcentral.paths.restapi.account.ivrprompts.Index {
87+
return com.ringcentral.paths.restapi.account.ivrprompts.Index(this, promptId)
88+
}
89+
90+
91+
@JvmOverloads
92+
fun ivrmenus(ivrMenuId: String? = null): com.ringcentral.paths.restapi.account.ivrmenus.Index {
93+
return com.ringcentral.paths.restapi.account.ivrmenus.Index(this, ivrMenuId)
94+
}
95+
96+
97+
fun callrecording(): com.ringcentral.paths.restapi.account.callrecording.Index {
98+
return com.ringcentral.paths.restapi.account.callrecording.Index(this)
99+
}
100+
101+
102+
fun businessaddress(): com.ringcentral.paths.restapi.account.businessaddress.Index {
103+
return com.ringcentral.paths.restapi.account.businessaddress.Index(this)
104+
}
105+
106+
107+
fun serviceinfo(): com.ringcentral.paths.restapi.account.serviceinfo.Index {
108+
return com.ringcentral.paths.restapi.account.serviceinfo.Index(this)
109+
}
110+
111+
112+
@JvmOverloads
113+
fun phonenumber(phoneNumberId: String? = null): com.ringcentral.paths.restapi.account.phonenumber.Index {
114+
return com.ringcentral.paths.restapi.account.phonenumber.Index(this, phoneNumberId)
115+
}
116+
117+
118+
@JvmOverloads
119+
fun templates(templateId: String? = null): com.ringcentral.paths.restapi.account.templates.Index {
120+
return com.ringcentral.paths.restapi.account.templates.Index(this, templateId)
121+
}
122+
123+
124+
@JvmOverloads
125+
fun callqueues(groupId: String? = null): com.ringcentral.paths.restapi.account.callqueues.Index {
126+
return com.ringcentral.paths.restapi.account.callqueues.Index(this, groupId)
127+
}
128+
129+
130+
@JvmOverloads
131+
fun department(departmentId: String? = null): com.ringcentral.paths.restapi.account.department.Index {
132+
return com.ringcentral.paths.restapi.account.department.Index(this, departmentId)
133+
}
134+
135+
136+
@JvmOverloads
137+
fun pagingonlygroups(pagingOnlyGroupId: String? = null): com.ringcentral.paths.restapi.account.pagingonlygroups.Index {
138+
return com.ringcentral.paths.restapi.account.pagingonlygroups.Index(this, pagingOnlyGroupId)
139+
}
140+
141+
142+
@JvmOverloads
143+
fun callmonitoringgroups(groupId: String? = null): com.ringcentral.paths.restapi.account.callmonitoringgroups.Index {
144+
return com.ringcentral.paths.restapi.account.callmonitoringgroups.Index(this, groupId)
145+
}
146+
147+
148+
@JvmOverloads
149+
fun device(deviceId: String? = null): com.ringcentral.paths.restapi.account.device.Index {
150+
return com.ringcentral.paths.restapi.account.device.Index(this, deviceId)
151+
}
152+
153+
154+
fun telephony(): com.ringcentral.paths.restapi.account.telephony.Index {
155+
return com.ringcentral.paths.restapi.account.telephony.Index(this)
156+
}
157+
158+
159+
@JvmOverloads
160+
fun messagestorereport(taskId: String? = null): com.ringcentral.paths.restapi.account.messagestorereport.Index {
161+
return com.ringcentral.paths.restapi.account.messagestorereport.Index(this, taskId)
162+
}
163+
164+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.ringcentral.paths.restapi.account.activecalls
2+
3+
class Index(val parent: com.ringcentral.paths.restapi.account.Index) {
4+
var rc: com.ringcentral.RestClient = parent.rc
5+
6+
7+
fun path(): String {
8+
return "${parent.path()}/active-calls"
9+
}
10+
11+
/**
12+
* Operation: Get Company Active Calls
13+
* Http Get /restapi/v1.0/account/{accountId}/active-calls
14+
*/
15+
@JvmOverloads
16+
fun get(queryParams: com.ringcentral.definitions.ListCompanyActiveCallsParameters? = null): com.ringcentral.definitions.ActiveCallsResponse? {
17+
val rb: okhttp3.ResponseBody = rc.get(this.path(), queryParams)
18+
19+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.ActiveCallsResponse::class.java)
20+
21+
}
22+
23+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
package com.ringcentral.paths.restapi.account.answeringrule
2+
3+
class Index(val parent: com.ringcentral.paths.restapi.account.Index, val ruleId: String? = null) {
4+
var rc: com.ringcentral.RestClient = parent.rc
5+
6+
7+
fun path(withParameter: Boolean = true): String {
8+
if (withParameter && ruleId != null) {
9+
return "${parent.path()}/answering-rule/${ruleId}"
10+
}
11+
12+
return "${parent.path()}/answering-rule"
13+
}
14+
15+
/**
16+
* Operation: Create Company Call Handling Rule
17+
* Http Post /restapi/v1.0/account/{accountId}/answering-rule
18+
*/
19+
fun post(companyAnsweringRuleRequest: com.ringcentral.definitions.CompanyAnsweringRuleRequest): com.ringcentral.definitions.CompanyAnsweringRuleInfo? {
20+
val rb: okhttp3.ResponseBody = rc.post(this.path(false), companyAnsweringRuleRequest)
21+
22+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.CompanyAnsweringRuleInfo::class.java)
23+
24+
}
25+
26+
27+
/**
28+
* Operation: Get Company Call Handling Rule List
29+
* Http Get /restapi/v1.0/account/{accountId}/answering-rule
30+
*/
31+
fun list(): com.ringcentral.definitions.CompanyAnsweringRuleList? {
32+
val rb: okhttp3.ResponseBody = rc.get(this.path(false))
33+
34+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.CompanyAnsweringRuleList::class.java)
35+
36+
}
37+
38+
39+
/**
40+
* Operation: Get Company Call Handling Rule
41+
* Http Get /restapi/v1.0/account/{accountId}/answering-rule/{ruleId}
42+
*/
43+
fun get(): com.ringcentral.definitions.CompanyAnsweringRuleInfo? {
44+
if (this.ruleId == null) {
45+
throw NullPointerException("ruleId")
46+
}
47+
48+
val rb: okhttp3.ResponseBody = rc.get(this.path())
49+
50+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.CompanyAnsweringRuleInfo::class.java)
51+
52+
}
53+
54+
55+
/**
56+
* Operation: Update Company Call Handling Rule
57+
* Http Put /restapi/v1.0/account/{accountId}/answering-rule/{ruleId}
58+
*/
59+
fun put(companyAnsweringRuleUpdate: com.ringcentral.definitions.CompanyAnsweringRuleUpdate): com.ringcentral.definitions.CompanyAnsweringRuleInfo? {
60+
if (this.ruleId == null) {
61+
throw NullPointerException("ruleId")
62+
}
63+
64+
val rb: okhttp3.ResponseBody = rc.put(this.path(), companyAnsweringRuleUpdate)
65+
66+
return com.alibaba.fastjson.JSON.parseObject(rb.string(), com.ringcentral.definitions.CompanyAnsweringRuleInfo::class.java)
67+
68+
}
69+
70+
71+
/**
72+
* Operation: Delete Company Call Handling Rule
73+
* Http Delete /restapi/v1.0/account/{accountId}/answering-rule/{ruleId}
74+
*/
75+
fun delete(): String? {
76+
if (this.ruleId == null) {
77+
throw NullPointerException("ruleId")
78+
}
79+
80+
val rb: okhttp3.ResponseBody = rc.delete(this.path())
81+
82+
return rb.string()
83+
84+
}
85+
86+
}

0 commit comments

Comments
 (0)