Socket
Socket
Sign inDemoInstall

paddle-sdk

Package Overview
Dependencies
24
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.3.0

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

## [1.3.0](https://github.com/avaly/paddle-sdk/compare/v1.2.2...v1.3.0) (2019-11-12)
### Features
* Add generatePayLink ([#8](https://github.com/avaly/paddle-sdk/issues/8)) ([a09b6c8](https://github.com/avaly/paddle-sdk/commit/a09b6c8))
### [1.2.2](https://github.com/avaly/paddle-sdk/compare/v1.2.1...v1.2.2) (2019-06-18)

@@ -7,0 +16,0 @@

2

package.json
{
"name": "paddle-sdk",
"description": "The Paddle.com Node.js SDK",
"version": "1.2.2",
"version": "1.3.0",
"main": "sdk.js",

@@ -6,0 +6,0 @@ "author": "Valentin Agachi <github-com@agachi.name>",

@@ -37,4 +37,6 @@ const crypto = require('crypto');

* @param {object} [headers] - header parameters
* @param {boolean} [form] - form parameter (ref: got package)
* @param {boolean} [json] - json parameter (ref: got package)
*/
_request(path, body = {}, headers = this._getDefaultHeaders()) {
_request(path, body = {}, headers = {}, form = true, json = true) {
const url = this.server + path;

@@ -44,5 +46,5 @@

body: Object.assign(body, this._getDefaultBody()),
form: true,
headers,
json: true,
form,
headers: this._getDefaultHeaders(headers),
json,
method: 'POST',

@@ -306,4 +308,26 @@ };

}
/**
* Generate a custom pay link
*
* @method
* @param {object} body
* @returns {Promise}
* @fulfil {object} - The new pay link url
*
* @example
* const custom = await client.generatePayLink({
* "title" : "my custom checkout",
* "custom_message" : "some custom message"
* "prices": [
* "USD:19.99",
* "EUR:15.99"
* ]
* });
*/
generatePayLink(body) {
return this._request('/product/generate_pay_link', body, {}, false);
}
}
module.exports = PaddleSDK;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc