CardRequest

public struct CardRequest : Encodable

Card request model.

  • Unique identification of the card in your system.

    Declaration

    Swift

    public var externalId: String
  • This product ID is assigned to you by the Alviere team when you setup your card issuance service.

    Declaration

    Swift

    public var productId: String
  • This is the initial balance that the card being issued will have, in cents.

    Declaration

    Swift

    public var initialBalance: Int?
  • Address to ship the card to. If not present, the system will send the card to the address defined in the user account profile.

    Declaration

    Swift

    public var shippingAddress: Address?
  • The rules this card should use when authorizing a transaction.

    Declaration

    Swift

    public var authRules: AuthRules?
  • The ID to be used at the embossing process.

    Declaration

    Swift

    public var embossId: String?
  • Card custom fields. The keys can be mapped from CardCustomField if you want type safety.

    Declaration

    Swift

    public var customFields: [String : Any]?
  • Service fees to be applied to a transaction.

    Declaration

    Swift

    public var serviceFees: [CardServiceFee]?
  • Card metadata fields.

    Declaration

    Swift

    public var metadata: [String : Any]?
  • Array of incentive rules that should apply to this card.

    Declaration

    Swift

    public var incentives: CardIncentivesRules?
  • If the pin should be automatically generated.

    Declaration

    Swift

    public var autoPinGeneration: Bool?
  • Auxiliary constructor

    Declaration

    Swift

    public init(productId: String,
                externalId: String = "",
                initialBalance: Int? = nil,
                shippingAddress: AddressModel? = nil,
                authRules: AuthRules? = nil,
                embossId: String? = nil,
                customFields: [String: Any]? = nil,
                serviceFees: [CardServiceFee]? = nil,
                metadata: [String: Any]? = nil,
                incentives: CardIncentivesRules? = nil,
                // swiftlint:disable discouraged_optional_boolean
                autoPinGeneration: Bool? = nil)

    Parameters

    externalId

    Unique identification of the card in your system.

    productId

    This product ID is assigned to you by the Alviere team when you setup your card issuance service.

    initialBalance

    This is the initial balance that the card being issued will have, in cents.

    shippingAddress

    Address to ship the card to. If not present, the system will send the card to the address defined in the user account profile.

    authRules

    The rules this card should use when authorizing a transaction.

    embossId

    The ID to be used at the embossing process.

    customFields

    Card custom fields. The keys can be mapped from CardCustomField if you want type safety.

    serviceFee

    Service fees to be applied to a transaction.

    metadata

    Card metadata fields.

    incentives

    Array of incentive rules that should apply to this card.

    autoPinGeneration

    If the pin should be automatically generated.

  • Encodes this value into the given encoder.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.