Subscription

The SDK allows for the host application to retrieve list of user subscriptions.

Required information

*Identity: In order to fetch subscriptions data, the application must have a valid user (represented by the Identity). That user must be active.

Concrete example

To fetch the list of subscriptions, one can use the following snippet

let service = SubscriptionService(identity: identity)
service.fetchContractDates(then: { result in
    switch result {
    case .success:
        // fetch successful
    case .failure:
        // error
    }
})

The HostApp now have the list of subscriptions upon success.

Last updated