Credit Card

Credit Card: Expiring Between

Returns a collection of Credit Card objects that expire between the specified dates.

Using a callback:

  1. Node
const before = new Date('2018-01-01');
const after = new Date('2018-12-31');

gateway.creditCard.expiringBetween(before, after, (err, expiredCards) => {
});

Using a stream:

  1. Node
const stream = require("stream");

const writableStream = stream.Writable({objectMode: true});
writableStream._write = (chunk, enc, next) => {
  // ...
  next();
};

const before = new Date('2018-01-01');
const after = new Date('2018-12-31');

gateway.creditCard.expiringBetween(before, after);

writeableStream.on('data', () => {
});
Arguments
endDaterequired, String
The maximum expiration date of cards returned in the search (inclusive).
startDaterequired, String
The minimum expiration date of cards returned in the search (inclusive).