Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
rebilly
Advanced tools
Readme
(Inspired by stripe-node)
npm install rebilly
Documentation is available at https://www.rebilly.com/api/documentation/v2.1/.
Every resource is accessed via your rebilly
instance:
var rebilly = require('rebilly')(' your rebilly API key ');
// rebilly.{ RESOURCE_NAME }.{ METHOD_NAME }
Every resource method accepts an optional callback as the last argument:
rebilly.customers.create(
{ email: 'customer@example.com' },
function(err, customer) {
err; // null if no error occurred
customer; // the created customer object
}
);
Additionally, every resource method returns a promise, so you don't have to use the regular callback. E.g.
// Create a new customer and then a new charge for that customer:
rebilly.customers.create({
email: 'name@company.com'
}).then(function(customer) {
return rebilly.customers.update(customer.id, {
defaultCard: '4242'
});
}).then(function(charge) {
// New charge created on a new customer
}, function(err) {
// Deal with an error
});
Where you see params
it is a plain JavaScript object, e.g. { email: 'name@company.com' }
create(params)
list([params])
update(customerId[, params])
retrieve(customerId)
createSubscription(customerId, params)
updateSubscription(customerId, subscriptionId, [, params])
cancelSubscription(customerId, subscriptionId, [, params])
listSubscriptions(params)
createCard(customerId[, params])
createCardWithID(customerId, cardId[, params])
listCards(customerId)
retrieveCard(customerId, cardId)
authorize(customerId, cardId[, params])
deactivate(customerId, cardId)
listInvoices(customerId)
listTransactions(customerId[, params])
create(params)
list([params])
update(planId[, params])
retrieve(planId)
del(planId)
create(params)
retrieve(tokenId)
expire(tokenId)
create(params)
createWithID(contactId, params)
list()
retrieve(contactId)
generate(apiUser, apiKey)
create(params)
modify|update(invoiceId, params)
retrieve(invoiceId, params)
void(invoiceId)
abandon(invoiceId)
issue(invoiceId, params)
createItem(invoiceId, params)
retrieveItems(invoiceId)
create(params)
retrieve(paymentId, params)
list(params)
create(params)
update(layoutId, params)
retrieve(layoutId, params)
list(params)
rebilly.setApiKey(' your secret api key ');
rebilly.setTimeout(20000); // in ms
(default is node's default: 120000ms
)To run the tests you'll need a Rebilly Sandbox API key (from your Rebilly Dashboard):
$ npm install -g mocha
$ npm test
Note: On Windows use SET
instead of export
for setting the REBILLY_TEST_API_KEY
environment variable.
Originally by Pedro Sampaio. Development was sponsored by Greenlamp.
FAQs
Rebilly API wrapper
The npm package rebilly receives a total of 5 weekly downloads. As such, rebilly popularity was classified as not popular.
We found that rebilly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.