Documentation ¶
Index ¶
- func LoadCookiesFromJSON(filePath string) ([]*http.Cookie, error)
- type Client
- func (c *Client) ConfigureFileExport(config FileExportConfig, sendEmailOnFinish *OnFinishSendEmail, ...) error
- func (c *Client) DownloadReport(ctx context.Context, report *ExpensifyReport) error
- func (c *Client) ExecuteFileExport(ctx context.Context, reportFields []string, expenseFields []string) ([]*ExpensifyReport, error)
- type ExpensifyReport
- type FileExportConfig
- type Image
- type OnFinishMarkAsExported
- type OnFinishSendEmail
- type OnFinishSftpUploadData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶ added in v1.2.0
type Client struct {
// contains filtered or unexported fields
}
Client is a struct to hold the ExpensifyClient information
func (*Client) ConfigureFileExport ¶ added in v1.2.0
func (c *Client) ConfigureFileExport(config FileExportConfig, sendEmailOnFinish *OnFinishSendEmail, markAsExportedOnFinish *OnFinishMarkAsExported, uploadToSftpOnFinish *OnFinishSftpUploadData, ) error
func (*Client) DownloadReport ¶ added in v1.2.0
func (c *Client) DownloadReport(ctx context.Context, report *ExpensifyReport) error
DownloadReport downloads the data of exported report
func (*Client) ExecuteFileExport ¶ added in v1.2.0
func (c *Client) ExecuteFileExport(ctx context.Context, reportFields []string, expenseFields []string) ([]*ExpensifyReport, error)
ExecuteFileExport configures the export request. Everything that is marked a point is nullable (meaning it is optional to configure) -filterByMarkedAsApprovedTag : pass the tag you are looking for
type ExpensifyReport ¶ added in v1.2.0
type ExpensifyReport struct { FileName string `json:"fileName"` FileSystem string `json:"fileSystem"` Data []byte `json:"data"` }
func (*ExpensifyReport) WriteToDisk ¶ added in v1.2.0
func (er *ExpensifyReport) WriteToDisk(ctx context.Context, filePath string) error
type FileExportConfig ¶
type FileExportConfig struct { FilterByReportId []string FilterByPolicyId []string FilterByStartDate *time.Time FilterByEndDate *time.Time FilterByApprovedAfterDate *time.Time FilterByMarkedAsApprovedTag *string FilterByEmployeeEmail *string FilterByReportState []string LimitNumberOfReportsExported *int OutputFileExtension string OutputFileBaseName *string OutputIncludeFullPageReceipts bool IsThisAtestCall bool }
type Image ¶ added in v1.2.0
Image struct holds the file name, file extension, and data
func GetImage ¶ added in v1.2.0
GetImage get image downloads the image from a URL, it requires a set of active session cookies
func (*Image) WriteToDisk ¶ added in v1.2.0
type OnFinishMarkAsExported ¶
type OnFinishMarkAsExported struct {
Label string `json:"label"`
}
type OnFinishSendEmail ¶
Click to show internal directories.
Click to hide internal directories.