Inherits from NSObject
Declared in RecurlySDK.h

Overview

Configures the SDK and provides the main APIs for interacting with the Recurly backend. The SDK should be initialized calling [Recurly configure:] or [Recurly setConfiguration:] before any other

Tasks

Class Methods

alertViewWithError:

+ (UIAlertView *)alertViewWithError:(NSError *)error
Discussion

Helper method to create UIAlerViews based in any error provided by this SDK.

Parameters

error

Error used to create the UIAlertView

Declared In

RecurlySDK.h

configuration

+ (REConfiguration *)configuration
Discussion

Returns the current settings of the framework.

Declared In

RecurlySDK.h

configure:

+ (void)configure:(NSString *)publicKey
Discussion

This must be the first method to be called. It configures the framework using the public key provided in your Recurly’s dashboard.

Parameters

publicKey

The public key used to configure Recurly.

Declared In

RecurlySDK.h

couponForPlan:code:completion:

+ (void)couponForPlan:(NSString *)plan code:(NSString *)couponCode completion:(void ( ^ ) ( RECoupon *coupon , NSError *error ))handler
Discussion

Returns the coupon details given a plan code and a discount code.

Parameters

plan

Plan’s id

couponCode

Coupon code

handler

Completion handler

Declared In

RecurlySDK.h

planForCode:completion:

+ (void)planForCode:(NSString *)planCode completion:(void ( ^ ) ( REPlan *plan , NSError *error ))handler
Discussion

Returns an instance of REPlan given the specified plan code. The plans can be created and managed in your Recurly’s dashboard.

Parameters

planCode

Plan’s id

handler

Completion handler

Declared In

RecurlySDK.h

pricing

+ (REPricing *)pricing
Discussion

Returns a pricing object used for advanced pricing calculations.

See Also

Declared In

RecurlySDK.h

setConfiguration:

+ (void)setConfiguration:(REConfiguration *)config
Discussion

Allows a higher level of customization, instance a object of REConfiguration with your default settings and make it default by using this method.

Parameters

config

The configuration object containing all the settings and the public key.

Declared In

RecurlySDK.h

taxForPostalCode:countryCode:completion:

+ (void)taxForPostalCode:(NSString *)postalCode countryCode:(NSString *)countryCode completion:(void ( ^ ) ( RETaxes *taxes , NSError *error ))handler
Discussion

Returns an instance of RETaxes given a postal code and a country code. RETaxes will encapsulate the tax rates of the specified area.

Parameters

postalCode

Postal code

countryCode

Country Code. ISO 3166-1 alpha-2

handler

Completion handler

See Also

Declared In

RecurlySDK.h

tokenWithRequest:completion:

+ (void)tokenWithRequest:(REPayment *)payment completion:(void ( ^ ) ( NSString *token , NSError *error ))handler
Discussion

Tokenizers a payment in order to use it safely in your backend and manage the transaction. A payment is an instance of RECardPayment. This method performs an async operation, it connects with the recurly servers.

Parameters

payment

Payment to tokenize

handler

Completion handler

See Also

Declared In

RecurlySDK.h