-
Deprecated
Not available in api version 3.8
The id of the account group for which the threshold is valid.
Declaration
Objective-C
@property (nonatomic, strong, readonly) MNF_DEPRECATED("Not available in api version 3.8") NSNumber *accountSetId;
Swift
var accountSetId: NSNumber { get }
-
The currency of the threshold set’s threshold values. If all associated accounts are in the same currency then that currency is used. If the account currencies are different the user currency is used.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSString *_Nonnull currencyCode;
Swift
var currencyCode: String { get }
-
A collection of account ids for which the threshold is valid. If nothing specified the threshold will be applied to all the user’s accounts.
Declaration
Objective-C
@property (nonatomic, copy) NSArray *_Nonnull accountIds;
Swift
var accountIds: [Any] { get set }
-
A collection of lower thresholds for the thresholds set in the currency of ‘CurrencyCode’.
Declaration
Objective-C
@property (nonatomic, copy) NSArray *_Nonnull lowerThresholds;
Swift
var lowerThresholds: [Any] { get set }
-
A collection of upper thresholds for the thresholds set in the currency of ‘CurrencyCode’.
Declaration
Objective-C
@property (nonatomic, copy) NSArray *_Nonnull upperThresholds;
Swift
var upperThresholds: [Any] { get set }
-
Deprecated
Not available in api version 3.8
A decimal specifying the value of the threshold.
Declaration
Objective-C
@property (nonatomic, strong) MNF_DEPRECATED("Not available in api version 3.8") NSNumber *value;
Swift
var value: NSNumber { get set }
-
Deprecated
Not available in api version 3.8
Whether the threshold is an upper limit or not.
Declaration
Objective-C
@property (nonatomic, strong) MNF_DEPRECATED("Not available in api version 3.8") NSNumber *isUpperLimit;
Swift
var isUpperLimit: NSNumber { get set }
-
Deprecated
Not available in api version 3.8
Fetches a threshold with a given identifier.
Declaration
Objective-C
+ (nonnull MNFJob *)fetchWithId:(nonnull NSNumber *)identifier completion: (nullable MNFThresholdCompletionHandler)completion;
Swift
class func fetch(withId identifier: NSNumber, completion: MNFThresholdCompletionHandler? = nil) -> MNFJob
Parameters
identifier
The id of the threshold.
completion
A completion block returning a threshold and an error.
Return Value
MNFJob A job containing a threshold and an error.
-
Fetches a list of thresholds filtered by account ids.
Declaration
Objective-C
+ (nonnull MNFJob *) fetchThresholdsWithAccountIds:(nullable NSString *)accountIds completion: (nullable MNFMultipleThresholdsCompletionHandler) completion;
Swift
class func fetchThresholds(withAccountIds accountIds: String?, completion: MNFMultipleThresholdsCompletionHandler? = nil) -> MNFJob
Parameters
accountIds
A comma seperated string of account ids to filter by. If nil returns all.
completion
A completion block returning a list of thresholds and an error.
Return Value
MNFJob A job containing a list of thresholds and an error.
-
Deprecated
User ‘createThresholdSetWithLowerThresholds:…’ instead
Creates a threshold on the server for give account ids.
Declaration
Objective-C
+ (nonnull MNFJob *) createThresholdWithValue:(nullable NSNumber *)value isUpperLimit:(nullable NSNumber *)isUpperLimit accountIds:(nonnull NSArray<NSNumber *> *)accountIds completion:(nullable MNFThresholdCompletionHandler)completion;
Swift
class func createThreshold(withValue value: NSNumber?, isUpperLimit: NSNumber?, accountIds: [NSNumber], completion: MNFThresholdCompletionHandler? = nil) -> MNFJob
Parameters
value
The value of the threshold.
isUpperLimit
Whether the threshold is an upper limit or not.
accountIds
A list of account ids for which the threshold is valid.
completion
A completion block returning the created threshold and an error.
Return Value
MNFJob A job containing the created threshold and an error.
-
Creates a threshold on the server for give account ids.
Declaration
Objective-C
+ (nonnull MNFJob *) createThresholdSetWithLowerThresholds: (nonnull NSArray<NSNumber *> *)lowerThresholds upperThresholds: (nonnull NSArray<NSNumber *> *)upperThresholds accountIds: (nonnull NSArray<NSNumber *> *)accountIds completion: (nullable MNFThresholdCompletionHandler) completion;
Swift
class func createThresholdSet(withLowerThresholds lowerThresholds: [NSNumber], upperThresholds: [NSNumber], accountIds: [NSNumber], completion: MNFThresholdCompletionHandler? = nil) -> MNFJob
Parameters
lowerThresholds
A list of lower thresholds.
upperThresholds
A list of upper thresholds.
accountIds
A list of account ids for which the threshold is valid.
completion
A completion block returning the created threshold and an error.
Return Value
MNFJob A job containing the created threshold and an error.
-
Deletes the threshold from the server.
Note
Remember to deallocate objects that have been deleted from the server.
Declaration
Objective-C
- (nonnull MNFJob *)deleteThresholdWithCompletion: (nullable MNFErrorOnlyCompletionHandler)completion;
Swift
func delete(completion: MNFErrorOnlyCompletionHandler? = nil) -> MNFJob
Parameters
completion
A completion block returning an error.
Return Value
MNFJob A job containing an error.
-
Save changes to a threshold on the server.
Declaration
Objective-C
- (nonnull MNFJob *)saveWithCompletion: (nullable MNFErrorOnlyCompletionHandler)completion;
Swift
func save(completion: MNFErrorOnlyCompletionHandler? = nil) -> MNFJob
Parameters
completion
A completion block returning an error.
Return Value
MNFJob A job containing an error.s