0.0.30 • Published 3 years ago

upodi v0.0.30

Weekly downloads
153
License
MIT
Repository
github
Last release
3 years ago

upodi-js

Unofficial NodeJs library for consuming the upodi.com API

Overview

Getting started

Install

npm install upodi

Initialization

const UpodiApi = require('upodi')

const upodi = new UpodiApi('${api key}')
const listOfCustomer = await upodi.customers.list({pagesize: '000, pagenumber: 1})

Working with Customers

List all customers. Options to limited list all or paged results. See limited lists below.

var customers = upodi.customers.list(all: true);

Create a new customer. Requires accountnumber, fullname and currencycode.

var newId = upodi.customers.create("acocuntnumber", "fullname", "USD");

Working with Subscriptions

List all subscriptions. Options to limited list all or paged results. See limited lists below.

var subscriptions = upodi.Subscriptions.list(all: true);

Create a new subscription. Requires the customer and product plan id.

var newId = upodi.subscriptions.create(customerId, productPlanId, DateTime.UtcNow);

Subscriptions enable various actions.

var result = upodi.subscriptions.activate(subscriptionId);
var result = upodi.subscriptions.cancel(subscriptionId);
var result = upodi.subscriptions.expire(subscriptionId);
var result = upodi.subscriptions.hold(subscriptionId);
var result = upodi.subscriptions.resume(subscriptionId);

Update amount of a subscription charge.

var result = upodi.Subscriptions.SetAmount(subscriptionId, productPlanChargeId, 302.34);

Limited lists

Using the .List() method on customer and subscription (ex. upodi.Subscriptions.List()) will return a reduced number of records due to performance. You will have to iterate through the list fetching each object to get the full object.

ListProperties
CustomerID,CompanyName,AccountNumber,CurrencyCode,FullName,AutoBill,RefKey,CreatedDate,ModifiedDate
SubscriptionID,SubscriptionNumber,CustomerID,ProductPlanID,StartDate,StateCode,Status,EndDate,RefKey,CreatedDate,ModifiedDate
0.0.30

3 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago