Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:

Functions

createSubscription(planId, subscriptionPayload, authToken, experimentId, options)

Creates a subscription for the user.

Kind: global function
Access: public

Param Type Description
planId string The id of the subscription plan
subscriptionPayload SubscriptionPayload The data of the subscription to create
authToken string
experimentId string Id of an AB test experiment defined in the MongoDB for svc-billing
options Object Additional options
options.endpoint string The endpoint's base URL

changeSubscriptionPlan(planId, subscriptionPayload, authToken, experimentId, options)

Updates the user's subscription.

Kind: global function
Access: public

Param Type Description
planId string The id of the subscription plan
subscriptionPayload SubscriptionPayload The data of the subscription to create
authToken string
experimentId string Id of an AB test experiment defined in the MongoDB for svc-billing
options Object Additional options
options.endpoint string The endpoint's base URL

fetchSubscription(authToken, options)

Fetches a user subscription.

Kind: global function
Access: public

Param Type Description
authToken string
options Object Additional options
options.endpoint string The endpoint's base URL

fetchAllSubscriptions(authToken, options)

Fetches all user subscriptions, including those that expired.

Kind: global function
Access: public

Param Type Description
authToken string
options Object Additional options
options.endpoint string The endpoint's base URL

validateSubdomain(subdomain, locale, mandatorId)

Checks whether a subdomain is available. Note: this method still uses the NP API.

Kind: global function
Access: public

Param Type Description
subdomain string The subdomain to validate
locale string The user's locale
mandatorId string The id of the user's mandator

validateVatId(vatId, country, authToken, options)

Checks whether a VAT ID is valid.

Kind: global function
Access: public

Param Type Description
vatId string The VAT ID to check for validity
country string The Country provided by the user
authToken string
options Object Additional options
options.endpoint string The endpoint's base URL

saveAndValidateBillingInfo(authToken, billing)

Saves billing info and checks if vat is valiid

Kind: global function
Access: public

Param Type Description
authToken string
billing Object information
options.endpoint string The endpoint's base URL

changeAutoRenewal(subscriptionId, autoRenewalOn)

Sets the autorenwal state of the given subscription

Kind: global function

Param Type
subscriptionId string
autoRenewalOn boolean