stripe/stripe-cli

File download support

Opened this issue · 0 comments

gugu commented

Problem

I've generated a tax report and need to download it using stripe CLI

Right now I'm getting this response:

> stripe files retrieve file_1
{
  "id": "file_1",
  "object": "file",
  "created": 12345,
  "expires_at": 12345,
  "filename": "frr_1.csv",
  "links": {
    "object": "list",
    "data": [],
    "has_more": false,
    "url": "/v1/file_links?file=file_1"
  },
  "purpose": "finance_report_run",
  "size": 27206,
  "title": "FinanceReportRun frr_1",
  "type": "csv",
  "url": "https://files.stripe.com/v1/files/file_1/contents"
}

But in order to download a file I need to send a request to files.stripe.com and I can not do this using stripe cli, I need use curl for that

Feature

Having a command stripe file download / stripe download would be great

Examples

stripe files download file_1 > tax_report.csv