l.s.s.i.ISalesforceVoucherProxy(Interface) : interface documentation

Part of lp.services.salesforce.interfaces View In Hierarchy

Wrapper class for voucher processing with Salesforce.

These vouchers are used to allow commercial projects to subscribe to Launchpad.

Method getUnredeemedVouchers Get the unredeemed vouchers for the user.
Method getAllVouchers Get all of the vouchers for the user.
Method getServerStatus Get the server status.
Method getVoucher Lookup a voucher.
Method redeemVoucher Redeem a voucher.
Method updateProjectName Update the name of a project in Salesforce.
Method grantVoucher An administrator can grant a voucher to a Launchpad user.
def getUnredeemedVouchers(user):
Get the unredeemed vouchers for the user.
def getAllVouchers(user):
Get all of the vouchers for the user.
def getServerStatus():
Get the server status.
def getVoucher(voucher_id):
Lookup a voucher.
def redeemVoucher(voucher_id, user, project):
Redeem a voucher.
Parametersvoucher_idstring with the id of the voucher to be redeemed.
useruser who is redeeming the voucher.
projectproject that is being subscribed.
Returnslist with a boolean indicating status of redemption, and an integer representing the number of months the subscription allows.
def updateProjectName(project):
Update the name of a project in Salesforce.

If a project changes its name it is updated in Salesforce.
:param project: the project to update
:return: integer representing the number of vouchers found for this
    project which were updated.
def grantVoucher(admin, approver, recipient, term_months):
An administrator can grant a voucher to a Launchpad user.

This call assumes the admin and approver already exist in the Salesforce database and can be looked up via their OpenID. The recipient may or may not exist, therefore basic information about the recipient is sent in the call.

Parametersadminthe admin who is making the grant.
approverthe manager who approved the grant.
recipientthe user who is being given the voucher.
term_monthsinteger representing the number of months for the voucher.
Returnsthe voucher id of the newly granted voucher.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.