diff --git a/package.json b/package.json index c669036..fc559ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gamebetr/api-client-js", - "version": "1.0.12", + "version": "1.0.13", "description": "Gamebetr API client library", "repository": { "type": "git", diff --git a/src/Services/affiliate.js b/src/Services/affiliate.js index 1ea155b..24783ed 100644 --- a/src/Services/affiliate.js +++ b/src/Services/affiliate.js @@ -13,6 +13,19 @@ export default class Affiliate { return token.getCookie('gamebetr_affiliate_id'); } + createConversion(domain_id, player_id, affiliate_id = 0, template_id = '', custom_id = '', promo_code = '') { + let client = new Client(this.config); + let data = { + 'domain_id': domain_id, + 'player_id': player_id, + 'affiliate_id': affiliate_id, + 'template_id': template_id, + 'custom_id': custom_id, + 'promo_code': promo_code + }; + return client.request('POST', 'affiliate/conversions', data); + } + listClicks(date_start, date_end) { let client = new Client(this.config); return client.request('GET', 'affiliate/clicks?filter[created_at]=bt|' + date_start + ';' + date_end + '&page[size]=9999');