ZSConfiguration

public class ZSConfiguration : NSObject

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

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

    Declaration

    Swift

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

    Declaration

    Swift

    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

    public var domain: ZSDomain
  • The unique identifier of the app in App Store Connect.

    Declaration

    Swift

    public var appAppleId: String
  • This will point to Zoho Billing’s beta setup for new features implementation and testing. Make sure to set this as false or blank in release environment of the app. It should be used only in development builds

    Declaration

    Swift

    public var enableBetaSetup: Bool
  • The Unique ID that is specific to an individual user. The id will be used to reference user in Zoho Billing.

    Declaration

    Swift

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

    Declaration

    Swift

    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 Billing.

    Declaration

    Swift

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

    Declaration

    Swift

    public init(apiKey: String, zsProductId: String, domain: ZSDomain, appAppleId: String, enableBetaSetup: Bool = false)

    Parameters

    apiKey

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

    zsProductId

    The unique id of the Product created in Zoho Billing.

    domain

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

    enableBeatSetup

    This will point to Zoho Billing’s beta setup for new features implementation and testing. Make sure to set this as false or blank in release environment of the app. It should be used only in development builds.

  • Call this method to set user details.

    Declaration

    Swift

    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 Billing.

    email

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

    displayName

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