From 4e20ac64670224905c683b08c2976f592143dad4 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 6 Feb 2025 05:35:28 -0800 Subject: [PATCH 1/2] fix: Fix `Items` entries type in Java (box/box-codegen#660) --- .codegen.json | 2 +- src/main/java/com/box/sdkgen/schemas/items/Items.java | 10 +++++----- .../itemsoffsetpaginated/ItemsOffsetPaginated.java | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.codegen.json b/.codegen.json index c3339c8c..7f01b335 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3a42ab0", "specHash": "59747aa", "version": "0.4.0" } +{ "engineHash": "cb61d82", "specHash": "59747aa", "version": "0.4.0" } diff --git a/src/main/java/com/box/sdkgen/schemas/items/Items.java b/src/main/java/com/box/sdkgen/schemas/items/Items.java index ec3393d6..bf38efab 100644 --- a/src/main/java/com/box/sdkgen/schemas/items/Items.java +++ b/src/main/java/com/box/sdkgen/schemas/items/Items.java @@ -1,7 +1,7 @@ package com.box.sdkgen.schemas.items; import com.box.sdkgen.internal.SerializableObject; -import com.box.sdkgen.schemas.filefullorfolderminiorweblink.FileFullOrFolderMiniOrWebLink; +import com.box.sdkgen.schemas.filefullorfolderfullorweblink.FileFullOrFolderFullOrWebLink; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Objects; @@ -23,7 +23,7 @@ public class Items extends SerializableObject { protected List order; - protected List entries; + protected List entries; public Items() { super(); @@ -64,7 +64,7 @@ public List getOrder() { return order; } - public List getEntries() { + public List getEntries() { return entries; } @@ -138,7 +138,7 @@ public static class ItemsBuilder { protected List order; - protected List entries; + protected List entries; public ItemsBuilder limit(Long limit) { this.limit = limit; @@ -170,7 +170,7 @@ public ItemsBuilder order(List order) { return this; } - public ItemsBuilder entries(List entries) { + public ItemsBuilder entries(List entries) { this.entries = entries; return this; } diff --git a/src/main/java/com/box/sdkgen/schemas/itemsoffsetpaginated/ItemsOffsetPaginated.java b/src/main/java/com/box/sdkgen/schemas/itemsoffsetpaginated/ItemsOffsetPaginated.java index 3ce4523f..8c99b905 100644 --- a/src/main/java/com/box/sdkgen/schemas/itemsoffsetpaginated/ItemsOffsetPaginated.java +++ b/src/main/java/com/box/sdkgen/schemas/itemsoffsetpaginated/ItemsOffsetPaginated.java @@ -1,7 +1,7 @@ package com.box.sdkgen.schemas.itemsoffsetpaginated; import com.box.sdkgen.internal.SerializableObject; -import com.box.sdkgen.schemas.filefullorfolderminiorweblink.FileFullOrFolderMiniOrWebLink; +import com.box.sdkgen.schemas.filefullorfolderfullorweblink.FileFullOrFolderFullOrWebLink; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Objects; @@ -17,7 +17,7 @@ public class ItemsOffsetPaginated extends SerializableObject { protected List order; - protected List entries; + protected List entries; public ItemsOffsetPaginated() { super(); @@ -48,7 +48,7 @@ public List getOrder() { return order; } - public List getEntries() { + public List getEntries() { return entries; } @@ -108,7 +108,7 @@ public static class ItemsOffsetPaginatedBuilder { protected List order; - protected List entries; + protected List entries; public ItemsOffsetPaginatedBuilder totalCount(Long totalCount) { this.totalCount = totalCount; @@ -130,7 +130,7 @@ public ItemsOffsetPaginatedBuilder order(List or return this; } - public ItemsOffsetPaginatedBuilder entries(List entries) { + public ItemsOffsetPaginatedBuilder entries(List entries) { this.entries = entries; return this; } From fe9048c673ce557630c7ebbcb440160f454ee695 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 7 Feb 2025 02:41:51 -0800 Subject: [PATCH 2/2] docs: Improve code samples in docs (box/box-codegen#661) --- .codegen.json | 2 +- docs/ai.md | 6 +++--- docs/collaborationallowlistentries.md | 2 +- docs/collaborationallowlistexempttargets.md | 2 +- docs/comments.md | 2 +- docs/devicepinners.md | 2 +- docs/docgentemplate.md | 2 +- docs/filerequests.md | 2 +- docs/files.md | 6 +++--- docs/folders.md | 8 ++++---- docs/groups.md | 2 +- docs/legalholdpolicies.md | 4 ++-- docs/metadatatemplates.md | 2 +- docs/retentionpolicies.md | 2 +- docs/sharedlinksfiles.md | 2 +- docs/sharedlinksfolders.md | 2 +- docs/sharedlinksweblinks.md | 2 +- docs/shieldinformationbarriersegments.md | 4 ++-- docs/signrequests.md | 2 +- docs/tasks.md | 2 +- docs/termsofservices.md | 2 +- docs/trashedfiles.md | 2 +- docs/uploads.md | 4 ++-- docs/usercollaborations.md | 4 ++-- docs/users.md | 4 ++-- docs/weblinks.md | 4 ++-- 26 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.codegen.json b/.codegen.json index 7f01b335..5d92b0ef 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "cb61d82", "specHash": "59747aa", "version": "0.4.0" } +{ "engineHash": "2c730de", "specHash": "59747aa", "version": "0.4.0" } diff --git a/docs/ai.md b/docs/ai.md index bc244ca1..027ea832 100644 --- a/docs/ai.md +++ b/docs/ai.md @@ -18,7 +18,7 @@ See the endpoint docs at ``` -client.getAi().createAiAsk(new AiAsk(AiAskModeField.MULTIPLE_ITEM_QA, "Which direction sun rises?", Arrays.asList(new AiItemAsk.AiItemAskBuilder(fileToAsk1.getId(), AiItemAskTypeField.FILE).content("Earth goes around the sun").build(), new AiItemAsk.AiItemAskBuilder(fileToAsk2.getId(), AiItemAskTypeField.FILE).content("Sun rises in the East in the morning").build()))) +client.getAi().createAiAsk(new AiAsk(AiAskModeField.SINGLE_ITEM_QA, "which direction sun rises", Arrays.asList(new AiItemAsk.AiItemAskBuilder(fileToAsk.getId(), AiItemAskTypeField.FILE).content("Sun rises in the East").build()))) ``` ### Arguments @@ -76,7 +76,7 @@ See the endpoint docs at ``` -client.getAi().getAiAgentDefaultConfig(new GetAiAgentDefaultConfigQueryParams.GetAiAgentDefaultConfigQueryParamsBuilder(GetAiAgentDefaultConfigQueryParamsModeField.TEXT_GEN).language("en-US").build()) +client.getAi().getAiAgentDefaultConfig(new GetAiAgentDefaultConfigQueryParams.GetAiAgentDefaultConfigQueryParamsBuilder(GetAiAgentDefaultConfigQueryParamsModeField.ASK).language("en-US").build()) ``` ### Arguments @@ -146,7 +146,7 @@ See the endpoint docs at ``` -client.getAi().createAiExtractStructured(new AiExtractStructured.AiExtractStructuredBuilder(Arrays.asList(new AiItemBase(file.getId()))).metadataTemplate(new AiExtractStructuredMetadataTemplateField.AiExtractStructuredMetadataTemplateFieldBuilder().templateKey(templateKey).scope("enterprise").build()).build()) +client.getAi().createAiExtractStructured(new AiExtractStructured.AiExtractStructuredBuilder(Arrays.asList(new AiItemBase(file.getId()))).fields(Arrays.asList(new AiExtractStructuredFieldsField.AiExtractStructuredFieldsFieldBuilder("firstName").description("Person first name").displayName("First name").prompt("What is the your first name?").type("string").build(), new AiExtractStructuredFieldsField.AiExtractStructuredFieldsFieldBuilder("lastName").description("Person last name").displayName("Last name").prompt("What is the your last name?").type("string").build(), new AiExtractStructuredFieldsField.AiExtractStructuredFieldsFieldBuilder("dateOfBirth").description("Person date of birth").displayName("Birth date").prompt("What is the date of your birth?").type("date").build(), new AiExtractStructuredFieldsField.AiExtractStructuredFieldsFieldBuilder("age").description("Person age").displayName("Age").prompt("How old are you?").type("float").build(), new AiExtractStructuredFieldsField.AiExtractStructuredFieldsFieldBuilder("hobby").description("Person hobby").displayName("Hobby").prompt("What is your hobby?").type("multiSelect").options(Arrays.asList(new AiExtractStructuredFieldsOptionsField("guitar"), new AiExtractStructuredFieldsOptionsField("books"))).build())).build()) ``` ### Arguments diff --git a/docs/collaborationallowlistentries.md b/docs/collaborationallowlistentries.md index 7ea0fb50..20aa3c70 100644 --- a/docs/collaborationallowlistentries.md +++ b/docs/collaborationallowlistentries.md @@ -78,7 +78,7 @@ See the endpoint docs at ``` -client.getCollaborationAllowlistEntries().getCollaborationWhitelistEntryById(entry.getId()) +client.getCollaborationAllowlistEntries().getCollaborationWhitelistEntryById(newEntry.getId()) ``` ### Arguments diff --git a/docs/collaborationallowlistexempttargets.md b/docs/collaborationallowlistexempttargets.md index c1450de6..a96a3790 100644 --- a/docs/collaborationallowlistexempttargets.md +++ b/docs/collaborationallowlistexempttargets.md @@ -78,7 +78,7 @@ See the endpoint docs at ``` -client.getCollaborationAllowlistExemptTargets().getCollaborationWhitelistExemptTargetById(exemptTarget.getId()) +client.getCollaborationAllowlistExemptTargets().getCollaborationWhitelistExemptTargetById(newExemptTarget.getId()) ``` ### Arguments diff --git a/docs/comments.md b/docs/comments.md index 38dfe6d7..0c974349 100644 --- a/docs/comments.md +++ b/docs/comments.md @@ -145,7 +145,7 @@ See the endpoint docs at ``` -client.getComments().createComment(new CreateCommentRequestBody(message, new CreateCommentRequestBodyItemField(newComment.getId(), CreateCommentRequestBodyItemTypeField.COMMENT))) +client.getComments().createComment(new CreateCommentRequestBody(message, new CreateCommentRequestBodyItemField(fileId, CreateCommentRequestBodyItemTypeField.FILE))) ``` ### Arguments diff --git a/docs/devicepinners.md b/docs/devicepinners.md index f6fc7980..4a66025d 100644 --- a/docs/devicepinners.md +++ b/docs/devicepinners.md @@ -77,7 +77,7 @@ See the endpoint docs at ``` -client.getDevicePinners().getEnterpriseDevicePinners(enterpriseId, new GetEnterpriseDevicePinnersQueryParams.GetEnterpriseDevicePinnersQueryParamsBuilder().direction(GetEnterpriseDevicePinnersQueryParamsDirectionField.DESC).build()) +client.getDevicePinners().getEnterpriseDevicePinners(enterpriseId) ``` ### Arguments diff --git a/docs/docgentemplate.md b/docs/docgentemplate.md index 612a73ae..0b583ff6 100644 --- a/docs/docgentemplate.md +++ b/docs/docgentemplate.md @@ -19,7 +19,7 @@ See the endpoint docs at ``` -client.getDocgenTemplate().createDocgenTemplateV2025R0(new DocGenTemplateCreateRequestV2025R0(new FileReferenceV2025R0(uploadedFile.getId()))) +client.getDocgenTemplate().createDocgenTemplateV2025R0(new DocGenTemplateCreateRequestV2025R0(new FileReferenceV2025R0(file.getId()))) ``` ### Arguments diff --git a/docs/filerequests.md b/docs/filerequests.md index d8f89f7e..bbcf769c 100644 --- a/docs/filerequests.md +++ b/docs/filerequests.md @@ -17,7 +17,7 @@ See the endpoint docs at ``` -client.getFileRequests().getFileRequestById(updatedFileRequest.getId()) +client.getFileRequests().getFileRequestById(fileRequestId) ``` ### Arguments diff --git a/docs/files.md b/docs/files.md index db05fc26..503f1ce5 100644 --- a/docs/files.md +++ b/docs/files.md @@ -19,7 +19,7 @@ See the endpoint docs at ``` -client.getFiles().getFileById(fileId, new GetFileByIdQueryParams.GetFileByIdQueryParamsBuilder().fields(Arrays.asList("is_associated_with_app_item")).build()) +client.getFiles().getFileById(uploadedFile.getId(), new GetFileByIdQueryParams.GetFileByIdQueryParamsBuilder().fields(Arrays.asList("is_externally_owned", "has_collaborations")).build()) ``` ### Arguments @@ -55,7 +55,7 @@ See the endpoint docs at ``` -downscopedClient.getFiles().updateFileById(file.getId(), new UpdateFileByIdRequestBody.UpdateFileByIdRequestBodyBuilder().name(getUuid()).build()) +client.getFiles().updateFileById(fileToUpdate.getId(), new UpdateFileByIdRequestBody.UpdateFileByIdRequestBodyBuilder().name(updatedName).description("Updated description").build()) ``` ### Arguments @@ -96,7 +96,7 @@ See the endpoint docs at ``` -parentClient.getFiles().deleteFileById(file.getId()) +client.getFiles().deleteFileById(thumbnailFile.getId()) ``` ### Arguments diff --git a/docs/folders.md b/docs/folders.md index 82d163a3..1cc6ea6d 100644 --- a/docs/folders.md +++ b/docs/folders.md @@ -28,7 +28,7 @@ See the endpoint docs at ``` -client.getFolders().getFolderById(folderId, new GetFolderByIdQueryParams.GetFolderByIdQueryParamsBuilder().fields(Arrays.asList("is_associated_with_app_item")).build()) +client.getFolders().getFolderById("0") ``` ### Arguments @@ -70,7 +70,7 @@ See the endpoint docs at ``` -downscopedClient.getFolders().updateFolderById(folder.getId(), new UpdateFolderByIdRequestBody.UpdateFolderByIdRequestBodyBuilder().name(getUuid()).build()) +client.getFolders().updateFolderById(folderToUpdate.getId(), new UpdateFolderByIdRequestBody.UpdateFolderByIdRequestBodyBuilder().name(updatedName).description("Updated description").build()) ``` ### Arguments @@ -113,7 +113,7 @@ See the endpoint docs at ``` -parentClient.getFolders().deleteFolderById(folder.getId()) +client.getFolders().deleteFolderById(newFolder.getId()) ``` ### Arguments @@ -180,7 +180,7 @@ See the endpoint docs at ``` -parentClient.getFolders().createFolder(new CreateFolderRequestBody(getUuid(), new CreateFolderRequestBodyParentField("0"))) +client.getFolders().createFolder(new CreateFolderRequestBody(newFolderName, new CreateFolderRequestBodyParentField("0"))) ``` ### Arguments diff --git a/docs/groups.md b/docs/groups.md index c9f0157a..ec1527d1 100644 --- a/docs/groups.md +++ b/docs/groups.md @@ -83,7 +83,7 @@ See the endpoint docs at ``` -client.getGroups().getGroupById(group.getId()) +client.getGroups().getGroupById(group.getId(), new GetGroupByIdQueryParams.GetGroupByIdQueryParamsBuilder().fields(Arrays.asList("id", "name", "description", "group_type")).build()) ``` ### Arguments diff --git a/docs/legalholdpolicies.md b/docs/legalholdpolicies.md index b08e2319..36849706 100644 --- a/docs/legalholdpolicies.md +++ b/docs/legalholdpolicies.md @@ -48,7 +48,7 @@ See the endpoint docs at ``` -client.getLegalHoldPolicies().createLegalHoldPolicy(new CreateLegalHoldPolicyRequestBody.CreateLegalHoldPolicyRequestBodyBuilder(legalHoldPolicyName).description(legalHoldDescription).filterStartedAt(filterStartedAt).filterEndedAt(filterEndedAt).isOngoing(false).build()) +client.getLegalHoldPolicies().createLegalHoldPolicy(new CreateLegalHoldPolicyRequestBody.CreateLegalHoldPolicyRequestBodyBuilder(legalHoldPolicyName).description(legalHoldDescription).isOngoing(true).build()) ``` ### Arguments @@ -140,7 +140,7 @@ See the endpoint docs at ``` -client.getLegalHoldPolicies().deleteLegalHoldPolicyById(legalHoldPolicy.getId()) +client.getLegalHoldPolicies().deleteLegalHoldPolicyById(legalHoldPolicyId) ``` ### Arguments diff --git a/docs/metadatatemplates.md b/docs/metadatatemplates.md index bd9c027f..ab8ffebf 100644 --- a/docs/metadatatemplates.md +++ b/docs/metadatatemplates.md @@ -252,7 +252,7 @@ See the endpoint docs at ``` -client.getMetadataTemplates().createMetadataTemplate(new CreateMetadataTemplateRequestBody.CreateMetadataTemplateRequestBodyBuilder("enterprise", templateKey).templateKey(templateKey).fields(Arrays.asList(new CreateMetadataTemplateRequestBodyFieldsField.CreateMetadataTemplateRequestBodyFieldsFieldBuilder(CreateMetadataTemplateRequestBodyFieldsTypeField.STRING, "firstName", "First name").description("Person first name").build(), new CreateMetadataTemplateRequestBodyFieldsField.CreateMetadataTemplateRequestBodyFieldsFieldBuilder(CreateMetadataTemplateRequestBodyFieldsTypeField.STRING, "lastName", "Last name").description("Person last name").build(), new CreateMetadataTemplateRequestBodyFieldsField.CreateMetadataTemplateRequestBodyFieldsFieldBuilder(CreateMetadataTemplateRequestBodyFieldsTypeField.DATE, "dateOfBirth", "Birth date").description("Person date of birth").build(), new CreateMetadataTemplateRequestBodyFieldsField.CreateMetadataTemplateRequestBodyFieldsFieldBuilder(CreateMetadataTemplateRequestBodyFieldsTypeField.FLOAT, "age", "Age").description("Person age").build(), new CreateMetadataTemplateRequestBodyFieldsField.CreateMetadataTemplateRequestBodyFieldsFieldBuilder(CreateMetadataTemplateRequestBodyFieldsTypeField.MULTISELECT, "hobby", "Hobby").description("Person hobby").options(Arrays.asList(new CreateMetadataTemplateRequestBodyFieldsOptionsField("guitar"), new CreateMetadataTemplateRequestBodyFieldsOptionsField("books"))).build())).build()) +client.getMetadataTemplates().createMetadataTemplate(new CreateMetadataTemplateRequestBody.CreateMetadataTemplateRequestBodyBuilder("enterprise", templateKey).templateKey(templateKey).fields(Arrays.asList(new CreateMetadataTemplateRequestBodyFieldsField(CreateMetadataTemplateRequestBodyFieldsTypeField.STRING, "testName", "testName"))).build()) ``` ### Arguments diff --git a/docs/retentionpolicies.md b/docs/retentionpolicies.md index bb51741c..a814487a 100644 --- a/docs/retentionpolicies.md +++ b/docs/retentionpolicies.md @@ -47,7 +47,7 @@ See the endpoint docs at ``` -client.getRetentionPolicies().createRetentionPolicy(new CreateRetentionPolicyRequestBody.CreateRetentionPolicyRequestBodyBuilder(getUuid(), CreateRetentionPolicyRequestBodyPolicyTypeField.FINITE, CreateRetentionPolicyRequestBodyDispositionActionField.REMOVE_RETENTION).description(description).retentionLength("1").retentionType(CreateRetentionPolicyRequestBodyRetentionTypeField.MODIFIABLE).canOwnerExtendRetention(false).build()) +client.getRetentionPolicies().createRetentionPolicy(new CreateRetentionPolicyRequestBody.CreateRetentionPolicyRequestBodyBuilder(retentionPolicyName, CreateRetentionPolicyRequestBodyPolicyTypeField.FINITE, CreateRetentionPolicyRequestBodyDispositionActionField.REMOVE_RETENTION).description(retentionDescription).retentionLength("1").retentionType(CreateRetentionPolicyRequestBodyRetentionTypeField.MODIFIABLE).canOwnerExtendRetention(true).areOwnersNotified(true).build()) ``` ### Arguments diff --git a/docs/sharedlinksfiles.md b/docs/sharedlinksfiles.md index 0c13ff80..d8a233fe 100644 --- a/docs/sharedlinksfiles.md +++ b/docs/sharedlinksfiles.md @@ -27,7 +27,7 @@ See the endpoint docs at ``` -userClient.getSharedLinksFiles().findFileForSharedLink(new FindFileForSharedLinkQueryParams(), new FindFileForSharedLinkHeaders(String.join("", "shared_link=", fileFromApi.getSharedLink().getUrl(), "&shared_link_password=incorrectPassword"))) +userClient.getSharedLinksFiles().findFileForSharedLink(new FindFileForSharedLinkQueryParams(), new FindFileForSharedLinkHeaders(String.join("", "shared_link=", fileFromApi.getSharedLink().getUrl(), "&shared_link_password=Secret123@"))) ``` ### Arguments diff --git a/docs/sharedlinksfolders.md b/docs/sharedlinksfolders.md index 251cbbad..1a4ec667 100644 --- a/docs/sharedlinksfolders.md +++ b/docs/sharedlinksfolders.md @@ -24,7 +24,7 @@ See the endpoint docs at ``` -userClient.getSharedLinksFolders().findFolderForSharedLink(new FindFolderForSharedLinkQueryParams(), new FindFolderForSharedLinkHeaders(String.join("", "shared_link=", folderFromApi.getSharedLink().getUrl(), "&shared_link_password=incorrectPassword"))) +userClient.getSharedLinksFolders().findFolderForSharedLink(new FindFolderForSharedLinkQueryParams(), new FindFolderForSharedLinkHeaders(String.join("", "shared_link=", folderFromApi.getSharedLink().getUrl(), "&shared_link_password=Secret123@"))) ``` ### Arguments diff --git a/docs/sharedlinksweblinks.md b/docs/sharedlinksweblinks.md index 5d91da21..9510d83c 100644 --- a/docs/sharedlinksweblinks.md +++ b/docs/sharedlinksweblinks.md @@ -24,7 +24,7 @@ See the endpoint docs at ``` -userClient.getSharedLinksWebLinks().findWebLinkForSharedLink(new FindWebLinkForSharedLinkQueryParams(), new FindWebLinkForSharedLinkHeaders(String.join("", "shared_link=", webLinkFromApi.getSharedLink().getUrl(), "&shared_link_password=incorrectPassword"))) +userClient.getSharedLinksWebLinks().findWebLinkForSharedLink(new FindWebLinkForSharedLinkQueryParams(), new FindWebLinkForSharedLinkHeaders(String.join("", "shared_link=", webLinkFromApi.getSharedLink().getUrl(), "&shared_link_password=Secret123@"))) ``` ### Arguments diff --git a/docs/shieldinformationbarriersegments.md b/docs/shieldinformationbarriersegments.md index 56cd938a..0a201009 100644 --- a/docs/shieldinformationbarriersegments.md +++ b/docs/shieldinformationbarriersegments.md @@ -48,7 +48,7 @@ See the endpoint docs at ``` -client.getShieldInformationBarrierSegments().deleteShieldInformationBarrierSegmentById(segment.getId()) +client.getShieldInformationBarrierSegments().deleteShieldInformationBarrierSegmentById(segmentId) ``` ### Arguments @@ -138,7 +138,7 @@ See the endpoint docs at ``` -client.getShieldInformationBarrierSegments().createShieldInformationBarrierSegment(new CreateShieldInformationBarrierSegmentRequestBody(new ShieldInformationBarrierBase.ShieldInformationBarrierBaseBuilder().id(barrierId).type(ShieldInformationBarrierBaseTypeField.SHIELD_INFORMATION_BARRIER).build(), segmentName)) +client.getShieldInformationBarrierSegments().createShieldInformationBarrierSegment(new CreateShieldInformationBarrierSegmentRequestBody.CreateShieldInformationBarrierSegmentRequestBodyBuilder(new ShieldInformationBarrierBase.ShieldInformationBarrierBaseBuilder().id(barrierId).type(ShieldInformationBarrierBaseTypeField.SHIELD_INFORMATION_BARRIER).build(), segmentName).description(segmentDescription).build()) ``` ### Arguments diff --git a/docs/signrequests.md b/docs/signrequests.md index bd706bb5..0cbc270b 100644 --- a/docs/signrequests.md +++ b/docs/signrequests.md @@ -134,7 +134,7 @@ See the endpoint docs at ``` -client.getSignRequests().createSignRequest(new SignRequestCreateRequest.SignRequestCreateRequestBuilder(Arrays.asList(new SignRequestCreateSigner.SignRequestCreateSignerBuilder().email(signer1Email).signerGroupId("user").build(), new SignRequestCreateSigner.SignRequestCreateSignerBuilder().email(signer2Email).signerGroupId("user").build())).sourceFiles(Arrays.asList(new FileBase(fileToSign.getId()))).parentFolder(new FolderMini(destinationFolder.getId())).build()) +client.getSignRequests().createSignRequest(new SignRequestCreateRequest.SignRequestCreateRequestBuilder(Arrays.asList(new SignRequestCreateSigner.SignRequestCreateSignerBuilder().email(signerEmail).role(SignRequestCreateSignerRoleField.SIGNER).isInPerson(false).embedUrlExternalUserId("123").declinedRedirectUrl("https://www.box.com").loginRequired(false).password("password").suppressNotifications(true).build())).sourceFiles(Arrays.asList(new FileBase(fileToSign.getId()))).parentFolder(new FolderMini(destinationFolder.getId())).isDocumentPreparationNeeded(false).redirectUrl("https://www.box.com").declinedRedirectUrl("https://www.box.com").areTextSignaturesEnabled(true).emailSubject("Sign this document").emailMessage("Please sign this document").areRemindersEnabled(true).name("Sign Request").daysValid(30L).externalId("123").externalSystemName("BoxSignIntegration").build()) ``` ### Arguments diff --git a/docs/tasks.md b/docs/tasks.md index b5be0ced..710247b4 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -52,7 +52,7 @@ See the endpoint docs at ``` -client.getTasks().createTask(new CreateTaskRequestBody.CreateTaskRequestBodyBuilder(new CreateTaskRequestBodyItemField.CreateTaskRequestBodyItemFieldBuilder().id(file.getId()).type(CreateTaskRequestBodyItemTypeField.FILE).build()).action(CreateTaskRequestBodyActionField.REVIEW).message("test message").dueAt(date).completionRule(CreateTaskRequestBodyCompletionRuleField.ALL_ASSIGNEES).build()) +client.getTasks().createTask(new CreateTaskRequestBody.CreateTaskRequestBodyBuilder(new CreateTaskRequestBodyItemField.CreateTaskRequestBodyItemFieldBuilder().id(file.getId()).type(CreateTaskRequestBodyItemTypeField.FILE).build()).action(CreateTaskRequestBodyActionField.REVIEW).message("test message").dueAt(dateTime).completionRule(CreateTaskRequestBodyCompletionRuleField.ALL_ASSIGNEES).build()) ``` ### Arguments diff --git a/docs/termsofservices.md b/docs/termsofservices.md index 1d04e436..ecc2c731 100644 --- a/docs/termsofservices.md +++ b/docs/termsofservices.md @@ -104,7 +104,7 @@ See the endpoint docs at ``` -client.getTermsOfServices().updateTermsOfServiceById(tos.getId(), new UpdateTermsOfServiceByIdRequestBody(UpdateTermsOfServiceByIdRequestBodyStatusField.DISABLED, "Updated TOS")) +client.getTermsOfServices().updateTermsOfServiceById(tos.getId(), new UpdateTermsOfServiceByIdRequestBody(UpdateTermsOfServiceByIdRequestBodyStatusField.DISABLED, "TOS")) ``` ### Arguments diff --git a/docs/trashedfiles.md b/docs/trashedfiles.md index 45f6f12c..90ed51ec 100644 --- a/docs/trashedfiles.md +++ b/docs/trashedfiles.md @@ -62,7 +62,7 @@ See the endpoint docs at ``` -client.getTrashedFiles().getTrashedFileById(uploadedFile.getId()) +client.getTrashedFiles().getTrashedFileById(file.getId()) ``` ### Arguments diff --git a/docs/uploads.md b/docs/uploads.md index 6764b3ec..d18bfb9c 100644 --- a/docs/uploads.md +++ b/docs/uploads.md @@ -22,7 +22,7 @@ See the endpoint docs at ``` -client.getUploads().uploadFileVersion(file.getId(), new UploadFileVersionRequestBody(new UploadFileVersionRequestBodyAttributesField(file.getName()), generateByteStream(20))) +client.getUploads().uploadFileVersion(uploadedFile.getId(), new UploadFileVersionRequestBody(new UploadFileVersionRequestBodyAttributesField(newFileVersionName), newFileContentStream)) ``` ### Arguments @@ -92,7 +92,7 @@ See the endpoint docs at ``` -parentClient.getUploads().uploadFile(new UploadFileRequestBody(new UploadFileRequestBodyAttributesField(getUuid(), new UploadFileRequestBodyAttributesParentField("0")), generateByteStream(1024 * 1024))) +client.getUploads().uploadFile(new UploadFileRequestBody(new UploadFileRequestBodyAttributesField(newFileName, new UploadFileRequestBodyAttributesParentField("0")), fileContentStream)) ``` ### Arguments diff --git a/docs/usercollaborations.md b/docs/usercollaborations.md index f435d001..be4b1819 100644 --- a/docs/usercollaborations.md +++ b/docs/usercollaborations.md @@ -83,7 +83,7 @@ See the endpoint docs at ``` -client.getUserCollaborations().deleteCollaborationById(groupCollaboration.getId()) +client.getUserCollaborations().deleteCollaborationById(collaborationId) ``` ### Arguments @@ -126,7 +126,7 @@ See the endpoint docs at ``` -client.getUserCollaborations().createCollaboration(new CreateCollaborationRequestBody(new CreateCollaborationRequestBodyItemField.CreateCollaborationRequestBodyItemFieldBuilder().type(CreateCollaborationRequestBodyItemTypeField.FILE).id(file.getId()).build(), new CreateCollaborationRequestBodyAccessibleByField.CreateCollaborationRequestBodyAccessibleByFieldBuilder(CreateCollaborationRequestBodyAccessibleByTypeField.USER).id(getEnvVar("USER_ID")).build(), CreateCollaborationRequestBodyRoleField.EDITOR)) +client.getUserCollaborations().createCollaboration(new CreateCollaborationRequestBody(new CreateCollaborationRequestBodyItemField.CreateCollaborationRequestBodyItemFieldBuilder().type(CreateCollaborationRequestBodyItemTypeField.FOLDER).id(folder.getId()).build(), new CreateCollaborationRequestBodyAccessibleByField.CreateCollaborationRequestBodyAccessibleByFieldBuilder(CreateCollaborationRequestBodyAccessibleByTypeField.USER).id(user.getId()).build(), CreateCollaborationRequestBodyRoleField.EDITOR)) ``` ### Arguments diff --git a/docs/users.md b/docs/users.md index f9f5b7e4..06bc6a58 100644 --- a/docs/users.md +++ b/docs/users.md @@ -55,7 +55,7 @@ See the endpoint docs at ``` -client.getUsers().createUser(new CreateUserRequestBody.CreateUserRequestBodyBuilder(userName).isPlatformAccessOnly(true).build()) +client.getUsers().createUser(new CreateUserRequestBody.CreateUserRequestBodyBuilder(userName).login(userLogin).isPlatformAccessOnly(true).build()) ``` ### Arguments @@ -208,7 +208,7 @@ See the endpoint docs at ``` -client.getUsers().deleteUserById(createdUser.getId()) +client.getUsers().deleteUserById(user.getId()) ``` ### Arguments diff --git a/docs/weblinks.md b/docs/weblinks.md index 81d91f75..206c944a 100644 --- a/docs/weblinks.md +++ b/docs/weblinks.md @@ -17,7 +17,7 @@ See the endpoint docs at ``` -client.getWebLinks().createWebLink(new CreateWebLinkRequestBody.CreateWebLinkRequestBodyBuilder("https://www.box.com", new CreateWebLinkRequestBodyParentField(parent.getId())).name(getUuid()).description("Weblink description").build()) +client.getWebLinks().createWebLink(new CreateWebLinkRequestBody.CreateWebLinkRequestBodyBuilder(url, new CreateWebLinkRequestBodyParentField(parent.getId())).name(name).description(description).build()) ``` ### Arguments @@ -106,7 +106,7 @@ See the endpoint docs at ``` -client.getWebLinks().deleteWebLinkById(webLinkId) +client.getWebLinks().deleteWebLinkById(weblink.getId()) ``` ### Arguments