Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from commercetools/gen-sdk-updates
- Loading branch information
Showing
1,135 changed files
with
22,153 additions
and
6,756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
...pi/src/main/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesPost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
|
||
package com.commercetools.api.client; | ||
|
||
import java.net.URI; | ||
import java.time.Duration; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
import io.vrap.rmf.base.client.*; | ||
import io.vrap.rmf.base.client.utils.Generated; | ||
|
||
import org.apache.commons.lang3.builder.EqualsBuilder; | ||
import org.apache.commons.lang3.builder.HashCodeBuilder; | ||
|
||
/** | ||
* <p>Create an Order from a Quote</p> | ||
* | ||
* <hr> | ||
* <div class=code-example> | ||
* <pre><code class='java'>{@code | ||
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> result = apiRoot | ||
* .withProjectKey("{projectKey}") | ||
* .orders() | ||
* .orderQuote() | ||
* .post(null) | ||
* .execute() | ||
* }</code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public class ByProjectKeyOrdersQuotesPost extends | ||
BodyApiMethod<ByProjectKeyOrdersQuotesPost, com.commercetools.api.models.order.Order, com.commercetools.api.models.order.OrderFromQuoteDraft> | ||
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyOrdersQuotesPost> { | ||
|
||
private String projectKey; | ||
|
||
private com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft; | ||
|
||
public ByProjectKeyOrdersQuotesPost(final ApiHttpClient apiHttpClient, String projectKey, | ||
com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) { | ||
super(apiHttpClient); | ||
this.projectKey = projectKey; | ||
this.orderFromQuoteDraft = orderFromQuoteDraft; | ||
} | ||
|
||
public ByProjectKeyOrdersQuotesPost(ByProjectKeyOrdersQuotesPost t) { | ||
super(t); | ||
this.projectKey = t.projectKey; | ||
this.orderFromQuoteDraft = t.orderFromQuoteDraft; | ||
} | ||
|
||
@Override | ||
protected ApiHttpRequest buildHttpRequest() { | ||
List<String> params = new ArrayList<>(getQueryParamUriStrings()); | ||
String httpRequestPath = String.format("/%s/orders/quotes", this.projectKey); | ||
if (!params.isEmpty()) { | ||
httpRequestPath += "?" + String.join("&", params); | ||
} | ||
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), | ||
io.vrap.rmf.base.client.utils.json.JsonUtils | ||
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(orderFromQuoteDraft))); | ||
|
||
} | ||
|
||
@Override | ||
public ApiHttpResponse<com.commercetools.api.models.order.Order> executeBlocking(final ApiHttpClient client, | ||
final Duration timeout) { | ||
return executeBlocking(client, timeout, com.commercetools.api.models.order.Order.class); | ||
} | ||
|
||
@Override | ||
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> execute( | ||
final ApiHttpClient client) { | ||
return execute(client, com.commercetools.api.models.order.Order.class); | ||
} | ||
|
||
public String getProjectKey() { | ||
return this.projectKey; | ||
} | ||
|
||
public void setProjectKey(final String projectKey) { | ||
this.projectKey = projectKey; | ||
} | ||
|
||
public com.commercetools.api.models.order.OrderFromQuoteDraft getBody() { | ||
return orderFromQuoteDraft; | ||
} | ||
|
||
public ByProjectKeyOrdersQuotesPost withBody( | ||
com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) { | ||
ByProjectKeyOrdersQuotesPost t = copy(); | ||
t.orderFromQuoteDraft = orderFromQuoteDraft; | ||
return t; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
|
||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
ByProjectKeyOrdersQuotesPost that = (ByProjectKeyOrdersQuotesPost) o; | ||
|
||
return new EqualsBuilder().append(projectKey, that.projectKey) | ||
.append(orderFromQuoteDraft, that.orderFromQuoteDraft) | ||
.isEquals(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return new HashCodeBuilder(17, 37).append(projectKey).append(orderFromQuoteDraft).toHashCode(); | ||
} | ||
|
||
@Override | ||
protected ByProjectKeyOrdersQuotesPost copy() { | ||
return new ByProjectKeyOrdersQuotesPost(this); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...n/java-generated/com/commercetools/api/client/ByProjectKeyOrdersQuotesRequestBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
package com.commercetools.api.client; | ||
|
||
import io.vrap.rmf.base.client.ApiHttpClient; | ||
import io.vrap.rmf.base.client.utils.Generated; | ||
|
||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public class ByProjectKeyOrdersQuotesRequestBuilder { | ||
|
||
private final ApiHttpClient apiHttpClient; | ||
private final String projectKey; | ||
|
||
public ByProjectKeyOrdersQuotesRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { | ||
this.apiHttpClient = apiHttpClient; | ||
this.projectKey = projectKey; | ||
} | ||
|
||
public ByProjectKeyOrdersQuotesPost post( | ||
com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) { | ||
return new ByProjectKeyOrdersQuotesPost(apiHttpClient, projectKey, orderFromQuoteDraft); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.