Package org.stellar.sdk
Class ManageSellOfferOperation.Builder
java.lang.Object
org.stellar.sdk.ManageSellOfferOperation.Builder
- Enclosing class:
ManageSellOfferOperation
Builds ManageSellOffer operation. If you want to update existing offer use
setOfferId(long).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(@NonNull Asset selling, @NonNull Asset buying, @NonNull String amount, @NonNull String price) An alias forBuilder(Asset, Asset, String, Price)Builder(@NonNull Asset selling, @NonNull Asset buying, @NonNull String amount, @NonNull Price price) Creates a new ManageSellOffer builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an operationsetOfferId(long offerId) Sets offer ID.setSourceAccount(@NonNull String sourceAccount) Sets the source account for this operation.
-
Constructor Details
-
Builder
public Builder(@NonNull @NonNull Asset selling, @NonNull @NonNull Asset buying, @NonNull @NonNull String amount, @NonNull @NonNull Price price) Creates a new ManageSellOffer builder. If you want to update existing offer usesetOfferId(long).- Parameters:
selling- The asset being sold in this operationbuying- The asset being bought in this operationamount- Amount of selling being sold.price- Price of 1 unit of selling in terms of buying.- Throws:
ArithmeticException- when amount has more than 7 decimal places.
-
Builder
public Builder(@NonNull @NonNull Asset selling, @NonNull @NonNull Asset buying, @NonNull @NonNull String amount, @NonNull @NonNull String price) An alias forBuilder(Asset, Asset, String, Price)
-
-
Method Details
-
setOfferId
Sets offer ID.0creates a new offer. Set to existing offer ID to change it.- Parameters:
offerId-
-
setSourceAccount
Sets the source account for this operation.- Parameters:
sourceAccount- The operation's source account.- Returns:
- Builder object so you can chain methods.
-
build
Builds an operation
-