AbstractPayTvPurchaseService
AbstractPayTvPurchaseService ⇐ AbstractPurchaseService
Kind: global abstract class
Extends: AbstractPurchaseService
Service:
Properties
Name | Type | Description |
---|---|---|
isActivated | boolean | Activation state of PayTvPurchaseService Service |
- AbstractPayTvPurchaseService ⇐
AbstractPurchaseService
- new AbstractPayTvPurchaseService()
- .init(options) ⇒
Promise
- .setActivated(options) ⇒
Promise
- .getOffers([options]) ⇒
Promise.<Array>
- .getOfferChannels(offerId) ⇒
Promise.<Array.<String>>
- ._init(options) ⇒
Promise
- ._setActivated(options) ⇒
Promise
- ._getOffers([options]) ⇒
*
- ._getOfferChannels(offerId) ⇒
*
AbstractPayTvPurchaseService()
The PayTvPurchaseService exposes the purchase API for payTv.
init(options) ⇒ Promise
Init the service
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
options | Object | request options |
setActivated(options) ⇒ Promise
Set flag isActivated to know if GDPR is active
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
options | Object | request options |
getOffers([options]) ⇒ Promise.<Array>
Get a list of available offers : -> If we have a channelIds in parameter : the function return all the available offers, including this channelIds -> If we have a offerIds in parameter : the function return all the available offers, including this offerIds which are not already subscribed -> Otherwise : the function return all available offers structure
Kind: instance method of AbstractPayTvPurchaseService
Returns: Promise.<Array>
- A list of models
Param | Type | Description |
---|---|---|
[options] | object | |
[options.channelIds] | Array.<String> | the channelId list |
[options.offerIds] | Array.<String> | the offerId list |
[options.filters] | number | possible values : byType, isPurchased, orderByPrice |
getOfferChannels(offerId) ⇒ Promise.<Array.<String>>
Get channels of the offer in parameter.
Kind: instance method of AbstractPayTvPurchaseService
Returns: Promise.<Array.<String>>
- Array of channelId
null if the offer does not exist
Param | Type | Description |
---|---|---|
offerId | number | Id of the offer |
_init(options) ⇒ Promise
Init the service
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
options | Object | request options |
_setActivated(options) ⇒ Promise
Set flag isActivated to know if GDPR is active
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
options | Object | request options |
_getOffers([options]) ⇒ *
Vendor implementation for getOffers function
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
[options] | object | |
[options.channelIds] | Array.<String> | the channelId list |
[options.offerIds] | Array.<String> | the offerId list |
[options.filters] | number | possible values : byType, isPurchased, orderByPrice |
_getOfferChannels(offerId) ⇒ *
Vendor implementation for getOfferChannels function
Kind: instance method of AbstractPayTvPurchaseService
Param | Type | Description |
---|---|---|
offerId | number | Id of the offer |