![JAR search and dependency download from the Maven repository](/logo.png)
com.banxa.model.request.GetOrderRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
The Java SDK for integration with Banxa's API
The newest version!
package com.banxa.model.request;
import com.banxa.model.response.GetOrderResponse;
import java.util.HashMap;
import java.util.Map;
public class GetOrderRequest extends GetRequest {
private static final String BASE_URI = "/api/orders/";
private final String orderId;
private final String fxCurrency;
private GetOrderRequest(Builder builder) {
this.orderId = builder.orderId;
this.fxCurrency = builder.fxCurrency;
}
@Override
public String getUri() {
String uri = BASE_URI + this.orderId;
Map uriParams = new HashMap<>();
this.addUriParam(uriParams, "fx_currency", fxCurrency);
return appendUriParams(uri, uriParams);
}
@Override
public Class getResponseClass() {
return GetOrderResponse.class;
}
public static class Builder {
private final String orderId;
private String fxCurrency;
public Builder(String orderId) {
this.orderId = orderId;
}
public Builder withFxCurrency(String fxCurrency) {
this.fxCurrency = fxCurrency;
return this;
}
public GetOrderRequest build() {
return new GetOrderRequest(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy