Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
update SDK from api-definitions (#423)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <rebilly-machine-user@users.noreply.github.com>
  • Loading branch information
1 parent 40ebcf6 commit b21f474
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/resources/api-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import SubscriptionPausesResource from './subscription-pauses-resource';
import SubscriptionReactivationsResource from './subscription-reactivations-resource';
import SubscriptionsResource from './subscriptions-resource';
import TagsResource from './tags-resource';
import TagsRulesResource from './tags-rules-resource';
import TrackingResource from './tracking-resource';
import TransactionsResource from './transactions-resource';
import UsagesResource from './usages-resource';
Expand Down Expand Up @@ -142,6 +143,7 @@ export class ApiInstance {
});
this.subscriptions = SubscriptionsResource({apiHandler});
this.tags = TagsResource({apiHandler});
this.tagsRules = TagsRulesResource({apiHandler});
this.tracking = TrackingResource({apiHandler});
this.transactions = TransactionsResource({apiHandler});
this.usages = UsagesResource({apiHandler});
Expand Down
3 changes: 2 additions & 1 deletion src/resources/applications-resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ export default function ApplicationsResource({apiHandler}) {
offset = null,
filter = null,
q = null,
expand = null,
fields = null,
sort = null,
} = {}) {
const params = {limit, offset, filter, q, fields, sort};
const params = {limit, offset, filter, q, expand, fields, sort};
return apiHandler.getAll(`applications`, params);
},
create({data}) {
Expand Down
45 changes: 45 additions & 0 deletions src/resources/tags-rules-resource.js
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}`);
},
};
}

0 comments on commit b21f474

Please sign in to comment.