ZSConfiguration

@objc
public class ZSConfiguration : NSObject

Configuration of the SDK. This configuration contains the basic data used to make API calls to Zoho Subscriptions’ server.

  • The unique key generated for the organization from Zoho Subscriptions. It is used for communication between the SDK and the Zoho Subscriptions Server. To generate public key go to this url -> https://subscriptions.zoho.com

    Declaration

    Swift

    @objc
    public var apiKey: String
  • The unique id of the Product created in Zoho Subscriptions.

    Declaration

    Swift

    @objc
    public var zsProductId: String
  • This is the domain that your organization is created in. For Example: If your org located in zoho.com choose ZSDomain.usDC

    Declaration

    Swift

    @objc
    public var domain: ZSDomain
  • The Unique ID that is specific to an individual user. The id will be used to reference user in Zoho Subscription.

    Declaration

    Swift

    @objc
    public var userId: String
  • The email id of the user. For new users, the email will be used in creating an customer in Zoho Subscription.

    Declaration

    Swift

    @objc
    public var emailId: String
  • The display name of the user. For new users, the display name will be used in creating an customer in Zoho Subscription.

    Declaration

    Swift

    @objc
    public var displayName: String
  • Call this method to initialize ZSConfiguration with the required values.

    Declaration

    Swift

    @objc
    public init(apiKey: String, zsProductId: String, domain: ZSDomain)

    Parameters

    apiKey

    The unique key generated for the organization from Zoho Subscriptions. It is used for communication between the SDK and the Zoho Subscriptions Server.

    zsProductId

    The unique id of the Product created in Zoho Subscriptions.

    domain

    This is the domain that your organization is created in. For Example: If your org located in zoho.com chosse ZSDomain.usDC

  • Call this method to set user details.

    Declaration

    Swift

    @objc
    public func setUserInfo(userId: String, email: String, displayName: String)

    Parameters

    userId

    The Unique ID that is specific to an individual user. The id will be used to reference user in Zoho Subscription.

    email

    The email id of the user. For new users, the email will be used in creating an customer in Zoho Subscription.

    displayName

    The display name of the user. For new users, the display name will be used in creating an customer in Zoho Subscription.