file

package
v79.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package file provides the /files APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(id string, params *stripe.FileParams) (*stripe.File, error)

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://stripe.com/docs/file-upload#download-file-contents).

func New

func New(params *stripe.FileParams) (*stripe.File, error)

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.

Types

type Client

type Client struct {
	B        stripe.Backend
	BUploads stripe.Backend
	Key      string
}

Client is used to invoke /files APIs.

func (Client) Get

func (c Client) Get(id string, params *stripe.FileParams) (*stripe.File, error)

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://stripe.com/docs/file-upload#download-file-contents).

func (Client) List

func (c Client) List(listParams *stripe.FileListParams) *Iter

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.

func (Client) New

func (c Client) New(params *stripe.FileParams) (*stripe.File, error)

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.

type Iter

type Iter struct {
	*stripe.Iter
}

Iter is an iterator for files.

func List

func List(params *stripe.FileListParams) *Iter

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.

func (*Iter) File

func (i *Iter) File() *stripe.File

File returns the file which the iterator is currently pointing to.

func (*Iter) FileList

func (i *Iter) FileList() *stripe.FileList

FileList returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL