Skip to content

Commit

Permalink
feat: handler for get variant by id
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek305 committed Apr 30, 2024
1 parent 800475f commit 89a0605
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/stack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,17 @@ class Stack {
const options = { params: optionParams, action: 'getVariantGroups' };
return this._connection.sendToParent('stackQuery', options).then(onData).catch(onError);
}

/**
* Returns variant groups details.
* @returns variant groups details.
*/
getVariantById(query={}, params = {}) {
const optionParams: GenericObjectType = params;
optionParams.query = query;
const options = { params: optionParams, action: 'getVariantById' };
return this._connection.sendToParent('stackQuery', options).then(onData).catch(onError);
}
}

export default Stack;

0 comments on commit 89a0605

Please sign in to comment.