Contents

init(title:price:currencyCode:)

Initializes the line item object with the specified title and pricing information.

Declaration

init!(title: String!, price: NSDecimalNumber!, currencyCode: String!)

Parameters

  • title:

    A localized string that describes the meaning of the charge. For example, you might specify the strings “Base fare”, “Per-mile charge”, or “+ per-mile”.

  • price:

    The price for the line item.

  • currencyCode:

    The ISO 4217 currency code to apply to the line item’s price. You can get a list of possible currency codes using the Isocurrencycodes method of Nslocale. For example, the string “USD” corresponds to United States dollars. This code used to determine the currency designator to apply to the price information.

Return Value

An initialized line item object or nil if the object could not be created.