This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update SDK from api-definitions (#423)
Co-authored-by: rebilly-machine-user <rebilly-machine-user@users.noreply.github.com>
- Loading branch information
1 parent
40ebcf6
commit b21f474
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* This file was auto-generated by rebilly-sdk-generator. | ||
* Do not make direct changes to this file. | ||
*/ | ||
|
||
export default function TagsRulesResource({apiHandler}) { | ||
return { | ||
/** | ||
* @param { rebilly.GetTagsRulesCollectionRequest } request | ||
* @returns { rebilly.GetTagsRulesCollectionResponsePromise } response | ||
*/ | ||
getAllTagsRules({ | ||
limit = null, | ||
offset = null, | ||
sort = null, | ||
filter = null, | ||
q = null, | ||
} = {}) { | ||
const params = {limit, offset, sort, filter, q}; | ||
return apiHandler.getAll(`tags-rules`, params); | ||
}, | ||
/** | ||
* @param { rebilly.CreateTagRulesRequest } request | ||
* @returns { rebilly.PostTagRulesResponsePromise } response | ||
*/ | ||
createTagsRule({id = '', data}) { | ||
return apiHandler.create(`tags-rules/${id}`, id, data); | ||
}, | ||
/** | ||
* @returns { rebilly.GetTagsRuleResponsePromise } response | ||
*/ | ||
getTagsRule({id}) { | ||
return apiHandler.get(`tags-rules/${id}`); | ||
}, | ||
/** | ||
* @returns { rebilly.PutTagsRuleResponsePromise } response | ||
*/ | ||
updateTagsRule({id, data}) { | ||
return apiHandler.put(`tags-rules/${id}`, data); | ||
}, | ||
deleteTagsRule({id}) { | ||
return apiHandler.delete(`tags-rules/${id}`); | ||
}, | ||
}; | ||
} |