PaymentMethodUnion

Union-type for an expandable PaymentMethod.

The PaymentMethod can optionally be expanded by the API in some calls resulting in a full object. This pseudo-union type joins the two possible options into a single field for polymorphic serialization as either an expanded object or just an ID.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Expanded(val paymentMethod: PaymentMethod) : PaymentMethodUnion

Container for the expanded PaymentMethod object.

Link copied to clipboard
@Serializable
data class Reference(val id: String) : PaymentMethodUnion

Reference to the PaymentMethod's ID (non-expanded)

Properties

Link copied to clipboard
abstract val id: String

ID of the PaymentMethod.