reports20210630

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package reports20210630 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCancelReportRequest

func NewCancelReportRequest(server string, reportId string) (*http.Request, error)

NewCancelReportRequest generates requests for CancelReport

func NewCancelReportScheduleRequest

func NewCancelReportScheduleRequest(server string, reportScheduleId string) (*http.Request, error)

NewCancelReportScheduleRequest generates requests for CancelReportSchedule

func NewCreateReportRequest

func NewCreateReportRequest(server string, body CreateReportJSONRequestBody) (*http.Request, error)

NewCreateReportRequest calls the generic CreateReport builder with application/json body

func NewCreateReportRequestWithBody

func NewCreateReportRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateReportRequestWithBody generates requests for CreateReport with any type of body

func NewCreateReportScheduleRequest

func NewCreateReportScheduleRequest(server string, body CreateReportScheduleJSONRequestBody) (*http.Request, error)

NewCreateReportScheduleRequest calls the generic CreateReportSchedule builder with application/json body

func NewCreateReportScheduleRequestWithBody

func NewCreateReportScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateReportScheduleRequestWithBody generates requests for CreateReportSchedule with any type of body

func NewGetReportDocumentRequest

func NewGetReportDocumentRequest(server string, reportDocumentId string) (*http.Request, error)

NewGetReportDocumentRequest generates requests for GetReportDocument

func NewGetReportRequest

func NewGetReportRequest(server string, reportId string) (*http.Request, error)

NewGetReportRequest generates requests for GetReport

func NewGetReportScheduleRequest

func NewGetReportScheduleRequest(server string, reportScheduleId string) (*http.Request, error)

NewGetReportScheduleRequest generates requests for GetReportSchedule

func NewGetReportSchedulesRequest

func NewGetReportSchedulesRequest(server string, params *GetReportSchedulesParams) (*http.Request, error)

NewGetReportSchedulesRequest generates requests for GetReportSchedules

func NewGetReportsRequest

func NewGetReportsRequest(server string, params *GetReportsParams) (*http.Request, error)

NewGetReportsRequest generates requests for GetReports

Types

type CancelReportResp

type CancelReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseCancelReportResp

func ParseCancelReportResp(rsp *http.Response) (*CancelReportResp, error)

ParseCancelReportResp parses an HTTP response from a CancelReportWithResponse call

func (CancelReportResp) Status

func (r CancelReportResp) Status() string

Status returns HTTPResponse.Status

func (CancelReportResp) StatusCode

func (r CancelReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CancelReportScheduleResp

type CancelReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseCancelReportScheduleResp

func ParseCancelReportScheduleResp(rsp *http.Response) (*CancelReportScheduleResp, error)

ParseCancelReportScheduleResp parses an HTTP response from a CancelReportScheduleWithResponse call

func (CancelReportScheduleResp) Status

func (r CancelReportScheduleResp) Status() string

Status returns HTTPResponse.Status

func (CancelReportScheduleResp) StatusCode

func (r CancelReportScheduleResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn

	// A callback for modifying response which are generated after receive from the network.
	ResponseEditors []ResponseEditorFn

	// The user agent header identifies your application, its version number, and the platform and programming language you are using.
	// You must include a user agent header in each request submitted to the sales partner API.
	UserAgent string
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) CancelReport

func (c *Client) CancelReport(ctx context.Context, reportId string) (*http.Response, error)

func (*Client) CancelReportSchedule

func (c *Client) CancelReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)

func (*Client) CreateReport

func (c *Client) CreateReport(ctx context.Context, body CreateReportJSONRequestBody) (*http.Response, error)

func (*Client) CreateReportSchedule

func (c *Client) CreateReportSchedule(ctx context.Context, body CreateReportScheduleJSONRequestBody) (*http.Response, error)

func (*Client) CreateReportScheduleWithBody

func (c *Client) CreateReportScheduleWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

func (*Client) CreateReportWithBody

func (c *Client) CreateReportWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

func (*Client) GetReport

func (c *Client) GetReport(ctx context.Context, reportId string) (*http.Response, error)

func (*Client) GetReportDocument

func (c *Client) GetReportDocument(ctx context.Context, reportDocumentId string) (*http.Response, error)

func (*Client) GetReportSchedule

func (c *Client) GetReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)

func (*Client) GetReportSchedules

func (c *Client) GetReportSchedules(ctx context.Context, params *GetReportSchedulesParams) (*http.Response, error)

func (*Client) GetReports

func (c *Client) GetReports(ctx context.Context, params *GetReportsParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetReportDocument request
	GetReportDocument(ctx context.Context, reportDocumentId string) (*http.Response, error)

	// GetReports request
	GetReports(ctx context.Context, params *GetReportsParams) (*http.Response, error)

	// CreateReportWithBody request with any body
	CreateReportWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	CreateReport(ctx context.Context, body CreateReportJSONRequestBody) (*http.Response, error)

	// CancelReport request
	CancelReport(ctx context.Context, reportId string) (*http.Response, error)

	// GetReport request
	GetReport(ctx context.Context, reportId string) (*http.Response, error)

	// GetReportSchedules request
	GetReportSchedules(ctx context.Context, params *GetReportSchedulesParams) (*http.Response, error)

	// CreateReportScheduleWithBody request with any body
	CreateReportScheduleWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)

	CreateReportSchedule(ctx context.Context, body CreateReportScheduleJSONRequestBody) (*http.Response, error)

	// CancelReportSchedule request
	CancelReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)

	// GetReportSchedule request
	GetReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

func WithResponseEditorFn

func WithResponseEditorFn(fn ResponseEditorFn) ClientOption

WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CancelReportScheduleWithResponse

func (c *ClientWithResponses) CancelReportScheduleWithResponse(ctx context.Context, reportScheduleId string) (*CancelReportScheduleResp, error)

CancelReportScheduleWithResponse request returning *CancelReportScheduleResp

func (*ClientWithResponses) CancelReportWithResponse

func (c *ClientWithResponses) CancelReportWithResponse(ctx context.Context, reportId string) (*CancelReportResp, error)

CancelReportWithResponse request returning *CancelReportResp

func (*ClientWithResponses) CreateReportScheduleWithBodyWithResponse

func (c *ClientWithResponses) CreateReportScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateReportScheduleResp, error)

CreateReportScheduleWithBodyWithResponse request with arbitrary body returning *CreateReportScheduleResp

func (*ClientWithResponses) CreateReportScheduleWithResponse

func (c *ClientWithResponses) CreateReportScheduleWithResponse(ctx context.Context, body CreateReportScheduleJSONRequestBody) (*CreateReportScheduleResp, error)

func (*ClientWithResponses) CreateReportWithBodyWithResponse

func (c *ClientWithResponses) CreateReportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateReportResp, error)

CreateReportWithBodyWithResponse request with arbitrary body returning *CreateReportResp

func (*ClientWithResponses) CreateReportWithResponse

func (c *ClientWithResponses) CreateReportWithResponse(ctx context.Context, body CreateReportJSONRequestBody) (*CreateReportResp, error)

func (*ClientWithResponses) GetReportDocumentWithResponse

func (c *ClientWithResponses) GetReportDocumentWithResponse(ctx context.Context, reportDocumentId string) (*GetReportDocumentResp, error)

GetReportDocumentWithResponse request returning *GetReportDocumentResp

func (*ClientWithResponses) GetReportScheduleWithResponse

func (c *ClientWithResponses) GetReportScheduleWithResponse(ctx context.Context, reportScheduleId string) (*GetReportScheduleResp, error)

GetReportScheduleWithResponse request returning *GetReportScheduleResp

func (*ClientWithResponses) GetReportSchedulesWithResponse

func (c *ClientWithResponses) GetReportSchedulesWithResponse(ctx context.Context, params *GetReportSchedulesParams) (*GetReportSchedulesResp, error)

GetReportSchedulesWithResponse request returning *GetReportSchedulesResp

func (*ClientWithResponses) GetReportWithResponse

func (c *ClientWithResponses) GetReportWithResponse(ctx context.Context, reportId string) (*GetReportResp, error)

GetReportWithResponse request returning *GetReportResp

func (*ClientWithResponses) GetReportsWithResponse

func (c *ClientWithResponses) GetReportsWithResponse(ctx context.Context, params *GetReportsParams) (*GetReportsResp, error)

GetReportsWithResponse request returning *GetReportsResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetReportDocumentWithResponse request
	GetReportDocumentWithResponse(ctx context.Context, reportDocumentId string) (*GetReportDocumentResp, error)

	// GetReportsWithResponse request
	GetReportsWithResponse(ctx context.Context, params *GetReportsParams) (*GetReportsResp, error)

	// CreateReportWithBodyWithResponse request with any body
	CreateReportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateReportResp, error)

	CreateReportWithResponse(ctx context.Context, body CreateReportJSONRequestBody) (*CreateReportResp, error)

	// CancelReportWithResponse request
	CancelReportWithResponse(ctx context.Context, reportId string) (*CancelReportResp, error)

	// GetReportWithResponse request
	GetReportWithResponse(ctx context.Context, reportId string) (*GetReportResp, error)

	// GetReportSchedulesWithResponse request
	GetReportSchedulesWithResponse(ctx context.Context, params *GetReportSchedulesParams) (*GetReportSchedulesResp, error)

	// CreateReportScheduleWithBodyWithResponse request with any body
	CreateReportScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateReportScheduleResp, error)

	CreateReportScheduleWithResponse(ctx context.Context, body CreateReportScheduleJSONRequestBody) (*CreateReportScheduleResp, error)

	// CancelReportScheduleWithResponse request
	CancelReportScheduleWithResponse(ctx context.Context, reportScheduleId string) (*CancelReportScheduleResp, error)

	// GetReportScheduleWithResponse request
	GetReportScheduleWithResponse(ctx context.Context, reportScheduleId string) (*GetReportScheduleResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateReportJSONRequestBody

type CreateReportJSONRequestBody = CreateReportSpecification

CreateReportJSONRequestBody defines body for CreateReport for application/json ContentType.

type CreateReportResp

type CreateReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *CreateReportResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseCreateReportResp

func ParseCreateReportResp(rsp *http.Response) (*CreateReportResp, error)

ParseCreateReportResp parses an HTTP response from a CreateReportWithResponse call

func (CreateReportResp) Status

func (r CreateReportResp) Status() string

Status returns HTTPResponse.Status

func (CreateReportResp) StatusCode

func (r CreateReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateReportResponse

type CreateReportResponse struct {
	// ReportId The identifier for the report. This identifier is unique only in combination with a seller ID.
	ReportId string `json:"reportId"`
}

CreateReportResponse Response schema.

type CreateReportScheduleJSONRequestBody

type CreateReportScheduleJSONRequestBody = CreateReportScheduleSpecification

CreateReportScheduleJSONRequestBody defines body for CreateReportSchedule for application/json ContentType.

type CreateReportScheduleResp

type CreateReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *CreateReportScheduleResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseCreateReportScheduleResp

func ParseCreateReportScheduleResp(rsp *http.Response) (*CreateReportScheduleResp, error)

ParseCreateReportScheduleResp parses an HTTP response from a CreateReportScheduleWithResponse call

func (CreateReportScheduleResp) Status

func (r CreateReportScheduleResp) Status() string

Status returns HTTPResponse.Status

func (CreateReportScheduleResp) StatusCode

func (r CreateReportScheduleResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateReportScheduleResponse

type CreateReportScheduleResponse struct {
	// ReportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
	ReportScheduleId string `json:"reportScheduleId"`
}

CreateReportScheduleResponse Response schema.

type CreateReportScheduleSpecification

type CreateReportScheduleSpecification struct {
	// MarketplaceIds A list of marketplace identifiers for the report schedule.
	MarketplaceIds []string `json:"marketplaceIds"`

	// NextReportCreationTime The date and time when the schedule will create its next report, in ISO 8601 date time format.
	NextReportCreationTime *time.Time `json:"nextReportCreationTime,omitempty"`

	// Period One of a set of predefined ISO 8601 periods that specifies how often a report should be created.
	Period CreateReportScheduleSpecificationPeriod `json:"period"`

	// ReportOptions Additional information passed to reports. This varies by report type.
	ReportOptions *ReportOptions `json:"reportOptions,omitempty"`

	// ReportType The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
	ReportType string `json:"reportType"`
}

CreateReportScheduleSpecification defines model for CreateReportScheduleSpecification.

type CreateReportScheduleSpecificationPeriod

type CreateReportScheduleSpecificationPeriod string

CreateReportScheduleSpecificationPeriod One of a set of predefined ISO 8601 periods that specifies how often a report should be created.

type CreateReportSpecification

type CreateReportSpecification struct {
	// DataEndTime The end of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this.
	DataEndTime *time.Time `json:"dataEndTime,omitempty"`

	// DataStartTime The start of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this.
	DataStartTime *time.Time `json:"dataStartTime,omitempty"`

	// MarketplaceIds A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise.
	MarketplaceIds []string `json:"marketplaceIds"`

	// ReportOptions Additional information passed to reports. This varies by report type.
	ReportOptions *ReportOptions `json:"reportOptions,omitempty"`

	// ReportType The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
	ReportType string `json:"reportType"`
}

CreateReportSpecification Information required to create the report.

type Error

type Error struct {
	// Code An error code that identifies the type of error that occurred.
	Code string `json:"code"`

	// Details Additional details that can help the caller understand or fix the issue.
	Details *string `json:"details,omitempty"`

	// Message A message that describes the error condition in a human-readable form.
	Message string `json:"message"`
}

Error Error response returned when the request is unsuccessful.

type ErrorList

type ErrorList struct {
	Errors []Error `json:"errors"`
}

ErrorList A list of error responses returned when a request is unsuccessful.

type GetReportDocumentResp

type GetReportDocumentResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReportDocument
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetReportDocumentResp

func ParseGetReportDocumentResp(rsp *http.Response) (*GetReportDocumentResp, error)

ParseGetReportDocumentResp parses an HTTP response from a GetReportDocumentWithResponse call

func (GetReportDocumentResp) Status

func (r GetReportDocumentResp) Status() string

Status returns HTTPResponse.Status

func (GetReportDocumentResp) StatusCode

func (r GetReportDocumentResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReportResp

type GetReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Report
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetReportResp

func ParseGetReportResp(rsp *http.Response) (*GetReportResp, error)

ParseGetReportResp parses an HTTP response from a GetReportWithResponse call

func (GetReportResp) Status

func (r GetReportResp) Status() string

Status returns HTTPResponse.Status

func (GetReportResp) StatusCode

func (r GetReportResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReportScheduleResp

type GetReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReportSchedule
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetReportScheduleResp

func ParseGetReportScheduleResp(rsp *http.Response) (*GetReportScheduleResp, error)

ParseGetReportScheduleResp parses an HTTP response from a GetReportScheduleWithResponse call

func (GetReportScheduleResp) Status

func (r GetReportScheduleResp) Status() string

Status returns HTTPResponse.Status

func (GetReportScheduleResp) StatusCode

func (r GetReportScheduleResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReportSchedulesParams

type GetReportSchedulesParams struct {
	// ReportTypes A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
	ReportTypes []string `form:"reportTypes" json:"reportTypes"`
}

GetReportSchedulesParams defines parameters for GetReportSchedules.

type GetReportSchedulesResp

type GetReportSchedulesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReportScheduleList
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetReportSchedulesResp

func ParseGetReportSchedulesResp(rsp *http.Response) (*GetReportSchedulesResp, error)

ParseGetReportSchedulesResp parses an HTTP response from a GetReportSchedulesWithResponse call

func (GetReportSchedulesResp) Status

func (r GetReportSchedulesResp) Status() string

Status returns HTTPResponse.Status

func (GetReportSchedulesResp) StatusCode

func (r GetReportSchedulesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReportsParams

type GetReportsParams struct {
	// ReportTypes A list of report types used to filter reports. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required.
	ReportTypes *[]string `form:"reportTypes,omitempty" json:"reportTypes,omitempty"`

	// ProcessingStatuses A list of processing statuses used to filter reports.
	ProcessingStatuses *[]GetReportsParamsProcessingStatuses `form:"processingStatuses,omitempty" json:"processingStatuses,omitempty"`

	// MarketplaceIds A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify.
	MarketplaceIds *[]string `form:"marketplaceIds,omitempty" json:"marketplaceIds,omitempty"`

	// PageSize The maximum number of reports to return in a single call.
	PageSize *int `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// CreatedSince The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days.
	CreatedSince *time.Time `form:"createdSince,omitempty" json:"createdSince,omitempty"`

	// CreatedUntil The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now.
	CreatedUntil *time.Time `form:"createdUntil,omitempty" json:"createdUntil,omitempty"`

	// NextToken A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail.
	NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"`
}

GetReportsParams defines parameters for GetReports.

type GetReportsParamsProcessingStatuses

type GetReportsParamsProcessingStatuses string

GetReportsParamsProcessingStatuses defines parameters for GetReports.

const (
	GetReportsParamsProcessingStatusesCANCELLED  GetReportsParamsProcessingStatuses = "CANCELLED"
	GetReportsParamsProcessingStatusesDONE       GetReportsParamsProcessingStatuses = "DONE"
	GetReportsParamsProcessingStatusesFATAL      GetReportsParamsProcessingStatuses = "FATAL"
	GetReportsParamsProcessingStatusesINPROGRESS GetReportsParamsProcessingStatuses = "IN_PROGRESS"
	GetReportsParamsProcessingStatusesINQUEUE    GetReportsParamsProcessingStatuses = "IN_QUEUE"
)

Defines values for GetReportsParamsProcessingStatuses.

type GetReportsResp

type GetReportsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetReportsResponse
	JSON400      *ErrorList
	JSON401      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseGetReportsResp

func ParseGetReportsResp(rsp *http.Response) (*GetReportsResp, error)

ParseGetReportsResp parses an HTTP response from a GetReportsWithResponse call

func (GetReportsResp) Status

func (r GetReportsResp) Status() string

Status returns HTTPResponse.Status

func (GetReportsResp) StatusCode

func (r GetReportsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetReportsResponse

type GetReportsResponse struct {
	// NextToken Returned when the number of results exceeds pageSize. To get the next page of results, call getReports with this token as the only parameter.
	NextToken *string `json:"nextToken,omitempty"`

	// Reports A list of reports.
	Reports ReportList `json:"reports"`
}

GetReportsResponse The response for the getReports operation.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Report

type Report struct {
	// CreatedTime The date and time when the report was created.
	CreatedTime time.Time `json:"createdTime"`

	// DataEndTime The end of a date and time range used for selecting the data to report.
	DataEndTime *time.Time `json:"dataEndTime,omitempty"`

	// DataStartTime The start of a date and time range used for selecting the data to report.
	DataStartTime *time.Time `json:"dataStartTime,omitempty"`

	// MarketplaceIds A list of marketplace identifiers for the report.
	MarketplaceIds *[]string `json:"marketplaceIds,omitempty"`

	// ProcessingEndTime The date and time when the report processing completed, in ISO 8601 date time format.
	ProcessingEndTime *time.Time `json:"processingEndTime,omitempty"`

	// ProcessingStartTime The date and time when the report processing started, in ISO 8601 date time format.
	ProcessingStartTime *time.Time `json:"processingStartTime,omitempty"`

	// ProcessingStatus The processing status of the report.
	ProcessingStatus ReportProcessingStatus `json:"processingStatus"`

	// ReportDocumentId The identifier for the report document. Pass this into the getReportDocument operation to get the information you will need to retrieve the report document's contents.
	ReportDocumentId *string `json:"reportDocumentId,omitempty"`

	// ReportId The identifier for the report. This identifier is unique only in combination with a seller ID.
	ReportId string `json:"reportId"`

	// ReportScheduleId The identifier of the report schedule that created this report (if any). This identifier is unique only in combination with a seller ID.
	ReportScheduleId *string `json:"reportScheduleId,omitempty"`

	// ReportType The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
	ReportType string `json:"reportType"`
}

Report Detailed information about the report.

type ReportDocument

type ReportDocument struct {
	// CompressionAlgorithm If the report document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the report when you download. Otherwise, you can download the report directly. Refer to [Step 2. Download the report](doc:reports-api-v2021-06-30-retrieve-a-report#step-2-download-the-report) in the use case guide, where sample code is provided.
	CompressionAlgorithm *ReportDocumentCompressionAlgorithm `json:"compressionAlgorithm,omitempty"`

	// ReportDocumentId The identifier for the report document. This identifier is unique only in combination with a seller ID.
	ReportDocumentId string `json:"reportDocumentId"`

	// Url A presigned URL for the report document. If `compressionAlgorithm` is not returned, you can download the report directly from this URL. This URL expires after 5 minutes.
	Url string `json:"url"`
}

ReportDocument Information required for the report document.

type ReportDocumentCompressionAlgorithm

type ReportDocumentCompressionAlgorithm string

ReportDocumentCompressionAlgorithm If the report document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the report when you download. Otherwise, you can download the report directly. Refer to [Step 2. Download the report](doc:reports-api-v2021-06-30-retrieve-a-report#step-2-download-the-report) in the use case guide, where sample code is provided.

const (
	GZIP ReportDocumentCompressionAlgorithm = "GZIP"
)

Defines values for ReportDocumentCompressionAlgorithm.

type ReportList

type ReportList = []Report

ReportList A list of reports.

type ReportOptions

type ReportOptions map[string]string

ReportOptions Additional information passed to reports. This varies by report type.

type ReportProcessingStatus

type ReportProcessingStatus string

ReportProcessingStatus The processing status of the report.

const (
	ReportProcessingStatusCANCELLED  ReportProcessingStatus = "CANCELLED"
	ReportProcessingStatusDONE       ReportProcessingStatus = "DONE"
	ReportProcessingStatusFATAL      ReportProcessingStatus = "FATAL"
	ReportProcessingStatusINPROGRESS ReportProcessingStatus = "IN_PROGRESS"
	ReportProcessingStatusINQUEUE    ReportProcessingStatus = "IN_QUEUE"
)

Defines values for ReportProcessingStatus.

type ReportSchedule

type ReportSchedule struct {
	// MarketplaceIds A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise.
	MarketplaceIds *[]string `json:"marketplaceIds,omitempty"`

	// NextReportCreationTime The date and time when the schedule will create its next report, in ISO 8601 date time format.
	NextReportCreationTime *time.Time `json:"nextReportCreationTime,omitempty"`

	// Period An ISO 8601 period value that indicates how often a report should be created.
	Period string `json:"period"`

	// ReportOptions Additional information passed to reports. This varies by report type.
	ReportOptions *ReportOptions `json:"reportOptions,omitempty"`

	// ReportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
	ReportScheduleId string `json:"reportScheduleId"`

	// ReportType The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
	ReportType string `json:"reportType"`
}

ReportSchedule Detailed information about a report schedule.

type ReportScheduleList

type ReportScheduleList struct {
	ReportSchedules []ReportSchedule `json:"reportSchedules"`
}

ReportScheduleList A list of report schedules.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

Jump to

Keyboard shortcuts

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