<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INRideFareLineItem/init(title:price:currencyCode:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INRideFareLineItem(im)initWithTitle:price:currencyCode:"
  },
  "title" : "init(title:price:currencyCode:)"
}
-->

# init(title:price:currencyCode:)

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

```
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 <doc://com.apple.documentation/documentation/Foundation/NSLocale/isoCurrencyCodes> method of <doc://com.apple.documentation/documentation/Foundation/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.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)