@brouwervos/sdk
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -61,3 +61,3 @@ /// <reference types="node" /> | ||
get payment(): { | ||
attach: (companyId: string, paymentId: string, body: { | ||
attach: (paymentId: string, body: { | ||
terminal: { | ||
@@ -73,4 +73,4 @@ id: string; | ||
}) => Promise<PaymentType>; | ||
create: (companyId: string, body: PaymentCreation) => Promise<PaymentType>; | ||
retrieve: (companyId: string, id: string) => Promise<PaymentType>; | ||
create: (body: PaymentCreation) => Promise<PaymentType>; | ||
retrieve: (id: string) => Promise<PaymentType>; | ||
}; | ||
@@ -77,0 +77,0 @@ get customer(): { |
@@ -120,4 +120,4 @@ import jsonwebtoken from "jsonwebtoken"; | ||
return { | ||
attach: async (companyId, paymentId, body) => { | ||
const result = await this.requestPartner(`${url}/v1/partners/@me/companies/${encodeURIComponent(companyId)}/payments/${encodeURIComponent(paymentId)}`, { | ||
attach: async (paymentId, body) => { | ||
const result = await this.requestPartner(`${url}/v1/partners/@me/companies/${encodeURIComponent(this.company_id)}/payments/${encodeURIComponent(paymentId)}`, { | ||
method: 'POST', | ||
@@ -131,4 +131,4 @@ body: body, | ||
}, | ||
create: async (companyId, body) => { | ||
const result = await this.request(`${url}/v1/companies/${this.company_id}/${encodeURIComponent(companyId)}/payments`, { | ||
create: async (body) => { | ||
const result = await this.request(`${url}/v1/companies/${this.company_id}/${encodeURIComponent(this.company_id)}/payments`, { | ||
method: 'POST', | ||
@@ -142,4 +142,4 @@ body: body, | ||
}, | ||
retrieve: async (companyId, id) => { | ||
const result = await this.request(`${url}/v1/companies/${this.company_id}/${encodeURIComponent(companyId)}/payments/${encodeURIComponent(id)}`, { | ||
retrieve: async (id) => { | ||
const result = await this.request(`${url}/v1/companies/${this.company_id}/${encodeURIComponent(this.company_id)}/payments/${encodeURIComponent(id)}`, { | ||
method: 'GET', | ||
@@ -146,0 +146,0 @@ }); |
{ | ||
"name": "@brouwervos/sdk", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
65718