0.5.0 • Published 4 months ago

@octy/promofire-web-sdk v0.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

Installation

npm install promofire-js-sdk

Setup

import { Promofire } from 'promofire-js-sdk';

const sdkData = {
  secret: 'YOUR_SECRET',
  appBuild: 'YOUR_APP_BUILD', // optional
  appVersion: 'YOUR_APP_VERSION', // optional
}

const customerData = {
  customerUserId: 'TENANT_ASSIGNED_ID',
  firstName: 'FIRST_NAME', // optional
  lastName: 'LAST_NAME', // optional
  email: 'YOUR_EMAIL', // optional
  phone: 'YOUR_PHONE' // optional
}

const promofire = new Promofire(sdkData)
  .activate(customerData);

Userless App Setup

import { Promofire } from 'promofire-js-sdk';

const sdkData = {
  secret: 'YOUR_SECRET',
  appBuild: 'YOUR_APP_BUILD', // optional
  appVersion: 'YOUR_APP_VERSION', // optional
}

const promofire = new Promofire(sdkData)
  .activate();

Methods

  • get templates list
  • get templates by id

  • get available codes

  • get one code by value
  • create one code
  • create codes batch
  • update code
  • redeem code
  • get codes by campaign id
  • get redeems of my code
  • get my code redeems

  • get me

0.5.0

4 months ago

0.4.1

4 months ago

0.4.0

4 months ago

0.3.0

4 months ago