Package model
Class Authorization
- java.lang.Object
-
- model.Authorization
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Authorization extends Object
A charge authorization
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthorization.CustomTypeAdapterFactorystatic classAuthorization.StateEnumThe state of the `Authorization`.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Authorization()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Authorization_3dsRedirectUrl(String _3dsRedirectUrl)AuthorizationadditionalBuyerCharges(AdditionalBuyerCharges additionalBuyerCharges)AuthorizationaddMessagesItem(String messagesItem)Authorizationamount(Long amount)Authorizationapplication(String application)AuthorizationcaptureAmount(Long captureAmount)AuthorizationcardPresentDetails(CardPresentDetails cardPresentDetails)AuthorizationcreatedAt(OffsetDateTime createdAt)Authorizationcurrency(Currency currency)Authorizationdevice(String device)booleanequals(Object o)AuthorizationexpiresAt(OffsetDateTime expiresAt)AuthorizationfailureCode(String failureCode)AuthorizationfailureMessage(String failureMessage)static AuthorizationfromJson(String jsonString)Create an instance of Authorization given an JSON stringStringget3dsRedirectUrl()The redirect URL used for 3DS transactions (if supported by the processor).AdditionalBuyerChargesgetAdditionalBuyerCharges()Get additionalBuyerChargesLonggetAmount()The total amount that will be debited in cents (e.g.StringgetApplication()The ID of the `Application` resource the `Authorization` was created under.LonggetCaptureAmount()The amount of the `Authorization` you would like to capture in cents.CardPresentDetailsgetCardPresentDetails()Get cardPresentDetailsOffsetDateTimegetCreatedAt()Timestamp of when the object was created.CurrencygetCurrency()Get currencyStringgetDevice()The ID of the activated device.OffsetDateTimegetExpiresAt()`Authorization` expiration time.StringgetFailureCode()The code of the failure so the decline can be handled programmatically.StringgetFailureMessage()A human-readable description of why the transaction was declined.StringgetId()The ID of the `Authorization` resource.StringgetIdempotencyId()A randomly generated value that'll be associated with the request.BooleangetIsVoid()Details if the `Authorization` is void.AuthorizationLinksgetLinks()Get linksStringgetMerchantIdentity()The ID of the resource.List<String>getMessages()Message field that provides additional details.ObjectgetRaw()Raw response from the processor.StringgetSource()ID of the `Payment Instrument` where funds get debited.Authorization.StateEnumgetState()The state of the `Authorization`.Map<String,String>getTags()Key value pair for annotating custom meta data (e.g.StringgetTraceId()Trace ID of the `Authorization`.StringgetTransfer()The ID of the `transfer` resource that gets created when the `Authorization` moves to **SUCCEEDED**.OffsetDateTimegetUpdatedAt()Timestamp of when the object was last updated.StringgetVoidState()Details if the `Authorization` has been voided.inthashCode()Authorizationid(String id)AuthorizationidempotencyId(String idempotencyId)AuthorizationisVoid(Boolean isVoid)Authorizationlinks(AuthorizationLinks links)AuthorizationmerchantIdentity(String merchantIdentity)Authorizationmessages(List<String> messages)AuthorizationputTagsItem(String key, String tagsItem)Authorizationraw(Object raw)voidset3dsRedirectUrl(String _3dsRedirectUrl)voidsetAdditionalBuyerCharges(AdditionalBuyerCharges additionalBuyerCharges)voidsetAmount(Long amount)voidsetApplication(String application)voidsetCaptureAmount(Long captureAmount)voidsetCardPresentDetails(CardPresentDetails cardPresentDetails)voidsetCreatedAt(OffsetDateTime createdAt)voidsetCurrency(Currency currency)voidsetDevice(String device)voidsetExpiresAt(OffsetDateTime expiresAt)voidsetFailureCode(String failureCode)voidsetFailureMessage(String failureMessage)voidsetId(String id)voidsetIdempotencyId(String idempotencyId)voidsetIsVoid(Boolean isVoid)voidsetLinks(AuthorizationLinks links)voidsetMerchantIdentity(String merchantIdentity)voidsetMessages(List<String> messages)voidsetRaw(Object raw)voidsetSource(String source)voidsetState(Authorization.StateEnum state)voidsetTags(Map<String,String> tags)voidsetTraceId(String traceId)voidsetTransfer(String transfer)voidsetUpdatedAt(OffsetDateTime updatedAt)voidsetVoidState(String voidState)Authorizationsource(String source)Authorizationstate(Authorization.StateEnum state)Authorizationtags(Map<String,String> tags)StringtoJson()Convert an instance of Authorization to an JSON stringStringtoString()AuthorizationtraceId(String traceId)Authorizationtransfer(String transfer)AuthorizationupdatedAt(OffsetDateTime updatedAt)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundAuthorizationvoidState(String voidState)
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CREATED_AT
public static final String SERIALIZED_NAME_CREATED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UPDATED_AT
public static final String SERIALIZED_NAME_UPDATED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_3DS_REDIRECT_URL
public static final String SERIALIZED_NAME_3DS_REDIRECT_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ADDITIONAL_BUYER_CHARGES
public static final String SERIALIZED_NAME_ADDITIONAL_BUYER_CHARGES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AMOUNT
public static final String SERIALIZED_NAME_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_APPLICATION
public static final String SERIALIZED_NAME_APPLICATION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CARD_PRESENT_DETAILS
public static final String SERIALIZED_NAME_CARD_PRESENT_DETAILS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CAPTURE_AMOUNT
public static final String SERIALIZED_NAME_CAPTURE_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CURRENCY
public static final String SERIALIZED_NAME_CURRENCY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DEVICE
public static final String SERIALIZED_NAME_DEVICE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPIRES_AT
public static final String SERIALIZED_NAME_EXPIRES_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FAILURE_CODE
public static final String SERIALIZED_NAME_FAILURE_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FAILURE_MESSAGE
public static final String SERIALIZED_NAME_FAILURE_MESSAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IDEMPOTENCY_ID
public static final String SERIALIZED_NAME_IDEMPOTENCY_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IS_VOID
public static final String SERIALIZED_NAME_IS_VOID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MERCHANT_IDENTITY
public static final String SERIALIZED_NAME_MERCHANT_IDENTITY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MESSAGES
public static final String SERIALIZED_NAME_MESSAGES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RAW
public static final String SERIALIZED_NAME_RAW
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SOURCE
public static final String SERIALIZED_NAME_SOURCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATE
public static final String SERIALIZED_NAME_STATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAGS
public static final String SERIALIZED_NAME_TAGS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRACE_ID
public static final String SERIALIZED_NAME_TRACE_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRANSFER
public static final String SERIALIZED_NAME_TRANSFER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VOID_STATE
public static final String SERIALIZED_NAME_VOID_STATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LINKS
public static final String SERIALIZED_NAME_LINKS
- See Also:
- Constant Field Values
-
-
Method Detail
-
id
public Authorization id(String id)
-
setId
public void setId(String id)
-
createdAt
public Authorization createdAt(OffsetDateTime createdAt)
-
getCreatedAt
@Nullable public OffsetDateTime getCreatedAt()
Timestamp of when the object was created.- Returns:
- createdAt
-
setCreatedAt
public void setCreatedAt(OffsetDateTime createdAt)
-
updatedAt
public Authorization updatedAt(OffsetDateTime updatedAt)
-
getUpdatedAt
@Nullable public OffsetDateTime getUpdatedAt()
Timestamp of when the object was last updated.- Returns:
- updatedAt
-
setUpdatedAt
public void setUpdatedAt(OffsetDateTime updatedAt)
-
_3dsRedirectUrl
public Authorization _3dsRedirectUrl(String _3dsRedirectUrl)
-
get3dsRedirectUrl
@Nullable public String get3dsRedirectUrl()
The redirect URL used for 3DS transactions (if supported by the processor).- Returns:
- _3dsRedirectUrl
-
set3dsRedirectUrl
public void set3dsRedirectUrl(String _3dsRedirectUrl)
-
additionalBuyerCharges
public Authorization additionalBuyerCharges(AdditionalBuyerCharges additionalBuyerCharges)
-
getAdditionalBuyerCharges
@Nullable public AdditionalBuyerCharges getAdditionalBuyerCharges()
Get additionalBuyerCharges- Returns:
- additionalBuyerCharges
-
setAdditionalBuyerCharges
public void setAdditionalBuyerCharges(AdditionalBuyerCharges additionalBuyerCharges)
-
amount
public Authorization amount(Long amount)
-
getAmount
@Nullable public Long getAmount()
The total amount that will be debited in cents (e.g. 100 cents to debit $1.00). minimum: 0- Returns:
- amount
-
setAmount
public void setAmount(Long amount)
-
application
public Authorization application(String application)
-
getApplication
@Nullable public String getApplication()
The ID of the `Application` resource the `Authorization` was created under.- Returns:
- application
-
setApplication
public void setApplication(String application)
-
cardPresentDetails
public Authorization cardPresentDetails(CardPresentDetails cardPresentDetails)
-
getCardPresentDetails
@Nullable public CardPresentDetails getCardPresentDetails()
Get cardPresentDetails- Returns:
- cardPresentDetails
-
setCardPresentDetails
public void setCardPresentDetails(CardPresentDetails cardPresentDetails)
-
captureAmount
public Authorization captureAmount(Long captureAmount)
-
getCaptureAmount
@Nullable public Long getCaptureAmount()
The amount of the `Authorization` you would like to capture in cents. Must be less than or equal to the `amount` of the `Authorization`.- Returns:
- captureAmount
-
setCaptureAmount
public void setCaptureAmount(Long captureAmount)
-
currency
public Authorization currency(Currency currency)
-
setCurrency
public void setCurrency(Currency currency)
-
device
public Authorization device(String device)
-
setDevice
public void setDevice(String device)
-
expiresAt
public Authorization expiresAt(OffsetDateTime expiresAt)
-
getExpiresAt
@Nullable public OffsetDateTime getExpiresAt()
`Authorization` expiration time.- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(OffsetDateTime expiresAt)
-
failureCode
public Authorization failureCode(String failureCode)
-
getFailureCode
@Nullable public String getFailureCode()
The code of the failure so the decline can be handled programmatically. For more info on how to handle the failure, see [Failure Codes](/docs/guides/developers/errors/#failure-codes).- Returns:
- failureCode
-
setFailureCode
public void setFailureCode(String failureCode)
-
failureMessage
public Authorization failureMessage(String failureMessage)
-
getFailureMessage
@Nullable public String getFailureMessage()
A human-readable description of why the transaction was declined. This will also include a suggestion on how to complete the payment.- Returns:
- failureMessage
-
setFailureMessage
public void setFailureMessage(String failureMessage)
-
idempotencyId
public Authorization idempotencyId(String idempotencyId)
-
getIdempotencyId
@Nullable public String getIdempotencyId()
A randomly generated value that'll be associated with the request.- Returns:
- idempotencyId
-
setIdempotencyId
public void setIdempotencyId(String idempotencyId)
-
isVoid
public Authorization isVoid(Boolean isVoid)
-
getIsVoid
@Nullable public Boolean getIsVoid()
Details if the `Authorization` is void.- Returns:
- isVoid
-
setIsVoid
public void setIsVoid(Boolean isVoid)
-
merchantIdentity
public Authorization merchantIdentity(String merchantIdentity)
-
getMerchantIdentity
@Nullable public String getMerchantIdentity()
The ID of the resource.- Returns:
- merchantIdentity
-
setMerchantIdentity
public void setMerchantIdentity(String merchantIdentity)
-
messages
public Authorization messages(List<String> messages)
-
addMessagesItem
public Authorization addMessagesItem(String messagesItem)
-
getMessages
@Nullable public List<String> getMessages()
Message field that provides additional details. This field is typically **null**.- Returns:
- messages
-
raw
public Authorization raw(Object raw)
-
setRaw
public void setRaw(Object raw)
-
source
public Authorization source(String source)
-
getSource
@Nullable public String getSource()
ID of the `Payment Instrument` where funds get debited.- Returns:
- source
-
setSource
public void setSource(String source)
-
state
public Authorization state(Authorization.StateEnum state)
-
getState
@Nullable public Authorization.StateEnum getState()
The state of the `Authorization`.- Returns:
- state
-
setState
public void setState(Authorization.StateEnum state)
-
tags
public Authorization tags(Map<String,String> tags)
-
putTagsItem
public Authorization putTagsItem(String key, String tagsItem)
-
getTags
@Nullable public Map<String,String> getTags()
Key value pair for annotating custom meta data (e.g. order numbers).- Returns:
- tags
-
traceId
public Authorization traceId(String traceId)
-
getTraceId
@Nullable public String getTraceId()
Trace ID of the `Authorization`. The processor sends back the `trace_id` so you can track the authorization end-to-end.- Returns:
- traceId
-
setTraceId
public void setTraceId(String traceId)
-
transfer
public Authorization transfer(String transfer)
-
getTransfer
@Nullable public String getTransfer()
The ID of the `transfer` resource that gets created when the `Authorization` moves to **SUCCEEDED**.- Returns:
- transfer
-
setTransfer
public void setTransfer(String transfer)
-
voidState
public Authorization voidState(String voidState)
-
getVoidState
@Nullable public String getVoidState()
Details if the `Authorization` has been voided.- Returns:
- voidState
-
setVoidState
public void setVoidState(String voidState)
-
links
public Authorization links(AuthorizationLinks links)
-
getLinks
@Nullable public AuthorizationLinks getLinks()
Get links- Returns:
- links
-
setLinks
public void setLinks(AuthorizationLinks links)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to Authorization
-
fromJson
public static Authorization fromJson(String jsonString) throws IOException
Create an instance of Authorization given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Authorization
- Throws:
IOException- if the JSON string is invalid with respect to Authorization
-
toJson
public String toJson()
Convert an instance of Authorization to an JSON string- Returns:
- JSON string
-
-