From 9c5ab6597925c9cb1be3efbbd122ed892ec08877 Mon Sep 17 00:00:00 2001 From: cb-navaneedhan Date: Tue, 26 May 2020 12:04:17 +0530 Subject: [PATCH] Addressing review comments: #3 SUBSENGG-6138 --- typescript/LICENSE | 24 ++++++++++++++++++++++++ typescript/README.md | 29 +++++++++++++++++++++++++++++ typescript/package.json | 8 ++++---- typescript/src/core.ts | 2 +- 4 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 typescript/LICENSE create mode 100644 typescript/README.md diff --git a/typescript/LICENSE b/typescript/LICENSE new file mode 100644 index 00000000..1e0b22bf --- /dev/null +++ b/typescript/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011-2019 ChargeBee, Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/typescript/README.md b/typescript/README.md new file mode 100644 index 00000000..a0d6c1bc --- /dev/null +++ b/typescript/README.md @@ -0,0 +1,29 @@ +# Chargebee Typescript Client Library - API V2 + +[![npm](https://img.shields.io/npm/v/chargebee.svg?maxAge=2592000)](https://www.npmjs.com/package/chargebee) +[![npm](https://img.shields.io/npm/dt/chargebee.svg?maxAge=2592000)](https://www.npmjs.com/package/chargebee) + +This is the [typescript](https://www.typescriptlang.org/) Library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com). + +## Installation + +Install the latest version 2.x.x of the library with the following commands: + + $ npm install chargebee-typescript@">=2" + +Then import the library as: + + import {ChargeBee} from 'chargebee-typescript'; + var chargebee = new ChargeBee(); + +## Documentation + +The full documentation can be found on the chargebee site here: + +[https://apidocs.chargebee.com/docs/api?lang=typescript](https://apidocs.chargebee.com/docs/api?lang=typescript) + + +## License + +See the LICENSE file. + diff --git a/typescript/package.json b/typescript/package.json index 138c1272..4770b425 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -1,14 +1,14 @@ { "name": "chargebee", "version": "2.0.0", - "description": "A library in typescript for integrating with ChargeBee.", + "description": "A library in typescript for integrating with Chargebee.", "keywords": [ "payments", "billing", "subscription", "chargebee" ], - "homepage": "http://github.com/chargebee/chargebee-ts", + "homepage": "http://github.com/chargebee/chargebee-typescript", "author": "Navaneedhan (https://www.chargebee.com)", "main": "lib/chargebee.js", "types": "lib/chargebee.d.ts", @@ -22,7 +22,7 @@ }, "repository": { "type": "git", - "url": "http://github.com/chargebee/chargebee-ts.git" + "url": "http://github.com/chargebee/chargebee-typescript.git" }, "engines": { "node": ">=0.6.0" @@ -34,7 +34,7 @@ "licenses": [ { "type": "MIT", - "url": "http://github.com/chargebee/chargebee-ts/blob/master/LICENSE" + "url": "http://github.com/chargebee/chargebee-typescript/blob/master/LICENSE" } ] } diff --git a/typescript/src/core.ts b/typescript/src/core.ts index 54d1c73d..b2e5d611 100644 --- a/typescript/src/core.ts +++ b/typescript/src/core.ts @@ -68,7 +68,7 @@ export class Core { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', "Content-Length": data.length, - 'User-Agent': "Chargebee-NodeJs-Client " + env.clientVersion, + 'User-Agent': "Chargebee-Typescript-Client " + env.clientVersion, 'Lang-Version': process.version, 'OS-Version': this.os.platform() + " " + this.os.arch() + " " + this.os.release() });