Comparing version 2.7.4 to 2.8.0
@@ -16,4 +16,29 @@ 'use strict'; | ||
method: 'POST', | ||
path: '/{id}/refund', urlParams: ['id'] | ||
path: '/{id}/refund', | ||
urlParams: ['id'] | ||
}), | ||
createRefund: stripeMethod({ | ||
method: 'POST', | ||
path: '/{feeId}/refunds', | ||
urlParams: ['feeId'] | ||
}), | ||
listRefunds: stripeMethod({ | ||
method: 'GET', | ||
path: '/{feeId}/refunds', | ||
urlParams: ['feeId'] | ||
}), | ||
retrieveRefund: stripeMethod({ | ||
method: 'GET', | ||
path: '/{feeId}/refunds/{refundId}', | ||
urlParams: ['feeId', 'refundId'] | ||
}), | ||
updateRefund: stripeMethod({ | ||
method: 'POST', | ||
path: '/{feeId}/refunds/{refundId}', | ||
urlParams: ['feeId', 'refundId'] | ||
}) | ||
}); |
@@ -46,3 +46,4 @@ 'use strict'; | ||
CustomerSubscriptions: require('./resources/CustomerSubscriptions'), | ||
ChargeRefunds: require('./resources/ChargeRefunds') | ||
ChargeRefunds: require('./resources/ChargeRefunds'), | ||
ApplicationFeeRefunds: require('./resources/ApplicationFeeRefunds') | ||
@@ -49,0 +50,0 @@ }; |
{ | ||
"name": "stripe", | ||
"version": "2.7.4", | ||
"version": "2.8.0", | ||
"description": "Stripe API wrapper", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/stripe/stripe-node", |
@@ -114,3 +114,3 @@ # Stripe node.js bindings [![Build Status](https://travis-ci.org/stripe/stripe-node.png?branch=master)](https://travis-ci.org/stripe/stripe-node) | ||
* [`retrieveLines(invoiceId)`](https://stripe.com/docs/api/node#invoice_lines) | ||
* [`retrieveUpcoming(customerId)`](https://stripe.com/docs/api/node#retrieve_customer_invoice) | ||
* [`retrieveUpcoming(customerId[, subscriptionId])`](https://stripe.com/docs/api/node#retrieve_customer_invoice) | ||
* [`pay(invoiceId)`](https://stripe.com/docs/api/node#pay_invoice) | ||
@@ -168,3 +168,3 @@ * plans | ||
*Note: On Windows use `SET` isntead of `export` for setting the `STRIPE_TEST_API_KEY` environment variable.* | ||
*Note: On Windows use `SET` instead of `export` for setting the `STRIPE_TEST_API_KEY` environment variable.* | ||
@@ -171,0 +171,0 @@ If you don't have a prefixed key (in the form `sk_test_...`) you can get one by rolling your "Test Secret Key". This can be done under your dashboard (*Account Setting -> API Keys -> Click the roll icon next to the "test secret key"*). This should give you a new prefixed key ('sk_test_..'), which will then be usable by the node mocha tests. |
@@ -37,2 +37,56 @@ 'use strict'; | ||
describe('refunds', function() { | ||
it('Sends the correct update request', function() { | ||
stripe.applicationFees.updateRefund( | ||
'appFeeIdExample3242', | ||
'refundIdExample2312', | ||
{ metadata: {key: 'value'}} | ||
); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/application_fees/appFeeIdExample3242/refunds/refundIdExample2312', | ||
data: { metadata: {key: 'value'}} | ||
}); | ||
}); | ||
it('Sends the correct create request', function() { | ||
stripe.applicationFees.createRefund( | ||
'appFeeIdExample3242', | ||
{ amount: 100 } | ||
); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'POST', | ||
url: '/v1/application_fees/appFeeIdExample3242/refunds', | ||
data: { amount: 100 } | ||
}); | ||
}); | ||
it('Sends the correct list request', function() { | ||
stripe.applicationFees.listRefunds( | ||
'appFeeIdExample3242' | ||
); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/application_fees/appFeeIdExample3242/refunds', | ||
data: {} | ||
}); | ||
}); | ||
it('Sends the correct retrieve request', function() { | ||
stripe.applicationFees.retrieveRefund( | ||
'appFeeIdExample3242', | ||
'refundIdExample2312' | ||
); | ||
expect(stripe.LAST_REQUEST).to.deep.equal({ | ||
method: 'GET', | ||
url: '/v1/application_fees/appFeeIdExample3242/refunds/refundIdExample2312', | ||
data: {} | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
125982
56
3358
8