Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## 0.2.4 (11/23/2026)

### Bug fixes

- `FulfillmentClient.uploadEvidenceFileAsync` now sends the file as a `multipart/form-data` part. Before, it sent the request without a body, so every upload failed.

## 0.2.3 (10/28/2026)

### Dependencies
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "com.ebay"
version = "0.2.3"
version = "0.2.4"

java {
toolchain { languageVersion.set(JavaLanguageVersion.of(17)) }
Expand Down Expand Up @@ -91,7 +91,7 @@ publishing {
from(components["java"])
groupId = "com.ebay"
artifactId = "order-management-java-sdk"
version = "0.2.3"
version = "0.2.4"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ echo "Generating Order Management Java SDK with Kiota..."
rm -rf src/main/java/com/ebay/ordermanagement/generated

echo "Generating FulfillmentApiClient..."
kiota generate -l java -d specs/openapi/fulfillment.json \
kiota generate -l java -d specs/kiota/fulfillment.json \
-c FulfillmentApiClient -n com.ebay.ordermanagement.generated.fulfillment \
-o src/main/java/com/ebay/ordermanagement/generated/fulfillment --ebc --co

Expand Down
5,425 changes: 5,425 additions & 0 deletions specs/kiota/fulfillment.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ public CompletableFuture<UploadEvidenceFilePaymentDisputeResponse> uploadEvidenc
String paymentDisputeId, byte[] body, String accessToken, RequestOptions requestOptions) {
return CompletableFuture.supplyAsync(() -> TokenContext.runWith(accessToken, () -> {
Map<String, String> headers = mergedHeaders(requestOptions);
return kiota.paymentDispute().byPayment_dispute_id(Params.requireValid("paymentDisputeId", paymentDisputeId)).uploadEvidenceFile().post(config -> {
com.microsoft.kiota.MultipartBody multipartBody = new com.microsoft.kiota.MultipartBody();
multipartBody.addOrReplacePart("file", "application/octet-stream", body);
return kiota.paymentDispute().byPayment_dispute_id(Params.requireValid("paymentDisputeId", paymentDisputeId)).uploadEvidenceFile().post(multipartBody, config -> {
headers.forEach((k, v) -> config.headers.add(k, v));
});
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"descriptionHash": "C44DCBCE6FA06247F8B4242614048806B9EFC0B8FF91A377CF837D1C151967885BCCD5DFC86F672A4BB08321F7F5263EFF270BEC7023122C5A452C789B6F4FDE",
"descriptionLocation": "../../../../../../../../specs/openapi/fulfillment.json",
"descriptionHash": "4AECC176AAB950F0CBA963C5B686A476DBFE715C51413225563F2494A863812F4473DDE67D4439C79AE8685C9CB05953D9201ACF2BFE8FC4612D4CEEE3054DEC",
"descriptionLocation": "../../../../../../../../specs/kiota/fulfillment.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.35.0",
"clientClassName": "FulfillmentApiClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.microsoft.kiota.BaseRequestBuilder;
import com.microsoft.kiota.BaseRequestConfiguration;
import com.microsoft.kiota.HttpMethod;
import com.microsoft.kiota.MultipartBody;
import com.microsoft.kiota.RequestAdapter;
import com.microsoft.kiota.RequestInformation;
import com.microsoft.kiota.RequestOption;
Expand Down Expand Up @@ -51,26 +52,29 @@ public UploadEvidenceFileRequestBuilder(@jakarta.annotation.Nonnull final String
}
/**
* This method is used to upload an evidence file for a contested payment dispute. The unique identifier of the payment dispute is passed in as a path parameter, and unique identifiers for payment disputes can be retrieved with the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-payment_dispute-getpaymentdisputesummaries&quot; target=&quot;_blank &quot;&gt;getPaymentDisputeSummaries&lt;/a&gt; method.&lt;br&gt;&lt;br&gt;&lt;span class=&quot;tablenote&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;strong&gt;uploadEvidenceFile&lt;/strong&gt; only uploads an encrypted, binary image file (using &lt;strong&gt;multipart/form-data&lt;/strong&gt; HTTP request header), and does not have a JSON-based request payload.&lt;br&gt;&lt;br&gt;Use &apos;file&apos; as the name of the key that you use to upload the image file. The upload will not be successful if a different key name is used.&lt;br&gt;&lt;br&gt;The three image formats supported at this time are &lt;strong&gt;.JPEG&lt;/strong&gt;, &lt;strong&gt;.JPG&lt;/strong&gt;, and &lt;strong&gt;.PNG&lt;/strong&gt;.&lt;/span&gt;&lt;br&gt;After the file is successfully uploaded, the seller will need to grab the &lt;strong&gt;fileId&lt;/strong&gt; value in the response payload to add this file to a new evidence set using the &lt;strong&gt;addEvidence&lt;/strong&gt; method, or to add this file to an existing evidence set using the &lt;strong&gt;updateEvidence&lt;/strong&gt; method.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;msgbox_important&quot;&gt;&lt;p class=&quot;msgbox_importantInDiv&quot; data-mc-autonum=&quot;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color: #dd1e31;&amp;quot; class=&amp;quot;mcFormatColor&amp;quot;&amp;gt;Important! &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&quot;&gt;&lt;span class=&quot;autonumber&quot;&gt;&lt;span&gt;&lt;strong&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important!&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; This method only supports file upload. If &lt;code&gt;PROOF_OF_DELIVERY&lt;/code&gt; is requested when contesting a payment dispute, do &lt;strong&gt;not&lt;/strong&gt; upload shipment tracking information for proof of order delivery using this method. Instead, use the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-shipping_fulfillment-createshippingfulfillment&quot; target=&quot;_blank &quot;&gt;createShippingFulfillment&lt;/a&gt; to provide tracking information evidence for a dispute. &lt;/p&gt;&lt;/div&gt;
* @param body The request body
* @return a {@link UploadEvidenceFilePaymentDisputeResponse}
* @throws ErrorResponse When receiving a 400 status code
* @throws ErrorResponse When receiving a 404 status code
* @throws ErrorResponse When receiving a 409 status code
*/
@jakarta.annotation.Nullable
public UploadEvidenceFilePaymentDisputeResponse post() {
return post(null);
public UploadEvidenceFilePaymentDisputeResponse post(@jakarta.annotation.Nonnull final MultipartBody body) {
return post(body, null);
}
/**
* This method is used to upload an evidence file for a contested payment dispute. The unique identifier of the payment dispute is passed in as a path parameter, and unique identifiers for payment disputes can be retrieved with the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-payment_dispute-getpaymentdisputesummaries&quot; target=&quot;_blank &quot;&gt;getPaymentDisputeSummaries&lt;/a&gt; method.&lt;br&gt;&lt;br&gt;&lt;span class=&quot;tablenote&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;strong&gt;uploadEvidenceFile&lt;/strong&gt; only uploads an encrypted, binary image file (using &lt;strong&gt;multipart/form-data&lt;/strong&gt; HTTP request header), and does not have a JSON-based request payload.&lt;br&gt;&lt;br&gt;Use &apos;file&apos; as the name of the key that you use to upload the image file. The upload will not be successful if a different key name is used.&lt;br&gt;&lt;br&gt;The three image formats supported at this time are &lt;strong&gt;.JPEG&lt;/strong&gt;, &lt;strong&gt;.JPG&lt;/strong&gt;, and &lt;strong&gt;.PNG&lt;/strong&gt;.&lt;/span&gt;&lt;br&gt;After the file is successfully uploaded, the seller will need to grab the &lt;strong&gt;fileId&lt;/strong&gt; value in the response payload to add this file to a new evidence set using the &lt;strong&gt;addEvidence&lt;/strong&gt; method, or to add this file to an existing evidence set using the &lt;strong&gt;updateEvidence&lt;/strong&gt; method.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;msgbox_important&quot;&gt;&lt;p class=&quot;msgbox_importantInDiv&quot; data-mc-autonum=&quot;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color: #dd1e31;&amp;quot; class=&amp;quot;mcFormatColor&amp;quot;&amp;gt;Important! &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&quot;&gt;&lt;span class=&quot;autonumber&quot;&gt;&lt;span&gt;&lt;strong&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important!&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; This method only supports file upload. If &lt;code&gt;PROOF_OF_DELIVERY&lt;/code&gt; is requested when contesting a payment dispute, do &lt;strong&gt;not&lt;/strong&gt; upload shipment tracking information for proof of order delivery using this method. Instead, use the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-shipping_fulfillment-createshippingfulfillment&quot; target=&quot;_blank &quot;&gt;createShippingFulfillment&lt;/a&gt; to provide tracking information evidence for a dispute. &lt;/p&gt;&lt;/div&gt;
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link UploadEvidenceFilePaymentDisputeResponse}
* @throws ErrorResponse When receiving a 400 status code
* @throws ErrorResponse When receiving a 404 status code
* @throws ErrorResponse When receiving a 409 status code
*/
@jakarta.annotation.Nullable
public UploadEvidenceFilePaymentDisputeResponse post(@jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
final RequestInformation requestInfo = toPostRequestInformation(requestConfiguration);
public UploadEvidenceFilePaymentDisputeResponse post(@jakarta.annotation.Nonnull final MultipartBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = toPostRequestInformation(body, requestConfiguration);
final HashMap<String, ParsableFactory<? extends Parsable>> errorMapping = new HashMap<String, ParsableFactory<? extends Parsable>>();
errorMapping.put("400", ErrorResponse::createFromDiscriminatorValue);
errorMapping.put("404", ErrorResponse::createFromDiscriminatorValue);
Expand All @@ -79,22 +83,26 @@ public UploadEvidenceFilePaymentDisputeResponse post(@jakarta.annotation.Nullabl
}
/**
* This method is used to upload an evidence file for a contested payment dispute. The unique identifier of the payment dispute is passed in as a path parameter, and unique identifiers for payment disputes can be retrieved with the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-payment_dispute-getpaymentdisputesummaries&quot; target=&quot;_blank &quot;&gt;getPaymentDisputeSummaries&lt;/a&gt; method.&lt;br&gt;&lt;br&gt;&lt;span class=&quot;tablenote&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;strong&gt;uploadEvidenceFile&lt;/strong&gt; only uploads an encrypted, binary image file (using &lt;strong&gt;multipart/form-data&lt;/strong&gt; HTTP request header), and does not have a JSON-based request payload.&lt;br&gt;&lt;br&gt;Use &apos;file&apos; as the name of the key that you use to upload the image file. The upload will not be successful if a different key name is used.&lt;br&gt;&lt;br&gt;The three image formats supported at this time are &lt;strong&gt;.JPEG&lt;/strong&gt;, &lt;strong&gt;.JPG&lt;/strong&gt;, and &lt;strong&gt;.PNG&lt;/strong&gt;.&lt;/span&gt;&lt;br&gt;After the file is successfully uploaded, the seller will need to grab the &lt;strong&gt;fileId&lt;/strong&gt; value in the response payload to add this file to a new evidence set using the &lt;strong&gt;addEvidence&lt;/strong&gt; method, or to add this file to an existing evidence set using the &lt;strong&gt;updateEvidence&lt;/strong&gt; method.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;msgbox_important&quot;&gt;&lt;p class=&quot;msgbox_importantInDiv&quot; data-mc-autonum=&quot;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color: #dd1e31;&amp;quot; class=&amp;quot;mcFormatColor&amp;quot;&amp;gt;Important! &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&quot;&gt;&lt;span class=&quot;autonumber&quot;&gt;&lt;span&gt;&lt;strong&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important!&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; This method only supports file upload. If &lt;code&gt;PROOF_OF_DELIVERY&lt;/code&gt; is requested when contesting a payment dispute, do &lt;strong&gt;not&lt;/strong&gt; upload shipment tracking information for proof of order delivery using this method. Instead, use the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-shipping_fulfillment-createshippingfulfillment&quot; target=&quot;_blank &quot;&gt;createShippingFulfillment&lt;/a&gt; to provide tracking information evidence for a dispute. &lt;/p&gt;&lt;/div&gt;
* @param body The request body
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation() {
return toPostRequestInformation(null);
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final MultipartBody body) {
return toPostRequestInformation(body, null);
}
/**
* This method is used to upload an evidence file for a contested payment dispute. The unique identifier of the payment dispute is passed in as a path parameter, and unique identifiers for payment disputes can be retrieved with the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-payment_dispute-getpaymentdisputesummaries&quot; target=&quot;_blank &quot;&gt;getPaymentDisputeSummaries&lt;/a&gt; method.&lt;br&gt;&lt;br&gt;&lt;span class=&quot;tablenote&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;strong&gt;uploadEvidenceFile&lt;/strong&gt; only uploads an encrypted, binary image file (using &lt;strong&gt;multipart/form-data&lt;/strong&gt; HTTP request header), and does not have a JSON-based request payload.&lt;br&gt;&lt;br&gt;Use &apos;file&apos; as the name of the key that you use to upload the image file. The upload will not be successful if a different key name is used.&lt;br&gt;&lt;br&gt;The three image formats supported at this time are &lt;strong&gt;.JPEG&lt;/strong&gt;, &lt;strong&gt;.JPG&lt;/strong&gt;, and &lt;strong&gt;.PNG&lt;/strong&gt;.&lt;/span&gt;&lt;br&gt;After the file is successfully uploaded, the seller will need to grab the &lt;strong&gt;fileId&lt;/strong&gt; value in the response payload to add this file to a new evidence set using the &lt;strong&gt;addEvidence&lt;/strong&gt; method, or to add this file to an existing evidence set using the &lt;strong&gt;updateEvidence&lt;/strong&gt; method.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;msgbox_important&quot;&gt;&lt;p class=&quot;msgbox_importantInDiv&quot; data-mc-autonum=&quot;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;color: #dd1e31;&amp;quot; class=&amp;quot;mcFormatColor&amp;quot;&amp;gt;Important! &amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&quot;&gt;&lt;span class=&quot;autonumber&quot;&gt;&lt;span&gt;&lt;strong&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important!&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; This method only supports file upload. If &lt;code&gt;PROOF_OF_DELIVERY&lt;/code&gt; is requested when contesting a payment dispute, do &lt;strong&gt;not&lt;/strong&gt; upload shipment tracking information for proof of order delivery using this method. Instead, use the &lt;a href=&quot;/develop/api/sell/fulfillment_api#sell-fulfillment_api-shipping_fulfillment-createshippingfulfillment&quot; target=&quot;_blank &quot;&gt;createShippingFulfillment&lt;/a&gt; to provide tracking information evidence for a dispute. &lt;/p&gt;&lt;/div&gt;
* @param body The request body
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
* @return a {@link RequestInformation}
*/
@jakarta.annotation.Nonnull
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
public RequestInformation toPostRequestInformation(@jakarta.annotation.Nonnull final MultipartBody body, @jakarta.annotation.Nullable final java.util.function.Consumer<PostRequestConfiguration> requestConfiguration) {
Objects.requireNonNull(body);
final RequestInformation requestInfo = new RequestInformation(HttpMethod.POST, urlTemplate, pathParameters);
requestInfo.configure(requestConfiguration, PostRequestConfiguration::new);
requestInfo.headers.tryAdd("Accept", "application/json");
requestInfo.setContentFromParsable(requestAdapter, "multipart/form-data", body);
return requestInfo;
}
/**
Expand Down