Skip to content

Commit

Permalink
Merge pull request #94 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Changes from gocardless-nodejs-template
  • Loading branch information
danwakefield authored Apr 15, 2021
2 parents cc1162d + 3090d01 commit 69df83e
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 37 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gocardless-nodejs",
"version": "2.0.0",
"version": "2.1.0",
"description": "Node.js client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments",
"author": "GoCardless Ltd <[email protected]>",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enum Environments {
Sandbox = 'SANDBOX',
}

const CLIENT_VERSION = '2.0.0';
const CLIENT_VERSION = '2.1.0';
const API_VERSION = '2015-07-06';

export { Environments, CLIENT_VERSION, API_VERSION };
2 changes: 1 addition & 1 deletion src/services/bankAuthorisationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class BankAuthorisationService {

const response = await this.api.request(requestParams);
const formattedResponse: BankAuthorisationResponse = {
...response.body['bank_authorisations'],
...(response.body?.['bank_authorisations'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/bankDetailsLookupService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class BankDetailsLookupService {

const response = await this.api.request(requestParams);
const formattedResponse: BankDetailsLookupResponse = {
...response.body['bank_details_lookups'],
...(response.body?.['bank_details_lookups'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/billingRequestFlowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class BillingRequestFlowService {

const response = await this.api.request(requestParams);
const formattedResponse: BillingRequestFlowResponse = {
...response.body['billing_request_flows'],
...(response.body?.['billing_request_flows'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/billingRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class BillingRequestService {

const response = await this.api.request(requestParams);
const formattedResponse: BillingRequestResponse = {
...response.body['billing_requests'],
...(response.body?.['billing_requests'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/creditorBankAccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class CreditorBankAccountService {

const response = await this.api.request(requestParams);
const formattedResponse: CreditorBankAccountResponse = {
...response.body['creditor_bank_accounts'],
...(response.body?.['creditor_bank_accounts'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/creditorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class CreditorService {

const response = await this.api.request(requestParams);
const formattedResponse: CreditorResponse = {
...response.body['creditors'],
...(response.body?.['creditors'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/customerBankAccountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class CustomerBankAccountService {

const response = await this.api.request(requestParams);
const formattedResponse: CustomerBankAccountResponse = {
...response.body['customer_bank_accounts'],
...(response.body?.['customer_bank_accounts'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/customerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class CustomerService {

const response = await this.api.request(requestParams);
const formattedResponse: CustomerResponse = {
...response.body['customers'],
...(response.body?.['customers'] ?? response),
__response__: response.__response__,
};

Expand Down
4 changes: 2 additions & 2 deletions src/services/instalmentScheduleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class InstalmentScheduleService {

const response = await this.api.request(requestParams);
const formattedResponse: InstalmentScheduleResponse = {
...response.body['instalment_schedules'],
...(response.body?.['instalment_schedules'] ?? response),
__response__: response.__response__,
};

Expand All @@ -230,7 +230,7 @@ export class InstalmentScheduleService {

const response = await this.api.request(requestParams);
const formattedResponse: InstalmentScheduleResponse = {
...response.body['instalment_schedules'],
...(response.body?.['instalment_schedules'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/mandateImportEntryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class MandateImportEntryService {

const response = await this.api.request(requestParams);
const formattedResponse: MandateImportEntryResponse = {
...response.body['mandate_import_entries'],
...(response.body?.['mandate_import_entries'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/mandateImportService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class MandateImportService {

const response = await this.api.request(requestParams);
const formattedResponse: MandateImportResponse = {
...response.body['mandate_imports'],
...(response.body?.['mandate_imports'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/mandatePdfService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class MandatePdfService {

const response = await this.api.request(requestParams);
const formattedResponse: MandatePdfResponse = {
...response.body['mandate_pdfs'],
...(response.body?.['mandate_pdfs'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/mandateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class MandateService {

const response = await this.api.request(requestParams);
const formattedResponse: MandateResponse = {
...response.body['mandates'],
...(response.body?.['mandates'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/payerAuthorisationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class PayerAuthorisationService {

const response = await this.api.request(requestParams);
const formattedResponse: PayerAuthorisationResponse = {
...response.body['payer_authorisations'],
...(response.body?.['payer_authorisations'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/paymentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class PaymentService {

const response = await this.api.request(requestParams);
const formattedResponse: PaymentResponse = {
...response.body['payments'],
...(response.body?.['payments'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/redirectFlowService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class RedirectFlowService {

const response = await this.api.request(requestParams);
const formattedResponse: RedirectFlowResponse = {
...response.body['redirect_flows'],
...(response.body?.['redirect_flows'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/refundService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class RefundService {

const response = await this.api.request(requestParams);
const formattedResponse: RefundResponse = {
...response.body['refunds'],
...(response.body?.['refunds'] ?? response),
__response__: response.__response__,
};

Expand Down
2 changes: 1 addition & 1 deletion src/services/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class SubscriptionService {

const response = await this.api.request(requestParams);
const formattedResponse: SubscriptionResponse = {
...response.body['subscriptions'],
...(response.body?.['subscriptions'] ?? response),
__response__: response.__response__,
};

Expand Down

0 comments on commit 69df83e

Please sign in to comment.