Package com.adyen.model.capital
Class CalculatedGrantOffer
- java.lang.Object
-
- com.adyen.model.capital.CalculatedGrantOffer
-
public class CalculatedGrantOffer extends Object
CalculatedGrantOffer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCalculatedGrantOffer.ContractTypeEnumThe contract type of the offer.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ACCOUNT_HOLDER_IDstatic StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_CONTRACT_TYPEstatic StringJSON_PROPERTY_EXPIRES_ATstatic StringJSON_PROPERTY_FEEstatic StringJSON_PROPERTY_REPAYMENTstatic StringJSON_PROPERTY_STARTS_AT
-
Constructor Summary
Constructors Constructor Description CalculatedGrantOffer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CalculatedGrantOfferaccountHolderId(String accountHolderId)The unique identifier of the account holder that the dynamic offer is for.CalculatedGrantOfferamount(Amount amount)amountCalculatedGrantOffercontractType(CalculatedGrantOffer.ContractTypeEnum contractType)The contract type of the offer.booleanequals(Object o)Return true if this CalculatedGrantOffer object is equal to o.CalculatedGrantOfferexpiresAt(OffsetDateTime expiresAt)The expiration date and time of the offer validity period.CalculatedGrantOfferfee(GrantOfferFee fee)feestatic CalculatedGrantOfferfromJson(String jsonString)Create an instance of CalculatedGrantOffer given an JSON stringStringgetAccountHolderId()The unique identifier of the account holder that the dynamic offer is for.AmountgetAmount()Get amountCalculatedGrantOffer.ContractTypeEnumgetContractType()The contract type of the offer.OffsetDateTimegetExpiresAt()The expiration date and time of the offer validity period.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.GrantOfferFeegetFee()Get feeRepaymentgetRepayment()Get repaymentOffsetDateTimegetStartsAt()The starting date and time of the offer validity period.inthashCode()CalculatedGrantOfferincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.CalculatedGrantOfferrepayment(Repayment repayment)repaymentvoidsetAccountHolderId(String accountHolderId)The unique identifier of the account holder that the dynamic offer is for.voidsetAmount(Amount amount)amountvoidsetContractType(CalculatedGrantOffer.ContractTypeEnum contractType)The contract type of the offer.voidsetExpiresAt(OffsetDateTime expiresAt)The expiration date and time of the offer validity period.voidsetFee(GrantOfferFee fee)feevoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetRepayment(Repayment repayment)repaymentvoidsetStartsAt(OffsetDateTime startsAt)The starting date and time of the offer validity period.CalculatedGrantOfferstartsAt(OffsetDateTime startsAt)The starting date and time of the offer validity period.StringtoJson()Convert an instance of CalculatedGrantOffer to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_ACCOUNT_HOLDER_ID
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CONTRACT_TYPE
public static final String JSON_PROPERTY_CONTRACT_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXPIRES_AT
public static final String JSON_PROPERTY_EXPIRES_AT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FEE
public static final String JSON_PROPERTY_FEE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REPAYMENT
public static final String JSON_PROPERTY_REPAYMENT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STARTS_AT
public static final String JSON_PROPERTY_STARTS_AT
- See Also:
- Constant Field Values
-
-
Method Detail
-
accountHolderId
public CalculatedGrantOffer accountHolderId(String accountHolderId)
The unique identifier of the account holder that the dynamic offer is for.- Parameters:
accountHolderId- The unique identifier of the account holder that the dynamic offer is for.- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getAccountHolderId
public String getAccountHolderId()
The unique identifier of the account holder that the dynamic offer is for.- Returns:
- accountHolderId The unique identifier of the account holder that the dynamic offer is for.
-
setAccountHolderId
public void setAccountHolderId(String accountHolderId)
The unique identifier of the account holder that the dynamic offer is for.- Parameters:
accountHolderId- The unique identifier of the account holder that the dynamic offer is for.
-
amount
public CalculatedGrantOffer amount(Amount amount)
amount- Parameters:
amount-- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
contractType
public CalculatedGrantOffer contractType(CalculatedGrantOffer.ContractTypeEnum contractType)
The contract type of the offer. Possible values: * **loan** * **cashAdvance**- Parameters:
contractType- The contract type of the offer. Possible values: * **loan** * **cashAdvance**- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getContractType
public CalculatedGrantOffer.ContractTypeEnum getContractType()
The contract type of the offer. Possible values: * **loan** * **cashAdvance**- Returns:
- contractType The contract type of the offer. Possible values: * **loan** * **cashAdvance**
-
setContractType
public void setContractType(CalculatedGrantOffer.ContractTypeEnum contractType)
The contract type of the offer. Possible values: * **loan** * **cashAdvance**- Parameters:
contractType- The contract type of the offer. Possible values: * **loan** * **cashAdvance**
-
expiresAt
public CalculatedGrantOffer expiresAt(OffsetDateTime expiresAt)
The expiration date and time of the offer validity period.- Parameters:
expiresAt- The expiration date and time of the offer validity period.- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getExpiresAt
public OffsetDateTime getExpiresAt()
The expiration date and time of the offer validity period.- Returns:
- expiresAt The expiration date and time of the offer validity period.
-
setExpiresAt
public void setExpiresAt(OffsetDateTime expiresAt)
The expiration date and time of the offer validity period.- Parameters:
expiresAt- The expiration date and time of the offer validity period.
-
fee
public CalculatedGrantOffer fee(GrantOfferFee fee)
fee- Parameters:
fee-- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getFee
public GrantOfferFee getFee()
Get fee- Returns:
- fee
-
setFee
public void setFee(GrantOfferFee fee)
fee- Parameters:
fee-
-
repayment
public CalculatedGrantOffer repayment(Repayment repayment)
repayment- Parameters:
repayment-- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getRepayment
public Repayment getRepayment()
Get repayment- Returns:
- repayment
-
setRepayment
public void setRepayment(Repayment repayment)
repayment- Parameters:
repayment-
-
startsAt
public CalculatedGrantOffer startsAt(OffsetDateTime startsAt)
The starting date and time of the offer validity period.- Parameters:
startsAt- The starting date and time of the offer validity period.- Returns:
- the current
CalculatedGrantOfferinstance, allowing for method chaining
-
getStartsAt
public OffsetDateTime getStartsAt()
The starting date and time of the offer validity period.- Returns:
- startsAt The starting date and time of the offer validity period.
-
setStartsAt
public void setStartsAt(OffsetDateTime startsAt)
The starting date and time of the offer validity period.- Parameters:
startsAt- The starting date and time of the offer validity period.
-
includeNullValues
public CalculatedGrantOffer includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this CalculatedGrantOffer object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static CalculatedGrantOffer fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CalculatedGrantOffer given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CalculatedGrantOffer
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CalculatedGrantOffer
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CalculatedGrantOffer to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-