Skip to content

Commit

Permalink
Add the firstBillingDate support
Browse files Browse the repository at this point in the history
  • Loading branch information
ivank committed Jun 15, 2017
1 parent 5cb0636 commit f75b289
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mongoose-subscriptions-braintree",
"version": "1.3.6",
"version": "1.3.7",
"description": "Braintree processor for mongoose-subscriptions",
"main": "src/index.js",
"repository": "[email protected]:enhancv/mongoose-subscriptions-braintree.git",
Expand Down
1 change: 1 addition & 0 deletions src/subscriptionProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function processorFields(customer, subscription) {
: null,
descriptor: pick(["name", "phone", "url"], subscription.descriptor),
discounts: processorDiscounts,
firstBillingDate: subscription.firstBillingDate,
};

return pickBy(identity, response);
Expand Down
2 changes: 2 additions & 0 deletions test/subscriptionProcessorTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ describe(
],
paymentMethodId: "three",
processor: { id: "gzsxjb", state: "saved" },
firstBillingDate: "2016-09-29",
},
],
});
Expand Down Expand Up @@ -309,6 +310,7 @@ describe(
phone: "8899039032",
url: "example.com",
},
firstBillingDate: new Date("2016-09-29"),
discounts: {
update: [
{
Expand Down

0 comments on commit f75b289

Please sign in to comment.