Contents

init(label:amount:type:)

Initializes and returns a summary item with the given label, amount, and type.

Declaration

convenience init(label: String, amount: NSDecimalNumber, type: PKPaymentSummaryItemType)

Parameters

  • label:

    A short, localized description of the summary item.

  • amount:

    The amount associated with the summary item.

  • type:

    The type of the summary item.

Return Value

A summary item with the given label, amount, and type.

Discussion

When creating summary items for estimates or charges whose final value isn’t yet known, use a PKPaymentSummaryItemType.pending type. Use zero for the amount of pending items. The payment sheet doesn’t show the value of pending items.

See Also

Creating summary items