public interface Payment extends Resource<Payment>, Custom, WithKey
Modifier and Type | Method and Description |
---|---|
javax.money.MonetaryAmount |
getAmountAuthorized()
Deprecated.
This field will be removed with the next major SDK update.
|
javax.money.MonetaryAmount |
getAmountPaid()
Deprecated.
This field will be removed with the next major SDK update.
|
javax.money.MonetaryAmount |
getAmountPlanned() |
javax.money.MonetaryAmount |
getAmountRefunded()
Deprecated.
This field will be removed with the next major SDK update.
|
String |
getAnonymousId()
Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).
|
ZonedDateTime |
getAuthorizedUntil()
Deprecated.
This field will be removed with the next major SDK update.
|
CustomFields |
getCustom() |
Reference<Customer> |
getCustomer() |
String |
getExternalId()
Deprecated.
This field will be removed with the next major SDK update.
|
String |
getInterfaceId()
The identifier that is used by the interface that manages the payment (usually the PSP).
|
List<CustomFields> |
getInterfaceInteractions() |
String |
getKey()
User-specific unique identifier for the payment.
|
PaymentMethodInfo |
getPaymentMethodInfo() |
PaymentStatus |
getPaymentStatus() |
List<Transaction> |
getTransactions() |
static Reference<Payment> |
referenceOfId(String id)
Creates a reference for one item of this class by a known ID.
|
static String |
referenceTypeId()
A type hint for references which resource type is linked in a reference.
|
static String |
resourceTypeId()
An identifier for this resource which supports
CustomFields . |
default Reference<Payment> |
toReference()
Creates a reference to this resource, the reference may not be filled.
|
static com.fasterxml.jackson.core.type.TypeReference<Payment> |
typeReference()
Creates a container which contains the full Java type information to deserialize this class from JSON.
|
getCreatedAt, getId, getLastModifiedAt, getVersion
hasSameIdAs, toResourceIdentifier
@Deprecated @Nullable String getExternalId()
@Nullable String getInterfaceId()
getInterfaceId()
and getPaymentMethodInfo()
must be unique.javax.money.MonetaryAmount getAmountPlanned()
@Deprecated @Nullable javax.money.MonetaryAmount getAmountAuthorized()
@Deprecated @Nullable ZonedDateTime getAuthorizedUntil()
@Deprecated @Nullable javax.money.MonetaryAmount getAmountPaid()
@Deprecated @Nullable javax.money.MonetaryAmount getAmountRefunded()
PaymentMethodInfo getPaymentMethodInfo()
@Nullable CustomFields getCustom()
PaymentStatus getPaymentStatus()
List<Transaction> getTransactions()
List<CustomFields> getInterfaceInteractions()
@Nullable String getAnonymousId()
default Reference<Payment> toReference()
Referenceable
toReference
in interface Referenceable<Payment>
toReference
in interface Resource<Payment>
static String referenceTypeId()
Reference.getTypeId()
static com.fasterxml.jackson.core.type.TypeReference<Payment> typeReference()
static String resourceTypeId()
CustomFields
.TypeDraft.getResourceTypeIds()
,
Custom
static Reference<Payment> referenceOfId(String id)
An example for categories but this applies for other resources, too:
final String categoryIdFromFormOrSession = "84ac4271-0fec-49d0-9fee-55586c565c58"; final Reference<Category> categoryReference = Category.referenceOfId(categoryIdFromFormOrSession); assertThat(categoryReference.getId()).isEqualTo(categoryIdFromFormOrSession);
See the test code.
If you already have a resource object, then use toReference()
instead:
final Category category = getCategory1(); final Reference<Category> categoryReference = category.toReference(); assertThat(category.getId()).isEqualTo(categoryReference.getId());
See the test code.
id
- the ID of the resource which should be referenced.