accountbudgets

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetAccountBudgetFeatureFlagsRequest

func NewGetAccountBudgetFeatureFlagsRequest(server string, params *GetAccountBudgetFeatureFlagsParams) (*http.Request, error)

NewGetAccountBudgetFeatureFlagsRequest generates requests for GetAccountBudgetFeatureFlags

func NewUpdateAccountBudgetFeatureFlagsRequestWithApplicationVndAccountBudgetFeatureFlagsV1PlusJSONBody

func NewUpdateAccountBudgetFeatureFlagsRequestWithApplicationVndAccountBudgetFeatureFlagsV1PlusJSONBody(server string, params *UpdateAccountBudgetFeatureFlagsParams, body UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody) (*http.Request, error)

NewUpdateAccountBudgetFeatureFlagsRequestWithApplicationVndAccountBudgetFeatureFlagsV1PlusJSONBody calls the generic UpdateAccountBudgetFeatureFlags builder with application/vnd.accountBudgetFeatureFlags.v1+json body

func NewUpdateAccountBudgetFeatureFlagsRequestWithBody

func NewUpdateAccountBudgetFeatureFlagsRequestWithBody(server string, params *UpdateAccountBudgetFeatureFlagsParams, contentType string, body io.Reader) (*http.Request, error)

NewUpdateAccountBudgetFeatureFlagsRequestWithBody generates requests for UpdateAccountBudgetFeatureFlags with any type of body

Types

type APIScopeHeader

type APIScopeHeader = string

APIScopeHeader defines model for APIScopeHeader.

type AccountBudgetFeatureFlagsError

type AccountBudgetFeatureFlagsError struct {
	// Code An enumerated code for machine use.
	Code *AccountBudgetFeatureFlagsErrorCode `json:"code,omitempty"`

	// Details A human-readable description of the response.
	Details *string `json:"details,omitempty"`
}

AccountBudgetFeatureFlagsError The Error Response Object.

type AccountBudgetFeatureFlagsErrorCode

type AccountBudgetFeatureFlagsErrorCode string

AccountBudgetFeatureFlagsErrorCode An enumerated code for machine use.

const (
	AccountBudgetFeatureFlagsErrorCodeENTRYNOTFOUND         AccountBudgetFeatureFlagsErrorCode = "ENTRY_NOT_FOUND"
	AccountBudgetFeatureFlagsErrorCodeINVALIDPARAMETERVALUE AccountBudgetFeatureFlagsErrorCode = "INVALID_PARAMETER_VALUE"
	AccountBudgetFeatureFlagsErrorCodeOK                    AccountBudgetFeatureFlagsErrorCode = "OK"
)

Defines values for AccountBudgetFeatureFlagsErrorCode.

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) GetAccountBudgetFeatureFlags

func (c *Client) GetAccountBudgetFeatureFlags(ctx context.Context, params *GetAccountBudgetFeatureFlagsParams) (*http.Response, error)

func (*Client) UpdateAccountBudgetFeatureFlagsWithBody

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

type ClientIdHeader

type ClientIdHeader = string

ClientIdHeader defines model for ClientIdHeader.

type ClientInterface

type ClientInterface interface {
	// GetAccountBudgetFeatureFlags request
	GetAccountBudgetFeatureFlags(ctx context.Context, params *GetAccountBudgetFeatureFlagsParams) (*http.Response, error)

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

	UpdateAccountBudgetFeatureFlagsWithApplicationVndAccountBudgetFeatureFlagsV1PlusJSONBody(ctx context.Context, params *UpdateAccountBudgetFeatureFlagsParams, body UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody) (*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 added in v0.0.2

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) GetAccountBudgetFeatureFlagsWithResponse

func (c *ClientWithResponses) GetAccountBudgetFeatureFlagsWithResponse(ctx context.Context, params *GetAccountBudgetFeatureFlagsParams) (*GetAccountBudgetFeatureFlagsResp, error)

GetAccountBudgetFeatureFlagsWithResponse request returning *GetAccountBudgetFeatureFlagsResp

func (*ClientWithResponses) UpdateAccountBudgetFeatureFlagsWithBodyWithResponse

func (c *ClientWithResponses) UpdateAccountBudgetFeatureFlagsWithBodyWithResponse(ctx context.Context, params *UpdateAccountBudgetFeatureFlagsParams, contentType string, body io.Reader) (*UpdateAccountBudgetFeatureFlagsResp, error)

UpdateAccountBudgetFeatureFlagsWithBodyWithResponse request with arbitrary body returning *UpdateAccountBudgetFeatureFlagsResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetAccountBudgetFeatureFlagsWithResponse request
	GetAccountBudgetFeatureFlagsWithResponse(ctx context.Context, params *GetAccountBudgetFeatureFlagsParams) (*GetAccountBudgetFeatureFlagsResp, error)

	// UpdateAccountBudgetFeatureFlagsWithBodyWithResponse request with any body
	UpdateAccountBudgetFeatureFlagsWithBodyWithResponse(ctx context.Context, params *UpdateAccountBudgetFeatureFlagsParams, contentType string, body io.Reader) (*UpdateAccountBudgetFeatureFlagsResp, error)

	UpdateAccountBudgetFeatureFlagsWithApplicationVndAccountBudgetFeatureFlagsV1PlusJSONBodyWithResponse(ctx context.Context, params *UpdateAccountBudgetFeatureFlagsParams, body UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody) (*UpdateAccountBudgetFeatureFlagsResp, error)
}

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

type FeatureFlags

type FeatureFlags struct {
	// IsOptedOutForAverageDailyBudgetIncrease Denotes the opt in/out decision for AverageDailyBudgetIncrease feature. If the entity spends less than your daily budget, the unspent amount can be used to increase your daily budget to 100% (if opted in) or 25% (if opted out) in other days of calendar month.
	IsOptedOutForAverageDailyBudgetIncrease *bool `json:"isOptedOutForAverageDailyBudgetIncrease,omitempty"`
}

FeatureFlags Feature flags for account budget, which denotes that advertiser Opted In/Out from specific budget feature.

type GetAccountBudgetFeatureFlagsParams

type GetAccountBudgetFeatureFlagsParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientIdHeader `json:"Amazon-Advertising-API-ClientId"`

	// AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header and choose profile id `profileId` from the response to pass it as input.
	AmazonAdvertisingAPIScope APIScopeHeader `json:"Amazon-Advertising-API-Scope"`
}

GetAccountBudgetFeatureFlagsParams defines parameters for GetAccountBudgetFeatureFlags.

type GetAccountBudgetFeatureFlagsResp

type GetAccountBudgetFeatureFlagsResp struct {
	Body                                                  []byte
	HTTPResponse                                          *http.Response
	ApplicationvndAccountBudgetFeatureFlagsV1JSON200      *GetAccountBudgetFeatureFlagsResponse
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON400 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON401 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON403 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON429 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON500 *AccountBudgetFeatureFlagsError
}

func ParseGetAccountBudgetFeatureFlagsResp

func ParseGetAccountBudgetFeatureFlagsResp(rsp *http.Response) (*GetAccountBudgetFeatureFlagsResp, error)

ParseGetAccountBudgetFeatureFlagsResp parses an HTTP response from a GetAccountBudgetFeatureFlagsWithResponse call

func (GetAccountBudgetFeatureFlagsResp) Status

Status returns HTTPResponse.Status

func (GetAccountBudgetFeatureFlagsResp) StatusCode

func (r GetAccountBudgetFeatureFlagsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAccountBudgetFeatureFlagsResponse

type GetAccountBudgetFeatureFlagsResponse struct {
	// FeatureFlags Feature flags for account budget, which denotes that advertiser Opted In/Out from specific budget feature.
	FeatureFlags *FeatureFlags `json:"featureFlags,omitempty"`
}

GetAccountBudgetFeatureFlagsResponse Response to get account budget feature flags information.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn added in v0.0.2

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

ResponseEditorFn is the function signature for the ResponseEditor callback function

type UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody

type UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody = UpdateAccountBudgetFeatureFlagsRequest

UpdateAccountBudgetFeatureFlagsApplicationVndAccountBudgetFeatureFlagsV1PlusJSONRequestBody defines body for UpdateAccountBudgetFeatureFlags for application/vnd.accountBudgetFeatureFlags.v1+json ContentType.

type UpdateAccountBudgetFeatureFlagsParams

type UpdateAccountBudgetFeatureFlagsParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientIdHeader `json:"Amazon-Advertising-API-ClientId"`

	// AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header and choose profile id `profileId` from the response to pass it as input.
	AmazonAdvertisingAPIScope APIScopeHeader `json:"Amazon-Advertising-API-Scope"`
}

UpdateAccountBudgetFeatureFlagsParams defines parameters for UpdateAccountBudgetFeatureFlags.

type UpdateAccountBudgetFeatureFlagsRequest

type UpdateAccountBudgetFeatureFlagsRequest struct {
	// FeatureFlags Feature flags for account budget, which denotes that advertiser Opted In/Out from specific budget feature.
	FeatureFlags FeatureFlags `json:"featureFlags"`
}

UpdateAccountBudgetFeatureFlagsRequest Request to update account budget feature flags information.

type UpdateAccountBudgetFeatureFlagsResp

type UpdateAccountBudgetFeatureFlagsResp struct {
	Body                                                  []byte
	HTTPResponse                                          *http.Response
	ApplicationvndAccountBudgetFeatureFlagsV1JSON200      *UpdateAccountBudgetFeatureFlagsResponse
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON400 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON401 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON403 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON429 *AccountBudgetFeatureFlagsError
	ApplicationvndAccountBudgetFeatureFlagsErrorV1JSON500 *AccountBudgetFeatureFlagsError
}

func ParseUpdateAccountBudgetFeatureFlagsResp

func ParseUpdateAccountBudgetFeatureFlagsResp(rsp *http.Response) (*UpdateAccountBudgetFeatureFlagsResp, error)

ParseUpdateAccountBudgetFeatureFlagsResp parses an HTTP response from a UpdateAccountBudgetFeatureFlagsWithResponse call

func (UpdateAccountBudgetFeatureFlagsResp) Status

Status returns HTTPResponse.Status

func (UpdateAccountBudgetFeatureFlagsResp) StatusCode

StatusCode returns HTTPResponse.StatusCode

type UpdateAccountBudgetFeatureFlagsResponse

type UpdateAccountBudgetFeatureFlagsResponse struct {
	// Code An enumerated code for machine use.
	Code *UpdateAccountBudgetFeatureFlagsResponseCode `json:"code,omitempty"`

	// Details A human-readable description of the response.
	Details *string `json:"details,omitempty"`
}

UpdateAccountBudgetFeatureFlagsResponse Response for update account budget feature flags information.

type UpdateAccountBudgetFeatureFlagsResponseCode

type UpdateAccountBudgetFeatureFlagsResponseCode string

UpdateAccountBudgetFeatureFlagsResponseCode An enumerated code for machine use.

const (
	UpdateAccountBudgetFeatureFlagsResponseCodeENTRYNOTFOUND         UpdateAccountBudgetFeatureFlagsResponseCode = "ENTRY_NOT_FOUND"
	UpdateAccountBudgetFeatureFlagsResponseCodeINVALIDPARAMETERVALUE UpdateAccountBudgetFeatureFlagsResponseCode = "INVALID_PARAMETER_VALUE"
	UpdateAccountBudgetFeatureFlagsResponseCodeOK                    UpdateAccountBudgetFeatureFlagsResponseCode = "OK"
)

Defines values for UpdateAccountBudgetFeatureFlagsResponseCode.

Jump to

Keyboard shortcuts

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