com.banxa.model.request.CreateNftOrderRequest 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.CreateNftOrderResponse;
import com.fasterxml.jackson.annotation.JsonIgnore;
public class CreateNftOrderRequest extends CreateOrderRequest {
private final String walletAddress;
protected CreateNftOrderRequest(Builder builder) {
super(builder);
this.walletAddress = builder.walletAddress;
}
public String getWalletAddress() {
return walletAddress;
}
@Override
@JsonIgnore
public String getUri() {
return "/api/orders/nft/buy";
}
@Override
@JsonIgnore
public Class getResponseClass() {
return CreateNftOrderResponse.class;
}
public static class Builder extends CreateOrderRequest.Builder {
private final String walletAddress;
public Builder(String accountReference, String fiatCode, String fiatAmount, String coinCode, String walletAddress, String returnUrlOnSuccess, NftMetaData metaData) {
super(accountReference, fiatCode, coinCode, returnUrlOnSuccess);
this.walletAddress = walletAddress;
this.withSourceAmount(fiatAmount);
this.withMetaData(metaData);
}
public CreateNftOrderRequest build() {
return new CreateNftOrderRequest(this);
}
}
}