Skip to content

Commit

Permalink
Add methods to create and update admin issued virtual cards
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuoch committed Nov 3, 2023
1 parent a055da6 commit 221ea39
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/API.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,42 @@ export default function API(network, args) {
requireParameters(['cardUserEmail', 'hasCustomLimit', 'domainName'], parameters, commandName);
return performPOSTRequest(commandName, parameters);
},

/**
* Create an admin issued virtual card
*
* @param {Object} parameters
* @param {string} parameters.cardName
* @param {string} parameters.assigneeEmail
* @param {number} parameters.cardLimit
* @param {string} parameters.cardLimitType
*
* @returns {APIDeferred}
*/
createAdminIssuedVirtualCard: function (parameters) {
const commandName = 'Card_CreateAdminIssuedVirtualCard';
requireParameters(['cardName', 'assigneeEmail', 'cardLimit', 'cardLimitType'], parameters, commandName);
return performPOSTRequest(commandName, parameters);
},

/**
* Edit an admin issued virtual card
*
* @param {Object} parameters
* @param {string} parameters.domainName
* @param {number} parameters.cardID
* @param {string} parameters.cardName
* @param {string} parameters.assigneeEmail
* @param {number} parameters.cardLimit
* @param {string} parameters.cardLimitType
*
* @returns {APIDeferred}
*/
editAdminIssuedVirtualCard: function (parameters) {
const commandName = 'Card_EditAdminIssuedVirtualCard';
requireParameters(['domainName', 'cardID', 'cardName', 'assigneeEmail', 'cardLimit', 'cardLimitType'], parameters, commandName);
return performPOSTRequest(commandName, parameters);
},
},

JSON_CODES: {
Expand Down

0 comments on commit 221ea39

Please sign in to comment.