Skip to content

Commit

Permalink
Removed deprecated endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pkgacek committed Jan 14, 2021
1 parent 56a0928 commit d1a769a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-penguins-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@voucherify/sdk': minor
---

Removed deprecated endpoint
12 changes: 0 additions & 12 deletions packages/sdk/src/ClientSide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@ export class ClientSide {

return this.client.post<T.ClientSideRedeemResponse>('/redeem', payload, { code })
}
// @todo - add payload Type
public publish(campaign: string, payload: $FixMe = {}) {
assert(isString(campaign), 'client.publish - campaign is required to publish a voucher')
assert(isObject(payload), 'client.redeem - expected payload to be an object')

payload.customer = payload.customer ?? {}
payload.customer.source_id = payload.customer.source_id ?? this.trackingId
payload.channel = payload.channel ?? 'Voucherify.js' // @todo - removed hard-coded channel

// @todo - add ReturnType
return this.client.post<$FixMe>('/publish', payload, { campaign })
}
/**
* @see https://docs.voucherify.io/reference#track-custom-event-client-side
*/
Expand Down

0 comments on commit d1a769a

Please sign in to comment.