java.lang.Object
com.maxmind.minfraud.request.Order.Builder
- Enclosing class:
- Order
Builder creates instances of Order from values set by the builder's methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaffiliateId(String id) amount(BigDecimal amount) build()discountCode(String code) hasGiftMessage(boolean hasGiftMessage) isGift(boolean isGift) referrerUri(URI uri) subaffiliateId(String id)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
amount
- Parameters:
amount- The total order amount for the transaction.- Returns:
- The builder object.
-
amount
- Parameters:
amount- The total order amount for the transaction.- Returns:
- The builder object.
-
currency
- 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
- 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
- Parameters:
id- The ID of the affiliate where the order is coming from.- Returns:
- The builder object.
-
isGift
- Parameters:
isGift- Whether order was marked as a gift by the purchaser.- Returns:
- The builder object.
-
hasGiftMessage
- Parameters:
hasGiftMessage- Whether the purchaser included a gift message.- Returns:
- The builder object.
-
subaffiliateId
- Parameters:
id- The ID of the sub-affiliate where the order is coming from.- Returns:
- The builder object.
-
referrerUri
- Parameters:
uri- The URI of the referring site for this order.- Returns:
- The builder object.
-
build
- Returns:
- An instance of
Ordercreated from the fields set on this builder.
-