Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@juspay-tech/hyperswitch-node

Package Overview
Dependencies
Maintainers
10
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@juspay-tech/hyperswitch-node - npm Package Compare versions

Comparing version 1.0.1 to 1.0.3

92

lib/resources.js

@@ -8,100 +8,8 @@ // File generated from our OpenAPI spec

module.exports = {
Accounts: require('./resources/Accounts'),
// Support Accounts for consistency, Account for backwards compatibility
Account: require('./resources/Accounts'),
AccountLinks: require('./resources/AccountLinks'),
ApplePayDomains: require('./resources/ApplePayDomains'),
ApplicationFees: require('./resources/ApplicationFees'),
Balance: require('./resources/Balance'),
BalanceTransactions: require('./resources/BalanceTransactions'),
Charges: require('./resources/Charges'),
CountrySpecs: require('./resources/CountrySpecs'),
Coupons: require('./resources/Coupons'),
CreditNotes: require('./resources/CreditNotes'),
Customers: require('./resources/Customers'),
Disputes: require('./resources/Disputes'),
EphemeralKeys: require('./resources/EphemeralKeys'),
Events: require('./resources/Events'),
ExchangeRates: require('./resources/ExchangeRates'),
Files: require('./resources/Files'),
FileLinks: require('./resources/FileLinks'),
Invoices: require('./resources/Invoices'),
InvoiceItems: require('./resources/InvoiceItems'),
IssuerFraudRecords: require('./resources/IssuerFraudRecords'),
Mandates: require('./resources/Mandates'),
OAuth: require('./resources/OAuth'),
Orders: require('./resources/Orders'),
OrderReturns: require('./resources/OrderReturns'),
PaymentIntents: require('./resources/PaymentIntents'),
PaymentLinks: require('./resources/PaymentLinks'),
PaymentMethods: require('./resources/PaymentMethods'),
Payouts: require('./resources/Payouts'),
Plans: require('./resources/Plans'),
Prices: require('./resources/Prices'),
Products: require('./resources/Products'),
PromotionCodes: require('./resources/PromotionCodes'),
Quotes: require('./resources/Quotes'),
Refunds: require('./resources/Refunds'),
Reviews: require('./resources/Reviews'),
SetupAttempts: require('./resources/SetupAttempts'),
SetupIntents: require('./resources/SetupIntents'),
ShippingRates: require('./resources/ShippingRates'),
Skus: require('./resources/SKUs'),
Sources: require('./resources/Sources'),
Subscriptions: require('./resources/Subscriptions'),
SubscriptionItems: require('./resources/SubscriptionItems'),
SubscriptionSchedules: require('./resources/SubscriptionSchedules'),
TaxCodes: require('./resources/TaxCodes'),
TaxRates: require('./resources/TaxRates'),
Tokens: require('./resources/Tokens'),
Topups: require('./resources/Topups'),
Transfers: require('./resources/Transfers'),
WebhookEndpoints: require('./resources/WebhookEndpoints'),
BillingPortal: resourceNamespace('billingPortal', {
Configurations: require('./resources/BillingPortal/Configurations'),
Sessions: require('./resources/BillingPortal/Sessions'),
}),
Checkout: resourceNamespace('checkout', {
Sessions: require('./resources/Checkout/Sessions'),
}),
FinancialConnections: resourceNamespace('financialConnections', {
Accounts: require('./resources/FinancialConnections/Accounts'),
Sessions: require('./resources/FinancialConnections/Sessions'),
}),
Identity: resourceNamespace('identity', {
VerificationReports: require('./resources/Identity/VerificationReports'),
VerificationSessions: require('./resources/Identity/VerificationSessions'),
}),
Issuing: resourceNamespace('issuing', {
Authorizations: require('./resources/Issuing/Authorizations'),
Cards: require('./resources/Issuing/Cards'),
Cardholders: require('./resources/Issuing/Cardholders'),
Disputes: require('./resources/Issuing/Disputes'),
Transactions: require('./resources/Issuing/Transactions'),
}),
Radar: resourceNamespace('radar', {
EarlyFraudWarnings: require('./resources/Radar/EarlyFraudWarnings'),
ValueLists: require('./resources/Radar/ValueLists'),
ValueListItems: require('./resources/Radar/ValueListItems'),
}),
Reporting: resourceNamespace('reporting', {
ReportRuns: require('./resources/Reporting/ReportRuns'),
ReportTypes: require('./resources/Reporting/ReportTypes'),
}),
Sigma: resourceNamespace('sigma', {
ScheduledQueryRuns: require('./resources/Sigma/ScheduledQueryRuns'),
}),
Terminal: resourceNamespace('terminal', {
Configurations: require('./resources/Terminal/Configurations'),
ConnectionTokens: require('./resources/Terminal/ConnectionTokens'),
Locations: require('./resources/Terminal/Locations'),
Readers: require('./resources/Terminal/Readers'),
}),
TestHelpers: resourceNamespace('testHelpers', {
Refunds: require('./resources/TestHelpers/Refunds'),
TestClocks: require('./resources/TestHelpers/TestClocks'),
Terminal: resourceNamespace('terminal', {
Readers: require('./resources/TestHelpers/Terminal/Readers'),
}),
}),
};

98

lib/resources/Customers.js

@@ -37,12 +37,2 @@ // File generated from our OpenAPI spec

createFundingInstructions: stripeMethod({
method: 'POST',
path: '/{customer}/funding_instructions',
}),
deleteDiscount: stripeMethod({
method: 'DELETE',
path: '/{customer}/discount',
}),
listPaymentMethods: stripeMethod({

@@ -54,90 +44,6 @@ method: 'GET',

search: stripeMethod({
getCustomerMandates: stripeMethod({
method: 'GET',
path: '/search',
methodType: 'search',
path: '/{customer}/mandates',
}),
retrieveCashBalance: stripeMethod({
method: 'GET',
path: '/{customer}/cash_balance',
}),
updateCashBalance: stripeMethod({
method: 'POST',
path: '/{customer}/cash_balance',
}),
createBalanceTransaction: stripeMethod({
method: 'POST',
path: '/{customer}/balance_transactions',
}),
retrieveBalanceTransaction: stripeMethod({
method: 'GET',
path: '/{customer}/balance_transactions/{transaction}',
}),
updateBalanceTransaction: stripeMethod({
method: 'POST',
path: '/{customer}/balance_transactions/{transaction}',
}),
listBalanceTransactions: stripeMethod({
method: 'GET',
path: '/{customer}/balance_transactions',
methodType: 'list',
}),
createSource: stripeMethod({
method: 'POST',
path: '/{customer}/sources',
}),
retrieveSource: stripeMethod({
method: 'GET',
path: '/{customer}/sources/{id}',
}),
updateSource: stripeMethod({
method: 'POST',
path: '/{customer}/sources/{id}',
}),
listSources: stripeMethod({
method: 'GET',
path: '/{customer}/sources',
methodType: 'list',
}),
deleteSource: stripeMethod({
method: 'DELETE',
path: '/{customer}/sources/{id}',
}),
verifySource: stripeMethod({
method: 'POST',
path: '/{customer}/sources/{id}/verify',
}),
createTaxId: stripeMethod({
method: 'POST',
path: '/{customer}/tax_ids',
}),
retrieveTaxId: stripeMethod({
method: 'GET',
path: '/{customer}/tax_ids/{id}',
}),
listTaxIds: stripeMethod({
method: 'GET',
path: '/{customer}/tax_ids',
methodType: 'list',
}),
deleteTaxId: stripeMethod({
method: 'DELETE',
path: '/{customer}/tax_ids/{id}',
}),
});

@@ -14,9 +14,2 @@ // File generated from our OpenAPI spec

path: '',
validator: (data, options) => {
if (!options.headers || !options.headers['Stripe-Version']) {
throw new Error(
'Passing apiVersion in a separate options hash is required to create an ephemeral key. See https://stripe.com/docs/api/versioning?lang=node'
);
}
},
}),

@@ -23,0 +16,0 @@

5

lib/resources/Mandates.js

@@ -15,2 +15,7 @@ // File generated from our OpenAPI spec

}),
revoke: stripeMethod({
method: 'POST',
path: '/revoke/{mandate}',
}),
});

@@ -32,7 +32,2 @@ // File generated from our OpenAPI spec

applyCustomerBalance: stripeMethod({
method: 'POST',
path: '/{intent}/apply_customer_balance',
}),
cancel: stripeMethod({

@@ -53,17 +48,6 @@ method: 'POST',

incrementAuthorization: stripeMethod({
sessionTokens: stripeMethod({
method: 'POST',
path: '/{intent}/increment_authorization',
path: '/session_tokens',
}),
search: stripeMethod({
method: 'GET',
path: '/search',
methodType: 'search',
}),
verifyMicrodeposits: stripeMethod({
method: 'POST',
path: '/{intent}/verify_microdeposits',
}),
});

@@ -32,11 +32,6 @@ // File generated from our OpenAPI spec

attach: stripeMethod({
method: 'POST',
path: '/{paymentMethod}/attach',
delete: stripeMethod({
method: 'DELETE',
path: '/{paymentMethod}',
}),
detach: stripeMethod({
method: 'POST',
path: '/{paymentMethod}/detach',
}),
});

@@ -31,7 +31,2 @@ // File generated from our OpenAPI spec

}),
cancel: stripeMethod({
method: 'POST',
path: '/{refund}/cancel',
}),
});

@@ -5,3 +5,4 @@ 'use strict';

const DEFAULT_HOST = 'sandbox.hyperswitch.io';
const DEV_HOST_URL = 'sandbox.hyperswitch.io';
const PROD_HOST_URL = 'api.hyperswitch.io';
const DEFAULT_PORT = '443';

@@ -47,2 +48,3 @@ const DEFAULT_BASE_PATH = '/';

'stripeAccount',
'xFeature'
];

@@ -62,3 +64,3 @@

function Stripe(key, config = {}) {
function Stripe(key, config) {
if (!(this instanceof Stripe)) {

@@ -95,5 +97,7 @@ return new Stripe(key, config);

let host = key.startsWith("snd") ? DEV_HOST_URL : PROD_HOST_URL;
this._api = {
auth: null,
host: props.host || DEFAULT_HOST,
host: props.host || host,
port: props.port || DEFAULT_PORT,

@@ -109,2 +113,3 @@ protocol: props.protocol || 'https',

),
xFeature: null,
agent: agent,

@@ -129,2 +134,6 @@ httpClient: props.httpClient || Stripe.createNodeHttpClient(agent),

if(props.xFeature) {
this.setXFeatuee(props.xFeature);
}
this._prepResources();

@@ -348,2 +357,6 @@ this._setApiKey(key);

setXFeatuee(feature) {
this._api['xFeature'] = feature;
},
/**

@@ -350,0 +363,0 @@ * @deprecated will be removed in a future major version. Use the config object instead:

@@ -367,2 +367,3 @@ 'use strict';

apiVersion,
xFeature,
clientUserAgent,

@@ -384,2 +385,3 @@ method,

'Stripe-Version': apiVersion,
'X-Feature': xFeature,
'Stripe-Account': this._stripe.getApiField('stripeAccount'),

@@ -574,2 +576,3 @@ 'Idempotency-Key': this._defaultIdempotencyKey(

const apiVersion = this._stripe.getApiField('version');
const xFeature = this._stripe.getApiField('xFeature');
const headers = this._makeHeaders(

@@ -579,2 +582,3 @@ auth,

apiVersion,
xFeature,
clientUserAgent,

@@ -585,3 +589,3 @@ method,

);
makeRequest(apiVersion, headers);

@@ -588,0 +592,0 @@ });

{
"name": "@juspay-tech/hyperswitch-node",
"version": "1.0.1",
"version": "1.0.3",
"author": "Stripe <support@stripe.com> (https://stripe.com/)",

@@ -5,0 +5,0 @@ "bugs": {

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