Package com.maxmind.minfraud.request
Class Order.Builder
- java.lang.Object
-
- com.maxmind.minfraud.request.Order.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Order.BuilderaffiliateId(String id)Order.Builderamount(Double amount)Order.Builderamount(BigDecimal amount)Orderbuild()Order.Buildercurrency(String code)Order.BuilderdiscountCode(String code)Order.BuilderhasGiftMessage(boolean hasGiftMessage)Order.BuilderisGift(boolean isGift)Order.BuilderreferrerUri(URI uri)Order.BuildersubaffiliateId(String id)
-
-
-
Method Detail
-
amount
public Order.Builder amount(BigDecimal amount)
- Parameters:
amount- The total order amount for the transaction.- Returns:
- The builder object.
-
amount
public Order.Builder amount(Double amount)
- Parameters:
amount- The total order amount for the transaction.- Returns:
- The builder object.
-
currency
public Order.Builder currency(String code)
- Parameters:
code- The ISO 4217 currency code for the currency used in the transaction.- Returns:
- The builder object.
- Throws:
IllegalArgumentException- when currency is not a valid three-letter currency code.
-
discountCode
public Order.Builder discountCode(String code)
- Parameters:
code- The discount code applied to the transaction. If multiple discount codes were used, please separate them with a comma.- Returns:
- The builder object.
-
affiliateId
public Order.Builder affiliateId(String id)
- Parameters:
id- The ID of the affiliate where the order is coming from.- Returns:
- The builder object.
-
isGift
public Order.Builder isGift(boolean isGift)
- Parameters:
isGift- Whether order was marked as a gift by the purchaser.- Returns:
- The builder object.
-
hasGiftMessage
public Order.Builder hasGiftMessage(boolean hasGiftMessage)
- Parameters:
hasGiftMessage- Whether the purchaser included a gift message.- Returns:
- The builder object.
-
subaffiliateId
public Order.Builder subaffiliateId(String id)
- Parameters:
id- The ID of the sub-affiliate where the order is coming from.- Returns:
- The builder object.
-
referrerUri
public Order.Builder referrerUri(URI uri)
- Parameters:
uri- The URI of the referring site for this order.- Returns:
- The builder object.
-
build
public Order build()
- Returns:
- An instance of
Ordercreated from the fields set on this builder.
-
-