Instance Method

initWithPrice:currencyCode:

Initializes the object with the specified price information.

Declaration

- (instancetype)initWithPrice:(NSDecimalNumber *)price currencyCode:(NSString *)currencyCode;

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 ISOCurrencyCodes method of NSLocale. For example, the string “USD” corresponds to United States dollars.

Return Value

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

Discussion

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

See Also

Creating a Price Range Object

- initWithRangeBetweenPrice:andPrice:currencyCode:

Initializes the object with the specified range of prices.

- initWithMaximumPrice:currencyCode:

Initializes the object with the specified maximum price information.

- initWithMinimumPrice:currencyCode:

Initializes the object with the specified minimum price information.