Initial project import
This commit is contained in:
41
node_modules/stripe/cjs/resources/Files.js
generated
vendored
Normal file
41
node_modules/stripe/cjs/resources/Files.js
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
// File generated from our OpenAPI spec
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FileResource = void 0;
|
||||
const multipart_js_1 = require("../multipart.js");
|
||||
const StripeResource_js_1 = require("../StripeResource.js");
|
||||
class FileResource extends StripeResource_js_1.StripeResource {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.requestDataProcessor = multipart_js_1.multipartRequestDataProcessor;
|
||||
}
|
||||
/**
|
||||
* Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
|
||||
*/
|
||||
list(params, options) {
|
||||
return this._makeRequest('GET', '/v1/files', params, options, {
|
||||
methodType: 'list',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
|
||||
*
|
||||
* All of Stripe's officially supported Client libraries support sending multipart/form-data.
|
||||
*/
|
||||
create(params, options) {
|
||||
return this._makeRequest('POST', '/v1/files', params, options, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
apiBase: 'files',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://docs.stripe.com/docs/file-upload#download-file-contents).
|
||||
*/
|
||||
retrieve(id, params, options) {
|
||||
return this._makeRequest('GET', `/v1/files/${encodeURIComponent(id)}`, params, options);
|
||||
}
|
||||
}
|
||||
exports.FileResource = FileResource;
|
||||
//# sourceMappingURL=Files.js.map
|
||||
Reference in New Issue
Block a user