RipeAPI
@protocol RipeAPI <NSObject>
The protocol for the main API class.
-
The base API URL to be used by the API methods.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull url;
Swift
var url: String { get }
-
Retrieves the price for the current customization.
This operation is asynchronous and the provided callback will be called with the result.
To retrieve the price of a specific customization the method
-[RipeAPI getPrice:callback:]
should be used.Declaration
Objective-C
- (void)getPrice:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func getPrice(_ callback: @escaping ([AnyHashable : Any]) -> Void)
Parameters
callback
A block that accepts the price response as a parameter.
-
Retrieves the price of a specific customization.
This operation is asynchronous and the provided callback will be called with the result.
If no options are set the current customization of the owner will be used. The options map accepts the following keys:
brand - The brand of the model.
model - The name of the model.
variant - The variant of the the specified model.
product_id - The model’s unique identification (ID).
currency - The ISO 4217 currency code.
country - The ISO 3166-2 code of the country.
initials - The initials used to personalize the model.
engraving - The engraving of the personalization.
p - The customization parts, as triplets in the form of part:material:color.
Declaration
Objective-C
- (void)getPrice:(nonnull NSDictionary *)options callback:(nonnull void (^)(NSDictionary *_Nonnull))callback;
Swift
optional func getPrice(_ options: [AnyHashable : Any], callback: @escaping ([AnyHashable : Any]) -> Void)
Parameters
options
A map with options to specify a model.
callback
A block that accepts the price response as a parameter.
-
Retrieves the price for the current customization.
This operation is asynchronous and returned promise will be resolved with the result.
To retrieve the price of a specific customization the method
-[RipeAPI getPriceP:callback:]
should be used.See
-[RipeAPI getPriceP:callback:]
Return Value
A Promise that will be resolved with the result.
-
Retrieves the price of a specific customization.
This operation is asynchronous and the returned promise will be resolved with the result.
If no options are set the current customization of the owner will be used. The options map accepts the following keys:
brand - The brand of the model.
model - The name of the model.
variant - The variant of the the specified model.
product_id - The model’s unique identification (ID).
currency - The ISO 4217 currency code.
country - The ISO 3166-2 code of the country.
initials - The initials used to personalize the model.
engraving - The engraving of the personalization.
p - The customization parts, as triplets in the form of part:material:color.
Declaration
Objective-C
- (nonnull Promise *)getPriceP:(nonnull NSDictionary *)options;
Swift
optional func getPriceP(_ options: [AnyHashable : Any]) -> Promise
Parameters
options
A map with options to specify a model.
Return Value
A Promise that will be resolved with the result.