---
title: "init(price:currencyCode:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inpricerange/init(price:currencycode:)"
---

# init(price:currencyCode:)

Initializes the object with the specified price information.

## Declaration

```swift
convenience init(price: NSDecimalNumber, currencyCode: String)
```

## Parameters

- `price`: The price of the service. This value is used for both the minimum and maximum prices.
- `currencyCode`: The ISO 4217 currency code to apply to the price information. 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.

## Return Value

Return Value An initialized price range object or nil if the object could not be created.

## Discussion

Discussion This method sets the minimumPrice and maximumPrice properties to the value in the price parameter.

## See Also

### Creating a Price Range Object

- [init(firstPrice:secondPrice:currencyCode:)](intents/inpricerange/init(firstprice:secondprice:currencycode:).md)
- [init(maximumPrice:currencyCode:)](intents/inpricerange/init(maximumprice:currencycode:).md)
- [init(minimumPrice:currencyCode:)](intents/inpricerange/init(minimumprice:currencycode:).md)
