accountportfolios

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 accountportfolios 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

View Source
const (
	BearerAuthScopes              = "bearerAuth.Scopes"
	Oauth2AuthorizationCodeScopes = "oauth2AuthorizationCode.Scopes"
)

Variables

This section is empty.

Functions

func NewCreatePortfoliosRequest

func NewCreatePortfoliosRequest(server string, params *CreatePortfoliosParams, body CreatePortfoliosJSONRequestBody) (*http.Request, error)

NewCreatePortfoliosRequest calls the generic CreatePortfolios builder with application/json body

func NewCreatePortfoliosRequestWithBody

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

NewCreatePortfoliosRequestWithBody generates requests for CreatePortfolios with any type of body

func NewListPortfolioExRequest

func NewListPortfolioExRequest(server string, portfolioId float32, params *ListPortfolioExParams) (*http.Request, error)

NewListPortfolioExRequest generates requests for ListPortfolioEx

func NewListPortfolioRequest

func NewListPortfolioRequest(server string, portfolioId float32, params *ListPortfolioParams) (*http.Request, error)

NewListPortfolioRequest generates requests for ListPortfolio

func NewListPortfoliosExRequest

func NewListPortfoliosExRequest(server string, params *ListPortfoliosExParams) (*http.Request, error)

NewListPortfoliosExRequest generates requests for ListPortfoliosEx

func NewListPortfoliosRequest

func NewListPortfoliosRequest(server string, params *ListPortfoliosParams) (*http.Request, error)

NewListPortfoliosRequest generates requests for ListPortfolios

func NewUpdatePortfoliosRequest

func NewUpdatePortfoliosRequest(server string, params *UpdatePortfoliosParams, body UpdatePortfoliosJSONRequestBody) (*http.Request, error)

NewUpdatePortfoliosRequest calls the generic UpdatePortfolios builder with application/json body

func NewUpdatePortfoliosRequestWithBody

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

NewUpdatePortfoliosRequestWithBody generates requests for UpdatePortfolios with any type of body

Types

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

func (c *Client) CreatePortfolios(ctx context.Context, params *CreatePortfoliosParams, body CreatePortfoliosJSONRequestBody) (*http.Response, error)

func (*Client) CreatePortfoliosWithBody

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

func (*Client) ListPortfolio

func (c *Client) ListPortfolio(ctx context.Context, portfolioId float32, params *ListPortfolioParams) (*http.Response, error)

func (*Client) ListPortfolioEx

func (c *Client) ListPortfolioEx(ctx context.Context, portfolioId float32, params *ListPortfolioExParams) (*http.Response, error)

func (*Client) ListPortfolios

func (c *Client) ListPortfolios(ctx context.Context, params *ListPortfoliosParams) (*http.Response, error)

func (*Client) ListPortfoliosEx

func (c *Client) ListPortfoliosEx(ctx context.Context, params *ListPortfoliosExParams) (*http.Response, error)

func (*Client) UpdatePortfolios

func (c *Client) UpdatePortfolios(ctx context.Context, params *UpdatePortfoliosParams, body UpdatePortfoliosJSONRequestBody) (*http.Response, error)

func (*Client) UpdatePortfoliosWithBody

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

type ClientHeader

type ClientHeader = string

ClientHeader defines model for clientHeader.

type ClientInterface

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

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

	CreatePortfolios(ctx context.Context, params *CreatePortfoliosParams, body CreatePortfoliosJSONRequestBody) (*http.Response, error)

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

	UpdatePortfolios(ctx context.Context, params *UpdatePortfoliosParams, body UpdatePortfoliosJSONRequestBody) (*http.Response, error)

	// ListPortfoliosEx request
	ListPortfoliosEx(ctx context.Context, params *ListPortfoliosExParams) (*http.Response, error)

	// ListPortfolioEx request
	ListPortfolioEx(ctx context.Context, portfolioId float32, params *ListPortfolioExParams) (*http.Response, error)

	// ListPortfolio request
	ListPortfolio(ctx context.Context, portfolioId float32, params *ListPortfolioParams) (*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) CreatePortfoliosWithBodyWithResponse

func (c *ClientWithResponses) CreatePortfoliosWithBodyWithResponse(ctx context.Context, params *CreatePortfoliosParams, contentType string, body io.Reader) (*CreatePortfoliosResp, error)

CreatePortfoliosWithBodyWithResponse request with arbitrary body returning *CreatePortfoliosResp

func (*ClientWithResponses) CreatePortfoliosWithResponse

func (*ClientWithResponses) ListPortfolioExWithResponse

func (c *ClientWithResponses) ListPortfolioExWithResponse(ctx context.Context, portfolioId float32, params *ListPortfolioExParams) (*ListPortfolioExResp, error)

ListPortfolioExWithResponse request returning *ListPortfolioExResp

func (*ClientWithResponses) ListPortfolioWithResponse

func (c *ClientWithResponses) ListPortfolioWithResponse(ctx context.Context, portfolioId float32, params *ListPortfolioParams) (*ListPortfolioResp, error)

ListPortfolioWithResponse request returning *ListPortfolioResp

func (*ClientWithResponses) ListPortfoliosExWithResponse

func (c *ClientWithResponses) ListPortfoliosExWithResponse(ctx context.Context, params *ListPortfoliosExParams) (*ListPortfoliosExResp, error)

ListPortfoliosExWithResponse request returning *ListPortfoliosExResp

func (*ClientWithResponses) ListPortfoliosWithResponse

func (c *ClientWithResponses) ListPortfoliosWithResponse(ctx context.Context, params *ListPortfoliosParams) (*ListPortfoliosResp, error)

ListPortfoliosWithResponse request returning *ListPortfoliosResp

func (*ClientWithResponses) UpdatePortfoliosWithBodyWithResponse

func (c *ClientWithResponses) UpdatePortfoliosWithBodyWithResponse(ctx context.Context, params *UpdatePortfoliosParams, contentType string, body io.Reader) (*UpdatePortfoliosResp, error)

UpdatePortfoliosWithBodyWithResponse request with arbitrary body returning *UpdatePortfoliosResp

func (*ClientWithResponses) UpdatePortfoliosWithResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListPortfoliosWithResponse request
	ListPortfoliosWithResponse(ctx context.Context, params *ListPortfoliosParams) (*ListPortfoliosResp, error)

	// CreatePortfoliosWithBodyWithResponse request with any body
	CreatePortfoliosWithBodyWithResponse(ctx context.Context, params *CreatePortfoliosParams, contentType string, body io.Reader) (*CreatePortfoliosResp, error)

	CreatePortfoliosWithResponse(ctx context.Context, params *CreatePortfoliosParams, body CreatePortfoliosJSONRequestBody) (*CreatePortfoliosResp, error)

	// UpdatePortfoliosWithBodyWithResponse request with any body
	UpdatePortfoliosWithBodyWithResponse(ctx context.Context, params *UpdatePortfoliosParams, contentType string, body io.Reader) (*UpdatePortfoliosResp, error)

	UpdatePortfoliosWithResponse(ctx context.Context, params *UpdatePortfoliosParams, body UpdatePortfoliosJSONRequestBody) (*UpdatePortfoliosResp, error)

	// ListPortfoliosExWithResponse request
	ListPortfoliosExWithResponse(ctx context.Context, params *ListPortfoliosExParams) (*ListPortfoliosExResp, error)

	// ListPortfolioExWithResponse request
	ListPortfolioExWithResponse(ctx context.Context, portfolioId float32, params *ListPortfolioExParams) (*ListPortfolioExResp, error)

	// ListPortfolioWithResponse request
	ListPortfolioWithResponse(ctx context.Context, portfolioId float32, params *ListPortfolioParams) (*ListPortfolioResp, error)
}

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

type CreatePortfoliosJSONBody

type CreatePortfoliosJSONBody = []Portfolio

CreatePortfoliosJSONBody defines parameters for CreatePortfolios.

type CreatePortfoliosJSONRequestBody

type CreatePortfoliosJSONRequestBody = CreatePortfoliosJSONBody

CreatePortfoliosJSONRequestBody defines body for CreatePortfolios for application/json ContentType.

type CreatePortfoliosParams

type CreatePortfoliosParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

CreatePortfoliosParams defines parameters for CreatePortfolios.

type CreatePortfoliosResp

type CreatePortfoliosResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]struct {
		// Code A string, 'SUCCESS', that indicates the portfolio was updated successfully.
		Code *string `json:"code,omitempty"`

		// PortfolioId The portfolio identifier.
		PortfolioId *float32 `json:"portfolioId,omitempty"`
	}
	JSON401 *Unauthorized
	JSON404 *NotFound
}

func ParseCreatePortfoliosResp

func ParseCreatePortfoliosResp(rsp *http.Response) (*CreatePortfoliosResp, error)

ParseCreatePortfoliosResp parses an HTTP response from a CreatePortfoliosWithResponse call

func (CreatePortfoliosResp) Status

func (r CreatePortfoliosResp) Status() string

Status returns HTTPResponse.Status

func (CreatePortfoliosResp) StatusCode

func (r CreatePortfoliosResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListPortfolioExParams

type ListPortfolioExParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

ListPortfolioExParams defines parameters for ListPortfolioEx.

type ListPortfolioExResp

type ListPortfolioExResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PortfolioEx
	JSON401      *Unauthorized
	JSON404      *NotFound
}

func ParseListPortfolioExResp

func ParseListPortfolioExResp(rsp *http.Response) (*ListPortfolioExResp, error)

ParseListPortfolioExResp parses an HTTP response from a ListPortfolioExWithResponse call

func (ListPortfolioExResp) Status

func (r ListPortfolioExResp) Status() string

Status returns HTTPResponse.Status

func (ListPortfolioExResp) StatusCode

func (r ListPortfolioExResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPortfolioParams

type ListPortfolioParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

ListPortfolioParams defines parameters for ListPortfolio.

type ListPortfolioResp

type ListPortfolioResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Portfolio
	JSON401      *Unauthorized
	JSON404      *NotFound
}

func ParseListPortfolioResp

func ParseListPortfolioResp(rsp *http.Response) (*ListPortfolioResp, error)

ParseListPortfolioResp parses an HTTP response from a ListPortfolioWithResponse call

func (ListPortfolioResp) Status

func (r ListPortfolioResp) Status() string

Status returns HTTPResponse.Status

func (ListPortfolioResp) StatusCode

func (r ListPortfolioResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPortfoliosExParams

type ListPortfoliosExParams struct {
	// PortfolioIdFilter The returned list includes portfolios with identifiers matching those in the specified comma-delimited list. There is a maximum of 100 identifiers allowed.
	PortfolioIdFilter *PortfolioIdFilter `form:"portfolioIdFilter,omitempty" json:"portfolioIdFilter,omitempty"`

	// PortfolioNameFilter The returned list includes portfolios with names matching those in the specified comma-delimited list. There is a maximum of 100 names allowed.
	PortfolioNameFilter *PortfolioNameFilter `form:"portfolioNameFilter,omitempty" json:"portfolioNameFilter,omitempty"`

	// PortfolioStateFilter The returned list includes portfolios with states matching those in the specified comma-delimited list.
	PortfolioStateFilter *ListPortfoliosExParamsPortfolioStateFilter `form:"portfolioStateFilter,omitempty" json:"portfolioStateFilter,omitempty"`

	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

ListPortfoliosExParams defines parameters for ListPortfoliosEx.

type ListPortfoliosExParamsPortfolioStateFilter

type ListPortfoliosExParamsPortfolioStateFilter string

ListPortfoliosExParamsPortfolioStateFilter defines parameters for ListPortfoliosEx.

Defines values for ListPortfoliosExParamsPortfolioStateFilter.

type ListPortfoliosExResp

type ListPortfoliosExResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]PortfolioEx
	JSON401      *Unauthorized
	JSON404      *NotFound
}

func ParseListPortfoliosExResp

func ParseListPortfoliosExResp(rsp *http.Response) (*ListPortfoliosExResp, error)

ParseListPortfoliosExResp parses an HTTP response from a ListPortfoliosExWithResponse call

func (ListPortfoliosExResp) Status

func (r ListPortfoliosExResp) Status() string

Status returns HTTPResponse.Status

func (ListPortfoliosExResp) StatusCode

func (r ListPortfoliosExResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPortfoliosParams

type ListPortfoliosParams struct {
	// PortfolioIdFilter The returned list includes portfolios with identifiers matching those in the specified comma-delimited list. There is a maximum of 100 identifiers allowed.
	PortfolioIdFilter *PortfolioIdFilter `form:"portfolioIdFilter,omitempty" json:"portfolioIdFilter,omitempty"`

	// PortfolioNameFilter The returned list includes portfolios with names matching those in the specified comma-delimited list. There is a maximum of 100 names allowed.
	PortfolioNameFilter *PortfolioNameFilter `form:"portfolioNameFilter,omitempty" json:"portfolioNameFilter,omitempty"`

	// PortfolioStateFilter The returned list includes portfolios with states matching those in the specified comma-delimited list.
	PortfolioStateFilter *ListPortfoliosParamsPortfolioStateFilter `form:"portfolioStateFilter,omitempty" json:"portfolioStateFilter,omitempty"`

	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

ListPortfoliosParams defines parameters for ListPortfolios.

type ListPortfoliosParamsPortfolioStateFilter

type ListPortfoliosParamsPortfolioStateFilter string

ListPortfoliosParamsPortfolioStateFilter defines parameters for ListPortfolios.

const (
	ListPortfoliosParamsPortfolioStateFilterArchived ListPortfoliosParamsPortfolioStateFilter = "archived"
	ListPortfoliosParamsPortfolioStateFilterEnabled  ListPortfoliosParamsPortfolioStateFilter = "enabled"
	ListPortfoliosParamsPortfolioStateFilterPaused   ListPortfoliosParamsPortfolioStateFilter = "paused"
)

Defines values for ListPortfoliosParamsPortfolioStateFilter.

type ListPortfoliosResp

type ListPortfoliosResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Portfolio
	JSON401      *Unauthorized
	JSON404      *NotFound
}

func ParseListPortfoliosResp

func ParseListPortfoliosResp(rsp *http.Response) (*ListPortfoliosResp, error)

ParseListPortfoliosResp parses an HTTP response from a ListPortfoliosWithResponse call

func (ListPortfoliosResp) Status

func (r ListPortfoliosResp) Status() string

Status returns HTTPResponse.Status

func (ListPortfoliosResp) StatusCode

func (r ListPortfoliosResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type NotFound

type NotFound struct {
	// Code The error code.
	Code *string `json:"code,omitempty"`

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

NotFound defines model for notFound.

type Portfolio

type Portfolio struct {
	Budget *struct {
		// Amount The budget amount associated with the portfolio. Cannot be `null`.
		Amount *float32 `json:"amount,omitempty"`

		// CurrencyCode The currency used for all monetary values for entities under this profile. Cannot be `null`.
		// |Region|`countryCode`|Country Name|`currencyCode`|
		// |-----|------|------|------|
		// |NA|US|United States|USD|
		// |NA|CA|Canada|CAD|
		// |NA|MX|Mexico|MXN|
		// |NA|BR|Brazil|BRL|
		// |EU|UK|United Kingdom|GBP|
		// |EU|DE|Germany|EUR|
		// |EU|FR|France|EUR|
		// |EU|ES|Spain|EUR|
		// |EU|IT|Italy|EUR|
		// |EU|NL|The Netherlands|EUR|
		// |EU|SE|Sweden|SEK|
		// |EU|PL|Poland|PLN|
		// |EU|AE|United Arab Emirates|AED|
		// |EU|TR|Turkey|TRY|
		// |FE|JP|Japan|JPY|
		// |FE|AU|Australia|AUD|
		// |FE|SG|Singapore|SGD|
		CurrencyCode *PortfolioBudgetCurrencyCode `json:"currencyCode,omitempty"`

		// EndDate The end date after which the budget is no longer applied. Optional if `policy` is set to `dateRange` or `monthlyRecurring`.
		EndDate *string `json:"endDate,omitempty"`

		// Policy The budget policy. Set to `dateRange` to specify a budget for a specific period of time. Set to `monthlyRecurring` to specify a budget that is automatically renewed at the beginning of each month. Cannot be `null`.
		Policy *PortfolioBudgetPolicy `json:"policy,omitempty"`

		// StartDate The starting date in `YYYYMMDD` format to which the budget is applied. Required if `policy` is set to `dateRange`. Not specified if `policy` is set to `monthlyRecurring`. Note that the starting date for `monthlyRecurring` is the date when the policy is set.
		StartDate *string `json:"startDate,omitempty"`
	} `json:"budget,omitempty"`

	// InBudget Indicates the current budget status of the portfolio. Set to `true` if the portfolio is in budget, set to `false` if the portfolio is out of budget.
	InBudget *bool `json:"inBudget,omitempty"`

	// Name The portfolio name.
	Name *string `json:"name,omitempty"`

	// PortfolioId The portfolio identifier.
	PortfolioId *float32 `json:"portfolioId,omitempty"`

	// State The current state of the portfolio.
	State *PortfolioState `json:"state,omitempty"`
}

Portfolio defines model for Portfolio.

type PortfolioBudgetCurrencyCode

type PortfolioBudgetCurrencyCode string

PortfolioBudgetCurrencyCode The currency used for all monetary values for entities under this profile. Cannot be `null`. |Region|`countryCode`|Country Name|`currencyCode`| |-----|------|------|------| |NA|US|United States|USD| |NA|CA|Canada|CAD| |NA|MX|Mexico|MXN| |NA|BR|Brazil|BRL| |EU|UK|United Kingdom|GBP| |EU|DE|Germany|EUR| |EU|FR|France|EUR| |EU|ES|Spain|EUR| |EU|IT|Italy|EUR| |EU|NL|The Netherlands|EUR| |EU|SE|Sweden|SEK| |EU|PL|Poland|PLN| |EU|AE|United Arab Emirates|AED| |EU|TR|Turkey|TRY| |FE|JP|Japan|JPY| |FE|AU|Australia|AUD| |FE|SG|Singapore|SGD|

const (
	PortfolioBudgetCurrencyCodeAED PortfolioBudgetCurrencyCode = "AED"
	PortfolioBudgetCurrencyCodeAUD PortfolioBudgetCurrencyCode = "AUD"
	PortfolioBudgetCurrencyCodeBRL PortfolioBudgetCurrencyCode = "BRL"
	PortfolioBudgetCurrencyCodeCAD PortfolioBudgetCurrencyCode = "CAD"
	PortfolioBudgetCurrencyCodeEUR PortfolioBudgetCurrencyCode = "EUR"
	PortfolioBudgetCurrencyCodeGBP PortfolioBudgetCurrencyCode = "GBP"
	PortfolioBudgetCurrencyCodeJPY PortfolioBudgetCurrencyCode = "JPY"
	PortfolioBudgetCurrencyCodeMXN PortfolioBudgetCurrencyCode = "MXN"
	PortfolioBudgetCurrencyCodePLN PortfolioBudgetCurrencyCode = "PLN"
	PortfolioBudgetCurrencyCodeSEK PortfolioBudgetCurrencyCode = "SEK"
	PortfolioBudgetCurrencyCodeSGD PortfolioBudgetCurrencyCode = "SGD"
	PortfolioBudgetCurrencyCodeTRY PortfolioBudgetCurrencyCode = "TRY"
	PortfolioBudgetCurrencyCodeUSD PortfolioBudgetCurrencyCode = "USD"
)

Defines values for PortfolioBudgetCurrencyCode.

type PortfolioBudgetPolicy

type PortfolioBudgetPolicy string

PortfolioBudgetPolicy The budget policy. Set to `dateRange` to specify a budget for a specific period of time. Set to `monthlyRecurring` to specify a budget that is automatically renewed at the beginning of each month. Cannot be `null`.

const (
	PortfolioBudgetPolicyDateRange        PortfolioBudgetPolicy = "dateRange"
	PortfolioBudgetPolicyMonthlyRecurring PortfolioBudgetPolicy = "monthlyRecurring"
)

Defines values for PortfolioBudgetPolicy.

type PortfolioEx

type PortfolioEx struct {
	Budget *struct {
		// Amount The budget amount associated with the portfolio. Cannot be `null`.
		Amount *float32 `json:"amount,omitempty"`

		// CurrencyCode The currency used for all monetary values for entities under this profile. Cannot be `null`.
		// |Region|`countryCode`|Country Name|`currencyCode`|
		// |-----|------|------|------|
		// |NA|US|United States|USD|
		// |NA|CA|Canada|CAD|
		// |NA|MX|Mexico|MXN|
		// |NA|BR|Brazil|BRL|
		// |EU|UK|United Kingdom|GBP|
		// |EU|DE|Germany|EUR|
		// |EU|FR|France|EUR|
		// |EU|ES|Spain|EUR|
		// |EU|IT|Italy|EUR|
		// |EU|NL|The Netherlands|EUR|
		// |EU|SE|Sweden|SEK|
		// |EU|PL|Poland|PLN|
		// |EU|AE|United Arab Emirates|AED|
		// |EU|TR|Turkey|TRY|
		// |FE|JP|Japan|JPY|
		// |FE|AU|Australia|AUD|
		// |FE|SG|Singapore|SGD|
		CurrencyCode *PortfolioExBudgetCurrencyCode `json:"currencyCode,omitempty"`

		// EndDate The end date after which the budget is no longer applied. Optional if `policy` is set to `dateRange` or `monthlyRecurring`.
		EndDate *string `json:"endDate,omitempty"`

		// Policy The budget policy. Set to `dateRange` to specify a budget for a specific period of time. Set to `monthlyRecurring` to specify a budget that is automatically renewed at the beginning of each month. Cannot be `null`.
		Policy *PortfolioExBudgetPolicy `json:"policy,omitempty"`

		// StartDate The starting date in `YYYYMMDD` format to which the budget is applied. Required if `policy` is set to `dateRange`. Not specified if `policy` is set to `monthlyRecurring`. Note that the starting date for `monthlyRecurring` is the date when the policy is set.
		StartDate *string `json:"startDate,omitempty"`
	} `json:"budget,omitempty"`

	// CreationDate Date that the portfolio was created, in epoch time.
	CreationDate *float32 `json:"creationDate,omitempty"`

	// InBudget Indicates the current budget status of the portfolio. Set to `true` if the portfolio is in budget, set to `false` if the portfolio is out of budget.
	InBudget *bool `json:"inBudget,omitempty"`

	// LastUpdatedDate Date at least one property value of the portfolio was updated, in epoch time.
	LastUpdatedDate *float32 `json:"lastUpdatedDate,omitempty"`

	// Name The portfolio name.
	Name *string `json:"name,omitempty"`

	// PortfolioId The portfolio identifier.
	PortfolioId *float32 `json:"portfolioId,omitempty"`

	// ServingStatus The current serving status of the portfolio:
	// | Portfolio serving status | Description |
	// |--------------------------|-------------|
	// | PORTFOLIO_STATUS_ENABLED | The portfolio's status is ENABLED. |
	// | PORTFOLIO_STATUS_PAUSED  | The portfolio's status is PAUSED. |
	// | PORTFOLIO_ARCHIVED | The portfolio is archived. |
	// | PORTFOLIO_OUT_OF_BUDGET | The maximum budget cap at the portfolio level has been reached. |
	// | PENDING_START_DATE | The portfolio's start date is in the future. |
	// | ENDED | The portfolio's end date is in the past. |
	ServingStatus *PortfolioExServingStatus `json:"servingStatus,omitempty"`

	// State The current state of the portfolio.
	State *PortfolioExState `json:"state,omitempty"`
}

PortfolioEx defines model for PortfolioEx.

type PortfolioExBudgetCurrencyCode

type PortfolioExBudgetCurrencyCode string

PortfolioExBudgetCurrencyCode The currency used for all monetary values for entities under this profile. Cannot be `null`. |Region|`countryCode`|Country Name|`currencyCode`| |-----|------|------|------| |NA|US|United States|USD| |NA|CA|Canada|CAD| |NA|MX|Mexico|MXN| |NA|BR|Brazil|BRL| |EU|UK|United Kingdom|GBP| |EU|DE|Germany|EUR| |EU|FR|France|EUR| |EU|ES|Spain|EUR| |EU|IT|Italy|EUR| |EU|NL|The Netherlands|EUR| |EU|SE|Sweden|SEK| |EU|PL|Poland|PLN| |EU|AE|United Arab Emirates|AED| |EU|TR|Turkey|TRY| |FE|JP|Japan|JPY| |FE|AU|Australia|AUD| |FE|SG|Singapore|SGD|

const (
	PortfolioExBudgetCurrencyCodeAED PortfolioExBudgetCurrencyCode = "AED"
	PortfolioExBudgetCurrencyCodeAUD PortfolioExBudgetCurrencyCode = "AUD"
	PortfolioExBudgetCurrencyCodeBRL PortfolioExBudgetCurrencyCode = "BRL"
	PortfolioExBudgetCurrencyCodeCAD PortfolioExBudgetCurrencyCode = "CAD"
	PortfolioExBudgetCurrencyCodeEUR PortfolioExBudgetCurrencyCode = "EUR"
	PortfolioExBudgetCurrencyCodeGBP PortfolioExBudgetCurrencyCode = "GBP"
	PortfolioExBudgetCurrencyCodeJPY PortfolioExBudgetCurrencyCode = "JPY"
	PortfolioExBudgetCurrencyCodeMXN PortfolioExBudgetCurrencyCode = "MXN"
	PortfolioExBudgetCurrencyCodePLN PortfolioExBudgetCurrencyCode = "PLN"
	PortfolioExBudgetCurrencyCodeSEK PortfolioExBudgetCurrencyCode = "SEK"
	PortfolioExBudgetCurrencyCodeSGD PortfolioExBudgetCurrencyCode = "SGD"
	PortfolioExBudgetCurrencyCodeTRY PortfolioExBudgetCurrencyCode = "TRY"
	PortfolioExBudgetCurrencyCodeUSD PortfolioExBudgetCurrencyCode = "USD"
)

Defines values for PortfolioExBudgetCurrencyCode.

type PortfolioExBudgetPolicy

type PortfolioExBudgetPolicy string

PortfolioExBudgetPolicy The budget policy. Set to `dateRange` to specify a budget for a specific period of time. Set to `monthlyRecurring` to specify a budget that is automatically renewed at the beginning of each month. Cannot be `null`.

const (
	PortfolioExBudgetPolicyDateRange        PortfolioExBudgetPolicy = "dateRange"
	PortfolioExBudgetPolicyMonthlyRecurring PortfolioExBudgetPolicy = "monthlyRecurring"
)

Defines values for PortfolioExBudgetPolicy.

type PortfolioExServingStatus

type PortfolioExServingStatus string

PortfolioExServingStatus The current serving status of the portfolio: | Portfolio serving status | Description | |--------------------------|-------------| | PORTFOLIO_STATUS_ENABLED | The portfolio's status is ENABLED. | | PORTFOLIO_STATUS_PAUSED | The portfolio's status is PAUSED. | | PORTFOLIO_ARCHIVED | The portfolio is archived. | | PORTFOLIO_OUT_OF_BUDGET | The maximum budget cap at the portfolio level has been reached. | | PENDING_START_DATE | The portfolio's start date is in the future. | | ENDED | The portfolio's end date is in the past. |

const (
	ENDED                  PortfolioExServingStatus = "ENDED"
	PENDINGSTARTDATE       PortfolioExServingStatus = "PENDING_START_DATE"
	PORTFOLIOARCHIVED      PortfolioExServingStatus = "PORTFOLIO_ARCHIVED"
	PORTFOLIOOUTOFBUDGET   PortfolioExServingStatus = "PORTFOLIO_OUT_OF_BUDGET"
	PORTFOLIOPAUSED        PortfolioExServingStatus = "PORTFOLIO_PAUSED"
	PORTFOLIOSTATUSENABLED PortfolioExServingStatus = "PORTFOLIO_STATUS_ENABLED"
)

Defines values for PortfolioExServingStatus.

type PortfolioExState

type PortfolioExState string

PortfolioExState The current state of the portfolio.

const (
	PortfolioExStateArchived PortfolioExState = "archived"
	PortfolioExStateEnabled  PortfolioExState = "enabled"
	PortfolioExStatePaused   PortfolioExState = "paused"
)

Defines values for PortfolioExState.

type PortfolioIdFilter

type PortfolioIdFilter = string

PortfolioIdFilter defines model for portfolioIdFilter.

type PortfolioNameFilter

type PortfolioNameFilter = string

PortfolioNameFilter defines model for portfolioNameFilter.

type PortfolioState

type PortfolioState string

PortfolioState The current state of the portfolio.

const (
	PortfolioStateArchived PortfolioState = "archived"
	PortfolioStateEnabled  PortfolioState = "enabled"
	PortfolioStatePaused   PortfolioState = "paused"
)

Defines values for PortfolioState.

type PortfolioStateFilter

type PortfolioStateFilter string

PortfolioStateFilter defines model for portfolioStateFilter.

const (
	PortfolioStateFilterArchived PortfolioStateFilter = "archived"
	PortfolioStateFilterEnabled  PortfolioStateFilter = "enabled"
	PortfolioStateFilterPaused   PortfolioStateFilter = "paused"
)

Defines values for PortfolioStateFilter.

type ProfileHeader

type ProfileHeader = string

ProfileHeader defines model for profileHeader.

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 Unauthorized

type Unauthorized struct {
	// Code The error code.
	Code *string `json:"code,omitempty"`

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

Unauthorized defines model for unauthorized.

type UpdatePortfoliosJSONBody

type UpdatePortfoliosJSONBody = []Portfolio

UpdatePortfoliosJSONBody defines parameters for UpdatePortfolios.

type UpdatePortfoliosJSONRequestBody

type UpdatePortfoliosJSONRequestBody = UpdatePortfoliosJSONBody

UpdatePortfoliosJSONRequestBody defines body for UpdatePortfolios for application/json ContentType.

type UpdatePortfoliosParams

type UpdatePortfoliosParams struct {
	// AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account.
	AmazonAdvertisingAPIClientId ClientHeader `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.
	AmazonAdvertisingAPIScope ProfileHeader `json:"Amazon-Advertising-API-Scope"`
}

UpdatePortfoliosParams defines parameters for UpdatePortfolios.

type UpdatePortfoliosResp

type UpdatePortfoliosResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]struct {
		// Code A string, 'SUCCESS', that indicates the portfolio was updated successfully.
		Code *string `json:"code,omitempty"`

		// PortfolioId The portfolio identifier.
		PortfolioId *float32 `json:"portfolioId,omitempty"`
	}
	JSON401 *Unauthorized
	JSON404 *NotFound
}

func ParseUpdatePortfoliosResp

func ParseUpdatePortfoliosResp(rsp *http.Response) (*UpdatePortfoliosResp, error)

ParseUpdatePortfoliosResp parses an HTTP response from a UpdatePortfoliosWithResponse call

func (UpdatePortfoliosResp) Status

func (r UpdatePortfoliosResp) Status() string

Status returns HTTPResponse.Status

func (UpdatePortfoliosResp) StatusCode

func (r UpdatePortfoliosResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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