New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stripe

Package Overview
Dependencies
Maintainers
6
Versions
671
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stripe - npm Package Compare versions

Comparing version 2.7.4 to 2.8.0

lib/resources/ApplicationFeeRefunds.js

27

lib/resources/ApplicationFees.js

@@ -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']
})
});

3

lib/stripe.js

@@ -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

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