reports

package
v0.0.0-...-3a03c6d Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package reports provides primitives to interact the openapi HTTP API.

Code generated by go-sdk-codegen DO NOT EDIT.

Package reports provides primitives to interact the openapi HTTP API.

Code generated by go-sdk-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCancelReportRequest

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

NewCancelReportRequest generates requests for CancelReport

func NewCancelReportScheduleRequest

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

NewCancelReportScheduleRequest generates requests for CancelReportSchedule

func NewCreateReportRequest

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

NewCreateReportRequest calls the generic CreateReport builder with application/json body

func NewCreateReportRequestWithBody

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

NewCreateReportRequestWithBody generates requests for CreateReport with any type of body

func NewCreateReportScheduleRequest

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

NewCreateReportScheduleRequest calls the generic CreateReportSchedule builder with application/json body

func NewCreateReportScheduleRequestWithBody

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

NewCreateReportScheduleRequestWithBody generates requests for CreateReportSchedule with any type of body

func NewGetReportDocumentRequest

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

NewGetReportDocumentRequest generates requests for GetReportDocument

func NewGetReportRequest

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

NewGetReportRequest generates requests for GetReport

func NewGetReportScheduleRequest

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

NewGetReportScheduleRequest generates requests for GetReportSchedule

func NewGetReportSchedulesRequest

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

NewGetReportSchedulesRequest generates requests for GetReportSchedules

func NewGetReportsRequest

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

NewGetReportsRequest generates requests for GetReports

Types

type CancelReportResp

type CancelReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *CancelReportResponse
}

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 CancelReportResponse

type CancelReportResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

CancelReportResponse defines model for CancelReportResponse.

type CancelReportScheduleResp

type CancelReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *CancelReportScheduleResponse
}

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 CancelReportScheduleResponse

type CancelReportScheduleResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

CancelReportScheduleResponse defines model for CancelReportScheduleResponse.

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.
	Endpoint string

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

	// A callback for modifying requests which are generated before sending over
	// the network.
	RequestBefore RequestBeforeFn

	// A callback for modifying response which are generated before sending over
	// the network.
	ResponseAfter ResponseAfterFn

	// 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(endpoint 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)

	// CreateReport 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)

	// CreateReportSchedule 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 WithRequestBefore

func WithRequestBefore(fn RequestBeforeFn) ClientOption

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

func WithResponseAfter

func WithResponseAfter(fn ResponseAfterFn) ClientOption

WithResponseAfter allows setting up a callback function, which will be called right after get response the request. This can be used to log.

func WithUserAgent

func WithUserAgent(userAgent string) ClientOption

WithUserAgent set up useragent add user agent to every request automatically

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(endpoint 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 *CancelReportScheduleResponse

func (*ClientWithResponses) CancelReportWithResponse

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

CancelReportWithResponse request returning *CancelReportResponse

func (*ClientWithResponses) CreateReportScheduleWithBodyWithResponse

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

CreateReportScheduleWithBodyWithResponse request with arbitrary body returning *CreateReportScheduleResponse

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 *CreateReportResponse

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 *GetReportDocumentResponse

func (*ClientWithResponses) GetReportScheduleWithResponse

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

GetReportScheduleWithResponse request returning *GetReportScheduleResponse

func (*ClientWithResponses) GetReportSchedulesWithResponse

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

GetReportSchedulesWithResponse request returning *GetReportSchedulesResponse

func (*ClientWithResponses) GetReportWithResponse

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

GetReportWithResponse request returning *GetReportResponse

func (*ClientWithResponses) GetReportsWithResponse

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

GetReportsWithResponse request returning *GetReportsResponse

type ClientWithResponsesInterface

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

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

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

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

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

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

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

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

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

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

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

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

type CreateReportJSONBody

type CreateReportJSONBody CreateReportSpecification

CreateReportJSONBody defines parameters for CreateReport.

type CreateReportJSONRequestBody

type CreateReportJSONRequestBody CreateReportJSONBody

CreateReportRequestBody defines body for CreateReport for application/json ContentType.

type CreateReportResp

type CreateReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *CreateReportResponse
}

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 {

	// A list of error responses returned when a request is unsuccessful.
	Errors  *ErrorList          `json:"errors,omitempty"`
	Payload *CreateReportResult `json:"payload,omitempty"`
}

CreateReportResponse defines model for CreateReportResponse.

type CreateReportResult

type CreateReportResult struct {

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

CreateReportResult defines model for CreateReportResult.

type CreateReportScheduleJSONBody

type CreateReportScheduleJSONBody CreateReportScheduleSpecification

CreateReportScheduleJSONBody defines parameters for CreateReportSchedule.

type CreateReportScheduleJSONRequestBody

type CreateReportScheduleJSONRequestBody CreateReportScheduleJSONBody

CreateReportScheduleRequestBody defines body for CreateReportSchedule for application/json ContentType.

type CreateReportScheduleResp

type CreateReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *CreateReportScheduleResponse
}

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 {

	// A list of error responses returned when a request is unsuccessful.
	Errors  *ErrorList                  `json:"errors,omitempty"`
	Payload *CreateReportScheduleResult `json:"payload,omitempty"`
}

CreateReportScheduleResponse defines model for CreateReportScheduleResponse.

type CreateReportScheduleResult

type CreateReportScheduleResult struct {

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

CreateReportScheduleResult defines model for CreateReportScheduleResult.

type CreateReportScheduleSpecification

type CreateReportScheduleSpecification struct {

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

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

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

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

	// The report type.
	ReportType string `json:"reportType"`
}

CreateReportScheduleSpecification defines model for CreateReportScheduleSpecification.

type CreateReportSpecification

type CreateReportSpecification struct {

	// 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"`

	// 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"`

	// 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"`

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

	// The report type.
	ReportType string `json:"reportType"`
}

CreateReportSpecification defines model for CreateReportSpecification.

type Error

type Error struct {

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

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

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

Error defines model for Error.

type ErrorList

type ErrorList []Error

ErrorList defines model for ErrorList.

type GetReportDocumentResp

type GetReportDocumentResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetReportDocumentResponse
}

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 GetReportDocumentResponse

type GetReportDocumentResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors  *ErrorList      `json:"errors,omitempty"`
	Payload *ReportDocument `json:"payload,omitempty"`
}

GetReportDocumentResponse defines model for GetReportDocumentResponse.

type GetReportResp

type GetReportResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetReportResponse
}

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 GetReportResponse

type GetReportResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors  *ErrorList `json:"errors,omitempty"`
	Payload *Report    `json:"payload,omitempty"`
}

GetReportResponse defines model for GetReportResponse.

type GetReportScheduleResp

type GetReportScheduleResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetReportScheduleResponse
}

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 GetReportScheduleResponse

type GetReportScheduleResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// Detailed information about a report schedule.
	Payload *ReportSchedule `json:"payload,omitempty"`
}

GetReportScheduleResponse defines model for GetReportScheduleResponse.

type GetReportSchedulesParams

type GetReportSchedulesParams struct {

	// A list of report types used to filter report schedules.
	ReportTypes []string `json:"reportTypes"`
}

GetReportSchedulesParams defines parameters for GetReportSchedules.

type GetReportSchedulesResp

type GetReportSchedulesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetReportSchedulesResponse
}

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 GetReportSchedulesResponse

type GetReportSchedulesResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors  *ErrorList          `json:"errors,omitempty"`
	Payload *ReportScheduleList `json:"payload,omitempty"`
}

GetReportSchedulesResponse defines model for GetReportSchedulesResponse.

type GetReportsParams

type GetReportsParams struct {

	// A list of report types used to filter reports. 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 `json:"reportTypes,omitempty"`

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

	// 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 `json:"marketplaceIds,omitempty"`

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

	// 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 `json:"createdSince,omitempty"`

	// 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 `json:"createdUntil,omitempty"`

	// 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 `json:"nextToken,omitempty"`
}

GetReportsParams defines parameters for GetReports.

type GetReportsResp

type GetReportsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetReportsResponse
}

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 {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// 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"`
	Payload   *ReportList `json:"payload,omitempty"`
}

GetReportsResponse defines model for GetReportsResponse.

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 {

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

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

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

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

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

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

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

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

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

	// 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"`

	// The report type.
	ReportType string `json:"reportType"`
}

Report defines model for Report.

type ReportDocument

type ReportDocument struct {

	// If present, the report document contents have been compressed with the provided algorithm.
	CompressionAlgorithm *string `json:"compressionAlgorithm,omitempty"`

	// Encryption details required for decryption of a report document's contents.
	EncryptionDetails ReportDocumentEncryptionDetails `json:"encryptionDetails"`

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

	// A presigned URL for the report document. This URL expires after 5 minutes.
	Url string `json:"url"`
}

ReportDocument defines model for ReportDocument.

type ReportDocumentEncryptionDetails

type ReportDocumentEncryptionDetails struct {

	// The vector to decrypt the document contents using Cipher Block Chaining (CBC).
	InitializationVector string `json:"initializationVector"`

	// The encryption key used to decrypt the document contents.
	Key string `json:"key"`

	// The encryption standard required to decrypt the document contents.
	Standard string `json:"standard"`
}

ReportDocumentEncryptionDetails defines model for ReportDocumentEncryptionDetails.

type ReportList

type ReportList []Report

ReportList defines model for ReportList.

type ReportOptions

type ReportOptions struct {
	AdditionalProperties map[string]string `json:"-"`
}

ReportOptions defines model for ReportOptions.

func (ReportOptions) Get

func (a ReportOptions) Get(fieldName string) (value string, found bool)

Getter for additional properties for ReportOptions. Returns the specified element and whether it was found

func (ReportOptions) MarshalJSON

func (a ReportOptions) MarshalJSON() ([]byte, error)

Override default JSON handling for ReportOptions to handle AdditionalProperties

func (*ReportOptions) Set

func (a *ReportOptions) Set(fieldName string, value string)

Setter for additional properties for ReportOptions

func (*ReportOptions) UnmarshalJSON

func (a *ReportOptions) UnmarshalJSON(b []byte) error

Override default JSON handling for ReportOptions to handle AdditionalProperties

type ReportSchedule

type ReportSchedule struct {

	// 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"`

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

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

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

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

	// The report type.
	ReportType string `json:"reportType"`
}

ReportSchedule defines model for ReportSchedule.

type ReportScheduleList

type ReportScheduleList []ReportSchedule

ReportScheduleList defines model for ReportScheduleList.

type RequestBeforeFn

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

RequestBeforeFn is the function signature for the RequestBefore callback function

type ResponseAfterFn

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

ResponseAfterFn is the function signature for the ResponseAfter callback function

Jump to

Keyboard shortcuts

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