Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mollie-api-node

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mollie-api-node - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

lib/mollie/api/object/customer.js

13

lib/mollie.js
// Generated by CoffeeScript 1.8.0
(function() {
var Mollie;
module.exports = Mollie = {
module.exports = {
API: {

@@ -12,3 +10,5 @@ Client: require("./mollie/api/client"),

Method: require("./mollie/api/object/method"),
Issuer: require("./mollie/api/object/issuer")
Issuer: require("./mollie/api/object/issuer"),
Customer: require("./mollie/api/object/customer"),
Refund: require("./mollie/api/object/refund")
},

@@ -18,4 +18,7 @@ Resource: {

Payments: require("./mollie/api/resource/payments"),
PaymentsRefunds: require("./mollie/api/resource/payments/refunds"),
Methods: require("./mollie/api/resource/methods"),
Issuers: require("./mollie/api/resource/issuers")
Issuers: require("./mollie/api/resource/issuers"),
Customers: require("./mollie/api/resource/customers"),
CustomersPayments: require("./mollie/api/resource/customers/payments")
}

@@ -22,0 +25,0 @@ }

@@ -35,8 +35,4 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Issuers, Methods, Mollie, Payments, fs, https, os, url;
var Client, Customers, CustomersPayments, Issuers, Methods, Payments, PaymentsRefunds, fs, https, os, url;
Mollie = {
API: {}
};
url = require("url");

@@ -52,2 +48,4 @@

PaymentsRefunds = require("./resource/payments/refunds");
Methods = require("./resource/methods");

@@ -57,5 +55,9 @@

module.exports = Mollie.API.Client = (function() {
Client.version = "1.0.7";
Customers = require("./resource/customers");
CustomersPayments = require("./resource/customers/payments");
module.exports = Client = (function() {
Client.version = "1.1.0";
function Client() {

@@ -68,4 +70,7 @@ this.config = {

this.payments = new Payments(this);
this.payments_refunds = new PaymentsRefunds(this);
this.methods = new Methods(this);
this.issuers = new Issuers(this);
this.customers = new Customers(this);
this.customers_payments = new CustomersPayments(this);
}

@@ -72,0 +77,0 @@

@@ -35,12 +35,7 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Mollie;
var Issuer;
Mollie = {
API: {
Object: {}
}
};
module.exports = Mollie.API.Object.Issuer = (function() {
module.exports = Issuer = (function() {
function Issuer() {
this.resource = "issuer";
this.id = null;

@@ -47,0 +42,0 @@ this.name = null;

@@ -35,13 +35,7 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Mollie,
var List,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mollie = {
API: {
Object: {}
}
};
module.exports = Mollie.API.Object.List = (function(_super) {
module.exports = List = (function(_super) {
__extends(List, _super);

@@ -48,0 +42,0 @@

@@ -35,11 +35,5 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Mollie;
var Method;
Mollie = {
API: {
Object: {}
}
};
module.exports = Mollie.API.Object.Method = (function() {
module.exports = Method = (function() {
Method.IDEAL = "ideal";

@@ -68,2 +62,3 @@

function Method() {
this.resource = "method";
this.id = null;

@@ -70,0 +65,0 @@ this.description = null;

@@ -35,11 +35,5 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Mollie;
var Payment;
Mollie = {
API: {
Object: {}
}
};
module.exports = Mollie.API.Object.Payment = (function() {
module.exports = Payment = (function() {
Payment.STATUS_OPEN = "open";

@@ -54,5 +48,8 @@

function Payment() {
this.resource = "payment";
this.id = null;
this.mode = null;
this.amount = null;
this.amountRefunded = null;
this.amountRemaining = null;
this.description = null;

@@ -65,4 +62,9 @@ this.method = null;

this.expiredDatetime = null;
this.expiryPeriod = null;
this.metadata = null;
this.details = null;
this.locale = null;
this.profileId = null;
this.customerId = null;
this.settlementId = null;
this.links = {

@@ -69,0 +71,0 @@ paymentUrl: null,

@@ -35,13 +35,9 @@ // Generated by CoffeeScript 1.8.0

(function() {
var List, Mollie;
var Base, List;
Mollie = {
API: {
Resource: {}
}
};
List = require("../object/list");
module.exports = Mollie.API.Resource.Base = (function() {
module.exports = Base = (function() {
Base.api = null;
Base.resource = "unknown";

@@ -51,2 +47,4 @@

Base.parentId = null;
function Base(api) {

@@ -67,3 +65,3 @@ this.api = api;

Base.prototype.create = function(data, callback) {
return this.api.callRest("POST", this.constructor.resource, null, data, (function(_this) {
return this.api.callRest("POST", this.getResourceName(), null, data, (function(_this) {
return function(body) {

@@ -79,3 +77,3 @@ if (body.error) {

Base.prototype.get = function(id, callback) {
return this.api.callRest("GET", this.constructor.resource, id, null, (function(_this) {
return this.api.callRest("GET", this.getResourceName(), id, null, (function(_this) {
return function(body) {

@@ -91,3 +89,3 @@ if (body.error) {

Base.prototype.update = function(id, data, callback) {
return this.api.callRest("POST", this.constructor.resource, id, data, (function(_this) {
return this.api.callRest("POST", this.getResourceName(), id, data, (function(_this) {
return function(body) {

@@ -103,3 +101,3 @@ if (body.error) {

Base.prototype["delete"] = function(id, callback) {
return this.api.callRest("DELETE", this.constructor.resource, id, null, (function(_this) {
return this.api.callRest("DELETE", this.getResourceName(), id, null, (function(_this) {
return function(body) {

@@ -115,3 +113,3 @@ if (body.error) {

Base.prototype.all = function(callback) {
return this.api.callRest("GET", this.constructor.resource, null, null, (function(_this) {
return this.api.callRest("GET", this.getResourceName(), null, null, (function(_this) {
return function(body) {

@@ -134,2 +132,23 @@ var item, list;

Base.prototype.getResourceName = function() {
var parts;
if (this.constructor.resource.indexOf("_") >= 0) {
if (!this.parentId) {
throw new Error("Missing parent id");
}
parts = this.constructor.resource.split("_");
return parts[0] + "/" + this.parentId + "/" + parts[1];
}
return this.constructor.resource;
};
Base.prototype.withParent = function(parent) {
return this.withParentId(parent.id);
};
Base.prototype.withParentId = function(parentId) {
this.parentId = parentId;
return this;
};
return Base;

@@ -136,0 +155,0 @@

@@ -35,12 +35,6 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Base, Issuer, Mollie,
var Base, Issuer, Issuers,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mollie = {
API: {
Resource: {}
}
};
Base = require("./base");

@@ -50,3 +44,3 @@

module.exports = Mollie.API.Resource.Issuers = (function(_super) {
module.exports = Issuers = (function(_super) {
__extends(Issuers, _super);

@@ -53,0 +47,0 @@

@@ -35,12 +35,6 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Base, Method, Mollie,
var Base, Method, Methods,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mollie = {
API: {
Resource: {}
}
};
Base = require("./base");

@@ -50,3 +44,3 @@

module.exports = Mollie.API.Resource.Methods = (function(_super) {
module.exports = Methods = (function(_super) {
__extends(Methods, _super);

@@ -53,0 +47,0 @@

@@ -35,12 +35,6 @@ // Generated by CoffeeScript 1.8.0

(function() {
var Base, Mollie, Payment,
var Base, Payment, Payments,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mollie = {
API: {
Resource: {}
}
};
Base = require("./base");

@@ -50,3 +44,3 @@

module.exports = Mollie.API.Resource.Payments = (function(_super) {
module.exports = Payments = (function(_super) {
__extends(Payments, _super);

@@ -53,0 +47,0 @@

{
"name": "mollie-api-node",
"version": "1.0.7",
"version": "1.1.0",
"license": "BSD-3-Clause",
"repository": "git://github.com/mollie/mollie-api-node",
"description": "Official Mollie API client for Node (by Mollie B.V.)",

@@ -19,5 +21,7 @@ "homepage": "https://github.com/mollie/mollie-api-node",

"main": "./lib/mollie",
"repository": "git://github.com/mollie/mollie-api-node",
"scripts": {
"prepublish": "npm prune"
"prepublish": "npm prune",
"start": "node examples/app.js",
"watch": "./node_modules/.bin/coffee -c -w -o . src",
"build": "./node_modules/.bin/coffee -c -o . src"
},

@@ -24,0 +28,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc