BTNOfferDetails Protocol Reference

Conforms to NSObject
Declared in BTNOfferDetails.h

Overview

Defines the interface for creating OfferDetails objects for use in configuring ImpressionViews.

Note: You may either create an instance of the concrete class OfferDetails or implement this protocol on one of your own classes.

Other Methods

  url required method

The URL that is associated with the offer.

@property (nonatomic, readonly, copy) NSString *url

Discussion

The URL that is associated with the offer.

Declared In

BTNOfferDetails.h

  offerId required method

The Button-provided value that identifies the served offer.

@property (nonatomic, readonly, copy) NSString *offerId

Discussion

The Button-provided value that identifies the served offer.

Declared In

BTNOfferDetails.h

  visibleRate required method

The rate visible to the user. If the visibleRateType is fixed, this value represents the amount in the currency of the offer. If it is percent, this will be a value ranging from 0.0 to 100.0.

@property (nonatomic, readonly, assign) double visibleRate

Discussion

The rate visible to the user. If the visibleRateType is fixed, this value represents the amount in the currency of the offer. If it is percent, this will be a value ranging from 0.0 to 100.0.

Default value is 0.0.

Declared In

BTNOfferDetails.h

  visibleRateType required method

An enum value representing type of the visibleRate for the offer that is displayed to the user, either percent or fixed.

@property (nonatomic, readonly, assign) BTNVisibleRateType visibleRateType

Discussion

An enum value representing type of the visibleRate for the offer that is displayed to the user, either percent or fixed.

Declared In

BTNOfferDetails.h

Initialization

– initWithURL:offerId:visibleRate:rateType:

Creates a new instance with the details of an impression to be passed to an ImpressionView’s configureWith(details:) method.

- (instancetype)initWithURL:(NSString *)url offerId:(NSString *)offerId visibleRate:(double)visibleRate rateType:(BTNVisibleRateType)rateType

Parameters

url

The URL string of the served offer.

offerId

The Button-provided value that identifies the rate of the served offer.

visibleRate

The new visibleRateType of the served offer (or zero when not applicable).

rateType

The new visibleRate of the served offer (or unknown when not applicable).

If the offer displayed is valued at 3%, pass 3 for visibleRate and a rateType of .percent

impressionView.configureWith(details: ImpressionDetails(url: url, offerId: offerId, visibleRate: 3.0, rateType: .percent))

If the offer displayed is valued at $5, pass 5.0 for visibleRate and a rateType of .fixed

@code impressionView.configureWith(details: ImpressionDetails(url: url, offerId: offerId, visibleRate: 5.0, rateType: .fixed)) @endcode

Discussion

Creates a new instance with the details of an impression to be passed to an ImpressionView’s configureWith(details:) method.

Declared In

BTNOfferDetails.h