gan

package
v2.3.1-rc.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package gan provides access to the Google Affiliate Network API.

See https://developers.google.com/affiliate-network/

Usage example:

import "google.golang.org/api/gan/v1beta1"
...
ganService, err := gan.New(oauthHttpClient)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advertiser

type Advertiser struct {
	// AllowPublisherCreatedLinks: True if the advertiser allows publisher
	// created links, otherwise false.
	AllowPublisherCreatedLinks bool `json:"allowPublisherCreatedLinks,omitempty"`

	// Category: Category that this advertiser belongs to. A valid list of
	// categories can be found here:
	// http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581
	Category string `json:"category,omitempty"`

	// CommissionDuration: The longest possible length of a commission (how
	// long the cookies on the customer's browser last before they expire).
	CommissionDuration int64 `json:"commissionDuration,omitempty"`

	// ContactEmail: Email that this advertiser would like publishers to
	// contact them with.
	ContactEmail string `json:"contactEmail,omitempty"`

	// ContactPhone: Phone that this advertiser would like publishers to
	// contact them with.
	ContactPhone string `json:"contactPhone,omitempty"`

	// DefaultLinkId: The default link id for this advertiser.
	DefaultLinkId int64 `json:"defaultLinkId,omitempty,string"`

	// Description: Description of the website the advertiser advertises
	// from.
	Description string `json:"description,omitempty"`

	// EpcNinetyDayAverage: The sum of fees paid to publishers divided by
	// the total number of clicks over the past three months. This value
	// should be multiplied by 100 at the time of display.
	EpcNinetyDayAverage *Money `json:"epcNinetyDayAverage,omitempty"`

	// EpcSevenDayAverage: The sum of fees paid to publishers divided by the
	// total number of clicks over the past seven days. This value should be
	// multiplied by 100 at the time of display.
	EpcSevenDayAverage *Money `json:"epcSevenDayAverage,omitempty"`

	// Id: The ID of this advertiser.
	Id int64 `json:"id,omitempty,string"`

	// Item: The requested advertiser.
	Item *Advertiser `json:"item,omitempty"`

	// JoinDate: Date that this advertiser was approved as a Google
	// Affiliate Network advertiser.
	JoinDate string `json:"joinDate,omitempty"`

	// Kind: The kind for an advertiser.
	Kind string `json:"kind,omitempty"`

	// LogoUrl: URL to the logo this advertiser uses on the Google Affiliate
	// Network.
	LogoUrl string `json:"logoUrl,omitempty"`

	// MerchantCenterIds: List of merchant center ids for this advertiser
	MerchantCenterIds googleapi.Int64s `json:"merchantCenterIds,omitempty"`

	// Name: The name of this advertiser.
	Name string `json:"name,omitempty"`

	// PayoutRank: A rank based on commissions paid to publishers over the
	// past 90 days. A number between 1 and 4 where 4 means the top quartile
	// (most money paid) and 1 means the bottom quartile (least money paid).
	PayoutRank string `json:"payoutRank,omitempty"`

	// ProductFeedsEnabled: Allows advertisers to submit product listings to
	// Google Product Search.
	ProductFeedsEnabled bool `json:"productFeedsEnabled,omitempty"`

	// RedirectDomains: List of redirect URLs for this advertiser
	RedirectDomains []string `json:"redirectDomains,omitempty"`

	// SiteUrl: URL of the website this advertiser advertises from.
	SiteUrl string `json:"siteUrl,omitempty"`

	// Status: The status of the requesting publisher's relationship this
	// advertiser.
	Status string `json:"status,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g.
	// "AllowPublisherCreatedLinks") to unconditionally include in API
	// requests. By default, fields with empty values are omitted from API
	// requests. However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`
}

Advertiser: An AdvertiserResource.

func (*Advertiser) MarshalJSON

func (s *Advertiser) MarshalJSON() ([]byte, error)

type Advertisers

type Advertisers struct {
	// Items: The advertiser list.
	Items []*Advertiser `json:"items,omitempty"`

	// Kind: The kind for a page of advertisers.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: The 'pageToken' to pass to the next request to get the
	// next page, if there are more to retrieve.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*Advertisers) MarshalJSON

func (s *Advertisers) MarshalJSON() ([]byte, error)

type AdvertisersGetCall

type AdvertisersGetCall struct {
	// contains filtered or unexported fields
}

func (*AdvertisersGetCall) AdvertiserId

func (c *AdvertisersGetCall) AdvertiserId(advertiserId string) *AdvertisersGetCall

AdvertiserId sets the optional parameter "advertiserId": The ID of the advertiser to look up.

func (*AdvertisersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdvertisersGetCall) Do

func (c *AdvertisersGetCall) Do() (*Advertiser, error)

Do executes the "gan.advertisers.get" call. Exactly one of *Advertiser or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Advertiser.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdvertisersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AdvertisersGetCall) IfNoneMatch

func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AdvertisersListCall

type AdvertisersListCall struct {
	// contains filtered or unexported fields
}

func (*AdvertisersListCall) AdvertiserCategory

func (c *AdvertisersListCall) AdvertiserCategory(advertiserCategory string) *AdvertisersListCall

AdvertiserCategory sets the optional parameter "advertiserCategory": Caret(^) delimted list of advertiser categories. Valid categories are defined here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107581. Filters out all advertisers not in one of the given advertiser categories.

func (*AdvertisersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdvertisersListCall) Do

Do executes the "gan.advertisers.list" call. Exactly one of *Advertisers or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Advertisers.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdvertisersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AdvertisersListCall) IfNoneMatch

func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AdvertisersListCall) MaxResults

func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall

MaxResults sets the optional parameter "maxResults": Max number of items to return in this page. Defaults to 20.

func (*AdvertisersListCall) MinNinetyDayEpc

func (c *AdvertisersListCall) MinNinetyDayEpc(minNinetyDayEpc float64) *AdvertisersListCall

MinNinetyDayEpc sets the optional parameter "minNinetyDayEpc": Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0.

func (*AdvertisersListCall) MinPayoutRank

func (c *AdvertisersListCall) MinPayoutRank(minPayoutRank int64) *AdvertisersListCall

MinPayoutRank sets the optional parameter "minPayoutRank": A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included.

func (*AdvertisersListCall) MinSevenDayEpc

func (c *AdvertisersListCall) MinSevenDayEpc(minSevenDayEpc float64) *AdvertisersListCall

MinSevenDayEpc sets the optional parameter "minSevenDayEpc": Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0.

func (*AdvertisersListCall) PageToken

func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall

PageToken sets the optional parameter "pageToken": The value of 'nextPageToken' from the previous page.

func (*AdvertisersListCall) RelationshipStatus

func (c *AdvertisersListCall) RelationshipStatus(relationshipStatus string) *AdvertisersListCall

RelationshipStatus sets the optional parameter "relationshipStatus": Filters out all advertisers for which do not have the given relationship status with the requesting publisher.

Possible values:

"approved" - An advertiser that has approved your application.
"available" - An advertiser program that's accepting new

publishers.

"deactivated" - Deactivated means either the advertiser has removed

you from their program, or it could also mean that you chose to remove yourself from the advertiser's program.

"declined" - An advertiser that did not approve your application.
"pending" - An advertiser program that you've already applied to,

but they haven't yet decided to approve or decline your application.

type AdvertisersService

type AdvertisersService struct {
	// contains filtered or unexported fields
}

func NewAdvertisersService

func NewAdvertisersService(s *Service) *AdvertisersService

func (*AdvertisersService) Get

func (r *AdvertisersService) Get(role string, roleId string) *AdvertisersGetCall

Get: Retrieves data about a single advertiser if that the requesting advertiser/publisher has access to it. Only publishers can lookup advertisers. Advertisers can request information about themselves by omitting the advertiserId query parameter.

func (*AdvertisersService) List

func (r *AdvertisersService) List(role string, roleId string) *AdvertisersListCall

List: Retrieves data about all advertisers that the requesting advertiser/publisher has access to.

type CcOffer

type CcOffer struct {
	// AdditionalCardBenefits: More marketing copy about the card's
	// benefits. A summary field.
	AdditionalCardBenefits []string `json:"additionalCardBenefits,omitempty"`

	// AdditionalCardHolderFee: Any extra fees levied on card holders.
	AdditionalCardHolderFee string `json:"additionalCardHolderFee,omitempty"`

	// AgeMinimum: The youngest a recipient of this card may be.
	AgeMinimum float64 `json:"ageMinimum,omitempty"`

	// AgeMinimumDetails: Text describing the details of the age minimum
	// restriction.
	AgeMinimumDetails string `json:"ageMinimumDetails,omitempty"`

	// AnnualFee: The ongoing annual fee, in dollars.
	AnnualFee float64 `json:"annualFee,omitempty"`

	// AnnualFeeDisplay: Text describing the annual fee, including any
	// difference for the first year. A summary field.
	AnnualFeeDisplay string `json:"annualFeeDisplay,omitempty"`

	// AnnualRewardMaximum: The largest number of units you may accumulate
	// in a year.
	AnnualRewardMaximum float64 `json:"annualRewardMaximum,omitempty"`

	// ApprovedCategories: Possible categories for this card, eg "Low
	// Interest" or "Good." A summary field.
	ApprovedCategories []string `json:"approvedCategories,omitempty"`

	// AprDisplay: Text describing the purchase APR. A summary field.
	AprDisplay string `json:"aprDisplay,omitempty"`

	// BalanceComputationMethod: Text describing how the balance is
	// computed. A summary field.
	BalanceComputationMethod string `json:"balanceComputationMethod,omitempty"`

	// BalanceTransferTerms: Text describing the terms for balance
	// transfers. A summary field.
	BalanceTransferTerms string `json:"balanceTransferTerms,omitempty"`

	// BonusRewards: For cards with rewards programs, extra circumstances
	// whereby additional rewards may be granted.
	BonusRewards []*CcOfferBonusRewards `json:"bonusRewards,omitempty"`

	// CarRentalInsurance: If you get coverage when you use the card for the
	// given activity, this field describes it.
	CarRentalInsurance string `json:"carRentalInsurance,omitempty"`

	// CardBenefits: A list of what the issuer thinks are the most important
	// benefits of the card. Usually summarizes the rewards program, if
	// there is one. A summary field.
	CardBenefits []string `json:"cardBenefits,omitempty"`

	// CardName: The issuer's name for the card, including any trademark or
	// service mark designators. A summary field.
	CardName string `json:"cardName,omitempty"`

	// CardType: What kind of credit card this is, for example secured or
	// unsecured.
	CardType string `json:"cardType,omitempty"`

	// CashAdvanceTerms: Text describing the terms for cash advances. A
	// summary field.
	CashAdvanceTerms string `json:"cashAdvanceTerms,omitempty"`

	// CreditLimitMax: The high end for credit limits the issuer imposes on
	// recipients of this card.
	CreditLimitMax float64 `json:"creditLimitMax,omitempty"`

	// CreditLimitMin: The low end for credit limits the issuer imposes on
	// recipients of this card.
	CreditLimitMin float64 `json:"creditLimitMin,omitempty"`

	// CreditRatingDisplay: Text describing the credit ratings required for
	// recipients of this card, for example "Excellent/Good." A summary
	// field.
	CreditRatingDisplay string `json:"creditRatingDisplay,omitempty"`

	// DefaultFees: Fees for defaulting on your payments.
	DefaultFees []*CcOfferDefaultFees `json:"defaultFees,omitempty"`

	// Disclaimer: A notice that, if present, is referenced via an asterisk
	// by many of the other summary fields. If this field is present, it
	// will always start with an asterisk ("*"), and must be prominently
	// displayed with the offer. A summary field.
	Disclaimer string `json:"disclaimer,omitempty"`

	// EmergencyInsurance: If you get coverage when you use the card for the
	// given activity, this field describes it.
	EmergencyInsurance string `json:"emergencyInsurance,omitempty"`

	// ExistingCustomerOnly: Whether this card is only available to existing
	// customers of the issuer.
	ExistingCustomerOnly bool `json:"existingCustomerOnly,omitempty"`

	// ExtendedWarranty: If you get coverage when you use the card for the
	// given activity, this field describes it.
	ExtendedWarranty string `json:"extendedWarranty,omitempty"`

	// FirstYearAnnualFee: The annual fee for the first year, if different
	// from the ongoing fee. Optional.
	FirstYearAnnualFee float64 `json:"firstYearAnnualFee,omitempty"`

	// FlightAccidentInsurance: If you get coverage when you use the card
	// for the given activity, this field describes it.
	FlightAccidentInsurance string `json:"flightAccidentInsurance,omitempty"`

	// ForeignCurrencyTransactionFee: Fee for each transaction involving a
	// foreign currency.
	ForeignCurrencyTransactionFee string `json:"foreignCurrencyTransactionFee,omitempty"`

	// FraudLiability: If you get coverage when you use the card for the
	// given activity, this field describes it.
	FraudLiability string `json:"fraudLiability,omitempty"`

	// GracePeriodDisplay: Text describing the grace period before finance
	// charges apply. A summary field.
	GracePeriodDisplay string `json:"gracePeriodDisplay,omitempty"`

	// ImageUrl: The link to the image of the card that is shown on Connect
	// Commerce. A summary field.
	ImageUrl string `json:"imageUrl,omitempty"`

	// InitialSetupAndProcessingFee: Fee for setting up the card.
	InitialSetupAndProcessingFee string `json:"initialSetupAndProcessingFee,omitempty"`

	// IntroBalanceTransferTerms: Text describing the terms for introductory
	// period balance transfers. A summary field.
	IntroBalanceTransferTerms string `json:"introBalanceTransferTerms,omitempty"`

	// IntroCashAdvanceTerms: Text describing the terms for introductory
	// period cash advances. A summary field.
	IntroCashAdvanceTerms string `json:"introCashAdvanceTerms,omitempty"`

	// IntroPurchaseTerms: Text describing the terms for introductory period
	// purchases. A summary field.
	IntroPurchaseTerms string `json:"introPurchaseTerms,omitempty"`

	// Issuer: Name of card issuer. A summary field.
	Issuer string `json:"issuer,omitempty"`

	// IssuerId: The Google Affiliate Network ID of the advertiser making
	// this offer.
	IssuerId string `json:"issuerId,omitempty"`

	// IssuerWebsite: The generic link to the issuer's site.
	IssuerWebsite string `json:"issuerWebsite,omitempty"`

	// Kind: The kind for one credit card offer. A summary field.
	Kind string `json:"kind,omitempty"`

	// LandingPageUrl: The link to the issuer's page for this card. A
	// summary field.
	LandingPageUrl string `json:"landingPageUrl,omitempty"`

	// LatePaymentFee: Text describing how much a late payment will cost, eg
	// "up to $35." A summary field.
	LatePaymentFee string `json:"latePaymentFee,omitempty"`

	// LuggageInsurance: If you get coverage when you use the card for the
	// given activity, this field describes it.
	LuggageInsurance string `json:"luggageInsurance,omitempty"`

	// MaxPurchaseRate: The highest interest rate the issuer charges on this
	// card. Expressed as an absolute number, not as a percentage.
	MaxPurchaseRate float64 `json:"maxPurchaseRate,omitempty"`

	// MinPurchaseRate: The lowest interest rate the issuer charges on this
	// card. Expressed as an absolute number, not as a percentage.
	MinPurchaseRate float64 `json:"minPurchaseRate,omitempty"`

	// MinimumFinanceCharge: Text describing how much missing the grace
	// period will cost.
	MinimumFinanceCharge string `json:"minimumFinanceCharge,omitempty"`

	// Network: Which network (eg Visa) the card belongs to. A summary
	// field.
	Network string `json:"network,omitempty"`

	// OfferId: This offer's ID. A summary field.
	OfferId string `json:"offerId,omitempty"`

	// OffersImmediateCashReward: Whether a cash reward program lets you get
	// cash back sooner than end of year or other longish period.
	OffersImmediateCashReward bool `json:"offersImmediateCashReward,omitempty"`

	// OverLimitFee: Fee for exceeding the card's charge limit.
	OverLimitFee string `json:"overLimitFee,omitempty"`

	// ProhibitedCategories: Categories in which the issuer does not wish
	// the card to be displayed. A summary field.
	ProhibitedCategories []string `json:"prohibitedCategories,omitempty"`

	// PurchaseRateAdditionalDetails: Text describing any additional details
	// for the purchase rate. A summary field.
	PurchaseRateAdditionalDetails string `json:"purchaseRateAdditionalDetails,omitempty"`

	// PurchaseRateType: Fixed or variable.
	PurchaseRateType string `json:"purchaseRateType,omitempty"`

	// ReturnedPaymentFee: Text describing the fee for a payment that
	// doesn't clear. A summary field.
	ReturnedPaymentFee string `json:"returnedPaymentFee,omitempty"`

	// RewardPartner: The company that redeems the rewards, if different
	// from the issuer.
	RewardPartner string `json:"rewardPartner,omitempty"`

	// RewardUnit: For cards with rewards programs, the unit of reward. For
	// example, miles, cash back, points.
	RewardUnit string `json:"rewardUnit,omitempty"`

	// Rewards: For cards with rewards programs, detailed rules about how
	// the program works.
	Rewards []*CcOfferRewards `json:"rewards,omitempty"`

	// RewardsExpire: Whether accumulated rewards ever expire.
	RewardsExpire bool `json:"rewardsExpire,omitempty"`

	// RewardsHaveBlackoutDates: For airline miles rewards, tells whether
	// blackout dates apply to the miles.
	RewardsHaveBlackoutDates bool `json:"rewardsHaveBlackoutDates,omitempty"`

	// StatementCopyFee: Fee for requesting a copy of your statement.
	StatementCopyFee string `json:"statementCopyFee,omitempty"`

	// TrackingUrl: The link to ping to register a click on this offer. A
	// summary field.
	TrackingUrl string `json:"trackingUrl,omitempty"`

	// TravelInsurance: If you get coverage when you use the card for the
	// given activity, this field describes it.
	TravelInsurance string `json:"travelInsurance,omitempty"`

	// VariableRatesLastUpdated: When variable rates were last updated.
	VariableRatesLastUpdated string `json:"variableRatesLastUpdated,omitempty"`

	// VariableRatesUpdateFrequency: How often variable rates are updated.
	VariableRatesUpdateFrequency string `json:"variableRatesUpdateFrequency,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "AdditionalCardBenefits") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`
}

CcOffer: A credit card offer. There are many possible result fields. We provide two different views of the data, or "projections." The "full" projection includes every result field. And the "summary" projection, which is the default, includes a smaller subset of the fields. The fields included in the summary projection are marked as such in their descriptions.

func (*CcOffer) MarshalJSON

func (s *CcOffer) MarshalJSON() ([]byte, error)

type CcOfferBonusRewards

type CcOfferBonusRewards struct {
	// Amount: How many units of reward will be granted.
	Amount float64 `json:"amount,omitempty"`

	// Details: The circumstances under which this rule applies, for
	// example, booking a flight via Orbitz.
	Details string `json:"details,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Amount") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*CcOfferBonusRewards) MarshalJSON

func (s *CcOfferBonusRewards) MarshalJSON() ([]byte, error)

type CcOfferDefaultFees

type CcOfferDefaultFees struct {
	// Category: The type of charge, for example Purchases.
	Category string `json:"category,omitempty"`

	// MaxRate: The highest rate the issuer may charge for defaulting on
	// debt in this category. Expressed as an absolute number, not as a
	// percentage.
	MaxRate float64 `json:"maxRate,omitempty"`

	// MinRate: The lowest rate the issuer may charge for defaulting on debt
	// in this category. Expressed as an absolute number, not as a
	// percentage.
	MinRate float64 `json:"minRate,omitempty"`

	// RateType: Fixed or variable.
	RateType string `json:"rateType,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Category") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*CcOfferDefaultFees) MarshalJSON

func (s *CcOfferDefaultFees) MarshalJSON() ([]byte, error)

type CcOfferRewards

type CcOfferRewards struct {
	// AdditionalDetails: Other limits, for example, if this rule only
	// applies during an introductory period.
	AdditionalDetails string `json:"additionalDetails,omitempty"`

	// Amount: The number of units rewarded per purchase dollar.
	Amount float64 `json:"amount,omitempty"`

	// Category: The kind of purchases covered by this rule.
	Category string `json:"category,omitempty"`

	// ExpirationMonths: How long rewards granted by this rule last.
	ExpirationMonths float64 `json:"expirationMonths,omitempty"`

	// MaxRewardTier: The maximum purchase amount in the given category for
	// this rule to apply.
	MaxRewardTier float64 `json:"maxRewardTier,omitempty"`

	// MinRewardTier: The minimum purchase amount in the given category
	// before this rule applies.
	MinRewardTier float64 `json:"minRewardTier,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AdditionalDetails")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*CcOfferRewards) MarshalJSON

func (s *CcOfferRewards) MarshalJSON() ([]byte, error)

type CcOffers

type CcOffers struct {
	// Items: The credit card offers.
	Items []*CcOffer `json:"items,omitempty"`

	// Kind: The kind for a page of credit card offers.
	Kind string `json:"kind,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*CcOffers) MarshalJSON

func (s *CcOffers) MarshalJSON() ([]byte, error)

type CcOffersListCall

type CcOffersListCall struct {
	// contains filtered or unexported fields
}

func (*CcOffersListCall) Advertiser

func (c *CcOffersListCall) Advertiser(advertiser string) *CcOffersListCall

Advertiser sets the optional parameter "advertiser": The advertiser ID of a card issuer whose offers to include. Optional, may be repeated.

func (*CcOffersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CcOffersListCall) Do

func (c *CcOffersListCall) Do() (*CcOffers, error)

Do executes the "gan.ccOffers.list" call. Exactly one of *CcOffers or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CcOffers.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CcOffersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CcOffersListCall) IfNoneMatch

func (c *CcOffersListCall) IfNoneMatch(entityTag string) *CcOffersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CcOffersListCall) Projection

func (c *CcOffersListCall) Projection(projection string) *CcOffersListCall

Projection sets the optional parameter "projection": The set of fields to return.

Possible values:

"full" - Include all offer fields. This is the default.
"summary" - Include only the basic fields needed to display an

offer.

type CcOffersService

type CcOffersService struct {
	// contains filtered or unexported fields
}

func NewCcOffersService

func NewCcOffersService(s *Service) *CcOffersService

func (*CcOffersService) List

func (r *CcOffersService) List(publisher string) *CcOffersListCall

List: Retrieves credit card offers for the given publisher.

type Event

type Event struct {
	// AdvertiserId: The ID of advertiser for this event.
	AdvertiserId int64 `json:"advertiserId,omitempty,string"`

	// AdvertiserName: The name of the advertiser for this event.
	AdvertiserName string `json:"advertiserName,omitempty"`

	// ChargeId: The charge ID for this event. Only returned for charge
	// events.
	ChargeId string `json:"chargeId,omitempty"`

	// ChargeType: Charge type of the event
	// (other|slotting_fee|monthly_minimum|tier_bonus|debit|credit). Only
	// returned for charge events.
	ChargeType string `json:"chargeType,omitempty"`

	// CommissionableSales: Amount of money exchanged during the
	// transaction. Only returned for charge and conversion events.
	CommissionableSales *Money `json:"commissionableSales,omitempty"`

	// Earnings: Earnings by the publisher.
	Earnings *Money `json:"earnings,omitempty"`

	// EventDate: The date-time this event was initiated as a RFC 3339
	// date-time value.
	EventDate string `json:"eventDate,omitempty"`

	// Kind: The kind for one event.
	Kind string `json:"kind,omitempty"`

	// MemberId: The ID of the member attached to this event. Only returned
	// for conversion events.
	MemberId string `json:"memberId,omitempty"`

	// ModifyDate: The date-time this event was last modified as a RFC 3339
	// date-time value.
	ModifyDate string `json:"modifyDate,omitempty"`

	// NetworkFee: Fee that the advertiser paid to the Google Affiliate
	// Network.
	NetworkFee *Money `json:"networkFee,omitempty"`

	// OrderId: The order ID for this event. Only returned for conversion
	// events.
	OrderId string `json:"orderId,omitempty"`

	// Products: Products associated with the event.
	Products []*EventProducts `json:"products,omitempty"`

	// PublisherFee: Fee that the advertiser paid to the publisher.
	PublisherFee *Money `json:"publisherFee,omitempty"`

	// PublisherId: The ID of the publisher for this event.
	PublisherId int64 `json:"publisherId,omitempty,string"`

	// PublisherName: The name of the publisher for this event.
	PublisherName string `json:"publisherName,omitempty"`

	// Status: Status of the event (active|canceled). Only returned for
	// charge and conversion events.
	Status string `json:"status,omitempty"`

	// Type: Type of the event (action|transaction|charge).
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Event: An EventResource.

func (*Event) MarshalJSON

func (s *Event) MarshalJSON() ([]byte, error)

type EventProducts

type EventProducts struct {
	// CategoryId: Id of the category this product belongs to.
	CategoryId string `json:"categoryId,omitempty"`

	// CategoryName: Name of the category this product belongs to.
	CategoryName string `json:"categoryName,omitempty"`

	// Earnings: Amount earned by the publisher on this product.
	Earnings *Money `json:"earnings,omitempty"`

	// NetworkFee: Fee that the advertiser paid to the Google Affiliate
	// Network for this product.
	NetworkFee *Money `json:"networkFee,omitempty"`

	// PublisherFee: Fee that the advertiser paid to the publisehr for this
	// product.
	PublisherFee *Money `json:"publisherFee,omitempty"`

	// Quantity: Quantity of this product bought/exchanged.
	Quantity int64 `json:"quantity,omitempty,string"`

	// Sku: Sku of this product.
	Sku string `json:"sku,omitempty"`

	// SkuName: Sku name of this product.
	SkuName string `json:"skuName,omitempty"`

	// UnitPrice: Price per unit of this product.
	UnitPrice *Money `json:"unitPrice,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CategoryId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*EventProducts) MarshalJSON

func (s *EventProducts) MarshalJSON() ([]byte, error)

type Events

type Events struct {
	// Items: The event list.
	Items []*Event `json:"items,omitempty"`

	// Kind: The kind for a page of events.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: The 'pageToken' to pass to the next request to get the
	// next page, if there are more to retrieve.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*Events) MarshalJSON

func (s *Events) MarshalJSON() ([]byte, error)

type EventsListCall

type EventsListCall struct {
	// contains filtered or unexported fields
}

func (*EventsListCall) AdvertiserId

func (c *EventsListCall) AdvertiserId(advertiserId string) *EventsListCall

AdvertiserId sets the optional parameter "advertiserId": Caret(^) delimited list of advertiser IDs. Filters out all events that do not reference one of the given advertiser IDs. Only used when under publishers role.

func (*EventsListCall) ChargeType

func (c *EventsListCall) ChargeType(chargeType string) *EventsListCall

ChargeType sets the optional parameter "chargeType": Filters out all charge events that are not of the given charge type. Valid values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', 'debit'.

Possible values:

"credit" - A credit increases the publisher's payout amount and

decreases the advertiser's invoice amount.

"debit" - A debit reduces the publisher's payout and increases the

advertiser's invoice amount.

"monthly_minimum" - A payment made to Google by an advertiser as a

minimum monthly network fee.

"other" - Catch all. Default if unset
"slotting_fee" - A one time payment made from an advertiser to a

publisher.

"tier_bonus" - A payment from an advertiser to a publisher for the

publisher maintaining a high tier level

func (*EventsListCall) Context

func (c *EventsListCall) Context(ctx context.Context) *EventsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*EventsListCall) Do

func (c *EventsListCall) Do() (*Events, error)

Do executes the "gan.events.list" call. Exactly one of *Events or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Events.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*EventsListCall) EventDateMax

func (c *EventsListCall) EventDateMax(eventDateMax string) *EventsListCall

EventDateMax sets the optional parameter "eventDateMax": Filters out all events later than given date. Defaults to 24 hours after eventMin.

func (*EventsListCall) EventDateMin

func (c *EventsListCall) EventDateMin(eventDateMin string) *EventsListCall

EventDateMin sets the optional parameter "eventDateMin": Filters out all events earlier than given date. Defaults to 24 hours from current date/time.

func (*EventsListCall) Fields

func (c *EventsListCall) Fields(s ...googleapi.Field) *EventsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*EventsListCall) IfNoneMatch

func (c *EventsListCall) IfNoneMatch(entityTag string) *EventsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*EventsListCall) LinkId

func (c *EventsListCall) LinkId(linkId string) *EventsListCall

LinkId sets the optional parameter "linkId": Caret(^) delimited list of link IDs. Filters out all events that do not reference one of the given link IDs.

func (*EventsListCall) MaxResults

func (c *EventsListCall) MaxResults(maxResults int64) *EventsListCall

MaxResults sets the optional parameter "maxResults": Max number of offers to return in this page. Defaults to 20.

func (*EventsListCall) MemberId

func (c *EventsListCall) MemberId(memberId string) *EventsListCall

MemberId sets the optional parameter "memberId": Caret(^) delimited list of member IDs. Filters out all events that do not reference one of the given member IDs.

func (*EventsListCall) ModifyDateMax

func (c *EventsListCall) ModifyDateMax(modifyDateMax string) *EventsListCall

ModifyDateMax sets the optional parameter "modifyDateMax": Filters out all events modified later than given date. Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly set.

func (*EventsListCall) ModifyDateMin

func (c *EventsListCall) ModifyDateMin(modifyDateMin string) *EventsListCall

ModifyDateMin sets the optional parameter "modifyDateMin": Filters out all events modified earlier than given date. Defaults to 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set.

func (*EventsListCall) OrderId

func (c *EventsListCall) OrderId(orderId string) *EventsListCall

OrderId sets the optional parameter "orderId": Caret(^) delimited list of order IDs. Filters out all events that do not reference one of the given order IDs.

func (*EventsListCall) PageToken

func (c *EventsListCall) PageToken(pageToken string) *EventsListCall

PageToken sets the optional parameter "pageToken": The value of 'nextPageToken' from the previous page.

func (*EventsListCall) ProductCategory

func (c *EventsListCall) ProductCategory(productCategory string) *EventsListCall

ProductCategory sets the optional parameter "productCategory": Caret(^) delimited list of product categories. Filters out all events that do not reference a product in one of the given product categories.

func (*EventsListCall) PublisherId

func (c *EventsListCall) PublisherId(publisherId string) *EventsListCall

PublisherId sets the optional parameter "publisherId": Caret(^) delimited list of publisher IDs. Filters out all events that do not reference one of the given publishers IDs. Only used when under advertiser role.

func (*EventsListCall) Sku

func (c *EventsListCall) Sku(sku string) *EventsListCall

Sku sets the optional parameter "sku": Caret(^) delimited list of SKUs. Filters out all events that do not reference one of the given SKU.

func (*EventsListCall) Status

func (c *EventsListCall) Status(status string) *EventsListCall

Status sets the optional parameter "status": Filters out all events that do not have the given status. Valid values: 'active', 'canceled'.

Possible values:

"active" - Event is currently active.
"canceled" - Event is currently canceled.

func (*EventsListCall) Type

func (c *EventsListCall) Type(type_ string) *EventsListCall

Type sets the optional parameter "type": Filters out all events that are not of the given type. Valid values: 'action', 'transaction', 'charge'.

Possible values:

"action" - The completion of an application, sign-up, or other

process. For example, an action occurs if a user clicks an ad for a credit card and completes an application for that card.

"charge" - A charge event is typically a payment between an

advertiser, publisher or Google.

"transaction" - A conversion event, typically an e-commerce

transaction. Some advertisers use a transaction to record other types of events, such as magazine subscriptions.

type EventsService

type EventsService struct {
	// contains filtered or unexported fields
}

func NewEventsService

func NewEventsService(s *Service) *EventsService

func (*EventsService) List

func (r *EventsService) List(role string, roleId string) *EventsListCall

List: Retrieves event data for a given advertiser/publisher.

type Link struct {
	// AdvertiserId: The advertiser id for the advertiser who owns this
	// link.
	AdvertiserId int64 `json:"advertiserId,omitempty,string"`

	// Authorship: Authorship
	Authorship string `json:"authorship,omitempty"`

	// Availability: Availability.
	Availability string `json:"availability,omitempty"`

	// ClickTrackingUrl: Tracking url for clicks.
	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`

	// CreateDate: Date that this link was created.
	CreateDate string `json:"createDate,omitempty"`

	// Description: Description.
	Description string `json:"description,omitempty"`

	// DestinationUrl: The destination URL for the link.
	DestinationUrl string `json:"destinationUrl,omitempty"`

	// Duration: Duration
	Duration string `json:"duration,omitempty"`

	// EndDate: Date that this link becomes inactive.
	EndDate string `json:"endDate,omitempty"`

	// EpcNinetyDayAverage: The sum of fees paid to publishers divided by
	// the total number of clicks over the past three months on this link.
	// This value should be multiplied by 100 at the time of display.
	EpcNinetyDayAverage *Money `json:"epcNinetyDayAverage,omitempty"`

	// EpcSevenDayAverage: The sum of fees paid to publishers divided by the
	// total number of clicks over the past seven days on this link. This
	// value should be multiplied by 100 at the time of display.
	EpcSevenDayAverage *Money `json:"epcSevenDayAverage,omitempty"`

	// Id: The ID of this link.
	Id int64 `json:"id,omitempty,string"`

	// ImageAltText: image alt text.
	ImageAltText string `json:"imageAltText,omitempty"`

	// ImpressionTrackingUrl: Tracking url for impressions.
	ImpressionTrackingUrl string `json:"impressionTrackingUrl,omitempty"`

	// IsActive: Flag for if this link is active.
	IsActive bool `json:"isActive,omitempty"`

	// Kind: The kind for one entity.
	Kind string `json:"kind,omitempty"`

	// LinkType: The link type.
	LinkType string `json:"linkType,omitempty"`

	// Name: The logical name for this link.
	Name string `json:"name,omitempty"`

	// PromotionType: Promotion Type
	PromotionType string `json:"promotionType,omitempty"`

	// SpecialOffers: Special offers on the link.
	SpecialOffers *LinkSpecialOffers `json:"specialOffers,omitempty"`

	// StartDate: Date that this link becomes active.
	StartDate string `json:"startDate,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AdvertiserId") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Link: A LinkResource.

func (*Link) MarshalJSON

func (s *Link) MarshalJSON() ([]byte, error)

type LinkSpecialOffers

type LinkSpecialOffers struct {
	// FreeGift: Whether there is a free gift
	FreeGift bool `json:"freeGift,omitempty"`

	// FreeShipping: Whether there is free shipping
	FreeShipping bool `json:"freeShipping,omitempty"`

	// FreeShippingMin: Minimum purchase amount for free shipping promotion
	FreeShippingMin *Money `json:"freeShippingMin,omitempty"`

	// PercentOff: Percent off on the purchase
	PercentOff float64 `json:"percentOff,omitempty"`

	// PercentOffMin: Minimum purchase amount for percent off promotion
	PercentOffMin *Money `json:"percentOffMin,omitempty"`

	// PriceCut: Price cut on the purchase
	PriceCut *Money `json:"priceCut,omitempty"`

	// PriceCutMin: Minimum purchase amount for price cut promotion
	PriceCutMin *Money `json:"priceCutMin,omitempty"`

	// PromotionCodes: List of promotion code associated with the link
	PromotionCodes []string `json:"promotionCodes,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FreeGift") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

LinkSpecialOffers: Special offers on the link.

func (*LinkSpecialOffers) MarshalJSON

func (s *LinkSpecialOffers) MarshalJSON() ([]byte, error)
type Links struct {
	// Items: The links.
	Items []*Link `json:"items,omitempty"`

	// Kind: The kind for a page of links.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: The next page token.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*Links) MarshalJSON

func (s *Links) MarshalJSON() ([]byte, error)

type LinksGetCall

type LinksGetCall struct {
	// contains filtered or unexported fields
}

func (*LinksGetCall) Context

func (c *LinksGetCall) Context(ctx context.Context) *LinksGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LinksGetCall) Do

func (c *LinksGetCall) Do() (*Link, error)

Do executes the "gan.links.get" call. Exactly one of *Link or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Link.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LinksGetCall) Fields

func (c *LinksGetCall) Fields(s ...googleapi.Field) *LinksGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LinksGetCall) IfNoneMatch

func (c *LinksGetCall) IfNoneMatch(entityTag string) *LinksGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type LinksInsertCall

type LinksInsertCall struct {
	// contains filtered or unexported fields
}

func (*LinksInsertCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LinksInsertCall) Do

func (c *LinksInsertCall) Do() (*Link, error)

Do executes the "gan.links.insert" call. Exactly one of *Link or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Link.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LinksInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type LinksListCall

type LinksListCall struct {
	// contains filtered or unexported fields
}

func (*LinksListCall) AdvertiserId

func (c *LinksListCall) AdvertiserId(advertiserId int64) *LinksListCall

AdvertiserId sets the optional parameter "advertiserId": Limits the resulting links to the ones belonging to the listed advertisers.

func (*LinksListCall) AssetSize

func (c *LinksListCall) AssetSize(assetSize string) *LinksListCall

AssetSize sets the optional parameter "assetSize": The size of the given asset.

func (*LinksListCall) Authorship

func (c *LinksListCall) Authorship(authorship string) *LinksListCall

Authorship sets the optional parameter "authorship": The role of the author of the link.

Possible values:

"advertiser"
"publisher"

func (*LinksListCall) Context

func (c *LinksListCall) Context(ctx context.Context) *LinksListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*LinksListCall) CreateDateMax

func (c *LinksListCall) CreateDateMax(createDateMax string) *LinksListCall

CreateDateMax sets the optional parameter "createDateMax": The end of the create date range.

func (*LinksListCall) CreateDateMin

func (c *LinksListCall) CreateDateMin(createDateMin string) *LinksListCall

CreateDateMin sets the optional parameter "createDateMin": The beginning of the create date range.

func (*LinksListCall) Do

func (c *LinksListCall) Do() (*Links, error)

Do executes the "gan.links.list" call. Exactly one of *Links or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Links.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*LinksListCall) Fields

func (c *LinksListCall) Fields(s ...googleapi.Field) *LinksListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*LinksListCall) IfNoneMatch

func (c *LinksListCall) IfNoneMatch(entityTag string) *LinksListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*LinksListCall) LinkType

func (c *LinksListCall) LinkType(linkType string) *LinksListCall

LinkType sets the optional parameter "linkType": The type of the link.

Possible values:

"banner"
"text"

func (*LinksListCall) MaxResults

func (c *LinksListCall) MaxResults(maxResults int64) *LinksListCall

MaxResults sets the optional parameter "maxResults": Max number of items to return in this page. Defaults to 20.

func (*LinksListCall) PageToken

func (c *LinksListCall) PageToken(pageToken string) *LinksListCall

PageToken sets the optional parameter "pageToken": The value of 'nextPageToken' from the previous page.

func (*LinksListCall) PromotionType

func (c *LinksListCall) PromotionType(promotionType string) *LinksListCall

PromotionType sets the optional parameter "promotionType": The promotion type.

Possible values:

"coupon"
"free_gift"
"free_shipping"
"percent_off"
"price_cut"

func (*LinksListCall) RelationshipStatus

func (c *LinksListCall) RelationshipStatus(relationshipStatus string) *LinksListCall

RelationshipStatus sets the optional parameter "relationshipStatus": The status of the relationship.

Possible values:

"approved"
"available"

func (*LinksListCall) SearchText

func (c *LinksListCall) SearchText(searchText string) *LinksListCall

SearchText sets the optional parameter "searchText": Field for full text search across title and merchandising text, supports link id search.

func (*LinksListCall) StartDateMax

func (c *LinksListCall) StartDateMax(startDateMax string) *LinksListCall

StartDateMax sets the optional parameter "startDateMax": The end of the start date range.

func (*LinksListCall) StartDateMin

func (c *LinksListCall) StartDateMin(startDateMin string) *LinksListCall

StartDateMin sets the optional parameter "startDateMin": The beginning of the start date range.

type LinksService

type LinksService struct {
	// contains filtered or unexported fields
}

func NewLinksService

func NewLinksService(s *Service) *LinksService

func (*LinksService) Get

func (r *LinksService) Get(role string, roleId string, linkId int64) *LinksGetCall

Get: Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.

func (*LinksService) Insert

func (r *LinksService) Insert(role string, roleId string, link *Link) *LinksInsertCall

Insert: Inserts a new link.

func (*LinksService) List

func (r *LinksService) List(role string, roleId string) *LinksListCall

List: Retrieves all links that match the query parameters.

type Money

type Money struct {
	// Amount: The amount of money.
	Amount float64 `json:"amount,omitempty"`

	// CurrencyCode: The 3-letter code of the currency in question.
	CurrencyCode string `json:"currencyCode,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Amount") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Money: An ApiMoneyProto.

func (*Money) MarshalJSON

func (s *Money) MarshalJSON() ([]byte, error)

type Publisher

type Publisher struct {
	// Classification: Classification that this publisher belongs to. See
	// this link for all publisher classifications:
	// http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en&answer=107625&ctx=cb&src=cb&cbid=-k5fihzthfaik&cbrank=4
	Classification string `json:"classification,omitempty"`

	// EpcNinetyDayAverage: The sum of fees paid to this publisher divided
	// by the total number of clicks over the past three months. Values are
	// multiplied by 100 for display purposes.
	EpcNinetyDayAverage *Money `json:"epcNinetyDayAverage,omitempty"`

	// EpcSevenDayAverage: The sum of fees paid to this publisher divided by
	// the total number of clicks over the past seven days. Values are
	// multiplied by 100 for display purposes.
	EpcSevenDayAverage *Money `json:"epcSevenDayAverage,omitempty"`

	// Id: The ID of this publisher.
	Id int64 `json:"id,omitempty,string"`

	// Item: The requested publisher.
	Item *Publisher `json:"item,omitempty"`

	// JoinDate: Date that this publisher was approved as a Google Affiliate
	// Network publisher.
	JoinDate string `json:"joinDate,omitempty"`

	// Kind: The kind for a publisher.
	Kind string `json:"kind,omitempty"`

	// Name: The name of this publisher.
	Name string `json:"name,omitempty"`

	// PayoutRank: A rank based on commissions paid to this publisher over
	// the past 90 days. A number between 1 and 4 where 4 means the top
	// quartile (most money paid) and 1 means the bottom quartile (least
	// money paid).
	PayoutRank string `json:"payoutRank,omitempty"`

	// Sites: Websites that this publisher uses to advertise.
	Sites []string `json:"sites,omitempty"`

	// Status: The status of the requesting advertiser's relationship with
	// this publisher.
	Status string `json:"status,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Classification") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Publisher: A PublisherResource.

func (*Publisher) MarshalJSON

func (s *Publisher) MarshalJSON() ([]byte, error)

type Publishers

type Publishers struct {
	// Items: The entity list.
	Items []*Publisher `json:"items,omitempty"`

	// Kind: The kind for a page of entities.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: The 'pageToken' to pass to the next request to get the
	// next page, if there are more to retrieve.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

func (*Publishers) MarshalJSON

func (s *Publishers) MarshalJSON() ([]byte, error)

type PublishersGetCall

type PublishersGetCall struct {
	// contains filtered or unexported fields
}

func (*PublishersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PublishersGetCall) Do

func (c *PublishersGetCall) Do() (*Publisher, error)

Do executes the "gan.publishers.get" call. Exactly one of *Publisher or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Publisher.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PublishersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PublishersGetCall) IfNoneMatch

func (c *PublishersGetCall) IfNoneMatch(entityTag string) *PublishersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PublishersGetCall) PublisherId

func (c *PublishersGetCall) PublisherId(publisherId string) *PublishersGetCall

PublisherId sets the optional parameter "publisherId": The ID of the publisher to look up.

type PublishersListCall

type PublishersListCall struct {
	// contains filtered or unexported fields
}

func (*PublishersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*PublishersListCall) Do

func (c *PublishersListCall) Do() (*Publishers, error)

Do executes the "gan.publishers.list" call. Exactly one of *Publishers or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Publishers.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*PublishersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PublishersListCall) IfNoneMatch

func (c *PublishersListCall) IfNoneMatch(entityTag string) *PublishersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*PublishersListCall) MaxResults

func (c *PublishersListCall) MaxResults(maxResults int64) *PublishersListCall

MaxResults sets the optional parameter "maxResults": Max number of items to return in this page. Defaults to 20.

func (*PublishersListCall) MinNinetyDayEpc

func (c *PublishersListCall) MinNinetyDayEpc(minNinetyDayEpc float64) *PublishersListCall

MinNinetyDayEpc sets the optional parameter "minNinetyDayEpc": Filters out all publishers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0.

func (*PublishersListCall) MinPayoutRank

func (c *PublishersListCall) MinPayoutRank(minPayoutRank int64) *PublishersListCall

MinPayoutRank sets the optional parameter "minPayoutRank": A value between 1 and 4, where 1 represents the quartile of publishers with the lowest ranks and 4 represents the quartile of publishers with the highest ranks. Filters out all publishers with a lower rank than the given quartile. For example if a 2 was given only publishers with a payout rank of 25 or higher would be included.

func (*PublishersListCall) MinSevenDayEpc

func (c *PublishersListCall) MinSevenDayEpc(minSevenDayEpc float64) *PublishersListCall

MinSevenDayEpc sets the optional parameter "minSevenDayEpc": Filters out all publishers that have a seven day EPC average lower than the given value (inclusive). Min value 0.0.

func (*PublishersListCall) PageToken

func (c *PublishersListCall) PageToken(pageToken string) *PublishersListCall

PageToken sets the optional parameter "pageToken": The value of 'nextPageToken' from the previous page.

func (*PublishersListCall) PublisherCategory

func (c *PublishersListCall) PublisherCategory(publisherCategory string) *PublishersListCall

PublisherCategory sets the optional parameter "publisherCategory": Caret(^) delimted list of publisher categories. Valid categories: (unclassified|community_and_content|shopping_and_promotion|loyalty_and _rewards|network|search_specialist|comparison_shopping|email). Filters out all publishers not in one of the given advertiser categories.

func (*PublishersListCall) RelationshipStatus

func (c *PublishersListCall) RelationshipStatus(relationshipStatus string) *PublishersListCall

RelationshipStatus sets the optional parameter "relationshipStatus": Filters out all publishers for which do not have the given relationship status with the requesting publisher.

Possible values:

"approved" - Publishers you've approved to your program.
"available" - Publishers available for you to recruit.
"deactivated" - A publisher that you terminated from your program.

Publishers also have the ability to remove themselves from your program.

"declined" - A publisher that you did not approve to your program.
"pending" - Publishers that have applied to your program. We

recommend reviewing and deciding on pending publishers on a weekly basis.

type PublishersService

type PublishersService struct {
	// contains filtered or unexported fields
}

func NewPublishersService

func NewPublishersService(s *Service) *PublishersService

func (*PublishersService) Get

func (r *PublishersService) Get(role string, roleId string) *PublishersGetCall

Get: Retrieves data about a single advertiser if that the requesting advertiser/publisher has access to it. Only advertisers can look up publishers. Publishers can request information about themselves by omitting the publisherId query parameter.

func (*PublishersService) List

func (r *PublishersService) List(role string, roleId string) *PublishersListCall

List: Retrieves data about all publishers that the requesting advertiser/publisher has access to.

type Report

type Report struct {
	// ColumnNames: The column names for the report
	ColumnNames []string `json:"column_names,omitempty"`

	// EndDate: The end of the date range for this report, exclusive.
	EndDate string `json:"end_date,omitempty"`

	// Kind: The kind for a report.
	Kind string `json:"kind,omitempty"`

	// MatchingRowCount: The number of matching rows before paging is
	// applied.
	MatchingRowCount int64 `json:"matching_row_count,omitempty,string"`

	// Rows: The rows of data for the report
	Rows [][]interface{} `json:"rows,omitempty"`

	// StartDate: The start of the date range for this report, inclusive.
	StartDate string `json:"start_date,omitempty"`

	// TotalsRows: The totals rows for the report
	TotalsRows [][]interface{} `json:"totals_rows,omitempty"`

	// Type: The report type.
	Type string `json:"type,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ColumnNames") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`
}

Report: A ReportResource representing a report of a certain type either for an advertiser or publisher.

func (*Report) MarshalJSON

func (s *Report) MarshalJSON() ([]byte, error)

type ReportsGetCall

type ReportsGetCall struct {
	// contains filtered or unexported fields
}

func (*ReportsGetCall) AdvertiserId

func (c *ReportsGetCall) AdvertiserId(advertiserId string) *ReportsGetCall

AdvertiserId sets the optional parameter "advertiserId": The IDs of the advertisers to look up, if applicable.

func (*ReportsGetCall) CalculateTotals

func (c *ReportsGetCall) CalculateTotals(calculateTotals bool) *ReportsGetCall

CalculateTotals sets the optional parameter "calculateTotals": Whether or not to calculate totals rows.

func (*ReportsGetCall) Context

func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ReportsGetCall) Do

func (c *ReportsGetCall) Do() (*Report, error)

Do executes the "gan.reports.get" call. Exactly one of *Report or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Report.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*ReportsGetCall) EndDate

func (c *ReportsGetCall) EndDate(endDate string) *ReportsGetCall

EndDate sets the optional parameter "endDate": The end date (exclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day after startDate, if that is given, or today.

func (*ReportsGetCall) EventType

func (c *ReportsGetCall) EventType(eventType string) *ReportsGetCall

EventType sets the optional parameter "eventType": Filters out all events that are not of the given type. Valid values: 'action', 'transaction', or 'charge'.

Possible values:

"action" - Event type is action.
"charge" - Event type is charge.
"transaction" - Event type is transaction.

func (*ReportsGetCall) Fields

func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ReportsGetCall) IfNoneMatch

func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ReportsGetCall) LinkId

func (c *ReportsGetCall) LinkId(linkId string) *ReportsGetCall

LinkId sets the optional parameter "linkId": Filters to capture one of given link IDs.

func (*ReportsGetCall) MaxResults

func (c *ReportsGetCall) MaxResults(maxResults int64) *ReportsGetCall

MaxResults sets the optional parameter "maxResults": Max number of items to return in this page. Defaults to return all results.

func (*ReportsGetCall) OrderId

func (c *ReportsGetCall) OrderId(orderId string) *ReportsGetCall

OrderId sets the optional parameter "orderId": Filters to capture one of the given order IDs.

func (*ReportsGetCall) PublisherId

func (c *ReportsGetCall) PublisherId(publisherId string) *ReportsGetCall

PublisherId sets the optional parameter "publisherId": The IDs of the publishers to look up, if applicable.

func (*ReportsGetCall) StartDate

func (c *ReportsGetCall) StartDate(startDate string) *ReportsGetCall

StartDate sets the optional parameter "startDate": The start date (inclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day before endDate, if that is given, or yesterday.

func (*ReportsGetCall) StartIndex

func (c *ReportsGetCall) StartIndex(startIndex int64) *ReportsGetCall

StartIndex sets the optional parameter "startIndex": Offset on which to return results when paging.

func (*ReportsGetCall) Status

func (c *ReportsGetCall) Status(status string) *ReportsGetCall

Status sets the optional parameter "status": Filters out all events that do not have the given status. Valid values: 'active', 'canceled', or 'invalid'.

Possible values:

"active" - Event is currently active.
"canceled" - Event is currently canceled.
"invalid" - Event is currently invalid.

type ReportsService

type ReportsService struct {
	// contains filtered or unexported fields
}

func NewReportsService

func NewReportsService(s *Service) *ReportsService

func (*ReportsService) Get

func (r *ReportsService) Get(role string, roleId string, reportType string) *ReportsGetCall

Get: Retrieves a report of the specified type.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Advertisers *AdvertisersService

	CcOffers *CcOffersService

	Events *EventsService

	Links *LinksService

	Publishers *PublishersService

	Reports *ReportsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

Jump to

Keyboard shortcuts

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