Skip to content

Commit

Permalink
Regenerate code according to latest swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jan 28, 2020
1 parent 3ca94a6 commit 8c40960
Show file tree
Hide file tree
Showing 108 changed files with 994 additions and 165 deletions.
2 changes: 1 addition & 1 deletion code-generator/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const generateField = (m, f) => {
p += `@JSONField(name="${f.name}")`
pName = f.name.replace(/[:.](\w)/g, '_$1')
p += `\n public ${f.type} ${pName};`
} else if (f.name === 'public' || f.name === 'default') {
} else if (f.name === 'public' || f.name === 'default' || f.name === 'package') {
p += `@JSONField(name="${f.name}")`
pName = `_${f.name}`
p += `\n public ${f.type} ${pName};`
Expand Down
56 changes: 56 additions & 0 deletions samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,26 @@ rc.revoke();
[Try it out](https://developer.ringcentral.com/api-reference#Call-Log-readUserCallRecord) in API Explorer.


## Update User Call Queues

HTTP PUT `/restapi/v1.0/account/{accountId}/extension/{extensionId}/call-queues`

```cs
RestClient rc = new RestClient("clientID", "clientSecret", "serverURL");
rc.authorize("username", "extension", "password");
var result = rc.restapi(apiVersion).account(accountId).extension(extensionId).callQueues().put(userCallQueues);
rc.revoke();
```

- Parameter `userCallQueues` is of type [UserCallQueues](./src/main/java/com/ringcentral/definitions/UserCallQueues.java)
- `result` is of type [UserCallQueues](./src/main/java/com/ringcentral/definitions/UserCallQueues.java)
- Parameter `apiVersion` is optional with default value `v1.0`
- Parameter `accountId` is optional with default value `~`
- Parameter `extensionId` is optional with default value `~`

[Try it out](https://developer.ringcentral.com/api-reference#Call-Queues-updateUserCallQueues) in API Explorer.


## Get Caller Blocking Settings

HTTP GET `/restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking`
Expand Down Expand Up @@ -4563,6 +4583,24 @@ rc.revoke();
[Try it out](https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports-createDataExportTask) in API Explorer.


## Get Data Export Task List

HTTP GET `/restapi/v1.0/glip/data-export`

```cs
RestClient rc = new RestClient("clientID", "clientSecret", "serverURL");
rc.authorize("username", "extension", "password");
var result = rc.restapi(apiVersion).glip().dataExport().list(listDataExportTasksParameters);
rc.revoke();
```

- Parameter `listDataExportTasksParameters` is of type [ListDataExportTasksParameters](./src/main/java/com/ringcentral/definitions/ListDataExportTasksParameters.java)
- `result` is of type [DataExportTaskList](./src/main/java/com/ringcentral/definitions/DataExportTaskList.java)
- Parameter `apiVersion` is optional with default value `v1.0`

[Try it out](https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports-listDataExportTasks) in API Explorer.


## Get Data Export Task

HTTP GET `/restapi/v1.0/glip/data-export/{taskId}`
Expand All @@ -4581,6 +4619,24 @@ rc.revoke();
[Try it out](https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports-readDataExportTask) in API Explorer.


## Get Data Export Task Dataset

HTTP GET `/restapi/v1.0/glip/data-export/{taskId}/datasets/{datasetId}`

```cs
RestClient rc = new RestClient("clientID", "clientSecret", "serverURL");
rc.authorize("username", "extension", "password");
var result = rc.restapi(apiVersion).glip().dataExport(taskId).datasets(datasetId).get();
rc.revoke();
```


- `result` is of type `byte[]`
- Parameter `apiVersion` is optional with default value `v1.0`

[Try it out](https://developer.ringcentral.com/api-reference#Glip-Compliance-Exports-readDataExportTaskDataset) in API Explorer.


## Get User Events List

HTTP GET `/restapi/v1.0/glip/events`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class AccountStatusInfo {
public String comment;
/**
* Type of suspension
* Enum: Voluntarily, Involuntarily
* Enum: SuspendedVoluntarily, SuspendedInvoluntarily, UserResumed
*/
public String reason;
/**
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/com/ringcentral/definitions/BillingPlanInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ public class BillingPlanInfo {
/**
* Number of duration units
*/
public String duration;
public Long duration;
/**
* Billing plan type
* Enum: Initial, Regular, Suspended, Trial, TrialNoCC, Free
*/
public String type;
/**
* Included digital lines count
*/
public Long includedPhoneLines;

public BillingPlanInfo id(String id) {
this.id = id;
Expand All @@ -40,7 +44,7 @@ public BillingPlanInfo durationUnit(String durationUnit) {
return this;
}

public BillingPlanInfo duration(String duration) {
public BillingPlanInfo duration(Long duration) {
this.duration = duration;
return this;
}
Expand All @@ -50,4 +54,9 @@ public BillingPlanInfo type(String type) {
return this;
}

public BillingPlanInfo includedPhoneLines(Long includedPhoneLines) {
this.includedPhoneLines = includedPhoneLines;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class CallLogRecordLegInfo {
*/
public String legType;
/**
* The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z
* The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z
*/
public String startTime;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public class CompanyPhoneNumberInfo {
* CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1'
*/
public ContactCenterProvider contactCenterProvider;
/**
* Vanity pattern for this number. Returned only when vanity search option is requested. Vanity pattern corresponds to request parameters nxx plus line or numberPattern
*/
public String vanityPattern;

public CompanyPhoneNumberInfo uri(String uri) {
this.uri = uri;
Expand Down Expand Up @@ -123,4 +127,9 @@ public CompanyPhoneNumberInfo contactCenterProvider(ContactCenterProvider contac
return this;
}

public CompanyPhoneNumberInfo vanityPattern(String vanityPattern) {
this.vanityPattern = vanityPattern;
return this;
}

}
1 change: 0 additions & 1 deletion src/main/java/com/ringcentral/definitions/ContactInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class ContactInfo {
public String jobTitle;
/**
* Email of extension user
* Required
*/
public String email;
/**
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/ringcentral/definitions/ContactList.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@


public class ContactList {
/**
* link to the list of user personal contacts
*/
public String uri;
/**
* List of personal contacts from the extension address book
*/
Expand All @@ -14,6 +18,15 @@ public class ContactList {
* Information on paging
*/
public UserContactsPagingInfo paging;
/**
* Information on address book groups
*/
public UserContactsGroupsInfo groups;

public ContactList uri(String uri) {
this.uri = uri;
return this;
}

public ContactList records(PersonalContactResource[] records) {
this.records = records;
Expand All @@ -30,4 +43,9 @@ public ContactList paging(UserContactsPagingInfo paging) {
return this;
}

public ContactList groups(UserContactsGroupsInfo groups) {
this.groups = groups;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@

public class CreateDataExportTaskRequest {
/**
* Starting time for data collection. The default value is current time minus 24 hours. If `dateTo` is not specified then its value is set to `dateFrom` plus 24 hours. The specified time range should not be greater than 7 days
* Starting time for data collection. The default value is `timeTo` minus 24 hours. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
*/
public String dateFrom;
public String timeFrom;
/**
* Ending time for data collection. The default value is current time. If `dateFrom` is not specified then its value is set to `dateTo` minus 24 hours. The specified time range should not be greater than 7 days
* Ending time for data collection. The default value is current time. Max allowed time frame between `timeFrom` and `timeTo` is 6 months
*/
public String dateTo;
public String timeTo;
/**
* List of users which data is collected. The following data will be exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s). The list of 30 users per request is supported.
*
*/
public String[] userIds;
public DataExportTaskContactInfo[] contacts;
/**
* List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected
* List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected. Maximum number of chats supported is 10
*/
public String[] chatIds;

public CreateDataExportTaskRequest dateFrom(String dateFrom) {
this.dateFrom = dateFrom;
public CreateDataExportTaskRequest timeFrom(String timeFrom) {
this.timeFrom = timeFrom;
return this;
}

public CreateDataExportTaskRequest dateTo(String dateTo) {
this.dateTo = dateTo;
public CreateDataExportTaskRequest timeTo(String timeTo) {
this.timeTo = timeTo;
return this;
}

public CreateDataExportTaskRequest userIds(String[] userIds) {
this.userIds = userIds;
public CreateDataExportTaskRequest contacts(DataExportTaskContactInfo[] contacts) {
this.contacts = contacts;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class CreateFaxMessageRequest {
/**
* To Phone Number
*/
public MessageStoreCallerInfoRequest[] to;
public MessageStoreCalleeInfoRequest[] to;
/**
* Timestamp to send fax at. If not specified (current or the past), the fax is sent immediately
*/
Expand Down Expand Up @@ -42,7 +42,7 @@ public CreateFaxMessageRequest faxResolution(String faxResolution) {
return this;
}

public CreateFaxMessageRequest to(MessageStoreCallerInfoRequest[] to) {
public CreateFaxMessageRequest to(MessageStoreCalleeInfoRequest[] to) {
this.to = to;
return this;
}
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/com/ringcentral/definitions/CreatorInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.ringcentral.definitions;


public class CreatorInfo {
/**
* Internal identifier of a user
*/
public String id;
/**
* First name of a user
*/
public String firstName;
/**
* Last name of a user
*/
public String lastName;

public CreatorInfo id(String id) {
this.id = id;
return this;
}

public CreatorInfo firstName(String firstName) {
this.firstName = firstName;
return this;
}

public CreatorInfo lastName(String lastName) {
this.lastName = lastName;
return this;
}

}
24 changes: 24 additions & 0 deletions src/main/java/com/ringcentral/definitions/CustomGreetingInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.ringcentral.definitions;


public class CustomGreetingInfo {
/**
* Link to a custom user greeting
*/
public String uri;
/**
* Internal identifier of a custom user greeting
*/
public String id;

public CustomGreetingInfo uri(String uri) {
this.uri = uri;
return this;
}

public CustomGreetingInfo id(String id) {
this.id = id;
return this;
}

}
28 changes: 23 additions & 5 deletions src/main/java/com/ringcentral/definitions/DataExportTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ public class DataExportTask {
public String lastModifiedTime;
/**
* Task status
* Enum: Accepted, InProgress, Completed, Failed
* Enum: Accepted, InProgress, Completed, Failed, Canceled
*/
public String status;
/**
* Data collection archives. Returned by task ID
* Internal identifier of a user
*/
public ExportTaskResultInfo[] result;
public String creator;
/**
* Information specififed in request
*/
public SpecificInfo specific;
/**
* Data collection sets. Returned by task ID
*/
public ExportTaskResultInfo[] datasets;

public DataExportTask uri(String uri) {
this.uri = uri;
Expand All @@ -53,8 +61,18 @@ public DataExportTask status(String status) {
return this;
}

public DataExportTask result(ExportTaskResultInfo[] result) {
this.result = result;
public DataExportTask creator(String creator) {
this.creator = creator;
return this;
}

public DataExportTask specific(SpecificInfo specific) {
this.specific = specific;
return this;
}

public DataExportTask datasets(ExportTaskResultInfo[] datasets) {
this.datasets = datasets;
return this;
}

Expand Down
Loading

0 comments on commit 8c40960

Please sign in to comment.