1// Package content provides access to the Content API for Shopping. 2// 3// See https://developers.google.com/shopping-content 4// 5// Usage example: 6// 7// import "google.golang.org/api/content/v2" 8// ... 9// contentService, err := content.New(oauthHttpClient) 10package content // import "google.golang.org/api/content/v2" 11 12import ( 13 "bytes" 14 "encoding/json" 15 "errors" 16 "fmt" 17 context "golang.org/x/net/context" 18 ctxhttp "golang.org/x/net/context/ctxhttp" 19 gensupport "google.golang.org/api/gensupport" 20 googleapi "google.golang.org/api/googleapi" 21 "io" 22 "net/http" 23 "net/url" 24 "strconv" 25 "strings" 26) 27 28// Always reference these packages, just in case the auto-generated code 29// below doesn't. 30var _ = bytes.NewBuffer 31var _ = strconv.Itoa 32var _ = fmt.Sprintf 33var _ = json.NewDecoder 34var _ = io.Copy 35var _ = url.Parse 36var _ = gensupport.MarshalJSON 37var _ = googleapi.Version 38var _ = errors.New 39var _ = strings.Replace 40var _ = context.Canceled 41var _ = ctxhttp.Do 42 43const apiId = "content:v2" 44const apiName = "content" 45const apiVersion = "v2" 46const basePath = "https://www.googleapis.com/content/v2/" 47 48// OAuth2 scopes used by this API. 49const ( 50 // Manage your product listings and accounts for Google Shopping 51 ContentScope = "https://www.googleapis.com/auth/content" 52) 53 54func New(client *http.Client) (*APIService, error) { 55 if client == nil { 56 return nil, errors.New("client is nil") 57 } 58 s := &APIService{client: client, BasePath: basePath} 59 s.Accounts = NewAccountsService(s) 60 s.Accountstatuses = NewAccountstatusesService(s) 61 s.Accounttax = NewAccounttaxService(s) 62 s.Datafeeds = NewDatafeedsService(s) 63 s.Datafeedstatuses = NewDatafeedstatusesService(s) 64 s.Inventory = NewInventoryService(s) 65 s.Liasettings = NewLiasettingsService(s) 66 s.Orders = NewOrdersService(s) 67 s.Pos = NewPosService(s) 68 s.Products = NewProductsService(s) 69 s.Productstatuses = NewProductstatusesService(s) 70 s.Shippingsettings = NewShippingsettingsService(s) 71 return s, nil 72} 73 74type APIService struct { 75 client *http.Client 76 BasePath string // API endpoint base URL 77 UserAgent string // optional additional User-Agent fragment 78 79 Accounts *AccountsService 80 81 Accountstatuses *AccountstatusesService 82 83 Accounttax *AccounttaxService 84 85 Datafeeds *DatafeedsService 86 87 Datafeedstatuses *DatafeedstatusesService 88 89 Inventory *InventoryService 90 91 Liasettings *LiasettingsService 92 93 Orders *OrdersService 94 95 Pos *PosService 96 97 Products *ProductsService 98 99 Productstatuses *ProductstatusesService 100 101 Shippingsettings *ShippingsettingsService 102} 103 104func (s *APIService) userAgent() string { 105 if s.UserAgent == "" { 106 return googleapi.UserAgent 107 } 108 return googleapi.UserAgent + " " + s.UserAgent 109} 110 111func NewAccountsService(s *APIService) *AccountsService { 112 rs := &AccountsService{s: s} 113 return rs 114} 115 116type AccountsService struct { 117 s *APIService 118} 119 120func NewAccountstatusesService(s *APIService) *AccountstatusesService { 121 rs := &AccountstatusesService{s: s} 122 return rs 123} 124 125type AccountstatusesService struct { 126 s *APIService 127} 128 129func NewAccounttaxService(s *APIService) *AccounttaxService { 130 rs := &AccounttaxService{s: s} 131 return rs 132} 133 134type AccounttaxService struct { 135 s *APIService 136} 137 138func NewDatafeedsService(s *APIService) *DatafeedsService { 139 rs := &DatafeedsService{s: s} 140 return rs 141} 142 143type DatafeedsService struct { 144 s *APIService 145} 146 147func NewDatafeedstatusesService(s *APIService) *DatafeedstatusesService { 148 rs := &DatafeedstatusesService{s: s} 149 return rs 150} 151 152type DatafeedstatusesService struct { 153 s *APIService 154} 155 156func NewInventoryService(s *APIService) *InventoryService { 157 rs := &InventoryService{s: s} 158 return rs 159} 160 161type InventoryService struct { 162 s *APIService 163} 164 165func NewLiasettingsService(s *APIService) *LiasettingsService { 166 rs := &LiasettingsService{s: s} 167 return rs 168} 169 170type LiasettingsService struct { 171 s *APIService 172} 173 174func NewOrdersService(s *APIService) *OrdersService { 175 rs := &OrdersService{s: s} 176 return rs 177} 178 179type OrdersService struct { 180 s *APIService 181} 182 183func NewPosService(s *APIService) *PosService { 184 rs := &PosService{s: s} 185 return rs 186} 187 188type PosService struct { 189 s *APIService 190} 191 192func NewProductsService(s *APIService) *ProductsService { 193 rs := &ProductsService{s: s} 194 return rs 195} 196 197type ProductsService struct { 198 s *APIService 199} 200 201func NewProductstatusesService(s *APIService) *ProductstatusesService { 202 rs := &ProductstatusesService{s: s} 203 return rs 204} 205 206type ProductstatusesService struct { 207 s *APIService 208} 209 210func NewShippingsettingsService(s *APIService) *ShippingsettingsService { 211 rs := &ShippingsettingsService{s: s} 212 return rs 213} 214 215type ShippingsettingsService struct { 216 s *APIService 217} 218 219// Account: Account data. 220type Account struct { 221 // AdultContent: Indicates whether the merchant sells adult content. 222 AdultContent bool `json:"adultContent,omitempty"` 223 224 // AdwordsLinks: List of linked AdWords accounts that are active or 225 // pending approval. To create a new link request, add a new link with 226 // status active to the list. It will remain in a pending state until 227 // approved or rejected either in the AdWords interface or through the 228 // AdWords API. To delete an active link, or to cancel a link request, 229 // remove it from the list. 230 AdwordsLinks []*AccountAdwordsLink `json:"adwordsLinks,omitempty"` 231 232 // GoogleMyBusinessLink: The GMB account which is linked or in the 233 // process of being linked with the Merchant Center accounnt. 234 GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"` 235 236 // Id: Merchant Center account ID. 237 Id uint64 `json:"id,omitempty,string"` 238 239 // Kind: Identifies what kind of resource this is. Value: the fixed 240 // string "content#account". 241 Kind string `json:"kind,omitempty"` 242 243 // Name: Display name for the account. 244 Name string `json:"name,omitempty"` 245 246 // ReviewsUrl: [DEPRECATED] This field is never returned and will be 247 // ignored if provided. 248 ReviewsUrl string `json:"reviewsUrl,omitempty"` 249 250 // SellerId: Client-specific, locally-unique, internal ID for the child 251 // account. 252 SellerId string `json:"sellerId,omitempty"` 253 254 // Users: Users with access to the account. Every account (except for 255 // subaccounts) must have at least one admin user. 256 Users []*AccountUser `json:"users,omitempty"` 257 258 // WebsiteUrl: The merchant's website. 259 WebsiteUrl string `json:"websiteUrl,omitempty"` 260 261 // YoutubeChannelLinks: List of linked YouTube channels that are active 262 // or pending approval. To create a new link request, add a new link 263 // with status active to the list. It will remain in a pending state 264 // until approved or rejected in the YT Creator Studio interface. To 265 // delete an active link, or to cancel a link request, remove it from 266 // the list. 267 YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"` 268 269 // ServerResponse contains the HTTP response code and headers from the 270 // server. 271 googleapi.ServerResponse `json:"-"` 272 273 // ForceSendFields is a list of field names (e.g. "AdultContent") to 274 // unconditionally include in API requests. By default, fields with 275 // empty values are omitted from API requests. However, any non-pointer, 276 // non-interface field appearing in ForceSendFields will be sent to the 277 // server regardless of whether the field is empty or not. This may be 278 // used to include empty fields in Patch requests. 279 ForceSendFields []string `json:"-"` 280 281 // NullFields is a list of field names (e.g. "AdultContent") to include 282 // in API requests with the JSON null value. By default, fields with 283 // empty values are omitted from API requests. However, any field with 284 // an empty value appearing in NullFields will be sent to the server as 285 // null. It is an error if a field in this list has a non-empty value. 286 // This may be used to include null fields in Patch requests. 287 NullFields []string `json:"-"` 288} 289 290func (s *Account) MarshalJSON() ([]byte, error) { 291 type NoMethod Account 292 raw := NoMethod(*s) 293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 294} 295 296type AccountAdwordsLink struct { 297 // AdwordsId: Customer ID of the AdWords account. 298 AdwordsId uint64 `json:"adwordsId,omitempty,string"` 299 300 // Status: Status of the link between this Merchant Center account and 301 // the AdWords account. Upon retrieval, it represents the actual status 302 // of the link and can be either active if it was approved in Google 303 // AdWords or pending if it's pending approval. Upon insertion, it 304 // represents the intended status of the link. Re-uploading a link with 305 // status active when it's still pending or with status pending when 306 // it's already active will have no effect: the status will remain 307 // unchanged. Re-uploading a link with deprecated status inactive is 308 // equivalent to not submitting the link at all and will delete the link 309 // if it was active or cancel the link request if it was pending. 310 Status string `json:"status,omitempty"` 311 312 // ForceSendFields is a list of field names (e.g. "AdwordsId") to 313 // unconditionally include in API requests. By default, fields with 314 // empty values are omitted from API requests. However, any non-pointer, 315 // non-interface field appearing in ForceSendFields will be sent to the 316 // server regardless of whether the field is empty or not. This may be 317 // used to include empty fields in Patch requests. 318 ForceSendFields []string `json:"-"` 319 320 // NullFields is a list of field names (e.g. "AdwordsId") to include in 321 // API requests with the JSON null value. By default, fields with empty 322 // values are omitted from API requests. However, any field with an 323 // empty value appearing in NullFields will be sent to the server as 324 // null. It is an error if a field in this list has a non-empty value. 325 // This may be used to include null fields in Patch requests. 326 NullFields []string `json:"-"` 327} 328 329func (s *AccountAdwordsLink) MarshalJSON() ([]byte, error) { 330 type NoMethod AccountAdwordsLink 331 raw := NoMethod(*s) 332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 333} 334 335type AccountGoogleMyBusinessLink struct { 336 // GmbEmail: The GMB email address of which a specific account within a 337 // GMB account. A sample account within a GMB account could be a 338 // business account with set of locations, managed under the GMB 339 // account. 340 GmbEmail string `json:"gmbEmail,omitempty"` 341 342 // Status: Status of the link between this Merchant Center account and 343 // the GMB account. 344 Status string `json:"status,omitempty"` 345 346 // ForceSendFields is a list of field names (e.g. "GmbEmail") to 347 // unconditionally include in API requests. By default, fields with 348 // empty values are omitted from API requests. However, any non-pointer, 349 // non-interface field appearing in ForceSendFields will be sent to the 350 // server regardless of whether the field is empty or not. This may be 351 // used to include empty fields in Patch requests. 352 ForceSendFields []string `json:"-"` 353 354 // NullFields is a list of field names (e.g. "GmbEmail") to include in 355 // API requests with the JSON null value. By default, fields with empty 356 // values are omitted from API requests. However, any field with an 357 // empty value appearing in NullFields will be sent to the server as 358 // null. It is an error if a field in this list has a non-empty value. 359 // This may be used to include null fields in Patch requests. 360 NullFields []string `json:"-"` 361} 362 363func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) { 364 type NoMethod AccountGoogleMyBusinessLink 365 raw := NoMethod(*s) 366 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 367} 368 369type AccountIdentifier struct { 370 // AggregatorId: The aggregator ID, set for aggregators and subaccounts 371 // (in that case, it represents the aggregator of the subaccount). 372 AggregatorId uint64 `json:"aggregatorId,omitempty,string"` 373 374 // MerchantId: The merchant account ID, set for individual accounts and 375 // subaccounts. 376 MerchantId uint64 `json:"merchantId,omitempty,string"` 377 378 // ForceSendFields is a list of field names (e.g. "AggregatorId") to 379 // unconditionally include in API requests. By default, fields with 380 // empty values are omitted from API requests. However, any non-pointer, 381 // non-interface field appearing in ForceSendFields will be sent to the 382 // server regardless of whether the field is empty or not. This may be 383 // used to include empty fields in Patch requests. 384 ForceSendFields []string `json:"-"` 385 386 // NullFields is a list of field names (e.g. "AggregatorId") to include 387 // in API requests with the JSON null value. By default, fields with 388 // empty values are omitted from API requests. However, any field with 389 // an empty value appearing in NullFields will be sent to the server as 390 // null. It is an error if a field in this list has a non-empty value. 391 // This may be used to include null fields in Patch requests. 392 NullFields []string `json:"-"` 393} 394 395func (s *AccountIdentifier) MarshalJSON() ([]byte, error) { 396 type NoMethod AccountIdentifier 397 raw := NoMethod(*s) 398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 399} 400 401// AccountStatus: The status of an account, i.e., information about its 402// products, which is computed offline and not returned immediately at 403// insertion time. 404type AccountStatus struct { 405 // AccountId: The ID of the account for which the status is reported. 406 AccountId string `json:"accountId,omitempty"` 407 408 // AccountLevelIssues: A list of account level issues. 409 AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"` 410 411 // DataQualityIssues: A list of data quality issues. 412 DataQualityIssues []*AccountStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 413 414 // Kind: Identifies what kind of resource this is. Value: the fixed 415 // string "content#accountStatus". 416 Kind string `json:"kind,omitempty"` 417 418 // WebsiteClaimed: Whether the account's website is claimed or not. 419 WebsiteClaimed bool `json:"websiteClaimed,omitempty"` 420 421 // ServerResponse contains the HTTP response code and headers from the 422 // server. 423 googleapi.ServerResponse `json:"-"` 424 425 // ForceSendFields is a list of field names (e.g. "AccountId") to 426 // unconditionally include in API requests. By default, fields with 427 // empty values are omitted from API requests. However, any non-pointer, 428 // non-interface field appearing in ForceSendFields will be sent to the 429 // server regardless of whether the field is empty or not. This may be 430 // used to include empty fields in Patch requests. 431 ForceSendFields []string `json:"-"` 432 433 // NullFields is a list of field names (e.g. "AccountId") to include in 434 // API requests with the JSON null value. By default, fields with empty 435 // values are omitted from API requests. However, any field with an 436 // empty value appearing in NullFields will be sent to the server as 437 // null. It is an error if a field in this list has a non-empty value. 438 // This may be used to include null fields in Patch requests. 439 NullFields []string `json:"-"` 440} 441 442func (s *AccountStatus) MarshalJSON() ([]byte, error) { 443 type NoMethod AccountStatus 444 raw := NoMethod(*s) 445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 446} 447 448type AccountStatusAccountLevelIssue struct { 449 // Country: Country for which this issue is reported. 450 Country string `json:"country,omitempty"` 451 452 // Destination: The destination the issue applies to. 453 Destination string `json:"destination,omitempty"` 454 455 // Detail: Additional details about the issue. 456 Detail string `json:"detail,omitempty"` 457 458 // Id: Issue identifier. 459 Id string `json:"id,omitempty"` 460 461 // Severity: Severity of the issue. 462 Severity string `json:"severity,omitempty"` 463 464 // Title: Short description of the issue. 465 Title string `json:"title,omitempty"` 466 467 // ForceSendFields is a list of field names (e.g. "Country") to 468 // unconditionally include in API requests. By default, fields with 469 // empty values are omitted from API requests. However, any non-pointer, 470 // non-interface field appearing in ForceSendFields will be sent to the 471 // server regardless of whether the field is empty or not. This may be 472 // used to include empty fields in Patch requests. 473 ForceSendFields []string `json:"-"` 474 475 // NullFields is a list of field names (e.g. "Country") to include in 476 // API requests with the JSON null value. By default, fields with empty 477 // values are omitted from API requests. However, any field with an 478 // empty value appearing in NullFields will be sent to the server as 479 // null. It is an error if a field in this list has a non-empty value. 480 // This may be used to include null fields in Patch requests. 481 NullFields []string `json:"-"` 482} 483 484func (s *AccountStatusAccountLevelIssue) MarshalJSON() ([]byte, error) { 485 type NoMethod AccountStatusAccountLevelIssue 486 raw := NoMethod(*s) 487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 488} 489 490type AccountStatusDataQualityIssue struct { 491 // Country: Country for which this issue is reported. 492 Country string `json:"country,omitempty"` 493 494 // Destination: The destination the issue applies to. 495 Destination string `json:"destination,omitempty"` 496 497 // Detail: A more detailed description of the issue. 498 Detail string `json:"detail,omitempty"` 499 500 // DisplayedValue: Actual value displayed on the landing page. 501 DisplayedValue string `json:"displayedValue,omitempty"` 502 503 // ExampleItems: Example items featuring the issue. 504 ExampleItems []*AccountStatusExampleItem `json:"exampleItems,omitempty"` 505 506 // Id: Issue identifier. 507 Id string `json:"id,omitempty"` 508 509 // LastChecked: Last time the account was checked for this issue. 510 LastChecked string `json:"lastChecked,omitempty"` 511 512 // Location: The attribute name that is relevant for the issue. 513 Location string `json:"location,omitempty"` 514 515 // NumItems: Number of items in the account found to have the said 516 // issue. 517 NumItems int64 `json:"numItems,omitempty"` 518 519 // Severity: Severity of the problem. 520 Severity string `json:"severity,omitempty"` 521 522 // SubmittedValue: Submitted value that causes the issue. 523 SubmittedValue string `json:"submittedValue,omitempty"` 524 525 // ForceSendFields is a list of field names (e.g. "Country") to 526 // unconditionally include in API requests. By default, fields with 527 // empty values are omitted from API requests. However, any non-pointer, 528 // non-interface field appearing in ForceSendFields will be sent to the 529 // server regardless of whether the field is empty or not. This may be 530 // used to include empty fields in Patch requests. 531 ForceSendFields []string `json:"-"` 532 533 // NullFields is a list of field names (e.g. "Country") to include in 534 // API requests with the JSON null value. By default, fields with empty 535 // values are omitted from API requests. However, any field with an 536 // empty value appearing in NullFields will be sent to the server as 537 // null. It is an error if a field in this list has a non-empty value. 538 // This may be used to include null fields in Patch requests. 539 NullFields []string `json:"-"` 540} 541 542func (s *AccountStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 543 type NoMethod AccountStatusDataQualityIssue 544 raw := NoMethod(*s) 545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 546} 547 548// AccountStatusExampleItem: An example of an item that has poor data 549// quality. An item value on the landing page differs from what is 550// submitted, or conflicts with a policy. 551type AccountStatusExampleItem struct { 552 // ItemId: Unique item ID as specified in the uploaded product data. 553 ItemId string `json:"itemId,omitempty"` 554 555 // Link: Landing page of the item. 556 Link string `json:"link,omitempty"` 557 558 // SubmittedValue: The item value that was submitted. 559 SubmittedValue string `json:"submittedValue,omitempty"` 560 561 // Title: Title of the item. 562 Title string `json:"title,omitempty"` 563 564 // ValueOnLandingPage: The actual value on the landing page. 565 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 566 567 // ForceSendFields is a list of field names (e.g. "ItemId") to 568 // unconditionally include in API requests. By default, fields with 569 // empty values are omitted from API requests. However, any non-pointer, 570 // non-interface field appearing in ForceSendFields will be sent to the 571 // server regardless of whether the field is empty or not. This may be 572 // used to include empty fields in Patch requests. 573 ForceSendFields []string `json:"-"` 574 575 // NullFields is a list of field names (e.g. "ItemId") to include in API 576 // requests with the JSON null value. By default, fields with empty 577 // values are omitted from API requests. However, any field with an 578 // empty value appearing in NullFields will be sent to the server as 579 // null. It is an error if a field in this list has a non-empty value. 580 // This may be used to include null fields in Patch requests. 581 NullFields []string `json:"-"` 582} 583 584func (s *AccountStatusExampleItem) MarshalJSON() ([]byte, error) { 585 type NoMethod AccountStatusExampleItem 586 raw := NoMethod(*s) 587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 588} 589 590// AccountTax: The tax settings of a merchant account. 591type AccountTax struct { 592 // AccountId: The ID of the account to which these account tax settings 593 // belong. 594 AccountId uint64 `json:"accountId,omitempty,string"` 595 596 // Kind: Identifies what kind of resource this is. Value: the fixed 597 // string "content#accountTax". 598 Kind string `json:"kind,omitempty"` 599 600 // Rules: Tax rules. Updating the tax rules will enable US taxes (not 601 // reversible). Defining no rules is equivalent to not charging tax at 602 // all. 603 Rules []*AccountTaxTaxRule `json:"rules,omitempty"` 604 605 // ServerResponse contains the HTTP response code and headers from the 606 // server. 607 googleapi.ServerResponse `json:"-"` 608 609 // ForceSendFields is a list of field names (e.g. "AccountId") to 610 // unconditionally include in API requests. By default, fields with 611 // empty values are omitted from API requests. However, any non-pointer, 612 // non-interface field appearing in ForceSendFields will be sent to the 613 // server regardless of whether the field is empty or not. This may be 614 // used to include empty fields in Patch requests. 615 ForceSendFields []string `json:"-"` 616 617 // NullFields is a list of field names (e.g. "AccountId") to include in 618 // API requests with the JSON null value. By default, fields with empty 619 // values are omitted from API requests. However, any field with an 620 // empty value appearing in NullFields will be sent to the server as 621 // null. It is an error if a field in this list has a non-empty value. 622 // This may be used to include null fields in Patch requests. 623 NullFields []string `json:"-"` 624} 625 626func (s *AccountTax) MarshalJSON() ([]byte, error) { 627 type NoMethod AccountTax 628 raw := NoMethod(*s) 629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 630} 631 632// AccountTaxTaxRule: Tax calculation rule to apply in a state or 633// province (USA only). 634type AccountTaxTaxRule struct { 635 // Country: Country code in which tax is applicable. 636 Country string `json:"country,omitempty"` 637 638 // LocationId: State (or province) is which the tax is applicable, 639 // described by its location id (also called criteria id). 640 LocationId uint64 `json:"locationId,omitempty,string"` 641 642 // RatePercent: Explicit tax rate in percent, represented as a floating 643 // point number without the percentage character. Must not be negative. 644 RatePercent string `json:"ratePercent,omitempty"` 645 646 // ShippingTaxed: If true, shipping charges are also taxed. 647 ShippingTaxed bool `json:"shippingTaxed,omitempty"` 648 649 // UseGlobalRate: Whether the tax rate is taken from a global tax table 650 // or specified explicitly. 651 UseGlobalRate bool `json:"useGlobalRate,omitempty"` 652 653 // ForceSendFields is a list of field names (e.g. "Country") to 654 // unconditionally include in API requests. By default, fields with 655 // empty values are omitted from API requests. However, any non-pointer, 656 // non-interface field appearing in ForceSendFields will be sent to the 657 // server regardless of whether the field is empty or not. This may be 658 // used to include empty fields in Patch requests. 659 ForceSendFields []string `json:"-"` 660 661 // NullFields is a list of field names (e.g. "Country") to include in 662 // API requests with the JSON null value. By default, fields with empty 663 // values are omitted from API requests. However, any field with an 664 // empty value appearing in NullFields will be sent to the server as 665 // null. It is an error if a field in this list has a non-empty value. 666 // This may be used to include null fields in Patch requests. 667 NullFields []string `json:"-"` 668} 669 670func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) { 671 type NoMethod AccountTaxTaxRule 672 raw := NoMethod(*s) 673 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 674} 675 676type AccountUser struct { 677 // Admin: Whether user is an admin. 678 Admin *bool `json:"admin,omitempty"` 679 680 // EmailAddress: User's email address. 681 EmailAddress string `json:"emailAddress,omitempty"` 682 683 // ForceSendFields is a list of field names (e.g. "Admin") to 684 // unconditionally include in API requests. By default, fields with 685 // empty values are omitted from API requests. However, any non-pointer, 686 // non-interface field appearing in ForceSendFields will be sent to the 687 // server regardless of whether the field is empty or not. This may be 688 // used to include empty fields in Patch requests. 689 ForceSendFields []string `json:"-"` 690 691 // NullFields is a list of field names (e.g. "Admin") to include in API 692 // requests with the JSON null value. By default, fields with empty 693 // values are omitted from API requests. However, any field with an 694 // empty value appearing in NullFields will be sent to the server as 695 // null. It is an error if a field in this list has a non-empty value. 696 // This may be used to include null fields in Patch requests. 697 NullFields []string `json:"-"` 698} 699 700func (s *AccountUser) MarshalJSON() ([]byte, error) { 701 type NoMethod AccountUser 702 raw := NoMethod(*s) 703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 704} 705 706type AccountYouTubeChannelLink struct { 707 // ChannelId: Channel ID. 708 ChannelId string `json:"channelId,omitempty"` 709 710 // Status: Status of the link between this Merchant Center account and 711 // the YouTube channel. Upon retrieval, it represents the actual status 712 // of the link and can be either active if it was approved in YT Creator 713 // Studio or pending if it's pending approval. Upon insertion, it 714 // represents the intended status of the link. Re-uploading a link with 715 // status active when it's still pending or with status pending when 716 // it's already active will have no effect: the status will remain 717 // unchanged. Re-uploading a link with deprecated status inactive is 718 // equivalent to not submitting the link at all and will delete the link 719 // if it was active or cancel the link request if it was pending. 720 Status string `json:"status,omitempty"` 721 722 // ForceSendFields is a list of field names (e.g. "ChannelId") to 723 // unconditionally include in API requests. By default, fields with 724 // empty values are omitted from API requests. However, any non-pointer, 725 // non-interface field appearing in ForceSendFields will be sent to the 726 // server regardless of whether the field is empty or not. This may be 727 // used to include empty fields in Patch requests. 728 ForceSendFields []string `json:"-"` 729 730 // NullFields is a list of field names (e.g. "ChannelId") to include in 731 // API requests with the JSON null value. By default, fields with empty 732 // values are omitted from API requests. However, any field with an 733 // empty value appearing in NullFields will be sent to the server as 734 // null. It is an error if a field in this list has a non-empty value. 735 // This may be used to include null fields in Patch requests. 736 NullFields []string `json:"-"` 737} 738 739func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) { 740 type NoMethod AccountYouTubeChannelLink 741 raw := NoMethod(*s) 742 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 743} 744 745type AccountsAuthInfoResponse struct { 746 // AccountIdentifiers: The account identifiers corresponding to the 747 // authenticated user. 748 // - For an individual account: only the merchant ID is defined 749 // - For an aggregator: only the aggregator ID is defined 750 // - For a subaccount of an MCA: both the merchant ID and the aggregator 751 // ID are defined. 752 AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"` 753 754 // Kind: Identifies what kind of resource this is. Value: the fixed 755 // string "content#accountsAuthInfoResponse". 756 Kind string `json:"kind,omitempty"` 757 758 // ServerResponse contains the HTTP response code and headers from the 759 // server. 760 googleapi.ServerResponse `json:"-"` 761 762 // ForceSendFields is a list of field names (e.g. "AccountIdentifiers") 763 // to unconditionally include in API requests. By default, fields with 764 // empty values are omitted from API requests. However, any non-pointer, 765 // non-interface field appearing in ForceSendFields will be sent to the 766 // server regardless of whether the field is empty or not. This may be 767 // used to include empty fields in Patch requests. 768 ForceSendFields []string `json:"-"` 769 770 // NullFields is a list of field names (e.g. "AccountIdentifiers") to 771 // include in API requests with the JSON null value. By default, fields 772 // with empty values are omitted from API requests. However, any field 773 // with an empty value appearing in NullFields will be sent to the 774 // server as null. It is an error if a field in this list has a 775 // non-empty value. This may be used to include null fields in Patch 776 // requests. 777 NullFields []string `json:"-"` 778} 779 780func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) { 781 type NoMethod AccountsAuthInfoResponse 782 raw := NoMethod(*s) 783 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 784} 785 786type AccountsClaimWebsiteResponse struct { 787 // Kind: Identifies what kind of resource this is. Value: the fixed 788 // string "content#accountsClaimWebsiteResponse". 789 Kind string `json:"kind,omitempty"` 790 791 // ServerResponse contains the HTTP response code and headers from the 792 // server. 793 googleapi.ServerResponse `json:"-"` 794 795 // ForceSendFields is a list of field names (e.g. "Kind") to 796 // unconditionally include in API requests. By default, fields with 797 // empty values are omitted from API requests. However, any non-pointer, 798 // non-interface field appearing in ForceSendFields will be sent to the 799 // server regardless of whether the field is empty or not. This may be 800 // used to include empty fields in Patch requests. 801 ForceSendFields []string `json:"-"` 802 803 // NullFields is a list of field names (e.g. "Kind") to include in API 804 // requests with the JSON null value. By default, fields with empty 805 // values are omitted from API requests. However, any field with an 806 // empty value appearing in NullFields will be sent to the server as 807 // null. It is an error if a field in this list has a non-empty value. 808 // This may be used to include null fields in Patch requests. 809 NullFields []string `json:"-"` 810} 811 812func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) { 813 type NoMethod AccountsClaimWebsiteResponse 814 raw := NoMethod(*s) 815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 816} 817 818type AccountsCustomBatchRequest struct { 819 // Entries: The request entries to be processed in the batch. 820 Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"` 821 822 // ForceSendFields is a list of field names (e.g. "Entries") to 823 // unconditionally include in API requests. By default, fields with 824 // empty values are omitted from API requests. However, any non-pointer, 825 // non-interface field appearing in ForceSendFields will be sent to the 826 // server regardless of whether the field is empty or not. This may be 827 // used to include empty fields in Patch requests. 828 ForceSendFields []string `json:"-"` 829 830 // NullFields is a list of field names (e.g. "Entries") to include in 831 // API requests with the JSON null value. By default, fields with empty 832 // values are omitted from API requests. However, any field with an 833 // empty value appearing in NullFields will be sent to the server as 834 // null. It is an error if a field in this list has a non-empty value. 835 // This may be used to include null fields in Patch requests. 836 NullFields []string `json:"-"` 837} 838 839func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) { 840 type NoMethod AccountsCustomBatchRequest 841 raw := NoMethod(*s) 842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 843} 844 845// AccountsCustomBatchRequestEntry: A batch entry encoding a single 846// non-batch accounts request. 847type AccountsCustomBatchRequestEntry struct { 848 // Account: The account to create or update. Only defined if the method 849 // is insert or update. 850 Account *Account `json:"account,omitempty"` 851 852 // AccountId: The ID of the targeted account. Only defined if the method 853 // is get, delete or claimwebsite. 854 AccountId uint64 `json:"accountId,omitempty,string"` 855 856 // BatchId: An entry ID, unique within the batch request. 857 BatchId int64 `json:"batchId,omitempty"` 858 859 // Force: Whether the account should be deleted if the account has 860 // offers. Only applicable if the method is delete. 861 Force bool `json:"force,omitempty"` 862 863 // MerchantId: The ID of the managing account. 864 MerchantId uint64 `json:"merchantId,omitempty,string"` 865 866 Method string `json:"method,omitempty"` 867 868 // Overwrite: Only applicable if the method is claimwebsite. Indicates 869 // whether or not to take the claim from another account in case there 870 // is a conflict. 871 Overwrite bool `json:"overwrite,omitempty"` 872 873 // ForceSendFields is a list of field names (e.g. "Account") to 874 // unconditionally include in API requests. By default, fields with 875 // empty values are omitted from API requests. However, any non-pointer, 876 // non-interface field appearing in ForceSendFields will be sent to the 877 // server regardless of whether the field is empty or not. This may be 878 // used to include empty fields in Patch requests. 879 ForceSendFields []string `json:"-"` 880 881 // NullFields is a list of field names (e.g. "Account") to include in 882 // API requests with the JSON null value. By default, fields with empty 883 // values are omitted from API requests. However, any field with an 884 // empty value appearing in NullFields will be sent to the server as 885 // null. It is an error if a field in this list has a non-empty value. 886 // This may be used to include null fields in Patch requests. 887 NullFields []string `json:"-"` 888} 889 890func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 891 type NoMethod AccountsCustomBatchRequestEntry 892 raw := NoMethod(*s) 893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 894} 895 896type AccountsCustomBatchResponse struct { 897 // Entries: The result of the execution of the batch requests. 898 Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"` 899 900 // Kind: Identifies what kind of resource this is. Value: the fixed 901 // string "content#accountsCustomBatchResponse". 902 Kind string `json:"kind,omitempty"` 903 904 // ServerResponse contains the HTTP response code and headers from the 905 // server. 906 googleapi.ServerResponse `json:"-"` 907 908 // ForceSendFields is a list of field names (e.g. "Entries") to 909 // unconditionally include in API requests. By default, fields with 910 // empty values are omitted from API requests. However, any non-pointer, 911 // non-interface field appearing in ForceSendFields will be sent to the 912 // server regardless of whether the field is empty or not. This may be 913 // used to include empty fields in Patch requests. 914 ForceSendFields []string `json:"-"` 915 916 // NullFields is a list of field names (e.g. "Entries") to include in 917 // API requests with the JSON null value. By default, fields with empty 918 // values are omitted from API requests. However, any field with an 919 // empty value appearing in NullFields will be sent to the server as 920 // null. It is an error if a field in this list has a non-empty value. 921 // This may be used to include null fields in Patch requests. 922 NullFields []string `json:"-"` 923} 924 925func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) { 926 type NoMethod AccountsCustomBatchResponse 927 raw := NoMethod(*s) 928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 929} 930 931// AccountsCustomBatchResponseEntry: A batch entry encoding a single 932// non-batch accounts response. 933type AccountsCustomBatchResponseEntry struct { 934 // Account: The retrieved, created, or updated account. Not defined if 935 // the method was delete or claimwebsite. 936 Account *Account `json:"account,omitempty"` 937 938 // BatchId: The ID of the request entry this entry responds to. 939 BatchId int64 `json:"batchId,omitempty"` 940 941 // Errors: A list of errors defined if and only if the request failed. 942 Errors *Errors `json:"errors,omitempty"` 943 944 // Kind: Identifies what kind of resource this is. Value: the fixed 945 // string "content#accountsCustomBatchResponseEntry". 946 Kind string `json:"kind,omitempty"` 947 948 // ForceSendFields is a list of field names (e.g. "Account") to 949 // unconditionally include in API requests. By default, fields with 950 // empty values are omitted from API requests. However, any non-pointer, 951 // non-interface field appearing in ForceSendFields will be sent to the 952 // server regardless of whether the field is empty or not. This may be 953 // used to include empty fields in Patch requests. 954 ForceSendFields []string `json:"-"` 955 956 // NullFields is a list of field names (e.g. "Account") to include in 957 // API requests with the JSON null value. By default, fields with empty 958 // values are omitted from API requests. However, any field with an 959 // empty value appearing in NullFields will be sent to the server as 960 // null. It is an error if a field in this list has a non-empty value. 961 // This may be used to include null fields in Patch requests. 962 NullFields []string `json:"-"` 963} 964 965func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 966 type NoMethod AccountsCustomBatchResponseEntry 967 raw := NoMethod(*s) 968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 969} 970 971type AccountsListResponse struct { 972 // Kind: Identifies what kind of resource this is. Value: the fixed 973 // string "content#accountsListResponse". 974 Kind string `json:"kind,omitempty"` 975 976 // NextPageToken: The token for the retrieval of the next page of 977 // accounts. 978 NextPageToken string `json:"nextPageToken,omitempty"` 979 980 Resources []*Account `json:"resources,omitempty"` 981 982 // ServerResponse contains the HTTP response code and headers from the 983 // server. 984 googleapi.ServerResponse `json:"-"` 985 986 // ForceSendFields is a list of field names (e.g. "Kind") to 987 // unconditionally include in API requests. By default, fields with 988 // empty values are omitted from API requests. However, any non-pointer, 989 // non-interface field appearing in ForceSendFields will be sent to the 990 // server regardless of whether the field is empty or not. This may be 991 // used to include empty fields in Patch requests. 992 ForceSendFields []string `json:"-"` 993 994 // NullFields is a list of field names (e.g. "Kind") to include in API 995 // requests with the JSON null value. By default, fields with empty 996 // values are omitted from API requests. However, any field with an 997 // empty value appearing in NullFields will be sent to the server as 998 // null. It is an error if a field in this list has a non-empty value. 999 // This may be used to include null fields in Patch requests. 1000 NullFields []string `json:"-"` 1001} 1002 1003func (s *AccountsListResponse) MarshalJSON() ([]byte, error) { 1004 type NoMethod AccountsListResponse 1005 raw := NoMethod(*s) 1006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1007} 1008 1009type AccountstatusesCustomBatchRequest struct { 1010 // Entries: The request entries to be processed in the batch. 1011 Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 1012 1013 // ForceSendFields is a list of field names (e.g. "Entries") to 1014 // unconditionally include in API requests. By default, fields with 1015 // empty values are omitted from API requests. However, any non-pointer, 1016 // non-interface field appearing in ForceSendFields will be sent to the 1017 // server regardless of whether the field is empty or not. This may be 1018 // used to include empty fields in Patch requests. 1019 ForceSendFields []string `json:"-"` 1020 1021 // NullFields is a list of field names (e.g. "Entries") to include in 1022 // API requests with the JSON null value. By default, fields with empty 1023 // values are omitted from API requests. However, any field with an 1024 // empty value appearing in NullFields will be sent to the server as 1025 // null. It is an error if a field in this list has a non-empty value. 1026 // This may be used to include null fields in Patch requests. 1027 NullFields []string `json:"-"` 1028} 1029 1030func (s *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 1031 type NoMethod AccountstatusesCustomBatchRequest 1032 raw := NoMethod(*s) 1033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1034} 1035 1036// AccountstatusesCustomBatchRequestEntry: A batch entry encoding a 1037// single non-batch accountstatuses request. 1038type AccountstatusesCustomBatchRequestEntry struct { 1039 // AccountId: The ID of the (sub-)account whose status to get. 1040 AccountId uint64 `json:"accountId,omitempty,string"` 1041 1042 // BatchId: An entry ID, unique within the batch request. 1043 BatchId int64 `json:"batchId,omitempty"` 1044 1045 // Destinations: If set, only issues for the specified destinations are 1046 // returned, otherwise only issues for the Shopping destination. 1047 Destinations []string `json:"destinations,omitempty"` 1048 1049 // MerchantId: The ID of the managing account. 1050 MerchantId uint64 `json:"merchantId,omitempty,string"` 1051 1052 // Method: The method (get). 1053 Method string `json:"method,omitempty"` 1054 1055 // ForceSendFields is a list of field names (e.g. "AccountId") to 1056 // unconditionally include in API requests. By default, fields with 1057 // empty values are omitted from API requests. However, any non-pointer, 1058 // non-interface field appearing in ForceSendFields will be sent to the 1059 // server regardless of whether the field is empty or not. This may be 1060 // used to include empty fields in Patch requests. 1061 ForceSendFields []string `json:"-"` 1062 1063 // NullFields is a list of field names (e.g. "AccountId") to include in 1064 // API requests with the JSON null value. By default, fields with empty 1065 // values are omitted from API requests. However, any field with an 1066 // empty value appearing in NullFields will be sent to the server as 1067 // null. It is an error if a field in this list has a non-empty value. 1068 // This may be used to include null fields in Patch requests. 1069 NullFields []string `json:"-"` 1070} 1071 1072func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1073 type NoMethod AccountstatusesCustomBatchRequestEntry 1074 raw := NoMethod(*s) 1075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1076} 1077 1078type AccountstatusesCustomBatchResponse struct { 1079 // Entries: The result of the execution of the batch requests. 1080 Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 1081 1082 // Kind: Identifies what kind of resource this is. Value: the fixed 1083 // string "content#accountstatusesCustomBatchResponse". 1084 Kind string `json:"kind,omitempty"` 1085 1086 // ServerResponse contains the HTTP response code and headers from the 1087 // server. 1088 googleapi.ServerResponse `json:"-"` 1089 1090 // ForceSendFields is a list of field names (e.g. "Entries") to 1091 // unconditionally include in API requests. By default, fields with 1092 // empty values are omitted from API requests. However, any non-pointer, 1093 // non-interface field appearing in ForceSendFields will be sent to the 1094 // server regardless of whether the field is empty or not. This may be 1095 // used to include empty fields in Patch requests. 1096 ForceSendFields []string `json:"-"` 1097 1098 // NullFields is a list of field names (e.g. "Entries") to include in 1099 // API requests with the JSON null value. By default, fields with empty 1100 // values are omitted from API requests. However, any field with an 1101 // empty value appearing in NullFields will be sent to the server as 1102 // null. It is an error if a field in this list has a non-empty value. 1103 // This may be used to include null fields in Patch requests. 1104 NullFields []string `json:"-"` 1105} 1106 1107func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 1108 type NoMethod AccountstatusesCustomBatchResponse 1109 raw := NoMethod(*s) 1110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1111} 1112 1113// AccountstatusesCustomBatchResponseEntry: A batch entry encoding a 1114// single non-batch accountstatuses response. 1115type AccountstatusesCustomBatchResponseEntry struct { 1116 // AccountStatus: The requested account status. Defined if and only if 1117 // the request was successful. 1118 AccountStatus *AccountStatus `json:"accountStatus,omitempty"` 1119 1120 // BatchId: The ID of the request entry this entry responds to. 1121 BatchId int64 `json:"batchId,omitempty"` 1122 1123 // Errors: A list of errors defined if and only if the request failed. 1124 Errors *Errors `json:"errors,omitempty"` 1125 1126 // ForceSendFields is a list of field names (e.g. "AccountStatus") to 1127 // unconditionally include in API requests. By default, fields with 1128 // empty values are omitted from API requests. However, any non-pointer, 1129 // non-interface field appearing in ForceSendFields will be sent to the 1130 // server regardless of whether the field is empty or not. This may be 1131 // used to include empty fields in Patch requests. 1132 ForceSendFields []string `json:"-"` 1133 1134 // NullFields is a list of field names (e.g. "AccountStatus") to include 1135 // in API requests with the JSON null value. By default, fields with 1136 // empty values are omitted from API requests. However, any field with 1137 // an empty value appearing in NullFields will be sent to the server as 1138 // null. It is an error if a field in this list has a non-empty value. 1139 // This may be used to include null fields in Patch requests. 1140 NullFields []string `json:"-"` 1141} 1142 1143func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1144 type NoMethod AccountstatusesCustomBatchResponseEntry 1145 raw := NoMethod(*s) 1146 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1147} 1148 1149type AccountstatusesListResponse struct { 1150 // Kind: Identifies what kind of resource this is. Value: the fixed 1151 // string "content#accountstatusesListResponse". 1152 Kind string `json:"kind,omitempty"` 1153 1154 // NextPageToken: The token for the retrieval of the next page of 1155 // account statuses. 1156 NextPageToken string `json:"nextPageToken,omitempty"` 1157 1158 Resources []*AccountStatus `json:"resources,omitempty"` 1159 1160 // ServerResponse contains the HTTP response code and headers from the 1161 // server. 1162 googleapi.ServerResponse `json:"-"` 1163 1164 // ForceSendFields is a list of field names (e.g. "Kind") to 1165 // unconditionally include in API requests. By default, fields with 1166 // empty values are omitted from API requests. However, any non-pointer, 1167 // non-interface field appearing in ForceSendFields will be sent to the 1168 // server regardless of whether the field is empty or not. This may be 1169 // used to include empty fields in Patch requests. 1170 ForceSendFields []string `json:"-"` 1171 1172 // NullFields is a list of field names (e.g. "Kind") to include in API 1173 // requests with the JSON null value. By default, fields with empty 1174 // values are omitted from API requests. However, any field with an 1175 // empty value appearing in NullFields will be sent to the server as 1176 // null. It is an error if a field in this list has a non-empty value. 1177 // This may be used to include null fields in Patch requests. 1178 NullFields []string `json:"-"` 1179} 1180 1181func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) { 1182 type NoMethod AccountstatusesListResponse 1183 raw := NoMethod(*s) 1184 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1185} 1186 1187type AccounttaxCustomBatchRequest struct { 1188 // Entries: The request entries to be processed in the batch. 1189 Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"` 1190 1191 // ForceSendFields is a list of field names (e.g. "Entries") to 1192 // unconditionally include in API requests. By default, fields with 1193 // empty values are omitted from API requests. However, any non-pointer, 1194 // non-interface field appearing in ForceSendFields will be sent to the 1195 // server regardless of whether the field is empty or not. This may be 1196 // used to include empty fields in Patch requests. 1197 ForceSendFields []string `json:"-"` 1198 1199 // NullFields is a list of field names (e.g. "Entries") to include in 1200 // API requests with the JSON null value. By default, fields with empty 1201 // values are omitted from API requests. However, any field with an 1202 // empty value appearing in NullFields will be sent to the server as 1203 // null. It is an error if a field in this list has a non-empty value. 1204 // This may be used to include null fields in Patch requests. 1205 NullFields []string `json:"-"` 1206} 1207 1208func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) { 1209 type NoMethod AccounttaxCustomBatchRequest 1210 raw := NoMethod(*s) 1211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1212} 1213 1214// AccounttaxCustomBatchRequestEntry: A batch entry encoding a single 1215// non-batch accounttax request. 1216type AccounttaxCustomBatchRequestEntry struct { 1217 // AccountId: The ID of the account for which to get/update account tax 1218 // settings. 1219 AccountId uint64 `json:"accountId,omitempty,string"` 1220 1221 // AccountTax: The account tax settings to update. Only defined if the 1222 // method is update. 1223 AccountTax *AccountTax `json:"accountTax,omitempty"` 1224 1225 // BatchId: An entry ID, unique within the batch request. 1226 BatchId int64 `json:"batchId,omitempty"` 1227 1228 // MerchantId: The ID of the managing account. 1229 MerchantId uint64 `json:"merchantId,omitempty,string"` 1230 1231 Method string `json:"method,omitempty"` 1232 1233 // ForceSendFields is a list of field names (e.g. "AccountId") to 1234 // unconditionally include in API requests. By default, fields with 1235 // empty values are omitted from API requests. However, any non-pointer, 1236 // non-interface field appearing in ForceSendFields will be sent to the 1237 // server regardless of whether the field is empty or not. This may be 1238 // used to include empty fields in Patch requests. 1239 ForceSendFields []string `json:"-"` 1240 1241 // NullFields is a list of field names (e.g. "AccountId") to include in 1242 // API requests with the JSON null value. By default, fields with empty 1243 // values are omitted from API requests. However, any field with an 1244 // empty value appearing in NullFields will be sent to the server as 1245 // null. It is an error if a field in this list has a non-empty value. 1246 // This may be used to include null fields in Patch requests. 1247 NullFields []string `json:"-"` 1248} 1249 1250func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1251 type NoMethod AccounttaxCustomBatchRequestEntry 1252 raw := NoMethod(*s) 1253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1254} 1255 1256type AccounttaxCustomBatchResponse struct { 1257 // Entries: The result of the execution of the batch requests. 1258 Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"` 1259 1260 // Kind: Identifies what kind of resource this is. Value: the fixed 1261 // string "content#accounttaxCustomBatchResponse". 1262 Kind string `json:"kind,omitempty"` 1263 1264 // ServerResponse contains the HTTP response code and headers from the 1265 // server. 1266 googleapi.ServerResponse `json:"-"` 1267 1268 // ForceSendFields is a list of field names (e.g. "Entries") to 1269 // unconditionally include in API requests. By default, fields with 1270 // empty values are omitted from API requests. However, any non-pointer, 1271 // non-interface field appearing in ForceSendFields will be sent to the 1272 // server regardless of whether the field is empty or not. This may be 1273 // used to include empty fields in Patch requests. 1274 ForceSendFields []string `json:"-"` 1275 1276 // NullFields is a list of field names (e.g. "Entries") to include in 1277 // API requests with the JSON null value. By default, fields with empty 1278 // values are omitted from API requests. However, any field with an 1279 // empty value appearing in NullFields will be sent to the server as 1280 // null. It is an error if a field in this list has a non-empty value. 1281 // This may be used to include null fields in Patch requests. 1282 NullFields []string `json:"-"` 1283} 1284 1285func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) { 1286 type NoMethod AccounttaxCustomBatchResponse 1287 raw := NoMethod(*s) 1288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1289} 1290 1291// AccounttaxCustomBatchResponseEntry: A batch entry encoding a single 1292// non-batch accounttax response. 1293type AccounttaxCustomBatchResponseEntry struct { 1294 // AccountTax: The retrieved or updated account tax settings. 1295 AccountTax *AccountTax `json:"accountTax,omitempty"` 1296 1297 // BatchId: The ID of the request entry this entry responds to. 1298 BatchId int64 `json:"batchId,omitempty"` 1299 1300 // Errors: A list of errors defined if and only if the request failed. 1301 Errors *Errors `json:"errors,omitempty"` 1302 1303 // Kind: Identifies what kind of resource this is. Value: the fixed 1304 // string "content#accounttaxCustomBatchResponseEntry". 1305 Kind string `json:"kind,omitempty"` 1306 1307 // ForceSendFields is a list of field names (e.g. "AccountTax") to 1308 // unconditionally include in API requests. By default, fields with 1309 // empty values are omitted from API requests. However, any non-pointer, 1310 // non-interface field appearing in ForceSendFields will be sent to the 1311 // server regardless of whether the field is empty or not. This may be 1312 // used to include empty fields in Patch requests. 1313 ForceSendFields []string `json:"-"` 1314 1315 // NullFields is a list of field names (e.g. "AccountTax") to include in 1316 // API requests with the JSON null value. By default, fields with empty 1317 // values are omitted from API requests. However, any field with an 1318 // empty value appearing in NullFields will be sent to the server as 1319 // null. It is an error if a field in this list has a non-empty value. 1320 // This may be used to include null fields in Patch requests. 1321 NullFields []string `json:"-"` 1322} 1323 1324func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1325 type NoMethod AccounttaxCustomBatchResponseEntry 1326 raw := NoMethod(*s) 1327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1328} 1329 1330type AccounttaxListResponse struct { 1331 // Kind: Identifies what kind of resource this is. Value: the fixed 1332 // string "content#accounttaxListResponse". 1333 Kind string `json:"kind,omitempty"` 1334 1335 // NextPageToken: The token for the retrieval of the next page of 1336 // account tax settings. 1337 NextPageToken string `json:"nextPageToken,omitempty"` 1338 1339 Resources []*AccountTax `json:"resources,omitempty"` 1340 1341 // ServerResponse contains the HTTP response code and headers from the 1342 // server. 1343 googleapi.ServerResponse `json:"-"` 1344 1345 // ForceSendFields is a list of field names (e.g. "Kind") to 1346 // unconditionally include in API requests. By default, fields with 1347 // empty values are omitted from API requests. However, any non-pointer, 1348 // non-interface field appearing in ForceSendFields will be sent to the 1349 // server regardless of whether the field is empty or not. This may be 1350 // used to include empty fields in Patch requests. 1351 ForceSendFields []string `json:"-"` 1352 1353 // NullFields is a list of field names (e.g. "Kind") to include in API 1354 // requests with the JSON null value. By default, fields with empty 1355 // values are omitted from API requests. However, any field with an 1356 // empty value appearing in NullFields will be sent to the server as 1357 // null. It is an error if a field in this list has a non-empty value. 1358 // This may be used to include null fields in Patch requests. 1359 NullFields []string `json:"-"` 1360} 1361 1362func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) { 1363 type NoMethod AccounttaxListResponse 1364 raw := NoMethod(*s) 1365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1366} 1367 1368type CarrierRate struct { 1369 // CarrierName: Carrier service, such as "UPS" or "Fedex". The list of 1370 // supported carriers can be retrieved via the getSupportedCarriers 1371 // method. Required. 1372 CarrierName string `json:"carrierName,omitempty"` 1373 1374 // CarrierService: Carrier service, such as "ground" or "2 days". The 1375 // list of supported services for a carrier can be retrieved via the 1376 // getSupportedCarriers method. Required. 1377 CarrierService string `json:"carrierService,omitempty"` 1378 1379 // FlatAdjustment: Additive shipping rate modifier. Can be negative. For 1380 // example { "value": "1", "currency" : "USD" } adds $1 to the rate, { 1381 // "value": "-3", "currency" : "USD" } removes $3 from the rate. 1382 // Optional. 1383 FlatAdjustment *Price `json:"flatAdjustment,omitempty"` 1384 1385 // Name: Name of the carrier rate. Must be unique per rate group. 1386 // Required. 1387 Name string `json:"name,omitempty"` 1388 1389 // OriginPostalCode: Shipping origin for this carrier rate. Required. 1390 OriginPostalCode string `json:"originPostalCode,omitempty"` 1391 1392 // PercentageAdjustment: Multiplicative shipping rate modifier as a 1393 // number in decimal notation. Can be negative. For example "5.4" 1394 // increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional. 1395 PercentageAdjustment string `json:"percentageAdjustment,omitempty"` 1396 1397 // ForceSendFields is a list of field names (e.g. "CarrierName") to 1398 // unconditionally include in API requests. By default, fields with 1399 // empty values are omitted from API requests. However, any non-pointer, 1400 // non-interface field appearing in ForceSendFields will be sent to the 1401 // server regardless of whether the field is empty or not. This may be 1402 // used to include empty fields in Patch requests. 1403 ForceSendFields []string `json:"-"` 1404 1405 // NullFields is a list of field names (e.g. "CarrierName") to include 1406 // in API requests with the JSON null value. By default, fields with 1407 // empty values are omitted from API requests. However, any field with 1408 // an empty value appearing in NullFields will be sent to the server as 1409 // null. It is an error if a field in this list has a non-empty value. 1410 // This may be used to include null fields in Patch requests. 1411 NullFields []string `json:"-"` 1412} 1413 1414func (s *CarrierRate) MarshalJSON() ([]byte, error) { 1415 type NoMethod CarrierRate 1416 raw := NoMethod(*s) 1417 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1418} 1419 1420type CarriersCarrier struct { 1421 // Country: The CLDR country code of the carrier (e.g., "US"). Always 1422 // present. 1423 Country string `json:"country,omitempty"` 1424 1425 // Name: The name of the carrier (e.g., "UPS"). Always present. 1426 Name string `json:"name,omitempty"` 1427 1428 // Services: A list of supported services (e.g., "ground") for that 1429 // carrier. Contains at least one service. 1430 Services []string `json:"services,omitempty"` 1431 1432 // ForceSendFields is a list of field names (e.g. "Country") to 1433 // unconditionally include in API requests. By default, fields with 1434 // empty values are omitted from API requests. However, any non-pointer, 1435 // non-interface field appearing in ForceSendFields will be sent to the 1436 // server regardless of whether the field is empty or not. This may be 1437 // used to include empty fields in Patch requests. 1438 ForceSendFields []string `json:"-"` 1439 1440 // NullFields is a list of field names (e.g. "Country") to include in 1441 // API requests with the JSON null value. By default, fields with empty 1442 // values are omitted from API requests. However, any field with an 1443 // empty value appearing in NullFields will be sent to the server as 1444 // null. It is an error if a field in this list has a non-empty value. 1445 // This may be used to include null fields in Patch requests. 1446 NullFields []string `json:"-"` 1447} 1448 1449func (s *CarriersCarrier) MarshalJSON() ([]byte, error) { 1450 type NoMethod CarriersCarrier 1451 raw := NoMethod(*s) 1452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1453} 1454 1455// Datafeed: Datafeed configuration data. 1456type Datafeed struct { 1457 // AttributeLanguage: The two-letter ISO 639-1 language in which the 1458 // attributes are defined in the data feed. 1459 AttributeLanguage string `json:"attributeLanguage,omitempty"` 1460 1461 // ContentLanguage: [DEPRECATED] Please use targets[].language instead. 1462 // The two-letter ISO 639-1 language of the items in the feed. Must be a 1463 // valid language for targetCountry. 1464 ContentLanguage string `json:"contentLanguage,omitempty"` 1465 1466 // ContentType: The type of data feed. For product inventory feeds, only 1467 // feeds for local stores, not online stores, are supported. 1468 ContentType string `json:"contentType,omitempty"` 1469 1470 // FetchSchedule: Fetch schedule for the feed file. 1471 FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"` 1472 1473 // FileName: The filename of the feed. All feeds must have a unique file 1474 // name. 1475 FileName string `json:"fileName,omitempty"` 1476 1477 // Format: Format of the feed file. 1478 Format *DatafeedFormat `json:"format,omitempty"` 1479 1480 // Id: The ID of the data feed. 1481 Id int64 `json:"id,omitempty,string"` 1482 1483 // IntendedDestinations: [DEPRECATED] Please use 1484 // targets[].includedDestinations instead. The list of intended 1485 // destinations (corresponds to checked check boxes in Merchant Center). 1486 IntendedDestinations []string `json:"intendedDestinations,omitempty"` 1487 1488 // Kind: Identifies what kind of resource this is. Value: the fixed 1489 // string "content#datafeed". 1490 Kind string `json:"kind,omitempty"` 1491 1492 // Name: A descriptive name of the data feed. 1493 Name string `json:"name,omitempty"` 1494 1495 // TargetCountry: [DEPRECATED] Please use targets[].country instead. The 1496 // country where the items in the feed will be included in the search 1497 // index, represented as a CLDR territory code. 1498 TargetCountry string `json:"targetCountry,omitempty"` 1499 1500 // Targets: The targets this feed should apply to (country, language, 1501 // destinations). 1502 Targets []*DatafeedTarget `json:"targets,omitempty"` 1503 1504 // ServerResponse contains the HTTP response code and headers from the 1505 // server. 1506 googleapi.ServerResponse `json:"-"` 1507 1508 // ForceSendFields is a list of field names (e.g. "AttributeLanguage") 1509 // to unconditionally include in API requests. By default, fields with 1510 // empty values are omitted from API requests. However, any non-pointer, 1511 // non-interface field appearing in ForceSendFields will be sent to the 1512 // server regardless of whether the field is empty or not. This may be 1513 // used to include empty fields in Patch requests. 1514 ForceSendFields []string `json:"-"` 1515 1516 // NullFields is a list of field names (e.g. "AttributeLanguage") to 1517 // include in API requests with the JSON null value. By default, fields 1518 // with empty values are omitted from API requests. However, any field 1519 // with an empty value appearing in NullFields will be sent to the 1520 // server as null. It is an error if a field in this list has a 1521 // non-empty value. This may be used to include null fields in Patch 1522 // requests. 1523 NullFields []string `json:"-"` 1524} 1525 1526func (s *Datafeed) MarshalJSON() ([]byte, error) { 1527 type NoMethod Datafeed 1528 raw := NoMethod(*s) 1529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1530} 1531 1532// DatafeedFetchSchedule: The required fields vary based on the 1533// frequency of fetching. For a monthly fetch schedule, day_of_month and 1534// hour are required. For a weekly fetch schedule, weekday and hour are 1535// required. For a daily fetch schedule, only hour is required. 1536type DatafeedFetchSchedule struct { 1537 // DayOfMonth: The day of the month the feed file should be fetched 1538 // (1-31). 1539 DayOfMonth int64 `json:"dayOfMonth,omitempty"` 1540 1541 // FetchUrl: The URL where the feed file can be fetched. Google Merchant 1542 // Center will support automatic scheduled uploads using the HTTP, 1543 // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid 1544 // link using one of those four protocols. 1545 FetchUrl string `json:"fetchUrl,omitempty"` 1546 1547 // Hour: The hour of the day the feed file should be fetched (0-23). 1548 Hour int64 `json:"hour,omitempty"` 1549 1550 // MinuteOfHour: The minute of the hour the feed file should be fetched 1551 // (0-59). Read-only. 1552 MinuteOfHour int64 `json:"minuteOfHour,omitempty"` 1553 1554 // Password: An optional password for fetch_url. 1555 Password string `json:"password,omitempty"` 1556 1557 // Paused: Whether the scheduled fetch is paused or not. 1558 Paused bool `json:"paused,omitempty"` 1559 1560 // TimeZone: Time zone used for schedule. UTC by default. E.g., 1561 // "America/Los_Angeles". 1562 TimeZone string `json:"timeZone,omitempty"` 1563 1564 // Username: An optional user name for fetch_url. 1565 Username string `json:"username,omitempty"` 1566 1567 // Weekday: The day of the week the feed file should be fetched. 1568 Weekday string `json:"weekday,omitempty"` 1569 1570 // ForceSendFields is a list of field names (e.g. "DayOfMonth") to 1571 // unconditionally include in API requests. By default, fields with 1572 // empty values are omitted from API requests. However, any non-pointer, 1573 // non-interface field appearing in ForceSendFields will be sent to the 1574 // server regardless of whether the field is empty or not. This may be 1575 // used to include empty fields in Patch requests. 1576 ForceSendFields []string `json:"-"` 1577 1578 // NullFields is a list of field names (e.g. "DayOfMonth") to include in 1579 // API requests with the JSON null value. By default, fields with empty 1580 // values are omitted from API requests. However, any field with an 1581 // empty value appearing in NullFields will be sent to the server as 1582 // null. It is an error if a field in this list has a non-empty value. 1583 // This may be used to include null fields in Patch requests. 1584 NullFields []string `json:"-"` 1585} 1586 1587func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) { 1588 type NoMethod DatafeedFetchSchedule 1589 raw := NoMethod(*s) 1590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1591} 1592 1593type DatafeedFormat struct { 1594 // ColumnDelimiter: Delimiter for the separation of values in a 1595 // delimiter-separated values feed. If not specified, the delimiter will 1596 // be auto-detected. Ignored for non-DSV data feeds. 1597 ColumnDelimiter string `json:"columnDelimiter,omitempty"` 1598 1599 // FileEncoding: Character encoding scheme of the data feed. If not 1600 // specified, the encoding will be auto-detected. 1601 FileEncoding string `json:"fileEncoding,omitempty"` 1602 1603 // QuotingMode: Specifies how double quotes are interpreted. If not 1604 // specified, the mode will be auto-detected. Ignored for non-DSV data 1605 // feeds. 1606 QuotingMode string `json:"quotingMode,omitempty"` 1607 1608 // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to 1609 // unconditionally include in API requests. By default, fields with 1610 // empty values are omitted from API requests. However, any non-pointer, 1611 // non-interface field appearing in ForceSendFields will be sent to the 1612 // server regardless of whether the field is empty or not. This may be 1613 // used to include empty fields in Patch requests. 1614 ForceSendFields []string `json:"-"` 1615 1616 // NullFields is a list of field names (e.g. "ColumnDelimiter") to 1617 // include in API requests with the JSON null value. By default, fields 1618 // with empty values are omitted from API requests. However, any field 1619 // with an empty value appearing in NullFields will be sent to the 1620 // server as null. It is an error if a field in this list has a 1621 // non-empty value. This may be used to include null fields in Patch 1622 // requests. 1623 NullFields []string `json:"-"` 1624} 1625 1626func (s *DatafeedFormat) MarshalJSON() ([]byte, error) { 1627 type NoMethod DatafeedFormat 1628 raw := NoMethod(*s) 1629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1630} 1631 1632// DatafeedStatus: The status of a datafeed, i.e., the result of the 1633// last retrieval of the datafeed computed asynchronously when the feed 1634// processing is finished. 1635type DatafeedStatus struct { 1636 // Country: The country for which the status is reported, represented as 1637 // a CLDR territory code. 1638 Country string `json:"country,omitempty"` 1639 1640 // DatafeedId: The ID of the feed for which the status is reported. 1641 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 1642 1643 // Errors: The list of errors occurring in the feed. 1644 Errors []*DatafeedStatusError `json:"errors,omitempty"` 1645 1646 // ItemsTotal: The number of items in the feed that were processed. 1647 ItemsTotal uint64 `json:"itemsTotal,omitempty,string"` 1648 1649 // ItemsValid: The number of items in the feed that were valid. 1650 ItemsValid uint64 `json:"itemsValid,omitempty,string"` 1651 1652 // Kind: Identifies what kind of resource this is. Value: the fixed 1653 // string "content#datafeedStatus". 1654 Kind string `json:"kind,omitempty"` 1655 1656 // Language: The two-letter ISO 639-1 language for which the status is 1657 // reported. 1658 Language string `json:"language,omitempty"` 1659 1660 // LastUploadDate: The last date at which the feed was uploaded. 1661 LastUploadDate string `json:"lastUploadDate,omitempty"` 1662 1663 // ProcessingStatus: The processing status of the feed. 1664 ProcessingStatus string `json:"processingStatus,omitempty"` 1665 1666 // Warnings: The list of errors occurring in the feed. 1667 Warnings []*DatafeedStatusError `json:"warnings,omitempty"` 1668 1669 // ServerResponse contains the HTTP response code and headers from the 1670 // server. 1671 googleapi.ServerResponse `json:"-"` 1672 1673 // ForceSendFields is a list of field names (e.g. "Country") to 1674 // unconditionally include in API requests. By default, fields with 1675 // empty values are omitted from API requests. However, any non-pointer, 1676 // non-interface field appearing in ForceSendFields will be sent to the 1677 // server regardless of whether the field is empty or not. This may be 1678 // used to include empty fields in Patch requests. 1679 ForceSendFields []string `json:"-"` 1680 1681 // NullFields is a list of field names (e.g. "Country") to include in 1682 // API requests with the JSON null value. By default, fields with empty 1683 // values are omitted from API requests. However, any field with an 1684 // empty value appearing in NullFields will be sent to the server as 1685 // null. It is an error if a field in this list has a non-empty value. 1686 // This may be used to include null fields in Patch requests. 1687 NullFields []string `json:"-"` 1688} 1689 1690func (s *DatafeedStatus) MarshalJSON() ([]byte, error) { 1691 type NoMethod DatafeedStatus 1692 raw := NoMethod(*s) 1693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1694} 1695 1696// DatafeedStatusError: An error occurring in the feed, like "invalid 1697// price". 1698type DatafeedStatusError struct { 1699 // Code: The code of the error, e.g., "validation/invalid_value". 1700 Code string `json:"code,omitempty"` 1701 1702 // Count: The number of occurrences of the error in the feed. 1703 Count uint64 `json:"count,omitempty,string"` 1704 1705 // Examples: A list of example occurrences of the error, grouped by 1706 // product. 1707 Examples []*DatafeedStatusExample `json:"examples,omitempty"` 1708 1709 // Message: The error message, e.g., "Invalid price". 1710 Message string `json:"message,omitempty"` 1711 1712 // ForceSendFields is a list of field names (e.g. "Code") to 1713 // unconditionally include in API requests. By default, fields with 1714 // empty values are omitted from API requests. However, any non-pointer, 1715 // non-interface field appearing in ForceSendFields will be sent to the 1716 // server regardless of whether the field is empty or not. This may be 1717 // used to include empty fields in Patch requests. 1718 ForceSendFields []string `json:"-"` 1719 1720 // NullFields is a list of field names (e.g. "Code") to include in API 1721 // requests with the JSON null value. By default, fields with empty 1722 // values are omitted from API requests. However, any field with an 1723 // empty value appearing in NullFields will be sent to the server as 1724 // null. It is an error if a field in this list has a non-empty value. 1725 // This may be used to include null fields in Patch requests. 1726 NullFields []string `json:"-"` 1727} 1728 1729func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) { 1730 type NoMethod DatafeedStatusError 1731 raw := NoMethod(*s) 1732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1733} 1734 1735// DatafeedStatusExample: An example occurrence for a particular error. 1736type DatafeedStatusExample struct { 1737 // ItemId: The ID of the example item. 1738 ItemId string `json:"itemId,omitempty"` 1739 1740 // LineNumber: Line number in the data feed where the example is found. 1741 LineNumber uint64 `json:"lineNumber,omitempty,string"` 1742 1743 // Value: The problematic value. 1744 Value string `json:"value,omitempty"` 1745 1746 // ForceSendFields is a list of field names (e.g. "ItemId") to 1747 // unconditionally include in API requests. By default, fields with 1748 // empty values are omitted from API requests. However, any non-pointer, 1749 // non-interface field appearing in ForceSendFields will be sent to the 1750 // server regardless of whether the field is empty or not. This may be 1751 // used to include empty fields in Patch requests. 1752 ForceSendFields []string `json:"-"` 1753 1754 // NullFields is a list of field names (e.g. "ItemId") to include in API 1755 // requests with the JSON null value. By default, fields with empty 1756 // values are omitted from API requests. However, any field with an 1757 // empty value appearing in NullFields will be sent to the server as 1758 // null. It is an error if a field in this list has a non-empty value. 1759 // This may be used to include null fields in Patch requests. 1760 NullFields []string `json:"-"` 1761} 1762 1763func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) { 1764 type NoMethod DatafeedStatusExample 1765 raw := NoMethod(*s) 1766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1767} 1768 1769type DatafeedTarget struct { 1770 // Country: The country where the items in the feed will be included in 1771 // the search index, represented as a CLDR territory code. 1772 Country string `json:"country,omitempty"` 1773 1774 // ExcludedDestinations: The list of destinations to exclude for this 1775 // target (corresponds to unchecked check boxes in Merchant Center). 1776 ExcludedDestinations []string `json:"excludedDestinations,omitempty"` 1777 1778 // IncludedDestinations: The list of destinations to include for this 1779 // target (corresponds to checked check boxes in Merchant Center). 1780 // Default destinations are always included unless provided in the 1781 // excluded_destination field. 1782 IncludedDestinations []string `json:"includedDestinations,omitempty"` 1783 1784 // Language: The two-letter ISO 639-1 language of the items in the feed. 1785 // Must be a valid language for targets[].country. 1786 Language string `json:"language,omitempty"` 1787 1788 // ForceSendFields is a list of field names (e.g. "Country") to 1789 // unconditionally include in API requests. By default, fields with 1790 // empty values are omitted from API requests. However, any non-pointer, 1791 // non-interface field appearing in ForceSendFields will be sent to the 1792 // server regardless of whether the field is empty or not. This may be 1793 // used to include empty fields in Patch requests. 1794 ForceSendFields []string `json:"-"` 1795 1796 // NullFields is a list of field names (e.g. "Country") to include in 1797 // API requests with the JSON null value. By default, fields with empty 1798 // values are omitted from API requests. However, any field with an 1799 // empty value appearing in NullFields will be sent to the server as 1800 // null. It is an error if a field in this list has a non-empty value. 1801 // This may be used to include null fields in Patch requests. 1802 NullFields []string `json:"-"` 1803} 1804 1805func (s *DatafeedTarget) MarshalJSON() ([]byte, error) { 1806 type NoMethod DatafeedTarget 1807 raw := NoMethod(*s) 1808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1809} 1810 1811type DatafeedsCustomBatchRequest struct { 1812 // Entries: The request entries to be processed in the batch. 1813 Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"` 1814 1815 // ForceSendFields is a list of field names (e.g. "Entries") to 1816 // unconditionally include in API requests. By default, fields with 1817 // empty values are omitted from API requests. However, any non-pointer, 1818 // non-interface field appearing in ForceSendFields will be sent to the 1819 // server regardless of whether the field is empty or not. This may be 1820 // used to include empty fields in Patch requests. 1821 ForceSendFields []string `json:"-"` 1822 1823 // NullFields is a list of field names (e.g. "Entries") to include in 1824 // API requests with the JSON null value. By default, fields with empty 1825 // values are omitted from API requests. However, any field with an 1826 // empty value appearing in NullFields will be sent to the server as 1827 // null. It is an error if a field in this list has a non-empty value. 1828 // This may be used to include null fields in Patch requests. 1829 NullFields []string `json:"-"` 1830} 1831 1832func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) { 1833 type NoMethod DatafeedsCustomBatchRequest 1834 raw := NoMethod(*s) 1835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1836} 1837 1838// DatafeedsCustomBatchRequestEntry: A batch entry encoding a single 1839// non-batch datafeeds request. 1840type DatafeedsCustomBatchRequestEntry struct { 1841 // BatchId: An entry ID, unique within the batch request. 1842 BatchId int64 `json:"batchId,omitempty"` 1843 1844 // Datafeed: The data feed to insert. 1845 Datafeed *Datafeed `json:"datafeed,omitempty"` 1846 1847 // DatafeedId: The ID of the data feed to get, delete or fetch. 1848 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 1849 1850 // MerchantId: The ID of the managing account. 1851 MerchantId uint64 `json:"merchantId,omitempty,string"` 1852 1853 Method string `json:"method,omitempty"` 1854 1855 // ForceSendFields is a list of field names (e.g. "BatchId") to 1856 // unconditionally include in API requests. By default, fields with 1857 // empty values are omitted from API requests. However, any non-pointer, 1858 // non-interface field appearing in ForceSendFields will be sent to the 1859 // server regardless of whether the field is empty or not. This may be 1860 // used to include empty fields in Patch requests. 1861 ForceSendFields []string `json:"-"` 1862 1863 // NullFields is a list of field names (e.g. "BatchId") to include in 1864 // API requests with the JSON null value. By default, fields with empty 1865 // values are omitted from API requests. However, any field with an 1866 // empty value appearing in NullFields will be sent to the server as 1867 // null. It is an error if a field in this list has a non-empty value. 1868 // This may be used to include null fields in Patch requests. 1869 NullFields []string `json:"-"` 1870} 1871 1872func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1873 type NoMethod DatafeedsCustomBatchRequestEntry 1874 raw := NoMethod(*s) 1875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1876} 1877 1878type DatafeedsCustomBatchResponse struct { 1879 // Entries: The result of the execution of the batch requests. 1880 Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"` 1881 1882 // Kind: Identifies what kind of resource this is. Value: the fixed 1883 // string "content#datafeedsCustomBatchResponse". 1884 Kind string `json:"kind,omitempty"` 1885 1886 // ServerResponse contains the HTTP response code and headers from the 1887 // server. 1888 googleapi.ServerResponse `json:"-"` 1889 1890 // ForceSendFields is a list of field names (e.g. "Entries") to 1891 // unconditionally include in API requests. By default, fields with 1892 // empty values are omitted from API requests. However, any non-pointer, 1893 // non-interface field appearing in ForceSendFields will be sent to the 1894 // server regardless of whether the field is empty or not. This may be 1895 // used to include empty fields in Patch requests. 1896 ForceSendFields []string `json:"-"` 1897 1898 // NullFields is a list of field names (e.g. "Entries") to include in 1899 // API requests with the JSON null value. By default, fields with empty 1900 // values are omitted from API requests. However, any field with an 1901 // empty value appearing in NullFields will be sent to the server as 1902 // null. It is an error if a field in this list has a non-empty value. 1903 // This may be used to include null fields in Patch requests. 1904 NullFields []string `json:"-"` 1905} 1906 1907func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) { 1908 type NoMethod DatafeedsCustomBatchResponse 1909 raw := NoMethod(*s) 1910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1911} 1912 1913// DatafeedsCustomBatchResponseEntry: A batch entry encoding a single 1914// non-batch datafeeds response. 1915type DatafeedsCustomBatchResponseEntry struct { 1916 // BatchId: The ID of the request entry this entry responds to. 1917 BatchId int64 `json:"batchId,omitempty"` 1918 1919 // Datafeed: The requested data feed. Defined if and only if the request 1920 // was successful. 1921 Datafeed *Datafeed `json:"datafeed,omitempty"` 1922 1923 // Errors: A list of errors defined if and only if the request failed. 1924 Errors *Errors `json:"errors,omitempty"` 1925 1926 // ForceSendFields is a list of field names (e.g. "BatchId") to 1927 // unconditionally include in API requests. By default, fields with 1928 // empty values are omitted from API requests. However, any non-pointer, 1929 // non-interface field appearing in ForceSendFields will be sent to the 1930 // server regardless of whether the field is empty or not. This may be 1931 // used to include empty fields in Patch requests. 1932 ForceSendFields []string `json:"-"` 1933 1934 // NullFields is a list of field names (e.g. "BatchId") to include in 1935 // API requests with the JSON null value. By default, fields with empty 1936 // values are omitted from API requests. However, any field with an 1937 // empty value appearing in NullFields will be sent to the server as 1938 // null. It is an error if a field in this list has a non-empty value. 1939 // This may be used to include null fields in Patch requests. 1940 NullFields []string `json:"-"` 1941} 1942 1943func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1944 type NoMethod DatafeedsCustomBatchResponseEntry 1945 raw := NoMethod(*s) 1946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1947} 1948 1949type DatafeedsFetchNowResponse struct { 1950 // Kind: Identifies what kind of resource this is. Value: the fixed 1951 // string "content#datafeedsFetchNowResponse". 1952 Kind string `json:"kind,omitempty"` 1953 1954 // ServerResponse contains the HTTP response code and headers from the 1955 // server. 1956 googleapi.ServerResponse `json:"-"` 1957 1958 // ForceSendFields is a list of field names (e.g. "Kind") to 1959 // unconditionally include in API requests. By default, fields with 1960 // empty values are omitted from API requests. However, any non-pointer, 1961 // non-interface field appearing in ForceSendFields will be sent to the 1962 // server regardless of whether the field is empty or not. This may be 1963 // used to include empty fields in Patch requests. 1964 ForceSendFields []string `json:"-"` 1965 1966 // NullFields is a list of field names (e.g. "Kind") to include in API 1967 // requests with the JSON null value. By default, fields with empty 1968 // values are omitted from API requests. However, any field with an 1969 // empty value appearing in NullFields will be sent to the server as 1970 // null. It is an error if a field in this list has a non-empty value. 1971 // This may be used to include null fields in Patch requests. 1972 NullFields []string `json:"-"` 1973} 1974 1975func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) { 1976 type NoMethod DatafeedsFetchNowResponse 1977 raw := NoMethod(*s) 1978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1979} 1980 1981type DatafeedsListResponse struct { 1982 // Kind: Identifies what kind of resource this is. Value: the fixed 1983 // string "content#datafeedsListResponse". 1984 Kind string `json:"kind,omitempty"` 1985 1986 // NextPageToken: The token for the retrieval of the next page of 1987 // datafeeds. 1988 NextPageToken string `json:"nextPageToken,omitempty"` 1989 1990 Resources []*Datafeed `json:"resources,omitempty"` 1991 1992 // ServerResponse contains the HTTP response code and headers from the 1993 // server. 1994 googleapi.ServerResponse `json:"-"` 1995 1996 // ForceSendFields is a list of field names (e.g. "Kind") to 1997 // unconditionally include in API requests. By default, fields with 1998 // empty values are omitted from API requests. However, any non-pointer, 1999 // non-interface field appearing in ForceSendFields will be sent to the 2000 // server regardless of whether the field is empty or not. This may be 2001 // used to include empty fields in Patch requests. 2002 ForceSendFields []string `json:"-"` 2003 2004 // NullFields is a list of field names (e.g. "Kind") to include in API 2005 // requests with the JSON null value. By default, fields with empty 2006 // values are omitted from API requests. However, any field with an 2007 // empty value appearing in NullFields will be sent to the server as 2008 // null. It is an error if a field in this list has a non-empty value. 2009 // This may be used to include null fields in Patch requests. 2010 NullFields []string `json:"-"` 2011} 2012 2013func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) { 2014 type NoMethod DatafeedsListResponse 2015 raw := NoMethod(*s) 2016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2017} 2018 2019type DatafeedstatusesCustomBatchRequest struct { 2020 // Entries: The request entries to be processed in the batch. 2021 Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 2022 2023 // ForceSendFields is a list of field names (e.g. "Entries") to 2024 // unconditionally include in API requests. By default, fields with 2025 // empty values are omitted from API requests. However, any non-pointer, 2026 // non-interface field appearing in ForceSendFields will be sent to the 2027 // server regardless of whether the field is empty or not. This may be 2028 // used to include empty fields in Patch requests. 2029 ForceSendFields []string `json:"-"` 2030 2031 // NullFields is a list of field names (e.g. "Entries") to include in 2032 // API requests with the JSON null value. By default, fields with empty 2033 // values are omitted from API requests. However, any field with an 2034 // empty value appearing in NullFields will be sent to the server as 2035 // null. It is an error if a field in this list has a non-empty value. 2036 // This may be used to include null fields in Patch requests. 2037 NullFields []string `json:"-"` 2038} 2039 2040func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 2041 type NoMethod DatafeedstatusesCustomBatchRequest 2042 raw := NoMethod(*s) 2043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2044} 2045 2046// DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a 2047// single non-batch datafeedstatuses request. 2048type DatafeedstatusesCustomBatchRequestEntry struct { 2049 // BatchId: An entry ID, unique within the batch request. 2050 BatchId int64 `json:"batchId,omitempty"` 2051 2052 // Country: The country for which to get the datafeed status. If this 2053 // parameter is provided then language must also be provided. Note that 2054 // for multi-target datafeeds this parameter is required. 2055 Country string `json:"country,omitempty"` 2056 2057 // DatafeedId: The ID of the data feed to get. 2058 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2059 2060 // Language: The language for which to get the datafeed status. If this 2061 // parameter is provided then country must also be provided. Note that 2062 // for multi-target datafeeds this parameter is required. 2063 Language string `json:"language,omitempty"` 2064 2065 // MerchantId: The ID of the managing account. 2066 MerchantId uint64 `json:"merchantId,omitempty,string"` 2067 2068 Method string `json:"method,omitempty"` 2069 2070 // ForceSendFields is a list of field names (e.g. "BatchId") to 2071 // unconditionally include in API requests. By default, fields with 2072 // empty values are omitted from API requests. However, any non-pointer, 2073 // non-interface field appearing in ForceSendFields will be sent to the 2074 // server regardless of whether the field is empty or not. This may be 2075 // used to include empty fields in Patch requests. 2076 ForceSendFields []string `json:"-"` 2077 2078 // NullFields is a list of field names (e.g. "BatchId") to include in 2079 // API requests with the JSON null value. By default, fields with empty 2080 // values are omitted from API requests. However, any field with an 2081 // empty value appearing in NullFields will be sent to the server as 2082 // null. It is an error if a field in this list has a non-empty value. 2083 // This may be used to include null fields in Patch requests. 2084 NullFields []string `json:"-"` 2085} 2086 2087func (s *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2088 type NoMethod DatafeedstatusesCustomBatchRequestEntry 2089 raw := NoMethod(*s) 2090 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2091} 2092 2093type DatafeedstatusesCustomBatchResponse struct { 2094 // Entries: The result of the execution of the batch requests. 2095 Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 2096 2097 // Kind: Identifies what kind of resource this is. Value: the fixed 2098 // string "content#datafeedstatusesCustomBatchResponse". 2099 Kind string `json:"kind,omitempty"` 2100 2101 // ServerResponse contains the HTTP response code and headers from the 2102 // server. 2103 googleapi.ServerResponse `json:"-"` 2104 2105 // ForceSendFields is a list of field names (e.g. "Entries") to 2106 // unconditionally include in API requests. By default, fields with 2107 // empty values are omitted from API requests. However, any non-pointer, 2108 // non-interface field appearing in ForceSendFields will be sent to the 2109 // server regardless of whether the field is empty or not. This may be 2110 // used to include empty fields in Patch requests. 2111 ForceSendFields []string `json:"-"` 2112 2113 // NullFields is a list of field names (e.g. "Entries") to include in 2114 // API requests with the JSON null value. By default, fields with empty 2115 // values are omitted from API requests. However, any field with an 2116 // empty value appearing in NullFields will be sent to the server as 2117 // null. It is an error if a field in this list has a non-empty value. 2118 // This may be used to include null fields in Patch requests. 2119 NullFields []string `json:"-"` 2120} 2121 2122func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 2123 type NoMethod DatafeedstatusesCustomBatchResponse 2124 raw := NoMethod(*s) 2125 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2126} 2127 2128// DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a 2129// single non-batch datafeedstatuses response. 2130type DatafeedstatusesCustomBatchResponseEntry struct { 2131 // BatchId: The ID of the request entry this entry responds to. 2132 BatchId int64 `json:"batchId,omitempty"` 2133 2134 // DatafeedStatus: The requested data feed status. Defined if and only 2135 // if the request was successful. 2136 DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"` 2137 2138 // Errors: A list of errors defined if and only if the request failed. 2139 Errors *Errors `json:"errors,omitempty"` 2140 2141 // ForceSendFields is a list of field names (e.g. "BatchId") to 2142 // unconditionally include in API requests. By default, fields with 2143 // empty values are omitted from API requests. However, any non-pointer, 2144 // non-interface field appearing in ForceSendFields will be sent to the 2145 // server regardless of whether the field is empty or not. This may be 2146 // used to include empty fields in Patch requests. 2147 ForceSendFields []string `json:"-"` 2148 2149 // NullFields is a list of field names (e.g. "BatchId") to include in 2150 // API requests with the JSON null value. By default, fields with empty 2151 // values are omitted from API requests. However, any field with an 2152 // empty value appearing in NullFields will be sent to the server as 2153 // null. It is an error if a field in this list has a non-empty value. 2154 // This may be used to include null fields in Patch requests. 2155 NullFields []string `json:"-"` 2156} 2157 2158func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2159 type NoMethod DatafeedstatusesCustomBatchResponseEntry 2160 raw := NoMethod(*s) 2161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2162} 2163 2164type DatafeedstatusesListResponse struct { 2165 // Kind: Identifies what kind of resource this is. Value: the fixed 2166 // string "content#datafeedstatusesListResponse". 2167 Kind string `json:"kind,omitempty"` 2168 2169 // NextPageToken: The token for the retrieval of the next page of 2170 // datafeed statuses. 2171 NextPageToken string `json:"nextPageToken,omitempty"` 2172 2173 Resources []*DatafeedStatus `json:"resources,omitempty"` 2174 2175 // ServerResponse contains the HTTP response code and headers from the 2176 // server. 2177 googleapi.ServerResponse `json:"-"` 2178 2179 // ForceSendFields is a list of field names (e.g. "Kind") to 2180 // unconditionally include in API requests. By default, fields with 2181 // empty values are omitted from API requests. However, any non-pointer, 2182 // non-interface field appearing in ForceSendFields will be sent to the 2183 // server regardless of whether the field is empty or not. This may be 2184 // used to include empty fields in Patch requests. 2185 ForceSendFields []string `json:"-"` 2186 2187 // NullFields is a list of field names (e.g. "Kind") to include in API 2188 // requests with the JSON null value. By default, fields with empty 2189 // values are omitted from API requests. However, any field with an 2190 // empty value appearing in NullFields will be sent to the server as 2191 // null. It is an error if a field in this list has a non-empty value. 2192 // This may be used to include null fields in Patch requests. 2193 NullFields []string `json:"-"` 2194} 2195 2196func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) { 2197 type NoMethod DatafeedstatusesListResponse 2198 raw := NoMethod(*s) 2199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2200} 2201 2202type DeliveryTime struct { 2203 // HolidayCutoffs: Holiday cutoff definitions. If configured, they 2204 // specify order cutoff times for holiday-specific shipping. 2205 HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"` 2206 2207 // MaxTransitTimeInDays: Maximum number of business days that is spent 2208 // in transit. 0 means same day delivery, 1 means next day delivery. 2209 // Must be greater than or equal to minTransitTimeInDays. Required. 2210 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 2211 2212 // MinTransitTimeInDays: Minimum number of business days that is spent 2213 // in transit. 0 means same day delivery, 1 means next day delivery. 2214 // Required. 2215 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 2216 2217 // ForceSendFields is a list of field names (e.g. "HolidayCutoffs") to 2218 // unconditionally include in API requests. By default, fields with 2219 // empty values are omitted from API requests. However, any non-pointer, 2220 // non-interface field appearing in ForceSendFields will be sent to the 2221 // server regardless of whether the field is empty or not. This may be 2222 // used to include empty fields in Patch requests. 2223 ForceSendFields []string `json:"-"` 2224 2225 // NullFields is a list of field names (e.g. "HolidayCutoffs") to 2226 // include in API requests with the JSON null value. By default, fields 2227 // with empty values are omitted from API requests. However, any field 2228 // with an empty value appearing in NullFields will be sent to the 2229 // server as null. It is an error if a field in this list has a 2230 // non-empty value. This may be used to include null fields in Patch 2231 // requests. 2232 NullFields []string `json:"-"` 2233} 2234 2235func (s *DeliveryTime) MarshalJSON() ([]byte, error) { 2236 type NoMethod DeliveryTime 2237 raw := NoMethod(*s) 2238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2239} 2240 2241// Error: An error returned by the API. 2242type Error struct { 2243 // Domain: The domain of the error. 2244 Domain string `json:"domain,omitempty"` 2245 2246 // Message: A description of the error. 2247 Message string `json:"message,omitempty"` 2248 2249 // Reason: The error code. 2250 Reason string `json:"reason,omitempty"` 2251 2252 // ForceSendFields is a list of field names (e.g. "Domain") to 2253 // unconditionally include in API requests. By default, fields with 2254 // empty values are omitted from API requests. However, any non-pointer, 2255 // non-interface field appearing in ForceSendFields will be sent to the 2256 // server regardless of whether the field is empty or not. This may be 2257 // used to include empty fields in Patch requests. 2258 ForceSendFields []string `json:"-"` 2259 2260 // NullFields is a list of field names (e.g. "Domain") to include in API 2261 // requests with the JSON null value. By default, fields with empty 2262 // values are omitted from API requests. However, any field with an 2263 // empty value appearing in NullFields will be sent to the server as 2264 // null. It is an error if a field in this list has a non-empty value. 2265 // This may be used to include null fields in Patch requests. 2266 NullFields []string `json:"-"` 2267} 2268 2269func (s *Error) MarshalJSON() ([]byte, error) { 2270 type NoMethod Error 2271 raw := NoMethod(*s) 2272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2273} 2274 2275// Errors: A list of errors returned by a failed batch entry. 2276type Errors struct { 2277 // Code: The HTTP status of the first error in errors. 2278 Code int64 `json:"code,omitempty"` 2279 2280 // Errors: A list of errors. 2281 Errors []*Error `json:"errors,omitempty"` 2282 2283 // Message: The message of the first error in errors. 2284 Message string `json:"message,omitempty"` 2285 2286 // ForceSendFields is a list of field names (e.g. "Code") to 2287 // unconditionally include in API requests. By default, fields with 2288 // empty values are omitted from API requests. However, any non-pointer, 2289 // non-interface field appearing in ForceSendFields will be sent to the 2290 // server regardless of whether the field is empty or not. This may be 2291 // used to include empty fields in Patch requests. 2292 ForceSendFields []string `json:"-"` 2293 2294 // NullFields is a list of field names (e.g. "Code") to include in API 2295 // requests with the JSON null value. By default, fields with empty 2296 // values are omitted from API requests. However, any field with an 2297 // empty value appearing in NullFields will be sent to the server as 2298 // null. It is an error if a field in this list has a non-empty value. 2299 // This may be used to include null fields in Patch requests. 2300 NullFields []string `json:"-"` 2301} 2302 2303func (s *Errors) MarshalJSON() ([]byte, error) { 2304 type NoMethod Errors 2305 raw := NoMethod(*s) 2306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2307} 2308 2309type GmbAccounts struct { 2310 // AccountId: The ID of the account. 2311 AccountId uint64 `json:"accountId,omitempty,string"` 2312 2313 // GmbAccounts: A list of GMB accounts which are available to the 2314 // merchant. 2315 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 2316 2317 // ForceSendFields is a list of field names (e.g. "AccountId") to 2318 // unconditionally include in API requests. By default, fields with 2319 // empty values are omitted from API requests. However, any non-pointer, 2320 // non-interface field appearing in ForceSendFields will be sent to the 2321 // server regardless of whether the field is empty or not. This may be 2322 // used to include empty fields in Patch requests. 2323 ForceSendFields []string `json:"-"` 2324 2325 // NullFields is a list of field names (e.g. "AccountId") to include in 2326 // API requests with the JSON null value. By default, fields with empty 2327 // values are omitted from API requests. However, any field with an 2328 // empty value appearing in NullFields will be sent to the server as 2329 // null. It is an error if a field in this list has a non-empty value. 2330 // This may be used to include null fields in Patch requests. 2331 NullFields []string `json:"-"` 2332} 2333 2334func (s *GmbAccounts) MarshalJSON() ([]byte, error) { 2335 type NoMethod GmbAccounts 2336 raw := NoMethod(*s) 2337 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2338} 2339 2340type GmbAccountsGmbAccount struct { 2341 // Email: The email which identifies the GMB account. 2342 Email string `json:"email,omitempty"` 2343 2344 // ListingCount: Number of listings under this account. 2345 ListingCount uint64 `json:"listingCount,omitempty,string"` 2346 2347 // Name: The name of the GMB account. 2348 Name string `json:"name,omitempty"` 2349 2350 // Type: The type of the GMB account (User or Business). 2351 Type string `json:"type,omitempty"` 2352 2353 // ForceSendFields is a list of field names (e.g. "Email") to 2354 // unconditionally include in API requests. By default, fields with 2355 // empty values are omitted from API requests. However, any non-pointer, 2356 // non-interface field appearing in ForceSendFields will be sent to the 2357 // server regardless of whether the field is empty or not. This may be 2358 // used to include empty fields in Patch requests. 2359 ForceSendFields []string `json:"-"` 2360 2361 // NullFields is a list of field names (e.g. "Email") to include in API 2362 // requests with the JSON null value. By default, fields with empty 2363 // values are omitted from API requests. However, any field with an 2364 // empty value appearing in NullFields will be sent to the server as 2365 // null. It is an error if a field in this list has a non-empty value. 2366 // This may be used to include null fields in Patch requests. 2367 NullFields []string `json:"-"` 2368} 2369 2370func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) { 2371 type NoMethod GmbAccountsGmbAccount 2372 raw := NoMethod(*s) 2373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2374} 2375 2376// Headers: A non-empty list of row or column headers for a table. 2377// Exactly one of prices, weights, numItems, postalCodeGroupNames, or 2378// locations must be set. 2379type Headers struct { 2380 // Locations: A list of location ID sets. Must be non-empty. Can only be 2381 // set if all other fields are not set. 2382 Locations []*LocationIdSet `json:"locations,omitempty"` 2383 2384 // NumberOfItems: A list of inclusive number of items upper bounds. The 2385 // last value can be "infinity". For example ["10", "50", "infinity"] 2386 // represents the headers "<= 10 items", " 50 items". Must be non-empty. 2387 // Can only be set if all other fields are not set. 2388 NumberOfItems []string `json:"numberOfItems,omitempty"` 2389 2390 // PostalCodeGroupNames: A list of postal group names. The last value 2391 // can be "all other locations". Example: ["zone 1", "zone 2", "all 2392 // other locations"]. The referred postal code groups must match the 2393 // delivery country of the service. Must be non-empty. Can only be set 2394 // if all other fields are not set. 2395 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 2396 2397 // Prices: A list of inclusive order price upper bounds. The last 2398 // price's value can be "infinity". For example [{"value": "10", 2399 // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": 2400 // "infinity", "currency": "USD"}] represents the headers "<= $10", " 2401 // $500". All prices within a service must have the same currency. Must 2402 // be non-empty. Can only be set if all other fields are not set. 2403 Prices []*Price `json:"prices,omitempty"` 2404 2405 // Weights: A list of inclusive order weight upper bounds. The last 2406 // weight's value can be "infinity". For example [{"value": "10", 2407 // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", 2408 // "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights 2409 // within a service must have the same unit. Must be non-empty. Can only 2410 // be set if all other fields are not set. 2411 Weights []*Weight `json:"weights,omitempty"` 2412 2413 // ForceSendFields is a list of field names (e.g. "Locations") to 2414 // unconditionally include in API requests. By default, fields with 2415 // empty values are omitted from API requests. However, any non-pointer, 2416 // non-interface field appearing in ForceSendFields will be sent to the 2417 // server regardless of whether the field is empty or not. This may be 2418 // used to include empty fields in Patch requests. 2419 ForceSendFields []string `json:"-"` 2420 2421 // NullFields is a list of field names (e.g. "Locations") to include in 2422 // API requests with the JSON null value. By default, fields with empty 2423 // values are omitted from API requests. However, any field with an 2424 // empty value appearing in NullFields will be sent to the server as 2425 // null. It is an error if a field in this list has a non-empty value. 2426 // This may be used to include null fields in Patch requests. 2427 NullFields []string `json:"-"` 2428} 2429 2430func (s *Headers) MarshalJSON() ([]byte, error) { 2431 type NoMethod Headers 2432 raw := NoMethod(*s) 2433 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2434} 2435 2436type HolidayCutoff struct { 2437 // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g. 2438 // "2016-11-29" for 29th November 2016. Required. 2439 DeadlineDate string `json:"deadlineDate,omitempty"` 2440 2441 // DeadlineHour: Hour of the day on the deadline date until which the 2442 // order has to be placed to qualify for the delivery guarantee. 2443 // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. 2444 // Required. 2445 DeadlineHour int64 `json:"deadlineHour,omitempty"` 2446 2447 // DeadlineTimezone: Timezone identifier for the deadline hour. A list 2448 // of identifiers can be found in the AdWords API documentation. E.g. 2449 // "Europe/Zurich". Required. 2450 DeadlineTimezone string `json:"deadlineTimezone,omitempty"` 2451 2452 // HolidayId: Unique identifier for the holiday. Required. 2453 HolidayId string `json:"holidayId,omitempty"` 2454 2455 // VisibleFromDate: Date on which the deadline will become visible to 2456 // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October 2457 // 2016. Required. 2458 VisibleFromDate string `json:"visibleFromDate,omitempty"` 2459 2460 // ForceSendFields is a list of field names (e.g. "DeadlineDate") to 2461 // unconditionally include in API requests. By default, fields with 2462 // empty values are omitted from API requests. However, any non-pointer, 2463 // non-interface field appearing in ForceSendFields will be sent to the 2464 // server regardless of whether the field is empty or not. This may be 2465 // used to include empty fields in Patch requests. 2466 ForceSendFields []string `json:"-"` 2467 2468 // NullFields is a list of field names (e.g. "DeadlineDate") to include 2469 // in API requests with the JSON null value. By default, fields with 2470 // empty values are omitted from API requests. However, any field with 2471 // an empty value appearing in NullFields will be sent to the server as 2472 // null. It is an error if a field in this list has a non-empty value. 2473 // This may be used to include null fields in Patch requests. 2474 NullFields []string `json:"-"` 2475} 2476 2477func (s *HolidayCutoff) MarshalJSON() ([]byte, error) { 2478 type NoMethod HolidayCutoff 2479 raw := NoMethod(*s) 2480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2481} 2482 2483type HolidaysHoliday struct { 2484 // CountryCode: The CLDR territory code of the country in which the 2485 // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can 2486 // only be configured in a shipping settings service with matching 2487 // delivery country. Always present. 2488 CountryCode string `json:"countryCode,omitempty"` 2489 2490 // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for 2491 // Christmas 2016. Always present. 2492 Date string `json:"date,omitempty"` 2493 2494 // DeliveryGuaranteeDate: Date on which the order has to arrive at the 2495 // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December 2496 // 2016. Always present. 2497 DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"` 2498 2499 // DeliveryGuaranteeHour: Hour of the day in the delivery location's 2500 // timezone on the guaranteed delivery date by which the order has to 2501 // arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 2502 // 12 (noon), 13, ..., 23. Always present. 2503 DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"` 2504 2505 // Id: Unique identifier for the holiday to be used when configuring 2506 // holiday cutoffs. Always present. 2507 Id string `json:"id,omitempty"` 2508 2509 // Type: The holiday type. Always present. 2510 Type string `json:"type,omitempty"` 2511 2512 // ForceSendFields is a list of field names (e.g. "CountryCode") to 2513 // unconditionally include in API requests. By default, fields with 2514 // empty values are omitted from API requests. However, any non-pointer, 2515 // non-interface field appearing in ForceSendFields will be sent to the 2516 // server regardless of whether the field is empty or not. This may be 2517 // used to include empty fields in Patch requests. 2518 ForceSendFields []string `json:"-"` 2519 2520 // NullFields is a list of field names (e.g. "CountryCode") to include 2521 // in API requests with the JSON null value. By default, fields with 2522 // empty values are omitted from API requests. However, any field with 2523 // an empty value appearing in NullFields will be sent to the server as 2524 // null. It is an error if a field in this list has a non-empty value. 2525 // This may be used to include null fields in Patch requests. 2526 NullFields []string `json:"-"` 2527} 2528 2529func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { 2530 type NoMethod HolidaysHoliday 2531 raw := NoMethod(*s) 2532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2533} 2534 2535type Installment struct { 2536 // Amount: The amount the buyer has to pay per month. 2537 Amount *Price `json:"amount,omitempty"` 2538 2539 // Months: The number of installments the buyer has to pay. 2540 Months int64 `json:"months,omitempty,string"` 2541 2542 // ForceSendFields is a list of field names (e.g. "Amount") to 2543 // unconditionally include in API requests. By default, fields with 2544 // empty values are omitted from API requests. However, any non-pointer, 2545 // non-interface field appearing in ForceSendFields will be sent to the 2546 // server regardless of whether the field is empty or not. This may be 2547 // used to include empty fields in Patch requests. 2548 ForceSendFields []string `json:"-"` 2549 2550 // NullFields is a list of field names (e.g. "Amount") to include in API 2551 // requests with the JSON null value. By default, fields with empty 2552 // values are omitted from API requests. However, any field with an 2553 // empty value appearing in NullFields will be sent to the server as 2554 // null. It is an error if a field in this list has a non-empty value. 2555 // This may be used to include null fields in Patch requests. 2556 NullFields []string `json:"-"` 2557} 2558 2559func (s *Installment) MarshalJSON() ([]byte, error) { 2560 type NoMethod Installment 2561 raw := NoMethod(*s) 2562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2563} 2564 2565type Inventory struct { 2566 // Availability: The availability of the product. 2567 Availability string `json:"availability,omitempty"` 2568 2569 // Installment: Number and amount of installments to pay for an item. 2570 // Brazil only. 2571 Installment *Installment `json:"installment,omitempty"` 2572 2573 // Kind: Identifies what kind of resource this is. Value: the fixed 2574 // string "content#inventory". 2575 Kind string `json:"kind,omitempty"` 2576 2577 // LoyaltyPoints: Loyalty points that users receive after purchasing the 2578 // item. Japan only. 2579 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 2580 2581 // Pickup: Store pickup information. Only supported for local inventory. 2582 // Not setting pickup means "don't update" while setting it to the empty 2583 // value ({} in JSON) means "delete". Otherwise, pickupMethod and 2584 // pickupSla must be set together, unless pickupMethod is "not 2585 // supported". 2586 Pickup *InventoryPickup `json:"pickup,omitempty"` 2587 2588 // Price: The price of the product. 2589 Price *Price `json:"price,omitempty"` 2590 2591 // Quantity: The quantity of the product. Must be equal to or greater 2592 // than zero. Supported only for local products. 2593 Quantity int64 `json:"quantity,omitempty"` 2594 2595 // SalePrice: The sale price of the product. Mandatory if 2596 // sale_price_effective_date is defined. 2597 SalePrice *Price `json:"salePrice,omitempty"` 2598 2599 // SalePriceEffectiveDate: A date range represented by a pair of ISO 2600 // 8601 dates separated by a space, comma, or slash. Both dates might be 2601 // specified as 'null' if undecided. 2602 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 2603 2604 // SellOnGoogleQuantity: The quantity of the product that is reserved 2605 // for sell-on-google ads. Supported only for online products. 2606 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 2607 2608 // ForceSendFields is a list of field names (e.g. "Availability") to 2609 // unconditionally include in API requests. By default, fields with 2610 // empty values are omitted from API requests. However, any non-pointer, 2611 // non-interface field appearing in ForceSendFields will be sent to the 2612 // server regardless of whether the field is empty or not. This may be 2613 // used to include empty fields in Patch requests. 2614 ForceSendFields []string `json:"-"` 2615 2616 // NullFields is a list of field names (e.g. "Availability") to include 2617 // in API requests with the JSON null value. By default, fields with 2618 // empty values are omitted from API requests. However, any field with 2619 // an empty value appearing in NullFields will be sent to the server as 2620 // null. It is an error if a field in this list has a non-empty value. 2621 // This may be used to include null fields in Patch requests. 2622 NullFields []string `json:"-"` 2623} 2624 2625func (s *Inventory) MarshalJSON() ([]byte, error) { 2626 type NoMethod Inventory 2627 raw := NoMethod(*s) 2628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2629} 2630 2631type InventoryCustomBatchRequest struct { 2632 // Entries: The request entries to be processed in the batch. 2633 Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"` 2634 2635 // ForceSendFields is a list of field names (e.g. "Entries") to 2636 // unconditionally include in API requests. By default, fields with 2637 // empty values are omitted from API requests. However, any non-pointer, 2638 // non-interface field appearing in ForceSendFields will be sent to the 2639 // server regardless of whether the field is empty or not. This may be 2640 // used to include empty fields in Patch requests. 2641 ForceSendFields []string `json:"-"` 2642 2643 // NullFields is a list of field names (e.g. "Entries") to include in 2644 // API requests with the JSON null value. By default, fields with empty 2645 // values are omitted from API requests. However, any field with an 2646 // empty value appearing in NullFields will be sent to the server as 2647 // null. It is an error if a field in this list has a non-empty value. 2648 // This may be used to include null fields in Patch requests. 2649 NullFields []string `json:"-"` 2650} 2651 2652func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { 2653 type NoMethod InventoryCustomBatchRequest 2654 raw := NoMethod(*s) 2655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2656} 2657 2658// InventoryCustomBatchRequestEntry: A batch entry encoding a single 2659// non-batch inventory request. 2660type InventoryCustomBatchRequestEntry struct { 2661 // BatchId: An entry ID, unique within the batch request. 2662 BatchId int64 `json:"batchId,omitempty"` 2663 2664 // Inventory: Price and availability of the product. 2665 Inventory *Inventory `json:"inventory,omitempty"` 2666 2667 // MerchantId: The ID of the managing account. 2668 MerchantId uint64 `json:"merchantId,omitempty,string"` 2669 2670 // ProductId: The ID of the product for which to update price and 2671 // availability. 2672 ProductId string `json:"productId,omitempty"` 2673 2674 // StoreCode: The code of the store for which to update price and 2675 // availability. Use online to update price and availability of an 2676 // online product. 2677 StoreCode string `json:"storeCode,omitempty"` 2678 2679 // ForceSendFields is a list of field names (e.g. "BatchId") to 2680 // unconditionally include in API requests. By default, fields with 2681 // empty values are omitted from API requests. However, any non-pointer, 2682 // non-interface field appearing in ForceSendFields will be sent to the 2683 // server regardless of whether the field is empty or not. This may be 2684 // used to include empty fields in Patch requests. 2685 ForceSendFields []string `json:"-"` 2686 2687 // NullFields is a list of field names (e.g. "BatchId") to include in 2688 // API requests with the JSON null value. By default, fields with empty 2689 // values are omitted from API requests. However, any field with an 2690 // empty value appearing in NullFields will be sent to the server as 2691 // null. It is an error if a field in this list has a non-empty value. 2692 // This may be used to include null fields in Patch requests. 2693 NullFields []string `json:"-"` 2694} 2695 2696func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2697 type NoMethod InventoryCustomBatchRequestEntry 2698 raw := NoMethod(*s) 2699 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2700} 2701 2702type InventoryCustomBatchResponse struct { 2703 // Entries: The result of the execution of the batch requests. 2704 Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"` 2705 2706 // Kind: Identifies what kind of resource this is. Value: the fixed 2707 // string "content#inventoryCustomBatchResponse". 2708 Kind string `json:"kind,omitempty"` 2709 2710 // ServerResponse contains the HTTP response code and headers from the 2711 // server. 2712 googleapi.ServerResponse `json:"-"` 2713 2714 // ForceSendFields is a list of field names (e.g. "Entries") to 2715 // unconditionally include in API requests. By default, fields with 2716 // empty values are omitted from API requests. However, any non-pointer, 2717 // non-interface field appearing in ForceSendFields will be sent to the 2718 // server regardless of whether the field is empty or not. This may be 2719 // used to include empty fields in Patch requests. 2720 ForceSendFields []string `json:"-"` 2721 2722 // NullFields is a list of field names (e.g. "Entries") to include in 2723 // API requests with the JSON null value. By default, fields with empty 2724 // values are omitted from API requests. However, any field with an 2725 // empty value appearing in NullFields will be sent to the server as 2726 // null. It is an error if a field in this list has a non-empty value. 2727 // This may be used to include null fields in Patch requests. 2728 NullFields []string `json:"-"` 2729} 2730 2731func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { 2732 type NoMethod InventoryCustomBatchResponse 2733 raw := NoMethod(*s) 2734 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2735} 2736 2737// InventoryCustomBatchResponseEntry: A batch entry encoding a single 2738// non-batch inventory response. 2739type InventoryCustomBatchResponseEntry struct { 2740 // BatchId: The ID of the request entry this entry responds to. 2741 BatchId int64 `json:"batchId,omitempty"` 2742 2743 // Errors: A list of errors defined if and only if the request failed. 2744 Errors *Errors `json:"errors,omitempty"` 2745 2746 // Kind: Identifies what kind of resource this is. Value: the fixed 2747 // string "content#inventoryCustomBatchResponseEntry". 2748 Kind string `json:"kind,omitempty"` 2749 2750 // ForceSendFields is a list of field names (e.g. "BatchId") to 2751 // unconditionally include in API requests. By default, fields with 2752 // empty values are omitted from API requests. However, any non-pointer, 2753 // non-interface field appearing in ForceSendFields will be sent to the 2754 // server regardless of whether the field is empty or not. This may be 2755 // used to include empty fields in Patch requests. 2756 ForceSendFields []string `json:"-"` 2757 2758 // NullFields is a list of field names (e.g. "BatchId") to include in 2759 // API requests with the JSON null value. By default, fields with empty 2760 // values are omitted from API requests. However, any field with an 2761 // empty value appearing in NullFields will be sent to the server as 2762 // null. It is an error if a field in this list has a non-empty value. 2763 // This may be used to include null fields in Patch requests. 2764 NullFields []string `json:"-"` 2765} 2766 2767func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2768 type NoMethod InventoryCustomBatchResponseEntry 2769 raw := NoMethod(*s) 2770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2771} 2772 2773type InventoryPickup struct { 2774 // PickupMethod: Whether store pickup is available for this offer and 2775 // whether the pickup option should be shown as buy, reserve, or not 2776 // supported. Only supported for local inventory. Unless the value is 2777 // "not supported", must be submitted together with pickupSla. 2778 PickupMethod string `json:"pickupMethod,omitempty"` 2779 2780 // PickupSla: The expected date that an order will be ready for pickup, 2781 // relative to when the order is placed. Only supported for local 2782 // inventory. Must be submitted together with pickupMethod. 2783 PickupSla string `json:"pickupSla,omitempty"` 2784 2785 // ForceSendFields is a list of field names (e.g. "PickupMethod") to 2786 // unconditionally include in API requests. By default, fields with 2787 // empty values are omitted from API requests. However, any non-pointer, 2788 // non-interface field appearing in ForceSendFields will be sent to the 2789 // server regardless of whether the field is empty or not. This may be 2790 // used to include empty fields in Patch requests. 2791 ForceSendFields []string `json:"-"` 2792 2793 // NullFields is a list of field names (e.g. "PickupMethod") to include 2794 // in API requests with the JSON null value. By default, fields with 2795 // empty values are omitted from API requests. However, any field with 2796 // an empty value appearing in NullFields will be sent to the server as 2797 // null. It is an error if a field in this list has a non-empty value. 2798 // This may be used to include null fields in Patch requests. 2799 NullFields []string `json:"-"` 2800} 2801 2802func (s *InventoryPickup) MarshalJSON() ([]byte, error) { 2803 type NoMethod InventoryPickup 2804 raw := NoMethod(*s) 2805 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2806} 2807 2808type InventorySetRequest struct { 2809 // Availability: The availability of the product. 2810 Availability string `json:"availability,omitempty"` 2811 2812 // Installment: Number and amount of installments to pay for an item. 2813 // Brazil only. 2814 Installment *Installment `json:"installment,omitempty"` 2815 2816 // LoyaltyPoints: Loyalty points that users receive after purchasing the 2817 // item. Japan only. 2818 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 2819 2820 // Pickup: Store pickup information. Only supported for local inventory. 2821 // Not setting pickup means "don't update" while setting it to the empty 2822 // value ({} in JSON) means "delete". Otherwise, pickupMethod and 2823 // pickupSla must be set together, unless pickupMethod is "not 2824 // supported". 2825 Pickup *InventoryPickup `json:"pickup,omitempty"` 2826 2827 // Price: The price of the product. 2828 Price *Price `json:"price,omitempty"` 2829 2830 // Quantity: The quantity of the product. Must be equal to or greater 2831 // than zero. Supported only for local products. 2832 Quantity int64 `json:"quantity,omitempty"` 2833 2834 // SalePrice: The sale price of the product. Mandatory if 2835 // sale_price_effective_date is defined. 2836 SalePrice *Price `json:"salePrice,omitempty"` 2837 2838 // SalePriceEffectiveDate: A date range represented by a pair of ISO 2839 // 8601 dates separated by a space, comma, or slash. Both dates might be 2840 // specified as 'null' if undecided. 2841 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 2842 2843 // SellOnGoogleQuantity: The quantity of the product that is reserved 2844 // for sell-on-google ads. Supported only for online products. 2845 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 2846 2847 // ForceSendFields is a list of field names (e.g. "Availability") to 2848 // unconditionally include in API requests. By default, fields with 2849 // empty values are omitted from API requests. However, any non-pointer, 2850 // non-interface field appearing in ForceSendFields will be sent to the 2851 // server regardless of whether the field is empty or not. This may be 2852 // used to include empty fields in Patch requests. 2853 ForceSendFields []string `json:"-"` 2854 2855 // NullFields is a list of field names (e.g. "Availability") to include 2856 // in API requests with the JSON null value. By default, fields with 2857 // empty values are omitted from API requests. However, any field with 2858 // an empty value appearing in NullFields will be sent to the server as 2859 // null. It is an error if a field in this list has a non-empty value. 2860 // This may be used to include null fields in Patch requests. 2861 NullFields []string `json:"-"` 2862} 2863 2864func (s *InventorySetRequest) MarshalJSON() ([]byte, error) { 2865 type NoMethod InventorySetRequest 2866 raw := NoMethod(*s) 2867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2868} 2869 2870type InventorySetResponse struct { 2871 // Kind: Identifies what kind of resource this is. Value: the fixed 2872 // string "content#inventorySetResponse". 2873 Kind string `json:"kind,omitempty"` 2874 2875 // ServerResponse contains the HTTP response code and headers from the 2876 // server. 2877 googleapi.ServerResponse `json:"-"` 2878 2879 // ForceSendFields is a list of field names (e.g. "Kind") to 2880 // unconditionally include in API requests. By default, fields with 2881 // empty values are omitted from API requests. However, any non-pointer, 2882 // non-interface field appearing in ForceSendFields will be sent to the 2883 // server regardless of whether the field is empty or not. This may be 2884 // used to include empty fields in Patch requests. 2885 ForceSendFields []string `json:"-"` 2886 2887 // NullFields is a list of field names (e.g. "Kind") to include in API 2888 // requests with the JSON null value. By default, fields with empty 2889 // values are omitted from API requests. However, any field with an 2890 // empty value appearing in NullFields will be sent to the server as 2891 // null. It is an error if a field in this list has a non-empty value. 2892 // This may be used to include null fields in Patch requests. 2893 NullFields []string `json:"-"` 2894} 2895 2896func (s *InventorySetResponse) MarshalJSON() ([]byte, error) { 2897 type NoMethod InventorySetResponse 2898 raw := NoMethod(*s) 2899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2900} 2901 2902type LiaAboutPageSettings struct { 2903 // Status: The status of the verification process for the About page. 2904 Status string `json:"status,omitempty"` 2905 2906 // Url: The URL for the About page. 2907 Url string `json:"url,omitempty"` 2908 2909 // ForceSendFields is a list of field names (e.g. "Status") to 2910 // unconditionally include in API requests. By default, fields with 2911 // empty values are omitted from API requests. However, any non-pointer, 2912 // non-interface field appearing in ForceSendFields will be sent to the 2913 // server regardless of whether the field is empty or not. This may be 2914 // used to include empty fields in Patch requests. 2915 ForceSendFields []string `json:"-"` 2916 2917 // NullFields is a list of field names (e.g. "Status") to include in API 2918 // requests with the JSON null value. By default, fields with empty 2919 // values are omitted from API requests. However, any field with an 2920 // empty value appearing in NullFields will be sent to the server as 2921 // null. It is an error if a field in this list has a non-empty value. 2922 // This may be used to include null fields in Patch requests. 2923 NullFields []string `json:"-"` 2924} 2925 2926func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { 2927 type NoMethod LiaAboutPageSettings 2928 raw := NoMethod(*s) 2929 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2930} 2931 2932type LiaCountrySettings struct { 2933 // About: The settings for the About page. 2934 About *LiaAboutPageSettings `json:"about,omitempty"` 2935 2936 // Country: CLDR country code (e.g. "US"). 2937 Country string `json:"country,omitempty"` 2938 2939 // HostedLocalStorefrontActive: The status of the "Merchant hosted local 2940 // storefront" feature. 2941 HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` 2942 2943 // Inventory: LIA inventory verification settings. 2944 Inventory *LiaInventorySettings `json:"inventory,omitempty"` 2945 2946 // OnDisplayToOrder: LIA "On Display To Order" settings. 2947 OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` 2948 2949 // StorePickupActive: The status of the "Store pickup" feature. 2950 StorePickupActive bool `json:"storePickupActive,omitempty"` 2951 2952 // ForceSendFields is a list of field names (e.g. "About") to 2953 // unconditionally include in API requests. By default, fields with 2954 // empty values are omitted from API requests. However, any non-pointer, 2955 // non-interface field appearing in ForceSendFields will be sent to the 2956 // server regardless of whether the field is empty or not. This may be 2957 // used to include empty fields in Patch requests. 2958 ForceSendFields []string `json:"-"` 2959 2960 // NullFields is a list of field names (e.g. "About") to include in API 2961 // requests with the JSON null value. By default, fields with empty 2962 // values are omitted from API requests. However, any field with an 2963 // empty value appearing in NullFields will be sent to the server as 2964 // null. It is an error if a field in this list has a non-empty value. 2965 // This may be used to include null fields in Patch requests. 2966 NullFields []string `json:"-"` 2967} 2968 2969func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { 2970 type NoMethod LiaCountrySettings 2971 raw := NoMethod(*s) 2972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2973} 2974 2975type LiaInventorySettings struct { 2976 // InventoryVerificationContactEmail: The email of the contact for the 2977 // inventory verification process. 2978 InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` 2979 2980 // InventoryVerificationContactName: The name of the contact for the 2981 // inventory verification process. 2982 InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` 2983 2984 // InventoryVerificationContactStatus: The status of the verification 2985 // contact. 2986 InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` 2987 2988 // Status: The status of the inventory verification process. 2989 Status string `json:"status,omitempty"` 2990 2991 // ForceSendFields is a list of field names (e.g. 2992 // "InventoryVerificationContactEmail") to unconditionally include in 2993 // API requests. By default, fields with empty values are omitted from 2994 // API requests. However, any non-pointer, non-interface field appearing 2995 // in ForceSendFields will be sent to the server regardless of whether 2996 // the field is empty or not. This may be used to include empty fields 2997 // in Patch requests. 2998 ForceSendFields []string `json:"-"` 2999 3000 // NullFields is a list of field names (e.g. 3001 // "InventoryVerificationContactEmail") to include in API requests with 3002 // the JSON null value. By default, fields with empty values are omitted 3003 // from API requests. However, any field with an empty value appearing 3004 // in NullFields will be sent to the server as null. It is an error if a 3005 // field in this list has a non-empty value. This may be used to include 3006 // null fields in Patch requests. 3007 NullFields []string `json:"-"` 3008} 3009 3010func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { 3011 type NoMethod LiaInventorySettings 3012 raw := NoMethod(*s) 3013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3014} 3015 3016type LiaOnDisplayToOrderSettings struct { 3017 // ShippingCostPolicyUrl: Shipping cost and policy URL. 3018 ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` 3019 3020 // Status: The status of the ?On display to order? feature. 3021 Status string `json:"status,omitempty"` 3022 3023 // ForceSendFields is a list of field names (e.g. 3024 // "ShippingCostPolicyUrl") to unconditionally include in API requests. 3025 // By default, fields with empty values are omitted from API requests. 3026 // However, any non-pointer, non-interface field appearing in 3027 // ForceSendFields will be sent to the server regardless of whether the 3028 // field is empty or not. This may be used to include empty fields in 3029 // Patch requests. 3030 ForceSendFields []string `json:"-"` 3031 3032 // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to 3033 // include in API requests with the JSON null value. By default, fields 3034 // with empty values are omitted from API requests. However, any field 3035 // with an empty value appearing in NullFields will be sent to the 3036 // server as null. It is an error if a field in this list has a 3037 // non-empty value. This may be used to include null fields in Patch 3038 // requests. 3039 NullFields []string `json:"-"` 3040} 3041 3042func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { 3043 type NoMethod LiaOnDisplayToOrderSettings 3044 raw := NoMethod(*s) 3045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3046} 3047 3048type LiaSettings struct { 3049 // AccountId: The ID of the account to which these LIA settings belong. 3050 // Ignored upon update, always present in get request responses. 3051 AccountId uint64 `json:"accountId,omitempty,string"` 3052 3053 // CountrySettings: The LIA settings for each country. 3054 CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` 3055 3056 // Kind: Identifies what kind of resource this is. Value: the fixed 3057 // string "content#liaSettings". 3058 Kind string `json:"kind,omitempty"` 3059 3060 // ServerResponse contains the HTTP response code and headers from the 3061 // server. 3062 googleapi.ServerResponse `json:"-"` 3063 3064 // ForceSendFields is a list of field names (e.g. "AccountId") to 3065 // unconditionally include in API requests. By default, fields with 3066 // empty values are omitted from API requests. However, any non-pointer, 3067 // non-interface field appearing in ForceSendFields will be sent to the 3068 // server regardless of whether the field is empty or not. This may be 3069 // used to include empty fields in Patch requests. 3070 ForceSendFields []string `json:"-"` 3071 3072 // NullFields is a list of field names (e.g. "AccountId") to include in 3073 // API requests with the JSON null value. By default, fields with empty 3074 // values are omitted from API requests. However, any field with an 3075 // empty value appearing in NullFields will be sent to the server as 3076 // null. It is an error if a field in this list has a non-empty value. 3077 // This may be used to include null fields in Patch requests. 3078 NullFields []string `json:"-"` 3079} 3080 3081func (s *LiaSettings) MarshalJSON() ([]byte, error) { 3082 type NoMethod LiaSettings 3083 raw := NoMethod(*s) 3084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3085} 3086 3087type LiasettingsCustomBatchRequest struct { 3088 // Entries: The request entries to be processed in the batch. 3089 Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` 3090 3091 // ForceSendFields is a list of field names (e.g. "Entries") to 3092 // unconditionally include in API requests. By default, fields with 3093 // empty values are omitted from API requests. However, any non-pointer, 3094 // non-interface field appearing in ForceSendFields will be sent to the 3095 // server regardless of whether the field is empty or not. This may be 3096 // used to include empty fields in Patch requests. 3097 ForceSendFields []string `json:"-"` 3098 3099 // NullFields is a list of field names (e.g. "Entries") to include in 3100 // API requests with the JSON null value. By default, fields with empty 3101 // values are omitted from API requests. However, any field with an 3102 // empty value appearing in NullFields will be sent to the server as 3103 // null. It is an error if a field in this list has a non-empty value. 3104 // This may be used to include null fields in Patch requests. 3105 NullFields []string `json:"-"` 3106} 3107 3108func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 3109 type NoMethod LiasettingsCustomBatchRequest 3110 raw := NoMethod(*s) 3111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3112} 3113 3114type LiasettingsCustomBatchRequestEntry struct { 3115 // AccountId: The ID of the account for which to get/update account 3116 // shipping settings. 3117 AccountId uint64 `json:"accountId,omitempty,string"` 3118 3119 // BatchId: An entry ID, unique within the batch request. 3120 BatchId int64 `json:"batchId,omitempty"` 3121 3122 // ContactEmail: Inventory validation contact email. Required only for 3123 // SetInventoryValidationContact. 3124 ContactEmail string `json:"contactEmail,omitempty"` 3125 3126 // ContactName: Inventory validation contact name. Required only for 3127 // SetInventoryValidationContact. 3128 ContactName string `json:"contactName,omitempty"` 3129 3130 // Country: The country code. Required only for 3131 // RequestInventoryVerification. 3132 Country string `json:"country,omitempty"` 3133 3134 // GmbEmail: The GMB account. Required only for RequestGmbAccess. 3135 GmbEmail string `json:"gmbEmail,omitempty"` 3136 3137 // LiaSettings: The account Lia settings to update. Only defined if the 3138 // method is update. 3139 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 3140 3141 // MerchantId: The ID of the managing account. 3142 MerchantId uint64 `json:"merchantId,omitempty,string"` 3143 3144 Method string `json:"method,omitempty"` 3145 3146 // ForceSendFields is a list of field names (e.g. "AccountId") to 3147 // unconditionally include in API requests. By default, fields with 3148 // empty values are omitted from API requests. However, any non-pointer, 3149 // non-interface field appearing in ForceSendFields will be sent to the 3150 // server regardless of whether the field is empty or not. This may be 3151 // used to include empty fields in Patch requests. 3152 ForceSendFields []string `json:"-"` 3153 3154 // NullFields is a list of field names (e.g. "AccountId") to include in 3155 // API requests with the JSON null value. By default, fields with empty 3156 // values are omitted from API requests. However, any field with an 3157 // empty value appearing in NullFields will be sent to the server as 3158 // null. It is an error if a field in this list has a non-empty value. 3159 // This may be used to include null fields in Patch requests. 3160 NullFields []string `json:"-"` 3161} 3162 3163func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 3164 type NoMethod LiasettingsCustomBatchRequestEntry 3165 raw := NoMethod(*s) 3166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3167} 3168 3169type LiasettingsCustomBatchResponse struct { 3170 // Entries: The result of the execution of the batch requests. 3171 Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` 3172 3173 // Kind: Identifies what kind of resource this is. Value: the fixed 3174 // string "content#liasettingsCustomBatchResponse". 3175 Kind string `json:"kind,omitempty"` 3176 3177 // ServerResponse contains the HTTP response code and headers from the 3178 // server. 3179 googleapi.ServerResponse `json:"-"` 3180 3181 // ForceSendFields is a list of field names (e.g. "Entries") to 3182 // unconditionally include in API requests. By default, fields with 3183 // empty values are omitted from API requests. However, any non-pointer, 3184 // non-interface field appearing in ForceSendFields will be sent to the 3185 // server regardless of whether the field is empty or not. This may be 3186 // used to include empty fields in Patch requests. 3187 ForceSendFields []string `json:"-"` 3188 3189 // NullFields is a list of field names (e.g. "Entries") to include in 3190 // API requests with the JSON null value. By default, fields with empty 3191 // values are omitted from API requests. However, any field with an 3192 // empty value appearing in NullFields will be sent to the server as 3193 // null. It is an error if a field in this list has a non-empty value. 3194 // This may be used to include null fields in Patch requests. 3195 NullFields []string `json:"-"` 3196} 3197 3198func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 3199 type NoMethod LiasettingsCustomBatchResponse 3200 raw := NoMethod(*s) 3201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3202} 3203 3204type LiasettingsCustomBatchResponseEntry struct { 3205 // BatchId: The ID of the request entry to which this entry responds. 3206 BatchId int64 `json:"batchId,omitempty"` 3207 3208 // Errors: A list of errors defined if, and only if, the request failed. 3209 Errors *Errors `json:"errors,omitempty"` 3210 3211 // GmbAccounts: The the list of accessible GMB accounts. 3212 GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` 3213 3214 // Kind: Identifies what kind of resource this is. Value: the fixed 3215 // string "content#liasettingsCustomBatchResponseEntry". 3216 Kind string `json:"kind,omitempty"` 3217 3218 // LiaSettings: The retrieved or updated Lia settings. 3219 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 3220 3221 // ForceSendFields is a list of field names (e.g. "BatchId") to 3222 // unconditionally include in API requests. By default, fields with 3223 // empty values are omitted from API requests. However, any non-pointer, 3224 // non-interface field appearing in ForceSendFields will be sent to the 3225 // server regardless of whether the field is empty or not. This may be 3226 // used to include empty fields in Patch requests. 3227 ForceSendFields []string `json:"-"` 3228 3229 // NullFields is a list of field names (e.g. "BatchId") to include in 3230 // API requests with the JSON null value. By default, fields with empty 3231 // values are omitted from API requests. However, any field with an 3232 // empty value appearing in NullFields will be sent to the server as 3233 // null. It is an error if a field in this list has a non-empty value. 3234 // This may be used to include null fields in Patch requests. 3235 NullFields []string `json:"-"` 3236} 3237 3238func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 3239 type NoMethod LiasettingsCustomBatchResponseEntry 3240 raw := NoMethod(*s) 3241 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3242} 3243 3244type LiasettingsGetAccessibleGmbAccountsResponse struct { 3245 // AccountId: The ID of the account. 3246 AccountId uint64 `json:"accountId,omitempty,string"` 3247 3248 // GmbAccounts: A list of GMB accounts which are available to the 3249 // merchant. 3250 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 3251 3252 // Kind: Identifies what kind of resource this is. Value: the fixed 3253 // string "content#liasettingsGetAccessibleGmbAccountsResponse". 3254 Kind string `json:"kind,omitempty"` 3255 3256 // ServerResponse contains the HTTP response code and headers from the 3257 // server. 3258 googleapi.ServerResponse `json:"-"` 3259 3260 // ForceSendFields is a list of field names (e.g. "AccountId") to 3261 // unconditionally include in API requests. By default, fields with 3262 // empty values are omitted from API requests. However, any non-pointer, 3263 // non-interface field appearing in ForceSendFields will be sent to the 3264 // server regardless of whether the field is empty or not. This may be 3265 // used to include empty fields in Patch requests. 3266 ForceSendFields []string `json:"-"` 3267 3268 // NullFields is a list of field names (e.g. "AccountId") to include in 3269 // API requests with the JSON null value. By default, fields with empty 3270 // values are omitted from API requests. However, any field with an 3271 // empty value appearing in NullFields will be sent to the server as 3272 // null. It is an error if a field in this list has a non-empty value. 3273 // This may be used to include null fields in Patch requests. 3274 NullFields []string `json:"-"` 3275} 3276 3277func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { 3278 type NoMethod LiasettingsGetAccessibleGmbAccountsResponse 3279 raw := NoMethod(*s) 3280 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3281} 3282 3283type LiasettingsListResponse struct { 3284 // Kind: Identifies what kind of resource this is. Value: the fixed 3285 // string "content#liasettingsListResponse". 3286 Kind string `json:"kind,omitempty"` 3287 3288 // NextPageToken: The token for the retrieval of the next page of LIA 3289 // settings. 3290 NextPageToken string `json:"nextPageToken,omitempty"` 3291 3292 Resources []*LiaSettings `json:"resources,omitempty"` 3293 3294 // ServerResponse contains the HTTP response code and headers from the 3295 // server. 3296 googleapi.ServerResponse `json:"-"` 3297 3298 // ForceSendFields is a list of field names (e.g. "Kind") to 3299 // unconditionally include in API requests. By default, fields with 3300 // empty values are omitted from API requests. However, any non-pointer, 3301 // non-interface field appearing in ForceSendFields will be sent to the 3302 // server regardless of whether the field is empty or not. This may be 3303 // used to include empty fields in Patch requests. 3304 ForceSendFields []string `json:"-"` 3305 3306 // NullFields is a list of field names (e.g. "Kind") to include in API 3307 // requests with the JSON null value. By default, fields with empty 3308 // values are omitted from API requests. However, any field with an 3309 // empty value appearing in NullFields will be sent to the server as 3310 // null. It is an error if a field in this list has a non-empty value. 3311 // This may be used to include null fields in Patch requests. 3312 NullFields []string `json:"-"` 3313} 3314 3315func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) { 3316 type NoMethod LiasettingsListResponse 3317 raw := NoMethod(*s) 3318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3319} 3320 3321type LiasettingsRequestGmbAccessResponse struct { 3322 // Kind: Identifies what kind of resource this is. Value: the fixed 3323 // string "content#liasettingsRequestGmbAccessResponse". 3324 Kind string `json:"kind,omitempty"` 3325 3326 // ServerResponse contains the HTTP response code and headers from the 3327 // server. 3328 googleapi.ServerResponse `json:"-"` 3329 3330 // ForceSendFields is a list of field names (e.g. "Kind") to 3331 // unconditionally include in API requests. By default, fields with 3332 // empty values are omitted from API requests. However, any non-pointer, 3333 // non-interface field appearing in ForceSendFields will be sent to the 3334 // server regardless of whether the field is empty or not. This may be 3335 // used to include empty fields in Patch requests. 3336 ForceSendFields []string `json:"-"` 3337 3338 // NullFields is a list of field names (e.g. "Kind") to include in API 3339 // requests with the JSON null value. By default, fields with empty 3340 // values are omitted from API requests. However, any field with an 3341 // empty value appearing in NullFields will be sent to the server as 3342 // null. It is an error if a field in this list has a non-empty value. 3343 // This may be used to include null fields in Patch requests. 3344 NullFields []string `json:"-"` 3345} 3346 3347func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { 3348 type NoMethod LiasettingsRequestGmbAccessResponse 3349 raw := NoMethod(*s) 3350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3351} 3352 3353type LiasettingsRequestInventoryVerificationResponse struct { 3354 // Kind: Identifies what kind of resource this is. Value: the fixed 3355 // string "content#liasettingsRequestInventoryVerificationResponse". 3356 Kind string `json:"kind,omitempty"` 3357 3358 // ServerResponse contains the HTTP response code and headers from the 3359 // server. 3360 googleapi.ServerResponse `json:"-"` 3361 3362 // ForceSendFields is a list of field names (e.g. "Kind") to 3363 // unconditionally include in API requests. By default, fields with 3364 // empty values are omitted from API requests. However, any non-pointer, 3365 // non-interface field appearing in ForceSendFields will be sent to the 3366 // server regardless of whether the field is empty or not. This may be 3367 // used to include empty fields in Patch requests. 3368 ForceSendFields []string `json:"-"` 3369 3370 // NullFields is a list of field names (e.g. "Kind") to include in API 3371 // requests with the JSON null value. By default, fields with empty 3372 // values are omitted from API requests. However, any field with an 3373 // empty value appearing in NullFields will be sent to the server as 3374 // null. It is an error if a field in this list has a non-empty value. 3375 // This may be used to include null fields in Patch requests. 3376 NullFields []string `json:"-"` 3377} 3378 3379func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { 3380 type NoMethod LiasettingsRequestInventoryVerificationResponse 3381 raw := NoMethod(*s) 3382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3383} 3384 3385type LiasettingsSetInventoryVerificationContactResponse struct { 3386 // Kind: Identifies what kind of resource this is. Value: the fixed 3387 // string "content#liasettingsSetInventoryVerificationContactResponse". 3388 Kind string `json:"kind,omitempty"` 3389 3390 // ServerResponse contains the HTTP response code and headers from the 3391 // server. 3392 googleapi.ServerResponse `json:"-"` 3393 3394 // ForceSendFields is a list of field names (e.g. "Kind") to 3395 // unconditionally include in API requests. By default, fields with 3396 // empty values are omitted from API requests. However, any non-pointer, 3397 // non-interface field appearing in ForceSendFields will be sent to the 3398 // server regardless of whether the field is empty or not. This may be 3399 // used to include empty fields in Patch requests. 3400 ForceSendFields []string `json:"-"` 3401 3402 // NullFields is a list of field names (e.g. "Kind") to include in API 3403 // requests with the JSON null value. By default, fields with empty 3404 // values are omitted from API requests. However, any field with an 3405 // empty value appearing in NullFields will be sent to the server as 3406 // null. It is an error if a field in this list has a non-empty value. 3407 // This may be used to include null fields in Patch requests. 3408 NullFields []string `json:"-"` 3409} 3410 3411func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { 3412 type NoMethod LiasettingsSetInventoryVerificationContactResponse 3413 raw := NoMethod(*s) 3414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3415} 3416 3417type LocationIdSet struct { 3418 // LocationIds: A non-empty list of location IDs. They must all be of 3419 // the same location type (e.g., state). 3420 LocationIds []string `json:"locationIds,omitempty"` 3421 3422 // ForceSendFields is a list of field names (e.g. "LocationIds") to 3423 // unconditionally include in API requests. By default, fields with 3424 // empty values are omitted from API requests. However, any non-pointer, 3425 // non-interface field appearing in ForceSendFields will be sent to the 3426 // server regardless of whether the field is empty or not. This may be 3427 // used to include empty fields in Patch requests. 3428 ForceSendFields []string `json:"-"` 3429 3430 // NullFields is a list of field names (e.g. "LocationIds") to include 3431 // in API requests with the JSON null value. By default, fields with 3432 // empty values are omitted from API requests. However, any field with 3433 // an empty value appearing in NullFields will be sent to the server as 3434 // null. It is an error if a field in this list has a non-empty value. 3435 // This may be used to include null fields in Patch requests. 3436 NullFields []string `json:"-"` 3437} 3438 3439func (s *LocationIdSet) MarshalJSON() ([]byte, error) { 3440 type NoMethod LocationIdSet 3441 raw := NoMethod(*s) 3442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3443} 3444 3445type LoyaltyPoints struct { 3446 // Name: Name of loyalty points program. It is recommended to limit the 3447 // name to 12 full-width characters or 24 Roman characters. 3448 Name string `json:"name,omitempty"` 3449 3450 // PointsValue: The retailer's loyalty points in absolute value. 3451 PointsValue int64 `json:"pointsValue,omitempty,string"` 3452 3453 // Ratio: The ratio of a point when converted to currency. Google 3454 // assumes currency based on Merchant Center settings. If ratio is left 3455 // out, it defaults to 1.0. 3456 Ratio float64 `json:"ratio,omitempty"` 3457 3458 // ForceSendFields is a list of field names (e.g. "Name") to 3459 // unconditionally include in API requests. By default, fields with 3460 // empty values are omitted from API requests. However, any non-pointer, 3461 // non-interface field appearing in ForceSendFields will be sent to the 3462 // server regardless of whether the field is empty or not. This may be 3463 // used to include empty fields in Patch requests. 3464 ForceSendFields []string `json:"-"` 3465 3466 // NullFields is a list of field names (e.g. "Name") to include in API 3467 // requests with the JSON null value. By default, fields with empty 3468 // values are omitted from API requests. However, any field with an 3469 // empty value appearing in NullFields will be sent to the server as 3470 // null. It is an error if a field in this list has a non-empty value. 3471 // This may be used to include null fields in Patch requests. 3472 NullFields []string `json:"-"` 3473} 3474 3475func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) { 3476 type NoMethod LoyaltyPoints 3477 raw := NoMethod(*s) 3478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3479} 3480 3481func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { 3482 type NoMethod LoyaltyPoints 3483 var s1 struct { 3484 Ratio gensupport.JSONFloat64 `json:"ratio"` 3485 *NoMethod 3486 } 3487 s1.NoMethod = (*NoMethod)(s) 3488 if err := json.Unmarshal(data, &s1); err != nil { 3489 return err 3490 } 3491 s.Ratio = float64(s1.Ratio) 3492 return nil 3493} 3494 3495type Order struct { 3496 // Acknowledged: Whether the order was acknowledged. 3497 Acknowledged bool `json:"acknowledged,omitempty"` 3498 3499 // ChannelType: The channel type of the order: "purchaseOnGoogle" or 3500 // "googleExpress". 3501 ChannelType string `json:"channelType,omitempty"` 3502 3503 // Customer: The details of the customer who placed the order. 3504 Customer *OrderCustomer `json:"customer,omitempty"` 3505 3506 // DeliveryDetails: The details for the delivery. 3507 DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` 3508 3509 // Id: The REST id of the order. Globally unique. 3510 Id string `json:"id,omitempty"` 3511 3512 // Kind: Identifies what kind of resource this is. Value: the fixed 3513 // string "content#order". 3514 Kind string `json:"kind,omitempty"` 3515 3516 // LineItems: Line items that are ordered. 3517 LineItems []*OrderLineItem `json:"lineItems,omitempty"` 3518 3519 MerchantId uint64 `json:"merchantId,omitempty,string"` 3520 3521 // MerchantOrderId: Merchant-provided id of the order. 3522 MerchantOrderId string `json:"merchantOrderId,omitempty"` 3523 3524 // NetAmount: The net amount for the order. For example, if an order was 3525 // originally for a grand total of $100 and a refund was issued for $20, 3526 // the net amount will be $80. 3527 NetAmount *Price `json:"netAmount,omitempty"` 3528 3529 // PaymentMethod: The details of the payment method. 3530 PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"` 3531 3532 // PaymentStatus: The status of the payment. 3533 PaymentStatus string `json:"paymentStatus,omitempty"` 3534 3535 // PlacedDate: The date when the order was placed, in ISO 8601 format. 3536 PlacedDate string `json:"placedDate,omitempty"` 3537 3538 // Promotions: The details of the merchant provided promotions applied 3539 // to the order. More details about the program are here. 3540 Promotions []*OrderPromotion `json:"promotions,omitempty"` 3541 3542 // Refunds: Refunds for the order. 3543 Refunds []*OrderRefund `json:"refunds,omitempty"` 3544 3545 // Shipments: Shipments of the order. 3546 Shipments []*OrderShipment `json:"shipments,omitempty"` 3547 3548 // ShippingCost: The total cost of shipping for all items. 3549 ShippingCost *Price `json:"shippingCost,omitempty"` 3550 3551 // ShippingCostTax: The tax for the total shipping cost. 3552 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 3553 3554 // ShippingOption: The requested shipping option. 3555 ShippingOption string `json:"shippingOption,omitempty"` 3556 3557 // Status: The status of the order. 3558 Status string `json:"status,omitempty"` 3559 3560 // ServerResponse contains the HTTP response code and headers from the 3561 // server. 3562 googleapi.ServerResponse `json:"-"` 3563 3564 // ForceSendFields is a list of field names (e.g. "Acknowledged") to 3565 // unconditionally include in API requests. By default, fields with 3566 // empty values are omitted from API requests. However, any non-pointer, 3567 // non-interface field appearing in ForceSendFields will be sent to the 3568 // server regardless of whether the field is empty or not. This may be 3569 // used to include empty fields in Patch requests. 3570 ForceSendFields []string `json:"-"` 3571 3572 // NullFields is a list of field names (e.g. "Acknowledged") to include 3573 // in API requests with the JSON null value. By default, fields with 3574 // empty values are omitted from API requests. However, any field with 3575 // an empty value appearing in NullFields will be sent to the server as 3576 // null. It is an error if a field in this list has a non-empty value. 3577 // This may be used to include null fields in Patch requests. 3578 NullFields []string `json:"-"` 3579} 3580 3581func (s *Order) MarshalJSON() ([]byte, error) { 3582 type NoMethod Order 3583 raw := NoMethod(*s) 3584 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3585} 3586 3587type OrderAddress struct { 3588 // Country: CLDR country code (e.g. "US"). 3589 Country string `json:"country,omitempty"` 3590 3591 // FullAddress: Strings representing the lines of the printed label for 3592 // mailing the order, for example: 3593 // John Smith 3594 // 1600 Amphitheatre Parkway 3595 // Mountain View, CA, 94043 3596 // United States 3597 FullAddress []string `json:"fullAddress,omitempty"` 3598 3599 // IsPostOfficeBox: Whether the address is a post office box. 3600 IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` 3601 3602 // Locality: City, town or commune. May also include dependent 3603 // localities or sublocalities (e.g. neighborhoods or suburbs). 3604 Locality string `json:"locality,omitempty"` 3605 3606 // PostalCode: Postal Code or ZIP (e.g. "94043"). 3607 PostalCode string `json:"postalCode,omitempty"` 3608 3609 // RecipientName: Name of the recipient. 3610 RecipientName string `json:"recipientName,omitempty"` 3611 3612 // Region: Top-level administrative subdivision of the country (e.g. 3613 // "CA"). 3614 Region string `json:"region,omitempty"` 3615 3616 // StreetAddress: Street-level part of the address. 3617 StreetAddress []string `json:"streetAddress,omitempty"` 3618 3619 // ForceSendFields is a list of field names (e.g. "Country") to 3620 // unconditionally include in API requests. By default, fields with 3621 // empty values are omitted from API requests. However, any non-pointer, 3622 // non-interface field appearing in ForceSendFields will be sent to the 3623 // server regardless of whether the field is empty or not. This may be 3624 // used to include empty fields in Patch requests. 3625 ForceSendFields []string `json:"-"` 3626 3627 // NullFields is a list of field names (e.g. "Country") to include in 3628 // API requests with the JSON null value. By default, fields with empty 3629 // values are omitted from API requests. However, any field with an 3630 // empty value appearing in NullFields will be sent to the server as 3631 // null. It is an error if a field in this list has a non-empty value. 3632 // This may be used to include null fields in Patch requests. 3633 NullFields []string `json:"-"` 3634} 3635 3636func (s *OrderAddress) MarshalJSON() ([]byte, error) { 3637 type NoMethod OrderAddress 3638 raw := NoMethod(*s) 3639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3640} 3641 3642type OrderCancellation struct { 3643 // Actor: The actor that created the cancellation. 3644 Actor string `json:"actor,omitempty"` 3645 3646 // CreationDate: Date on which the cancellation has been created, in ISO 3647 // 8601 format. 3648 CreationDate string `json:"creationDate,omitempty"` 3649 3650 // Quantity: The quantity that was canceled. 3651 Quantity int64 `json:"quantity,omitempty"` 3652 3653 // Reason: The reason for the cancellation. Orders that are cancelled 3654 // with a noInventory reason will lead to the removal of the product 3655 // from POG until you make an update to that product. This will not 3656 // affect your Shopping ads. 3657 Reason string `json:"reason,omitempty"` 3658 3659 // ReasonText: The explanation of the reason. 3660 ReasonText string `json:"reasonText,omitempty"` 3661 3662 // ForceSendFields is a list of field names (e.g. "Actor") to 3663 // unconditionally include in API requests. By default, fields with 3664 // empty values are omitted from API requests. However, any non-pointer, 3665 // non-interface field appearing in ForceSendFields will be sent to the 3666 // server regardless of whether the field is empty or not. This may be 3667 // used to include empty fields in Patch requests. 3668 ForceSendFields []string `json:"-"` 3669 3670 // NullFields is a list of field names (e.g. "Actor") to include in API 3671 // requests with the JSON null value. By default, fields with empty 3672 // values are omitted from API requests. However, any field with an 3673 // empty value appearing in NullFields will be sent to the server as 3674 // null. It is an error if a field in this list has a non-empty value. 3675 // This may be used to include null fields in Patch requests. 3676 NullFields []string `json:"-"` 3677} 3678 3679func (s *OrderCancellation) MarshalJSON() ([]byte, error) { 3680 type NoMethod OrderCancellation 3681 raw := NoMethod(*s) 3682 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3683} 3684 3685type OrderCustomer struct { 3686 // Email: Email address that should be used for order related 3687 // communications. In certain cases this might not be a real users 3688 // email, but a proxy email. 3689 Email string `json:"email,omitempty"` 3690 3691 // ExplicitMarketingPreference: Deprecated. Please use 3692 // marketingRightsInfo instead. 3693 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 3694 3695 // FullName: Full name of the customer. 3696 FullName string `json:"fullName,omitempty"` 3697 3698 // MarketingRightsInfo: Customer's marketing preferences. 3699 MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 3700 3701 // ForceSendFields is a list of field names (e.g. "Email") to 3702 // unconditionally include in API requests. By default, fields with 3703 // empty values are omitted from API requests. However, any non-pointer, 3704 // non-interface field appearing in ForceSendFields will be sent to the 3705 // server regardless of whether the field is empty or not. This may be 3706 // used to include empty fields in Patch requests. 3707 ForceSendFields []string `json:"-"` 3708 3709 // NullFields is a list of field names (e.g. "Email") to include in API 3710 // requests with the JSON null value. By default, fields with empty 3711 // values are omitted from API requests. However, any field with an 3712 // empty value appearing in NullFields will be sent to the server as 3713 // null. It is an error if a field in this list has a non-empty value. 3714 // This may be used to include null fields in Patch requests. 3715 NullFields []string `json:"-"` 3716} 3717 3718func (s *OrderCustomer) MarshalJSON() ([]byte, error) { 3719 type NoMethod OrderCustomer 3720 raw := NoMethod(*s) 3721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3722} 3723 3724type OrderCustomerMarketingRightsInfo struct { 3725 // ExplicitMarketingPreference: Last known user selection regarding 3726 // marketing preferences. In certain cases this selection might not be 3727 // known, so this field would be empty. 3728 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 3729 3730 // LastUpdatedTimestamp: Timestamp when last time marketing preference 3731 // was updated. Could be empty, if user wasn't offered a selection yet. 3732 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 3733 3734 // MarketingEmailAddress: Email address that can be used for marketing 3735 // purposes. This field is only filled when explicitMarketingPreference 3736 // is equal to 'granted'. 3737 MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` 3738 3739 // ForceSendFields is a list of field names (e.g. 3740 // "ExplicitMarketingPreference") to unconditionally include in API 3741 // requests. By default, fields with empty values are omitted from API 3742 // requests. However, any non-pointer, non-interface field appearing in 3743 // ForceSendFields will be sent to the server regardless of whether the 3744 // field is empty or not. This may be used to include empty fields in 3745 // Patch requests. 3746 ForceSendFields []string `json:"-"` 3747 3748 // NullFields is a list of field names (e.g. 3749 // "ExplicitMarketingPreference") to include in API requests with the 3750 // JSON null value. By default, fields with empty values are omitted 3751 // from API requests. However, any field with an empty value appearing 3752 // in NullFields will be sent to the server as null. It is an error if a 3753 // field in this list has a non-empty value. This may be used to include 3754 // null fields in Patch requests. 3755 NullFields []string `json:"-"` 3756} 3757 3758func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 3759 type NoMethod OrderCustomerMarketingRightsInfo 3760 raw := NoMethod(*s) 3761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3762} 3763 3764type OrderDeliveryDetails struct { 3765 // Address: The delivery address 3766 Address *OrderAddress `json:"address,omitempty"` 3767 3768 // PhoneNumber: The phone number of the person receiving the delivery. 3769 PhoneNumber string `json:"phoneNumber,omitempty"` 3770 3771 // ForceSendFields is a list of field names (e.g. "Address") to 3772 // unconditionally include in API requests. By default, fields with 3773 // empty values are omitted from API requests. However, any non-pointer, 3774 // non-interface field appearing in ForceSendFields will be sent to the 3775 // server regardless of whether the field is empty or not. This may be 3776 // used to include empty fields in Patch requests. 3777 ForceSendFields []string `json:"-"` 3778 3779 // NullFields is a list of field names (e.g. "Address") to include in 3780 // API requests with the JSON null value. By default, fields with empty 3781 // values are omitted from API requests. However, any field with an 3782 // empty value appearing in NullFields will be sent to the server as 3783 // null. It is an error if a field in this list has a non-empty value. 3784 // This may be used to include null fields in Patch requests. 3785 NullFields []string `json:"-"` 3786} 3787 3788func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) { 3789 type NoMethod OrderDeliveryDetails 3790 raw := NoMethod(*s) 3791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3792} 3793 3794type OrderLineItem struct { 3795 // Annotations: Annotations that are attached to the line item. 3796 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 3797 3798 // Cancellations: Cancellations of the line item. 3799 Cancellations []*OrderCancellation `json:"cancellations,omitempty"` 3800 3801 // Id: The id of the line item. 3802 Id string `json:"id,omitempty"` 3803 3804 // Price: Total price for the line item. For example, if two items for 3805 // $10 are purchased, the total price will be $20. 3806 Price *Price `json:"price,omitempty"` 3807 3808 // Product: Product data from the time of the order placement. 3809 Product *OrderLineItemProduct `json:"product,omitempty"` 3810 3811 // QuantityCanceled: Number of items canceled. 3812 QuantityCanceled int64 `json:"quantityCanceled,omitempty"` 3813 3814 // QuantityDelivered: Number of items delivered. 3815 QuantityDelivered int64 `json:"quantityDelivered,omitempty"` 3816 3817 // QuantityOrdered: Number of items ordered. 3818 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 3819 3820 // QuantityPending: Number of items pending. 3821 QuantityPending int64 `json:"quantityPending,omitempty"` 3822 3823 // QuantityReturned: Number of items returned. 3824 QuantityReturned int64 `json:"quantityReturned,omitempty"` 3825 3826 // QuantityShipped: Number of items shipped. 3827 QuantityShipped int64 `json:"quantityShipped,omitempty"` 3828 3829 // ReturnInfo: Details of the return policy for the line item. 3830 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 3831 3832 // Returns: Returns of the line item. 3833 Returns []*OrderReturn `json:"returns,omitempty"` 3834 3835 // ShippingDetails: Details of the requested shipping for the line item. 3836 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 3837 3838 // Tax: Total tax amount for the line item. For example, if two items 3839 // are purchased, and each have a cost tax of $2, the total tax amount 3840 // will be $4. 3841 Tax *Price `json:"tax,omitempty"` 3842 3843 // ForceSendFields is a list of field names (e.g. "Annotations") to 3844 // unconditionally include in API requests. By default, fields with 3845 // empty values are omitted from API requests. However, any non-pointer, 3846 // non-interface field appearing in ForceSendFields will be sent to the 3847 // server regardless of whether the field is empty or not. This may be 3848 // used to include empty fields in Patch requests. 3849 ForceSendFields []string `json:"-"` 3850 3851 // NullFields is a list of field names (e.g. "Annotations") to include 3852 // in API requests with the JSON null value. By default, fields with 3853 // empty values are omitted from API requests. However, any field with 3854 // an empty value appearing in NullFields will be sent to the server as 3855 // null. It is an error if a field in this list has a non-empty value. 3856 // This may be used to include null fields in Patch requests. 3857 NullFields []string `json:"-"` 3858} 3859 3860func (s *OrderLineItem) MarshalJSON() ([]byte, error) { 3861 type NoMethod OrderLineItem 3862 raw := NoMethod(*s) 3863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3864} 3865 3866type OrderLineItemProduct struct { 3867 // Brand: Brand of the item. 3868 Brand string `json:"brand,omitempty"` 3869 3870 // Channel: The item's channel (online or local). 3871 Channel string `json:"channel,omitempty"` 3872 3873 // Condition: Condition or state of the item. 3874 Condition string `json:"condition,omitempty"` 3875 3876 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 3877 ContentLanguage string `json:"contentLanguage,omitempty"` 3878 3879 // Gtin: Global Trade Item Number (GTIN) of the item. 3880 Gtin string `json:"gtin,omitempty"` 3881 3882 // Id: The REST id of the product. 3883 Id string `json:"id,omitempty"` 3884 3885 // ImageLink: URL of an image of the item. 3886 ImageLink string `json:"imageLink,omitempty"` 3887 3888 // ItemGroupId: Shared identifier for all variants of the same product. 3889 ItemGroupId string `json:"itemGroupId,omitempty"` 3890 3891 // Mpn: Manufacturer Part Number (MPN) of the item. 3892 Mpn string `json:"mpn,omitempty"` 3893 3894 // OfferId: An identifier of the item. 3895 OfferId string `json:"offerId,omitempty"` 3896 3897 // Price: Price of the item. 3898 Price *Price `json:"price,omitempty"` 3899 3900 // ShownImage: URL to the cached image shown to the user when order was 3901 // placed. 3902 ShownImage string `json:"shownImage,omitempty"` 3903 3904 // TargetCountry: The CLDR territory code of the target country of the 3905 // product. 3906 TargetCountry string `json:"targetCountry,omitempty"` 3907 3908 // Title: The title of the product. 3909 Title string `json:"title,omitempty"` 3910 3911 // VariantAttributes: Variant attributes for the item. These are 3912 // dimensions of the product, such as color, gender, material, pattern, 3913 // and size. You can find a comprehensive list of variant attributes 3914 // here. 3915 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 3916 3917 // ForceSendFields is a list of field names (e.g. "Brand") to 3918 // unconditionally include in API requests. By default, fields with 3919 // empty values are omitted from API requests. However, any non-pointer, 3920 // non-interface field appearing in ForceSendFields will be sent to the 3921 // server regardless of whether the field is empty or not. This may be 3922 // used to include empty fields in Patch requests. 3923 ForceSendFields []string `json:"-"` 3924 3925 // NullFields is a list of field names (e.g. "Brand") to include in API 3926 // requests with the JSON null value. By default, fields with empty 3927 // values are omitted from API requests. However, any field with an 3928 // empty value appearing in NullFields will be sent to the server as 3929 // null. It is an error if a field in this list has a non-empty value. 3930 // This may be used to include null fields in Patch requests. 3931 NullFields []string `json:"-"` 3932} 3933 3934func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) { 3935 type NoMethod OrderLineItemProduct 3936 raw := NoMethod(*s) 3937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3938} 3939 3940type OrderLineItemProductVariantAttribute struct { 3941 // Dimension: The dimension of the variant. 3942 Dimension string `json:"dimension,omitempty"` 3943 3944 // Value: The value for the dimension. 3945 Value string `json:"value,omitempty"` 3946 3947 // ForceSendFields is a list of field names (e.g. "Dimension") to 3948 // unconditionally include in API requests. By default, fields with 3949 // empty values are omitted from API requests. However, any non-pointer, 3950 // non-interface field appearing in ForceSendFields will be sent to the 3951 // server regardless of whether the field is empty or not. This may be 3952 // used to include empty fields in Patch requests. 3953 ForceSendFields []string `json:"-"` 3954 3955 // NullFields is a list of field names (e.g. "Dimension") to include in 3956 // API requests with the JSON null value. By default, fields with empty 3957 // values are omitted from API requests. However, any field with an 3958 // empty value appearing in NullFields will be sent to the server as 3959 // null. It is an error if a field in this list has a non-empty value. 3960 // This may be used to include null fields in Patch requests. 3961 NullFields []string `json:"-"` 3962} 3963 3964func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { 3965 type NoMethod OrderLineItemProductVariantAttribute 3966 raw := NoMethod(*s) 3967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3968} 3969 3970type OrderLineItemReturnInfo struct { 3971 // DaysToReturn: How many days later the item can be returned. 3972 DaysToReturn int64 `json:"daysToReturn,omitempty"` 3973 3974 // IsReturnable: Whether the item is returnable. 3975 IsReturnable bool `json:"isReturnable,omitempty"` 3976 3977 // PolicyUrl: URL of the item return policy. 3978 PolicyUrl string `json:"policyUrl,omitempty"` 3979 3980 // ForceSendFields is a list of field names (e.g. "DaysToReturn") to 3981 // unconditionally include in API requests. By default, fields with 3982 // empty values are omitted from API requests. However, any non-pointer, 3983 // non-interface field appearing in ForceSendFields will be sent to the 3984 // server regardless of whether the field is empty or not. This may be 3985 // used to include empty fields in Patch requests. 3986 ForceSendFields []string `json:"-"` 3987 3988 // NullFields is a list of field names (e.g. "DaysToReturn") to include 3989 // in API requests with the JSON null value. By default, fields with 3990 // empty values are omitted from API requests. However, any field with 3991 // an empty value appearing in NullFields will be sent to the server as 3992 // null. It is an error if a field in this list has a non-empty value. 3993 // This may be used to include null fields in Patch requests. 3994 NullFields []string `json:"-"` 3995} 3996 3997func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { 3998 type NoMethod OrderLineItemReturnInfo 3999 raw := NoMethod(*s) 4000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4001} 4002 4003type OrderLineItemShippingDetails struct { 4004 // DeliverByDate: The delivery by date, in ISO 8601 format. 4005 DeliverByDate string `json:"deliverByDate,omitempty"` 4006 4007 // Method: Details of the shipping method. 4008 Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` 4009 4010 // ShipByDate: The ship by date, in ISO 8601 format. 4011 ShipByDate string `json:"shipByDate,omitempty"` 4012 4013 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 4014 // unconditionally include in API requests. By default, fields with 4015 // empty values are omitted from API requests. However, any non-pointer, 4016 // non-interface field appearing in ForceSendFields will be sent to the 4017 // server regardless of whether the field is empty or not. This may be 4018 // used to include empty fields in Patch requests. 4019 ForceSendFields []string `json:"-"` 4020 4021 // NullFields is a list of field names (e.g. "DeliverByDate") to include 4022 // in API requests with the JSON null value. By default, fields with 4023 // empty values are omitted from API requests. However, any field with 4024 // an empty value appearing in NullFields will be sent to the server as 4025 // null. It is an error if a field in this list has a non-empty value. 4026 // This may be used to include null fields in Patch requests. 4027 NullFields []string `json:"-"` 4028} 4029 4030func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { 4031 type NoMethod OrderLineItemShippingDetails 4032 raw := NoMethod(*s) 4033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4034} 4035 4036type OrderLineItemShippingDetailsMethod struct { 4037 // Carrier: The carrier for the shipping. Optional. See 4038 // shipments[].carrier for a list of acceptable values. 4039 Carrier string `json:"carrier,omitempty"` 4040 4041 // MaxDaysInTransit: Maximum transit time. 4042 MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` 4043 4044 // MethodName: The name of the shipping method. 4045 MethodName string `json:"methodName,omitempty"` 4046 4047 // MinDaysInTransit: Minimum transit time. 4048 MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` 4049 4050 // ForceSendFields is a list of field names (e.g. "Carrier") to 4051 // unconditionally include in API requests. By default, fields with 4052 // empty values are omitted from API requests. However, any non-pointer, 4053 // non-interface field appearing in ForceSendFields will be sent to the 4054 // server regardless of whether the field is empty or not. This may be 4055 // used to include empty fields in Patch requests. 4056 ForceSendFields []string `json:"-"` 4057 4058 // NullFields is a list of field names (e.g. "Carrier") to include in 4059 // API requests with the JSON null value. By default, fields with empty 4060 // values are omitted from API requests. However, any field with an 4061 // empty value appearing in NullFields will be sent to the server as 4062 // null. It is an error if a field in this list has a non-empty value. 4063 // This may be used to include null fields in Patch requests. 4064 NullFields []string `json:"-"` 4065} 4066 4067func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { 4068 type NoMethod OrderLineItemShippingDetailsMethod 4069 raw := NoMethod(*s) 4070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4071} 4072 4073type OrderMerchantProvidedAnnotation struct { 4074 // Key: Key for additional merchant provided (as key-value pairs) 4075 // annotation about the line item. 4076 Key string `json:"key,omitempty"` 4077 4078 // Value: Value for additional merchant provided (as key-value pairs) 4079 // annotation about the line item. 4080 Value string `json:"value,omitempty"` 4081 4082 // ForceSendFields is a list of field names (e.g. "Key") to 4083 // unconditionally include in API requests. By default, fields with 4084 // empty values are omitted from API requests. However, any non-pointer, 4085 // non-interface field appearing in ForceSendFields will be sent to the 4086 // server regardless of whether the field is empty or not. This may be 4087 // used to include empty fields in Patch requests. 4088 ForceSendFields []string `json:"-"` 4089 4090 // NullFields is a list of field names (e.g. "Key") to include in API 4091 // requests with the JSON null value. By default, fields with empty 4092 // values are omitted from API requests. However, any field with an 4093 // empty value appearing in NullFields will be sent to the server as 4094 // null. It is an error if a field in this list has a non-empty value. 4095 // This may be used to include null fields in Patch requests. 4096 NullFields []string `json:"-"` 4097} 4098 4099func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { 4100 type NoMethod OrderMerchantProvidedAnnotation 4101 raw := NoMethod(*s) 4102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4103} 4104 4105type OrderPaymentMethod struct { 4106 // BillingAddress: The billing address. 4107 BillingAddress *OrderAddress `json:"billingAddress,omitempty"` 4108 4109 // ExpirationMonth: The card expiration month (January = 1, February = 2 4110 // etc.). 4111 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 4112 4113 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 4114 ExpirationYear int64 `json:"expirationYear,omitempty"` 4115 4116 // LastFourDigits: The last four digits of the card number. 4117 LastFourDigits string `json:"lastFourDigits,omitempty"` 4118 4119 // PhoneNumber: The billing phone number. 4120 PhoneNumber string `json:"phoneNumber,omitempty"` 4121 4122 // Type: The type of instrument. 4123 // 4124 // Acceptable values are: 4125 // - "AMEX" 4126 // - "DISCOVER" 4127 // - "JCB" 4128 // - "MASTERCARD" 4129 // - "UNIONPAY" 4130 // - "VISA" 4131 // - "" 4132 Type string `json:"type,omitempty"` 4133 4134 // ForceSendFields is a list of field names (e.g. "BillingAddress") to 4135 // unconditionally include in API requests. By default, fields with 4136 // empty values are omitted from API requests. However, any non-pointer, 4137 // non-interface field appearing in ForceSendFields will be sent to the 4138 // server regardless of whether the field is empty or not. This may be 4139 // used to include empty fields in Patch requests. 4140 ForceSendFields []string `json:"-"` 4141 4142 // NullFields is a list of field names (e.g. "BillingAddress") to 4143 // include in API requests with the JSON null value. By default, fields 4144 // with empty values are omitted from API requests. However, any field 4145 // with an empty value appearing in NullFields will be sent to the 4146 // server as null. It is an error if a field in this list has a 4147 // non-empty value. This may be used to include null fields in Patch 4148 // requests. 4149 NullFields []string `json:"-"` 4150} 4151 4152func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) { 4153 type NoMethod OrderPaymentMethod 4154 raw := NoMethod(*s) 4155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4156} 4157 4158type OrderPromotion struct { 4159 Benefits []*OrderPromotionBenefit `json:"benefits,omitempty"` 4160 4161 // EffectiveDates: The date and time frame when the promotion is active 4162 // and ready for validation review. Note that the promotion live time 4163 // may be delayed for a few hours due to the validation review. 4164 // Start date and end date are separated by a forward slash (/). The 4165 // start date is specified by the format (YYYY-MM-DD), followed by the 4166 // letter ?T?, the time of the day when the sale starts (in Greenwich 4167 // Mean Time, GMT), followed by an expression of the time zone for the 4168 // sale. The end date is in the same format. 4169 EffectiveDates string `json:"effectiveDates,omitempty"` 4170 4171 // GenericRedemptionCode: Optional. The text code that corresponds to 4172 // the promotion when applied on the retailer?s website. 4173 GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` 4174 4175 // Id: The unique ID of the promotion. 4176 Id string `json:"id,omitempty"` 4177 4178 // LongTitle: The full title of the promotion. 4179 LongTitle string `json:"longTitle,omitempty"` 4180 4181 // ProductApplicability: Whether the promotion is applicable to all 4182 // products or only specific products. 4183 ProductApplicability string `json:"productApplicability,omitempty"` 4184 4185 // RedemptionChannel: Indicates that the promotion is valid online. 4186 RedemptionChannel string `json:"redemptionChannel,omitempty"` 4187 4188 // ForceSendFields is a list of field names (e.g. "Benefits") to 4189 // unconditionally include in API requests. By default, fields with 4190 // empty values are omitted from API requests. However, any non-pointer, 4191 // non-interface field appearing in ForceSendFields will be sent to the 4192 // server regardless of whether the field is empty or not. This may be 4193 // used to include empty fields in Patch requests. 4194 ForceSendFields []string `json:"-"` 4195 4196 // NullFields is a list of field names (e.g. "Benefits") to include in 4197 // API requests with the JSON null value. By default, fields with empty 4198 // values are omitted from API requests. However, any field with an 4199 // empty value appearing in NullFields will be sent to the server as 4200 // null. It is an error if a field in this list has a non-empty value. 4201 // This may be used to include null fields in Patch requests. 4202 NullFields []string `json:"-"` 4203} 4204 4205func (s *OrderPromotion) MarshalJSON() ([]byte, error) { 4206 type NoMethod OrderPromotion 4207 raw := NoMethod(*s) 4208 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4209} 4210 4211type OrderPromotionBenefit struct { 4212 // Discount: The discount in the order price when the promotion is 4213 // applied. 4214 Discount *Price `json:"discount,omitempty"` 4215 4216 // OfferIds: The OfferId(s) that were purchased in this order and map to 4217 // this specific benefit of the promotion. 4218 OfferIds []string `json:"offerIds,omitempty"` 4219 4220 // SubType: Further describes the benefit of the promotion. Note that we 4221 // will expand on this enumeration as we support new promotion 4222 // sub-types. 4223 SubType string `json:"subType,omitempty"` 4224 4225 // TaxImpact: The impact on tax when the promotion is applied. 4226 TaxImpact *Price `json:"taxImpact,omitempty"` 4227 4228 // Type: Describes whether the promotion applies to products (e.g. 20% 4229 // off) or to shipping (e.g. Free Shipping). 4230 Type string `json:"type,omitempty"` 4231 4232 // ForceSendFields is a list of field names (e.g. "Discount") to 4233 // unconditionally include in API requests. By default, fields with 4234 // empty values are omitted from API requests. However, any non-pointer, 4235 // non-interface field appearing in ForceSendFields will be sent to the 4236 // server regardless of whether the field is empty or not. This may be 4237 // used to include empty fields in Patch requests. 4238 ForceSendFields []string `json:"-"` 4239 4240 // NullFields is a list of field names (e.g. "Discount") to include in 4241 // API requests with the JSON null value. By default, fields with empty 4242 // values are omitted from API requests. However, any field with an 4243 // empty value appearing in NullFields will be sent to the server as 4244 // null. It is an error if a field in this list has a non-empty value. 4245 // This may be used to include null fields in Patch requests. 4246 NullFields []string `json:"-"` 4247} 4248 4249func (s *OrderPromotionBenefit) MarshalJSON() ([]byte, error) { 4250 type NoMethod OrderPromotionBenefit 4251 raw := NoMethod(*s) 4252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4253} 4254 4255type OrderRefund struct { 4256 // Actor: The actor that created the refund. 4257 Actor string `json:"actor,omitempty"` 4258 4259 // Amount: The amount that is refunded. 4260 Amount *Price `json:"amount,omitempty"` 4261 4262 // CreationDate: Date on which the item has been created, in ISO 8601 4263 // format. 4264 CreationDate string `json:"creationDate,omitempty"` 4265 4266 // Reason: The reason for the refund. 4267 Reason string `json:"reason,omitempty"` 4268 4269 // ReasonText: The explanation of the reason. 4270 ReasonText string `json:"reasonText,omitempty"` 4271 4272 // ForceSendFields is a list of field names (e.g. "Actor") to 4273 // unconditionally include in API requests. By default, fields with 4274 // empty values are omitted from API requests. However, any non-pointer, 4275 // non-interface field appearing in ForceSendFields will be sent to the 4276 // server regardless of whether the field is empty or not. This may be 4277 // used to include empty fields in Patch requests. 4278 ForceSendFields []string `json:"-"` 4279 4280 // NullFields is a list of field names (e.g. "Actor") to include in API 4281 // requests with the JSON null value. By default, fields with empty 4282 // values are omitted from API requests. However, any field with an 4283 // empty value appearing in NullFields will be sent to the server as 4284 // null. It is an error if a field in this list has a non-empty value. 4285 // This may be used to include null fields in Patch requests. 4286 NullFields []string `json:"-"` 4287} 4288 4289func (s *OrderRefund) MarshalJSON() ([]byte, error) { 4290 type NoMethod OrderRefund 4291 raw := NoMethod(*s) 4292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4293} 4294 4295type OrderReturn struct { 4296 // Actor: The actor that created the refund. 4297 Actor string `json:"actor,omitempty"` 4298 4299 // CreationDate: Date on which the item has been created, in ISO 8601 4300 // format. 4301 CreationDate string `json:"creationDate,omitempty"` 4302 4303 // Quantity: Quantity that is returned. 4304 Quantity int64 `json:"quantity,omitempty"` 4305 4306 // Reason: The reason for the return. 4307 Reason string `json:"reason,omitempty"` 4308 4309 // ReasonText: The explanation of the reason. 4310 ReasonText string `json:"reasonText,omitempty"` 4311 4312 // ForceSendFields is a list of field names (e.g. "Actor") to 4313 // unconditionally include in API requests. By default, fields with 4314 // empty values are omitted from API requests. However, any non-pointer, 4315 // non-interface field appearing in ForceSendFields will be sent to the 4316 // server regardless of whether the field is empty or not. This may be 4317 // used to include empty fields in Patch requests. 4318 ForceSendFields []string `json:"-"` 4319 4320 // NullFields is a list of field names (e.g. "Actor") to include in API 4321 // requests with the JSON null value. By default, fields with empty 4322 // values are omitted from API requests. However, any field with an 4323 // empty value appearing in NullFields will be sent to the server as 4324 // null. It is an error if a field in this list has a non-empty value. 4325 // This may be used to include null fields in Patch requests. 4326 NullFields []string `json:"-"` 4327} 4328 4329func (s *OrderReturn) MarshalJSON() ([]byte, error) { 4330 type NoMethod OrderReturn 4331 raw := NoMethod(*s) 4332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4333} 4334 4335type OrderShipment struct { 4336 // Carrier: The carrier handling the shipment. 4337 // 4338 // Acceptable values are: 4339 // - "gsx" 4340 // - "ups" 4341 // - "usps" 4342 // - "fedex" 4343 // - "dhl" 4344 // - "ecourier" 4345 // - "cxt" 4346 // - "google" 4347 // - "ontrac" 4348 // - "emsy" 4349 // - "ont" 4350 // - "deliv" 4351 // - "dynamex" 4352 // - "lasership" 4353 // - "mpx" 4354 // - "uds" 4355 Carrier string `json:"carrier,omitempty"` 4356 4357 // CreationDate: Date on which the shipment has been created, in ISO 4358 // 8601 format. 4359 CreationDate string `json:"creationDate,omitempty"` 4360 4361 // DeliveryDate: Date on which the shipment has been delivered, in ISO 4362 // 8601 format. Present only if status is delievered 4363 DeliveryDate string `json:"deliveryDate,omitempty"` 4364 4365 // Id: The id of the shipment. 4366 Id string `json:"id,omitempty"` 4367 4368 // LineItems: The line items that are shipped. 4369 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 4370 4371 // Status: The status of the shipment. 4372 Status string `json:"status,omitempty"` 4373 4374 // TrackingId: The tracking id for the shipment. 4375 TrackingId string `json:"trackingId,omitempty"` 4376 4377 // ForceSendFields is a list of field names (e.g. "Carrier") to 4378 // unconditionally include in API requests. By default, fields with 4379 // empty values are omitted from API requests. However, any non-pointer, 4380 // non-interface field appearing in ForceSendFields will be sent to the 4381 // server regardless of whether the field is empty or not. This may be 4382 // used to include empty fields in Patch requests. 4383 ForceSendFields []string `json:"-"` 4384 4385 // NullFields is a list of field names (e.g. "Carrier") to include in 4386 // API requests with the JSON null value. By default, fields with empty 4387 // values are omitted from API requests. However, any field with an 4388 // empty value appearing in NullFields will be sent to the server as 4389 // null. It is an error if a field in this list has a non-empty value. 4390 // This may be used to include null fields in Patch requests. 4391 NullFields []string `json:"-"` 4392} 4393 4394func (s *OrderShipment) MarshalJSON() ([]byte, error) { 4395 type NoMethod OrderShipment 4396 raw := NoMethod(*s) 4397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4398} 4399 4400type OrderShipmentLineItemShipment struct { 4401 // LineItemId: The id of the line item that is shipped. Either 4402 // lineItemId or productId is required. 4403 LineItemId string `json:"lineItemId,omitempty"` 4404 4405 // ProductId: The ID of the product to ship. This is the REST ID used in 4406 // the products service. Either lineItemId or productId is required. 4407 ProductId string `json:"productId,omitempty"` 4408 4409 // Quantity: The quantity that is shipped. 4410 Quantity int64 `json:"quantity,omitempty"` 4411 4412 // ForceSendFields is a list of field names (e.g. "LineItemId") to 4413 // unconditionally include in API requests. By default, fields with 4414 // empty values are omitted from API requests. However, any non-pointer, 4415 // non-interface field appearing in ForceSendFields will be sent to the 4416 // server regardless of whether the field is empty or not. This may be 4417 // used to include empty fields in Patch requests. 4418 ForceSendFields []string `json:"-"` 4419 4420 // NullFields is a list of field names (e.g. "LineItemId") to include in 4421 // API requests with the JSON null value. By default, fields with empty 4422 // values are omitted from API requests. However, any field with an 4423 // empty value appearing in NullFields will be sent to the server as 4424 // null. It is an error if a field in this list has a non-empty value. 4425 // This may be used to include null fields in Patch requests. 4426 NullFields []string `json:"-"` 4427} 4428 4429func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { 4430 type NoMethod OrderShipmentLineItemShipment 4431 raw := NoMethod(*s) 4432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4433} 4434 4435type OrdersAcknowledgeRequest struct { 4436 // OperationId: The ID of the operation. Unique across all operations 4437 // for a given order. 4438 OperationId string `json:"operationId,omitempty"` 4439 4440 // ForceSendFields is a list of field names (e.g. "OperationId") to 4441 // unconditionally include in API requests. By default, fields with 4442 // empty values are omitted from API requests. However, any non-pointer, 4443 // non-interface field appearing in ForceSendFields will be sent to the 4444 // server regardless of whether the field is empty or not. This may be 4445 // used to include empty fields in Patch requests. 4446 ForceSendFields []string `json:"-"` 4447 4448 // NullFields is a list of field names (e.g. "OperationId") to include 4449 // in API requests with the JSON null value. By default, fields with 4450 // empty values are omitted from API requests. However, any field with 4451 // an empty value appearing in NullFields will be sent to the server as 4452 // null. It is an error if a field in this list has a non-empty value. 4453 // This may be used to include null fields in Patch requests. 4454 NullFields []string `json:"-"` 4455} 4456 4457func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { 4458 type NoMethod OrdersAcknowledgeRequest 4459 raw := NoMethod(*s) 4460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4461} 4462 4463type OrdersAcknowledgeResponse struct { 4464 // ExecutionStatus: The status of the execution. 4465 ExecutionStatus string `json:"executionStatus,omitempty"` 4466 4467 // Kind: Identifies what kind of resource this is. Value: the fixed 4468 // string "content#ordersAcknowledgeResponse". 4469 Kind string `json:"kind,omitempty"` 4470 4471 // ServerResponse contains the HTTP response code and headers from the 4472 // server. 4473 googleapi.ServerResponse `json:"-"` 4474 4475 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 4476 // unconditionally include in API requests. By default, fields with 4477 // empty values are omitted from API requests. However, any non-pointer, 4478 // non-interface field appearing in ForceSendFields will be sent to the 4479 // server regardless of whether the field is empty or not. This may be 4480 // used to include empty fields in Patch requests. 4481 ForceSendFields []string `json:"-"` 4482 4483 // NullFields is a list of field names (e.g. "ExecutionStatus") to 4484 // include in API requests with the JSON null value. By default, fields 4485 // with empty values are omitted from API requests. However, any field 4486 // with an empty value appearing in NullFields will be sent to the 4487 // server as null. It is an error if a field in this list has a 4488 // non-empty value. This may be used to include null fields in Patch 4489 // requests. 4490 NullFields []string `json:"-"` 4491} 4492 4493func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { 4494 type NoMethod OrdersAcknowledgeResponse 4495 raw := NoMethod(*s) 4496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4497} 4498 4499type OrdersAdvanceTestOrderResponse struct { 4500 // Kind: Identifies what kind of resource this is. Value: the fixed 4501 // string "content#ordersAdvanceTestOrderResponse". 4502 Kind string `json:"kind,omitempty"` 4503 4504 // ServerResponse contains the HTTP response code and headers from the 4505 // server. 4506 googleapi.ServerResponse `json:"-"` 4507 4508 // ForceSendFields is a list of field names (e.g. "Kind") to 4509 // unconditionally include in API requests. By default, fields with 4510 // empty values are omitted from API requests. However, any non-pointer, 4511 // non-interface field appearing in ForceSendFields will be sent to the 4512 // server regardless of whether the field is empty or not. This may be 4513 // used to include empty fields in Patch requests. 4514 ForceSendFields []string `json:"-"` 4515 4516 // NullFields is a list of field names (e.g. "Kind") to include in API 4517 // requests with the JSON null value. By default, fields with empty 4518 // values are omitted from API requests. However, any field with an 4519 // empty value appearing in NullFields will be sent to the server as 4520 // null. It is an error if a field in this list has a non-empty value. 4521 // This may be used to include null fields in Patch requests. 4522 NullFields []string `json:"-"` 4523} 4524 4525func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { 4526 type NoMethod OrdersAdvanceTestOrderResponse 4527 raw := NoMethod(*s) 4528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4529} 4530 4531type OrdersCancelLineItemRequest struct { 4532 // Amount: Amount to refund for the cancelation. Optional. If not set, 4533 // Google will calculate the default based on the price and tax of the 4534 // items involved. The amount must not be larger than the net amount 4535 // left on the order. 4536 Amount *Price `json:"amount,omitempty"` 4537 4538 // AmountPretax: Amount to refund for the cancelation. Optional. If not 4539 // set, Google will calculate the default based on the price and tax of 4540 // the items involved. The amount must not be larger than the net amount 4541 // left on the order. 4542 AmountPretax *Price `json:"amountPretax,omitempty"` 4543 4544 // AmountTax: Tax amount that correspond to cancellation amount in 4545 // amountPretax. 4546 AmountTax *Price `json:"amountTax,omitempty"` 4547 4548 // LineItemId: The ID of the line item to cancel. Either lineItemId or 4549 // productId is required. 4550 LineItemId string `json:"lineItemId,omitempty"` 4551 4552 // OperationId: The ID of the operation. Unique across all operations 4553 // for a given order. 4554 OperationId string `json:"operationId,omitempty"` 4555 4556 // ProductId: The ID of the product to cancel. This is the REST ID used 4557 // in the products service. Either lineItemId or productId is required. 4558 ProductId string `json:"productId,omitempty"` 4559 4560 // Quantity: The quantity to cancel. 4561 Quantity int64 `json:"quantity,omitempty"` 4562 4563 // Reason: The reason for the cancellation. 4564 Reason string `json:"reason,omitempty"` 4565 4566 // ReasonText: The explanation of the reason. 4567 ReasonText string `json:"reasonText,omitempty"` 4568 4569 // ForceSendFields is a list of field names (e.g. "Amount") to 4570 // unconditionally include in API requests. By default, fields with 4571 // empty values are omitted from API requests. However, any non-pointer, 4572 // non-interface field appearing in ForceSendFields will be sent to the 4573 // server regardless of whether the field is empty or not. This may be 4574 // used to include empty fields in Patch requests. 4575 ForceSendFields []string `json:"-"` 4576 4577 // NullFields is a list of field names (e.g. "Amount") to include in API 4578 // requests with the JSON null value. By default, fields with empty 4579 // values are omitted from API requests. However, any field with an 4580 // empty value appearing in NullFields will be sent to the server as 4581 // null. It is an error if a field in this list has a non-empty value. 4582 // This may be used to include null fields in Patch requests. 4583 NullFields []string `json:"-"` 4584} 4585 4586func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { 4587 type NoMethod OrdersCancelLineItemRequest 4588 raw := NoMethod(*s) 4589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4590} 4591 4592type OrdersCancelLineItemResponse struct { 4593 // ExecutionStatus: The status of the execution. 4594 ExecutionStatus string `json:"executionStatus,omitempty"` 4595 4596 // Kind: Identifies what kind of resource this is. Value: the fixed 4597 // string "content#ordersCancelLineItemResponse". 4598 Kind string `json:"kind,omitempty"` 4599 4600 // ServerResponse contains the HTTP response code and headers from the 4601 // server. 4602 googleapi.ServerResponse `json:"-"` 4603 4604 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 4605 // unconditionally include in API requests. By default, fields with 4606 // empty values are omitted from API requests. However, any non-pointer, 4607 // non-interface field appearing in ForceSendFields will be sent to the 4608 // server regardless of whether the field is empty or not. This may be 4609 // used to include empty fields in Patch requests. 4610 ForceSendFields []string `json:"-"` 4611 4612 // NullFields is a list of field names (e.g. "ExecutionStatus") to 4613 // include in API requests with the JSON null value. By default, fields 4614 // with empty values are omitted from API requests. However, any field 4615 // with an empty value appearing in NullFields will be sent to the 4616 // server as null. It is an error if a field in this list has a 4617 // non-empty value. This may be used to include null fields in Patch 4618 // requests. 4619 NullFields []string `json:"-"` 4620} 4621 4622func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { 4623 type NoMethod OrdersCancelLineItemResponse 4624 raw := NoMethod(*s) 4625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4626} 4627 4628type OrdersCancelRequest struct { 4629 // OperationId: The ID of the operation. Unique across all operations 4630 // for a given order. 4631 OperationId string `json:"operationId,omitempty"` 4632 4633 // Reason: The reason for the cancellation. 4634 Reason string `json:"reason,omitempty"` 4635 4636 // ReasonText: The explanation of the reason. 4637 ReasonText string `json:"reasonText,omitempty"` 4638 4639 // ForceSendFields is a list of field names (e.g. "OperationId") to 4640 // unconditionally include in API requests. By default, fields with 4641 // empty values are omitted from API requests. However, any non-pointer, 4642 // non-interface field appearing in ForceSendFields will be sent to the 4643 // server regardless of whether the field is empty or not. This may be 4644 // used to include empty fields in Patch requests. 4645 ForceSendFields []string `json:"-"` 4646 4647 // NullFields is a list of field names (e.g. "OperationId") to include 4648 // in API requests with the JSON null value. By default, fields with 4649 // empty values are omitted from API requests. However, any field with 4650 // an empty value appearing in NullFields will be sent to the server as 4651 // null. It is an error if a field in this list has a non-empty value. 4652 // This may be used to include null fields in Patch requests. 4653 NullFields []string `json:"-"` 4654} 4655 4656func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) { 4657 type NoMethod OrdersCancelRequest 4658 raw := NoMethod(*s) 4659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4660} 4661 4662type OrdersCancelResponse struct { 4663 // ExecutionStatus: The status of the execution. 4664 ExecutionStatus string `json:"executionStatus,omitempty"` 4665 4666 // Kind: Identifies what kind of resource this is. Value: the fixed 4667 // string "content#ordersCancelResponse". 4668 Kind string `json:"kind,omitempty"` 4669 4670 // ServerResponse contains the HTTP response code and headers from the 4671 // server. 4672 googleapi.ServerResponse `json:"-"` 4673 4674 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 4675 // unconditionally include in API requests. By default, fields with 4676 // empty values are omitted from API requests. However, any non-pointer, 4677 // non-interface field appearing in ForceSendFields will be sent to the 4678 // server regardless of whether the field is empty or not. This may be 4679 // used to include empty fields in Patch requests. 4680 ForceSendFields []string `json:"-"` 4681 4682 // NullFields is a list of field names (e.g. "ExecutionStatus") to 4683 // include in API requests with the JSON null value. By default, fields 4684 // with empty values are omitted from API requests. However, any field 4685 // with an empty value appearing in NullFields will be sent to the 4686 // server as null. It is an error if a field in this list has a 4687 // non-empty value. This may be used to include null fields in Patch 4688 // requests. 4689 NullFields []string `json:"-"` 4690} 4691 4692func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) { 4693 type NoMethod OrdersCancelResponse 4694 raw := NoMethod(*s) 4695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4696} 4697 4698type OrdersCreateTestOrderRequest struct { 4699 // TemplateName: The test order template to use. Specify as an 4700 // alternative to testOrder as a shortcut for retrieving a template and 4701 // then creating an order using that template. 4702 TemplateName string `json:"templateName,omitempty"` 4703 4704 // TestOrder: The test order to create. 4705 TestOrder *TestOrder `json:"testOrder,omitempty"` 4706 4707 // ForceSendFields is a list of field names (e.g. "TemplateName") to 4708 // unconditionally include in API requests. By default, fields with 4709 // empty values are omitted from API requests. However, any non-pointer, 4710 // non-interface field appearing in ForceSendFields will be sent to the 4711 // server regardless of whether the field is empty or not. This may be 4712 // used to include empty fields in Patch requests. 4713 ForceSendFields []string `json:"-"` 4714 4715 // NullFields is a list of field names (e.g. "TemplateName") to include 4716 // in API requests with the JSON null value. By default, fields with 4717 // empty values are omitted from API requests. However, any field with 4718 // an empty value appearing in NullFields will be sent to the server as 4719 // null. It is an error if a field in this list has a non-empty value. 4720 // This may be used to include null fields in Patch requests. 4721 NullFields []string `json:"-"` 4722} 4723 4724func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { 4725 type NoMethod OrdersCreateTestOrderRequest 4726 raw := NoMethod(*s) 4727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4728} 4729 4730type OrdersCreateTestOrderResponse struct { 4731 // Kind: Identifies what kind of resource this is. Value: the fixed 4732 // string "content#ordersCreateTestOrderResponse". 4733 Kind string `json:"kind,omitempty"` 4734 4735 // OrderId: The ID of the newly created test order. 4736 OrderId string `json:"orderId,omitempty"` 4737 4738 // ServerResponse contains the HTTP response code and headers from the 4739 // server. 4740 googleapi.ServerResponse `json:"-"` 4741 4742 // ForceSendFields is a list of field names (e.g. "Kind") to 4743 // unconditionally include in API requests. By default, fields with 4744 // empty values are omitted from API requests. However, any non-pointer, 4745 // non-interface field appearing in ForceSendFields will be sent to the 4746 // server regardless of whether the field is empty or not. This may be 4747 // used to include empty fields in Patch requests. 4748 ForceSendFields []string `json:"-"` 4749 4750 // NullFields is a list of field names (e.g. "Kind") to include in API 4751 // requests with the JSON null value. By default, fields with empty 4752 // values are omitted from API requests. However, any field with an 4753 // empty value appearing in NullFields will be sent to the server as 4754 // null. It is an error if a field in this list has a non-empty value. 4755 // This may be used to include null fields in Patch requests. 4756 NullFields []string `json:"-"` 4757} 4758 4759func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { 4760 type NoMethod OrdersCreateTestOrderResponse 4761 raw := NoMethod(*s) 4762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4763} 4764 4765type OrdersCustomBatchRequest struct { 4766 // Entries: The request entries to be processed in the batch. 4767 Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"` 4768 4769 // ForceSendFields is a list of field names (e.g. "Entries") to 4770 // unconditionally include in API requests. By default, fields with 4771 // empty values are omitted from API requests. However, any non-pointer, 4772 // non-interface field appearing in ForceSendFields will be sent to the 4773 // server regardless of whether the field is empty or not. This may be 4774 // used to include empty fields in Patch requests. 4775 ForceSendFields []string `json:"-"` 4776 4777 // NullFields is a list of field names (e.g. "Entries") to include in 4778 // API requests with the JSON null value. By default, fields with empty 4779 // values are omitted from API requests. However, any field with an 4780 // empty value appearing in NullFields will be sent to the server as 4781 // null. It is an error if a field in this list has a non-empty value. 4782 // This may be used to include null fields in Patch requests. 4783 NullFields []string `json:"-"` 4784} 4785 4786func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) { 4787 type NoMethod OrdersCustomBatchRequest 4788 raw := NoMethod(*s) 4789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4790} 4791 4792type OrdersCustomBatchRequestEntry struct { 4793 // BatchId: An entry ID, unique within the batch request. 4794 BatchId int64 `json:"batchId,omitempty"` 4795 4796 // Cancel: Required for cancel method. 4797 Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"` 4798 4799 // CancelLineItem: Required for cancelLineItem method. 4800 CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"` 4801 4802 // InStoreRefundLineItem: Required for inStoreReturnLineItem method. 4803 InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"` 4804 4805 // MerchantId: The ID of the managing account. 4806 MerchantId uint64 `json:"merchantId,omitempty,string"` 4807 4808 // MerchantOrderId: The merchant order id. Required for 4809 // updateMerchantOrderId and getByMerchantOrderId methods. 4810 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4811 4812 // Method: The method to apply. 4813 Method string `json:"method,omitempty"` 4814 4815 // OperationId: The ID of the operation. Unique across all operations 4816 // for a given order. Required for all methods beside get and 4817 // getByMerchantOrderId. 4818 OperationId string `json:"operationId,omitempty"` 4819 4820 // OrderId: The ID of the order. Required for all methods beside 4821 // getByMerchantOrderId. 4822 OrderId string `json:"orderId,omitempty"` 4823 4824 // Refund: Required for refund method. 4825 Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"` 4826 4827 // RejectReturnLineItem: Required for rejectReturnLineItem method. 4828 RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"` 4829 4830 // ReturnLineItem: Required for returnLineItem method. 4831 ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"` 4832 4833 // ReturnRefundLineItem: Required for returnRefundLineItem method. 4834 ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"` 4835 4836 // SetLineItemMetadata: Required for setLineItemMetadata method. 4837 SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"` 4838 4839 // ShipLineItems: Required for shipLineItems method. 4840 ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"` 4841 4842 // UpdateLineItemShippingDetails: Required for 4843 // updateLineItemShippingDate method. 4844 UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"` 4845 4846 // UpdateShipment: Required for updateShipment method. 4847 UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"` 4848 4849 // ForceSendFields is a list of field names (e.g. "BatchId") to 4850 // unconditionally include in API requests. By default, fields with 4851 // empty values are omitted from API requests. However, any non-pointer, 4852 // non-interface field appearing in ForceSendFields will be sent to the 4853 // server regardless of whether the field is empty or not. This may be 4854 // used to include empty fields in Patch requests. 4855 ForceSendFields []string `json:"-"` 4856 4857 // NullFields is a list of field names (e.g. "BatchId") to include in 4858 // API requests with the JSON null value. By default, fields with empty 4859 // values are omitted from API requests. However, any field with an 4860 // empty value appearing in NullFields will be sent to the server as 4861 // null. It is an error if a field in this list has a non-empty value. 4862 // This may be used to include null fields in Patch requests. 4863 NullFields []string `json:"-"` 4864} 4865 4866func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 4867 type NoMethod OrdersCustomBatchRequestEntry 4868 raw := NoMethod(*s) 4869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4870} 4871 4872type OrdersCustomBatchRequestEntryCancel struct { 4873 // Reason: The reason for the cancellation. 4874 Reason string `json:"reason,omitempty"` 4875 4876 // ReasonText: The explanation of the reason. 4877 ReasonText string `json:"reasonText,omitempty"` 4878 4879 // ForceSendFields is a list of field names (e.g. "Reason") to 4880 // unconditionally include in API requests. By default, fields with 4881 // empty values are omitted from API requests. However, any non-pointer, 4882 // non-interface field appearing in ForceSendFields will be sent to the 4883 // server regardless of whether the field is empty or not. This may be 4884 // used to include empty fields in Patch requests. 4885 ForceSendFields []string `json:"-"` 4886 4887 // NullFields is a list of field names (e.g. "Reason") to include in API 4888 // requests with the JSON null value. By default, fields with empty 4889 // values are omitted from API requests. However, any field with an 4890 // empty value appearing in NullFields will be sent to the server as 4891 // null. It is an error if a field in this list has a non-empty value. 4892 // This may be used to include null fields in Patch requests. 4893 NullFields []string `json:"-"` 4894} 4895 4896func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) { 4897 type NoMethod OrdersCustomBatchRequestEntryCancel 4898 raw := NoMethod(*s) 4899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4900} 4901 4902type OrdersCustomBatchRequestEntryCancelLineItem struct { 4903 // Amount: Amount to refund for the cancelation. Optional. If not set, 4904 // Google will calculate the default based on the price and tax of the 4905 // items involved. The amount must not be larger than the net amount 4906 // left on the order. 4907 Amount *Price `json:"amount,omitempty"` 4908 4909 // AmountPretax: Amount to refund for the cancelation. Optional. If not 4910 // set, Google will calculate the default based on the price and tax of 4911 // the items involved. The amount must not be larger than the net amount 4912 // left on the order. 4913 AmountPretax *Price `json:"amountPretax,omitempty"` 4914 4915 // AmountTax: Tax amount that correspond to cancellation amount in 4916 // amountPretax. 4917 AmountTax *Price `json:"amountTax,omitempty"` 4918 4919 // LineItemId: The ID of the line item to cancel. Either lineItemId or 4920 // productId is required. 4921 LineItemId string `json:"lineItemId,omitempty"` 4922 4923 // ProductId: The ID of the product to cancel. This is the REST ID used 4924 // in the products service. Either lineItemId or productId is required. 4925 ProductId string `json:"productId,omitempty"` 4926 4927 // Quantity: The quantity to cancel. 4928 Quantity int64 `json:"quantity,omitempty"` 4929 4930 // Reason: The reason for the cancellation. 4931 Reason string `json:"reason,omitempty"` 4932 4933 // ReasonText: The explanation of the reason. 4934 ReasonText string `json:"reasonText,omitempty"` 4935 4936 // ForceSendFields is a list of field names (e.g. "Amount") to 4937 // unconditionally include in API requests. By default, fields with 4938 // empty values are omitted from API requests. However, any non-pointer, 4939 // non-interface field appearing in ForceSendFields will be sent to the 4940 // server regardless of whether the field is empty or not. This may be 4941 // used to include empty fields in Patch requests. 4942 ForceSendFields []string `json:"-"` 4943 4944 // NullFields is a list of field names (e.g. "Amount") to include in API 4945 // requests with the JSON null value. By default, fields with empty 4946 // values are omitted from API requests. However, any field with an 4947 // empty value appearing in NullFields will be sent to the server as 4948 // null. It is an error if a field in this list has a non-empty value. 4949 // This may be used to include null fields in Patch requests. 4950 NullFields []string `json:"-"` 4951} 4952 4953func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) { 4954 type NoMethod OrdersCustomBatchRequestEntryCancelLineItem 4955 raw := NoMethod(*s) 4956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4957} 4958 4959type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct { 4960 // AmountPretax: The amount that is refunded. Required. 4961 AmountPretax *Price `json:"amountPretax,omitempty"` 4962 4963 // AmountTax: Tax amount that correspond to refund amount in 4964 // amountPretax. Required. 4965 AmountTax *Price `json:"amountTax,omitempty"` 4966 4967 // LineItemId: The ID of the line item to return. Either lineItemId or 4968 // productId is required. 4969 LineItemId string `json:"lineItemId,omitempty"` 4970 4971 // ProductId: The ID of the product to return. This is the REST ID used 4972 // in the products service. Either lineItemId or productId is required. 4973 ProductId string `json:"productId,omitempty"` 4974 4975 // Quantity: The quantity to return and refund. 4976 Quantity int64 `json:"quantity,omitempty"` 4977 4978 // Reason: The reason for the return. 4979 Reason string `json:"reason,omitempty"` 4980 4981 // ReasonText: The explanation of the reason. 4982 ReasonText string `json:"reasonText,omitempty"` 4983 4984 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 4985 // unconditionally include in API requests. By default, fields with 4986 // empty values are omitted from API requests. However, any non-pointer, 4987 // non-interface field appearing in ForceSendFields will be sent to the 4988 // server regardless of whether the field is empty or not. This may be 4989 // used to include empty fields in Patch requests. 4990 ForceSendFields []string `json:"-"` 4991 4992 // NullFields is a list of field names (e.g. "AmountPretax") to include 4993 // in API requests with the JSON null value. By default, fields with 4994 // empty values are omitted from API requests. However, any field with 4995 // an empty value appearing in NullFields will be sent to the server as 4996 // null. It is an error if a field in this list has a non-empty value. 4997 // This may be used to include null fields in Patch requests. 4998 NullFields []string `json:"-"` 4999} 5000 5001func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) { 5002 type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem 5003 raw := NoMethod(*s) 5004 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5005} 5006 5007type OrdersCustomBatchRequestEntryRefund struct { 5008 // Amount: The amount that is refunded. 5009 Amount *Price `json:"amount,omitempty"` 5010 5011 // AmountPretax: The amount that is refunded. Either amount or 5012 // amountPretax and amountTax should be filled. 5013 AmountPretax *Price `json:"amountPretax,omitempty"` 5014 5015 // AmountTax: Tax amount that correspond to refund amount in 5016 // amountPretax. 5017 AmountTax *Price `json:"amountTax,omitempty"` 5018 5019 // Reason: The reason for the refund. 5020 Reason string `json:"reason,omitempty"` 5021 5022 // ReasonText: The explanation of the reason. 5023 ReasonText string `json:"reasonText,omitempty"` 5024 5025 // ForceSendFields is a list of field names (e.g. "Amount") to 5026 // unconditionally include in API requests. By default, fields with 5027 // empty values are omitted from API requests. However, any non-pointer, 5028 // non-interface field appearing in ForceSendFields will be sent to the 5029 // server regardless of whether the field is empty or not. This may be 5030 // used to include empty fields in Patch requests. 5031 ForceSendFields []string `json:"-"` 5032 5033 // NullFields is a list of field names (e.g. "Amount") to include in API 5034 // requests with the JSON null value. By default, fields with empty 5035 // values are omitted from API requests. However, any field with an 5036 // empty value appearing in NullFields will be sent to the server as 5037 // null. It is an error if a field in this list has a non-empty value. 5038 // This may be used to include null fields in Patch requests. 5039 NullFields []string `json:"-"` 5040} 5041 5042func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) { 5043 type NoMethod OrdersCustomBatchRequestEntryRefund 5044 raw := NoMethod(*s) 5045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5046} 5047 5048type OrdersCustomBatchRequestEntryRejectReturnLineItem struct { 5049 // LineItemId: The ID of the line item to return. Either lineItemId or 5050 // productId is required. 5051 LineItemId string `json:"lineItemId,omitempty"` 5052 5053 // ProductId: The ID of the product to return. This is the REST ID used 5054 // in the products service. Either lineItemId or productId is required. 5055 ProductId string `json:"productId,omitempty"` 5056 5057 // Quantity: The quantity to return and refund. 5058 Quantity int64 `json:"quantity,omitempty"` 5059 5060 // Reason: The reason for the return. 5061 Reason string `json:"reason,omitempty"` 5062 5063 // ReasonText: The explanation of the reason. 5064 ReasonText string `json:"reasonText,omitempty"` 5065 5066 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5067 // unconditionally include in API requests. By default, fields with 5068 // empty values are omitted from API requests. However, any non-pointer, 5069 // non-interface field appearing in ForceSendFields will be sent to the 5070 // server regardless of whether the field is empty or not. This may be 5071 // used to include empty fields in Patch requests. 5072 ForceSendFields []string `json:"-"` 5073 5074 // NullFields is a list of field names (e.g. "LineItemId") to include in 5075 // API requests with the JSON null value. By default, fields with empty 5076 // values are omitted from API requests. However, any field with an 5077 // empty value appearing in NullFields will be sent to the server as 5078 // null. It is an error if a field in this list has a non-empty value. 5079 // This may be used to include null fields in Patch requests. 5080 NullFields []string `json:"-"` 5081} 5082 5083func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) { 5084 type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem 5085 raw := NoMethod(*s) 5086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5087} 5088 5089type OrdersCustomBatchRequestEntryReturnLineItem struct { 5090 // LineItemId: The ID of the line item to return. Either lineItemId or 5091 // productId is required. 5092 LineItemId string `json:"lineItemId,omitempty"` 5093 5094 // ProductId: The ID of the product to return. This is the REST ID used 5095 // in the products service. Either lineItemId or productId is required. 5096 ProductId string `json:"productId,omitempty"` 5097 5098 // Quantity: The quantity to return. 5099 Quantity int64 `json:"quantity,omitempty"` 5100 5101 // Reason: The reason for the return. 5102 Reason string `json:"reason,omitempty"` 5103 5104 // ReasonText: The explanation of the reason. 5105 ReasonText string `json:"reasonText,omitempty"` 5106 5107 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5108 // unconditionally include in API requests. By default, fields with 5109 // empty values are omitted from API requests. However, any non-pointer, 5110 // non-interface field appearing in ForceSendFields will be sent to the 5111 // server regardless of whether the field is empty or not. This may be 5112 // used to include empty fields in Patch requests. 5113 ForceSendFields []string `json:"-"` 5114 5115 // NullFields is a list of field names (e.g. "LineItemId") to include in 5116 // API requests with the JSON null value. By default, fields with empty 5117 // values are omitted from API requests. However, any field with an 5118 // empty value appearing in NullFields will be sent to the server as 5119 // null. It is an error if a field in this list has a non-empty value. 5120 // This may be used to include null fields in Patch requests. 5121 NullFields []string `json:"-"` 5122} 5123 5124func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) { 5125 type NoMethod OrdersCustomBatchRequestEntryReturnLineItem 5126 raw := NoMethod(*s) 5127 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5128} 5129 5130type OrdersCustomBatchRequestEntryReturnRefundLineItem struct { 5131 // AmountPretax: The amount that is refunded. Optional, but if filled 5132 // then both amountPretax and amountTax must be set. 5133 AmountPretax *Price `json:"amountPretax,omitempty"` 5134 5135 // AmountTax: Tax amount that correspond to refund amount in 5136 // amountPretax. 5137 AmountTax *Price `json:"amountTax,omitempty"` 5138 5139 // LineItemId: The ID of the line item to return. Either lineItemId or 5140 // productId is required. 5141 LineItemId string `json:"lineItemId,omitempty"` 5142 5143 // ProductId: The ID of the product to return. This is the REST ID used 5144 // in the products service. Either lineItemId or productId is required. 5145 ProductId string `json:"productId,omitempty"` 5146 5147 // Quantity: The quantity to return and refund. 5148 Quantity int64 `json:"quantity,omitempty"` 5149 5150 // Reason: The reason for the return. 5151 Reason string `json:"reason,omitempty"` 5152 5153 // ReasonText: The explanation of the reason. 5154 ReasonText string `json:"reasonText,omitempty"` 5155 5156 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 5157 // unconditionally include in API requests. By default, fields with 5158 // empty values are omitted from API requests. However, any non-pointer, 5159 // non-interface field appearing in ForceSendFields will be sent to the 5160 // server regardless of whether the field is empty or not. This may be 5161 // used to include empty fields in Patch requests. 5162 ForceSendFields []string `json:"-"` 5163 5164 // NullFields is a list of field names (e.g. "AmountPretax") to include 5165 // in API requests with the JSON null value. By default, fields with 5166 // empty values are omitted from API requests. However, any field with 5167 // an empty value appearing in NullFields will be sent to the server as 5168 // null. It is an error if a field in this list has a non-empty value. 5169 // This may be used to include null fields in Patch requests. 5170 NullFields []string `json:"-"` 5171} 5172 5173func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) { 5174 type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem 5175 raw := NoMethod(*s) 5176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5177} 5178 5179type OrdersCustomBatchRequestEntrySetLineItemMetadata struct { 5180 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 5181 5182 // LineItemId: The ID of the line item to set metadata. Either 5183 // lineItemId or productId is required. 5184 LineItemId string `json:"lineItemId,omitempty"` 5185 5186 // ProductId: The ID of the product to set metadata. This is the REST ID 5187 // used in the products service. Either lineItemId or productId is 5188 // required. 5189 ProductId string `json:"productId,omitempty"` 5190 5191 // ForceSendFields is a list of field names (e.g. "Annotations") to 5192 // unconditionally include in API requests. By default, fields with 5193 // empty values are omitted from API requests. However, any non-pointer, 5194 // non-interface field appearing in ForceSendFields will be sent to the 5195 // server regardless of whether the field is empty or not. This may be 5196 // used to include empty fields in Patch requests. 5197 ForceSendFields []string `json:"-"` 5198 5199 // NullFields is a list of field names (e.g. "Annotations") to include 5200 // in API requests with the JSON null value. By default, fields with 5201 // empty values are omitted from API requests. However, any field with 5202 // an empty value appearing in NullFields will be sent to the server as 5203 // null. It is an error if a field in this list has a non-empty value. 5204 // This may be used to include null fields in Patch requests. 5205 NullFields []string `json:"-"` 5206} 5207 5208func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) { 5209 type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata 5210 raw := NoMethod(*s) 5211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5212} 5213 5214type OrdersCustomBatchRequestEntryShipLineItems struct { 5215 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 5216 // handling the shipment. See shipments[].carrier in the Orders 5217 // resource representation for a list of acceptable values. 5218 Carrier string `json:"carrier,omitempty"` 5219 5220 // LineItems: Line items to ship. 5221 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 5222 5223 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 5224 // the shipment. 5225 ShipmentId string `json:"shipmentId,omitempty"` 5226 5227 // ShipmentInfos: Shipment information. This field is repeated because a 5228 // single line item can be shipped in several packages (and have several 5229 // tracking IDs). 5230 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 5231 5232 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 5233 // id for the shipment. 5234 TrackingId string `json:"trackingId,omitempty"` 5235 5236 // ForceSendFields is a list of field names (e.g. "Carrier") to 5237 // unconditionally include in API requests. By default, fields with 5238 // empty values are omitted from API requests. However, any non-pointer, 5239 // non-interface field appearing in ForceSendFields will be sent to the 5240 // server regardless of whether the field is empty or not. This may be 5241 // used to include empty fields in Patch requests. 5242 ForceSendFields []string `json:"-"` 5243 5244 // NullFields is a list of field names (e.g. "Carrier") to include in 5245 // API requests with the JSON null value. By default, fields with empty 5246 // values are omitted from API requests. However, any field with an 5247 // empty value appearing in NullFields will be sent to the server as 5248 // null. It is an error if a field in this list has a non-empty value. 5249 // This may be used to include null fields in Patch requests. 5250 NullFields []string `json:"-"` 5251} 5252 5253func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) { 5254 type NoMethod OrdersCustomBatchRequestEntryShipLineItems 5255 raw := NoMethod(*s) 5256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5257} 5258 5259type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { 5260 // Carrier: The carrier handling the shipment. See shipments[].carrier 5261 // in the Orders resource representation for a list of acceptable 5262 // values. 5263 Carrier string `json:"carrier,omitempty"` 5264 5265 // ShipmentId: The ID of the shipment. 5266 ShipmentId string `json:"shipmentId,omitempty"` 5267 5268 // TrackingId: The tracking id for the shipment. 5269 TrackingId string `json:"trackingId,omitempty"` 5270 5271 // ForceSendFields is a list of field names (e.g. "Carrier") to 5272 // unconditionally include in API requests. By default, fields with 5273 // empty values are omitted from API requests. However, any non-pointer, 5274 // non-interface field appearing in ForceSendFields will be sent to the 5275 // server regardless of whether the field is empty or not. This may be 5276 // used to include empty fields in Patch requests. 5277 ForceSendFields []string `json:"-"` 5278 5279 // NullFields is a list of field names (e.g. "Carrier") to include in 5280 // API requests with the JSON null value. By default, fields with empty 5281 // values are omitted from API requests. However, any field with an 5282 // empty value appearing in NullFields will be sent to the server as 5283 // null. It is an error if a field in this list has a non-empty value. 5284 // This may be used to include null fields in Patch requests. 5285 NullFields []string `json:"-"` 5286} 5287 5288func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { 5289 type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo 5290 raw := NoMethod(*s) 5291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5292} 5293 5294type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct { 5295 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 5296 // specified only ship by date is updated. 5297 DeliverByDate string `json:"deliverByDate,omitempty"` 5298 5299 // LineItemId: The ID of the line item to set metadata. Either 5300 // lineItemId or productId is required. 5301 LineItemId string `json:"lineItemId,omitempty"` 5302 5303 // ProductId: The ID of the product to set metadata. This is the REST ID 5304 // used in the products service. Either lineItemId or productId is 5305 // required. 5306 ProductId string `json:"productId,omitempty"` 5307 5308 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 5309 // specified only deliver by date is updated. 5310 ShipByDate string `json:"shipByDate,omitempty"` 5311 5312 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 5313 // unconditionally include in API requests. By default, fields with 5314 // empty values are omitted from API requests. However, any non-pointer, 5315 // non-interface field appearing in ForceSendFields will be sent to the 5316 // server regardless of whether the field is empty or not. This may be 5317 // used to include empty fields in Patch requests. 5318 ForceSendFields []string `json:"-"` 5319 5320 // NullFields is a list of field names (e.g. "DeliverByDate") to include 5321 // in API requests with the JSON null value. By default, fields with 5322 // empty values are omitted from API requests. However, any field with 5323 // an empty value appearing in NullFields will be sent to the server as 5324 // null. It is an error if a field in this list has a non-empty value. 5325 // This may be used to include null fields in Patch requests. 5326 NullFields []string `json:"-"` 5327} 5328 5329func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) { 5330 type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails 5331 raw := NoMethod(*s) 5332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5333} 5334 5335type OrdersCustomBatchRequestEntryUpdateShipment struct { 5336 // Carrier: The carrier handling the shipment. Not updated if missing. 5337 // See shipments[].carrier in the Orders resource representation for a 5338 // list of acceptable values. 5339 Carrier string `json:"carrier,omitempty"` 5340 5341 // ShipmentId: The ID of the shipment. 5342 ShipmentId string `json:"shipmentId,omitempty"` 5343 5344 // Status: New status for the shipment. Not updated if missing. 5345 Status string `json:"status,omitempty"` 5346 5347 // TrackingId: The tracking id for the shipment. Not updated if missing. 5348 TrackingId string `json:"trackingId,omitempty"` 5349 5350 // ForceSendFields is a list of field names (e.g. "Carrier") to 5351 // unconditionally include in API requests. By default, fields with 5352 // empty values are omitted from API requests. However, any non-pointer, 5353 // non-interface field appearing in ForceSendFields will be sent to the 5354 // server regardless of whether the field is empty or not. This may be 5355 // used to include empty fields in Patch requests. 5356 ForceSendFields []string `json:"-"` 5357 5358 // NullFields is a list of field names (e.g. "Carrier") to include in 5359 // API requests with the JSON null value. By default, fields with empty 5360 // values are omitted from API requests. However, any field with an 5361 // empty value appearing in NullFields will be sent to the server as 5362 // null. It is an error if a field in this list has a non-empty value. 5363 // This may be used to include null fields in Patch requests. 5364 NullFields []string `json:"-"` 5365} 5366 5367func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) { 5368 type NoMethod OrdersCustomBatchRequestEntryUpdateShipment 5369 raw := NoMethod(*s) 5370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5371} 5372 5373type OrdersCustomBatchResponse struct { 5374 // Entries: The result of the execution of the batch requests. 5375 Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"` 5376 5377 // Kind: Identifies what kind of resource this is. Value: the fixed 5378 // string "content#ordersCustomBatchResponse". 5379 Kind string `json:"kind,omitempty"` 5380 5381 // ServerResponse contains the HTTP response code and headers from the 5382 // server. 5383 googleapi.ServerResponse `json:"-"` 5384 5385 // ForceSendFields is a list of field names (e.g. "Entries") to 5386 // unconditionally include in API requests. By default, fields with 5387 // empty values are omitted from API requests. However, any non-pointer, 5388 // non-interface field appearing in ForceSendFields will be sent to the 5389 // server regardless of whether the field is empty or not. This may be 5390 // used to include empty fields in Patch requests. 5391 ForceSendFields []string `json:"-"` 5392 5393 // NullFields is a list of field names (e.g. "Entries") to include in 5394 // API requests with the JSON null value. By default, fields with empty 5395 // values are omitted from API requests. However, any field with an 5396 // empty value appearing in NullFields will be sent to the server as 5397 // null. It is an error if a field in this list has a non-empty value. 5398 // This may be used to include null fields in Patch requests. 5399 NullFields []string `json:"-"` 5400} 5401 5402func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) { 5403 type NoMethod OrdersCustomBatchResponse 5404 raw := NoMethod(*s) 5405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5406} 5407 5408type OrdersCustomBatchResponseEntry struct { 5409 // BatchId: The ID of the request entry this entry responds to. 5410 BatchId int64 `json:"batchId,omitempty"` 5411 5412 // Errors: A list of errors defined if and only if the request failed. 5413 Errors *Errors `json:"errors,omitempty"` 5414 5415 // ExecutionStatus: The status of the execution. Only defined if the 5416 // method is not get or getByMerchantOrderId and if the request was 5417 // successful. 5418 ExecutionStatus string `json:"executionStatus,omitempty"` 5419 5420 // Kind: Identifies what kind of resource this is. Value: the fixed 5421 // string "content#ordersCustomBatchResponseEntry". 5422 Kind string `json:"kind,omitempty"` 5423 5424 // Order: The retrieved order. Only defined if the method is get and if 5425 // the request was successful. 5426 Order *Order `json:"order,omitempty"` 5427 5428 // ForceSendFields is a list of field names (e.g. "BatchId") to 5429 // unconditionally include in API requests. By default, fields with 5430 // empty values are omitted from API requests. However, any non-pointer, 5431 // non-interface field appearing in ForceSendFields will be sent to the 5432 // server regardless of whether the field is empty or not. This may be 5433 // used to include empty fields in Patch requests. 5434 ForceSendFields []string `json:"-"` 5435 5436 // NullFields is a list of field names (e.g. "BatchId") to include in 5437 // API requests with the JSON null value. By default, fields with empty 5438 // values are omitted from API requests. However, any field with an 5439 // empty value appearing in NullFields will be sent to the server as 5440 // null. It is an error if a field in this list has a non-empty value. 5441 // This may be used to include null fields in Patch requests. 5442 NullFields []string `json:"-"` 5443} 5444 5445func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 5446 type NoMethod OrdersCustomBatchResponseEntry 5447 raw := NoMethod(*s) 5448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5449} 5450 5451type OrdersGetByMerchantOrderIdResponse struct { 5452 // Kind: Identifies what kind of resource this is. Value: the fixed 5453 // string "content#ordersGetByMerchantOrderIdResponse". 5454 Kind string `json:"kind,omitempty"` 5455 5456 // Order: The requested order. 5457 Order *Order `json:"order,omitempty"` 5458 5459 // ServerResponse contains the HTTP response code and headers from the 5460 // server. 5461 googleapi.ServerResponse `json:"-"` 5462 5463 // ForceSendFields is a list of field names (e.g. "Kind") to 5464 // unconditionally include in API requests. By default, fields with 5465 // empty values are omitted from API requests. However, any non-pointer, 5466 // non-interface field appearing in ForceSendFields will be sent to the 5467 // server regardless of whether the field is empty or not. This may be 5468 // used to include empty fields in Patch requests. 5469 ForceSendFields []string `json:"-"` 5470 5471 // NullFields is a list of field names (e.g. "Kind") to include in API 5472 // requests with the JSON null value. By default, fields with empty 5473 // values are omitted from API requests. However, any field with an 5474 // empty value appearing in NullFields will be sent to the server as 5475 // null. It is an error if a field in this list has a non-empty value. 5476 // This may be used to include null fields in Patch requests. 5477 NullFields []string `json:"-"` 5478} 5479 5480func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 5481 type NoMethod OrdersGetByMerchantOrderIdResponse 5482 raw := NoMethod(*s) 5483 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5484} 5485 5486type OrdersGetTestOrderTemplateResponse struct { 5487 // Kind: Identifies what kind of resource this is. Value: the fixed 5488 // string "content#ordersGetTestOrderTemplateResponse". 5489 Kind string `json:"kind,omitempty"` 5490 5491 // Template: The requested test order template. 5492 Template *TestOrder `json:"template,omitempty"` 5493 5494 // ServerResponse contains the HTTP response code and headers from the 5495 // server. 5496 googleapi.ServerResponse `json:"-"` 5497 5498 // ForceSendFields is a list of field names (e.g. "Kind") to 5499 // unconditionally include in API requests. By default, fields with 5500 // empty values are omitted from API requests. However, any non-pointer, 5501 // non-interface field appearing in ForceSendFields will be sent to the 5502 // server regardless of whether the field is empty or not. This may be 5503 // used to include empty fields in Patch requests. 5504 ForceSendFields []string `json:"-"` 5505 5506 // NullFields is a list of field names (e.g. "Kind") to include in API 5507 // requests with the JSON null value. By default, fields with empty 5508 // values are omitted from API requests. However, any field with an 5509 // empty value appearing in NullFields will be sent to the server as 5510 // null. It is an error if a field in this list has a non-empty value. 5511 // This may be used to include null fields in Patch requests. 5512 NullFields []string `json:"-"` 5513} 5514 5515func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { 5516 type NoMethod OrdersGetTestOrderTemplateResponse 5517 raw := NoMethod(*s) 5518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5519} 5520 5521type OrdersInStoreRefundLineItemRequest struct { 5522 // AmountPretax: The amount that is refunded. Required. 5523 AmountPretax *Price `json:"amountPretax,omitempty"` 5524 5525 // AmountTax: Tax amount that correspond to refund amount in 5526 // amountPretax. Required. 5527 AmountTax *Price `json:"amountTax,omitempty"` 5528 5529 // LineItemId: The ID of the line item to return. Either lineItemId or 5530 // productId is required. 5531 LineItemId string `json:"lineItemId,omitempty"` 5532 5533 // OperationId: The ID of the operation. Unique across all operations 5534 // for a given order. 5535 OperationId string `json:"operationId,omitempty"` 5536 5537 // ProductId: The ID of the product to return. This is the REST ID used 5538 // in the products service. Either lineItemId or productId is required. 5539 ProductId string `json:"productId,omitempty"` 5540 5541 // Quantity: The quantity to return and refund. 5542 Quantity int64 `json:"quantity,omitempty"` 5543 5544 // Reason: The reason for the return. 5545 Reason string `json:"reason,omitempty"` 5546 5547 // ReasonText: The explanation of the reason. 5548 ReasonText string `json:"reasonText,omitempty"` 5549 5550 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 5551 // unconditionally include in API requests. By default, fields with 5552 // empty values are omitted from API requests. However, any non-pointer, 5553 // non-interface field appearing in ForceSendFields will be sent to the 5554 // server regardless of whether the field is empty or not. This may be 5555 // used to include empty fields in Patch requests. 5556 ForceSendFields []string `json:"-"` 5557 5558 // NullFields is a list of field names (e.g. "AmountPretax") to include 5559 // in API requests with the JSON null value. By default, fields with 5560 // empty values are omitted from API requests. However, any field with 5561 // an empty value appearing in NullFields will be sent to the server as 5562 // null. It is an error if a field in this list has a non-empty value. 5563 // This may be used to include null fields in Patch requests. 5564 NullFields []string `json:"-"` 5565} 5566 5567func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { 5568 type NoMethod OrdersInStoreRefundLineItemRequest 5569 raw := NoMethod(*s) 5570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5571} 5572 5573type OrdersInStoreRefundLineItemResponse struct { 5574 // ExecutionStatus: The status of the execution. 5575 ExecutionStatus string `json:"executionStatus,omitempty"` 5576 5577 // Kind: Identifies what kind of resource this is. Value: the fixed 5578 // string "content#ordersInStoreRefundLineItemResponse". 5579 Kind string `json:"kind,omitempty"` 5580 5581 // ServerResponse contains the HTTP response code and headers from the 5582 // server. 5583 googleapi.ServerResponse `json:"-"` 5584 5585 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5586 // unconditionally include in API requests. By default, fields with 5587 // empty values are omitted from API requests. However, any non-pointer, 5588 // non-interface field appearing in ForceSendFields will be sent to the 5589 // server regardless of whether the field is empty or not. This may be 5590 // used to include empty fields in Patch requests. 5591 ForceSendFields []string `json:"-"` 5592 5593 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5594 // include in API requests with the JSON null value. By default, fields 5595 // with empty values are omitted from API requests. However, any field 5596 // with an empty value appearing in NullFields will be sent to the 5597 // server as null. It is an error if a field in this list has a 5598 // non-empty value. This may be used to include null fields in Patch 5599 // requests. 5600 NullFields []string `json:"-"` 5601} 5602 5603func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { 5604 type NoMethod OrdersInStoreRefundLineItemResponse 5605 raw := NoMethod(*s) 5606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5607} 5608 5609type OrdersListResponse struct { 5610 // Kind: Identifies what kind of resource this is. Value: the fixed 5611 // string "content#ordersListResponse". 5612 Kind string `json:"kind,omitempty"` 5613 5614 // NextPageToken: The token for the retrieval of the next page of 5615 // orders. 5616 NextPageToken string `json:"nextPageToken,omitempty"` 5617 5618 Resources []*Order `json:"resources,omitempty"` 5619 5620 // ServerResponse contains the HTTP response code and headers from the 5621 // server. 5622 googleapi.ServerResponse `json:"-"` 5623 5624 // ForceSendFields is a list of field names (e.g. "Kind") to 5625 // unconditionally include in API requests. By default, fields with 5626 // empty values are omitted from API requests. However, any non-pointer, 5627 // non-interface field appearing in ForceSendFields will be sent to the 5628 // server regardless of whether the field is empty or not. This may be 5629 // used to include empty fields in Patch requests. 5630 ForceSendFields []string `json:"-"` 5631 5632 // NullFields is a list of field names (e.g. "Kind") to include in API 5633 // requests with the JSON null value. By default, fields with empty 5634 // values are omitted from API requests. However, any field with an 5635 // empty value appearing in NullFields will be sent to the server as 5636 // null. It is an error if a field in this list has a non-empty value. 5637 // This may be used to include null fields in Patch requests. 5638 NullFields []string `json:"-"` 5639} 5640 5641func (s *OrdersListResponse) MarshalJSON() ([]byte, error) { 5642 type NoMethod OrdersListResponse 5643 raw := NoMethod(*s) 5644 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5645} 5646 5647type OrdersRefundRequest struct { 5648 // Amount: The amount that is refunded. 5649 Amount *Price `json:"amount,omitempty"` 5650 5651 // AmountPretax: The amount that is refunded. Either amount or 5652 // amountPretax and amountTax should be filled. 5653 AmountPretax *Price `json:"amountPretax,omitempty"` 5654 5655 // AmountTax: Tax amount that correspond to refund amount in 5656 // amountPretax. 5657 AmountTax *Price `json:"amountTax,omitempty"` 5658 5659 // OperationId: The ID of the operation. Unique across all operations 5660 // for a given order. 5661 OperationId string `json:"operationId,omitempty"` 5662 5663 // Reason: The reason for the refund. 5664 Reason string `json:"reason,omitempty"` 5665 5666 // ReasonText: The explanation of the reason. 5667 ReasonText string `json:"reasonText,omitempty"` 5668 5669 // ForceSendFields is a list of field names (e.g. "Amount") to 5670 // unconditionally include in API requests. By default, fields with 5671 // empty values are omitted from API requests. However, any non-pointer, 5672 // non-interface field appearing in ForceSendFields will be sent to the 5673 // server regardless of whether the field is empty or not. This may be 5674 // used to include empty fields in Patch requests. 5675 ForceSendFields []string `json:"-"` 5676 5677 // NullFields is a list of field names (e.g. "Amount") to include in API 5678 // requests with the JSON null value. By default, fields with empty 5679 // values are omitted from API requests. However, any field with an 5680 // empty value appearing in NullFields will be sent to the server as 5681 // null. It is an error if a field in this list has a non-empty value. 5682 // This may be used to include null fields in Patch requests. 5683 NullFields []string `json:"-"` 5684} 5685 5686func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) { 5687 type NoMethod OrdersRefundRequest 5688 raw := NoMethod(*s) 5689 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5690} 5691 5692type OrdersRefundResponse struct { 5693 // ExecutionStatus: The status of the execution. 5694 ExecutionStatus string `json:"executionStatus,omitempty"` 5695 5696 // Kind: Identifies what kind of resource this is. Value: the fixed 5697 // string "content#ordersRefundResponse". 5698 Kind string `json:"kind,omitempty"` 5699 5700 // ServerResponse contains the HTTP response code and headers from the 5701 // server. 5702 googleapi.ServerResponse `json:"-"` 5703 5704 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5705 // unconditionally include in API requests. By default, fields with 5706 // empty values are omitted from API requests. However, any non-pointer, 5707 // non-interface field appearing in ForceSendFields will be sent to the 5708 // server regardless of whether the field is empty or not. This may be 5709 // used to include empty fields in Patch requests. 5710 ForceSendFields []string `json:"-"` 5711 5712 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5713 // include in API requests with the JSON null value. By default, fields 5714 // with empty values are omitted from API requests. However, any field 5715 // with an empty value appearing in NullFields will be sent to the 5716 // server as null. It is an error if a field in this list has a 5717 // non-empty value. This may be used to include null fields in Patch 5718 // requests. 5719 NullFields []string `json:"-"` 5720} 5721 5722func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) { 5723 type NoMethod OrdersRefundResponse 5724 raw := NoMethod(*s) 5725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5726} 5727 5728type OrdersRejectReturnLineItemRequest struct { 5729 // LineItemId: The ID of the line item to return. Either lineItemId or 5730 // productId is required. 5731 LineItemId string `json:"lineItemId,omitempty"` 5732 5733 // OperationId: The ID of the operation. Unique across all operations 5734 // for a given order. 5735 OperationId string `json:"operationId,omitempty"` 5736 5737 // ProductId: The ID of the product to return. This is the REST ID used 5738 // in the products service. Either lineItemId or productId is required. 5739 ProductId string `json:"productId,omitempty"` 5740 5741 // Quantity: The quantity to return and refund. 5742 Quantity int64 `json:"quantity,omitempty"` 5743 5744 // Reason: The reason for the return. 5745 Reason string `json:"reason,omitempty"` 5746 5747 // ReasonText: The explanation of the reason. 5748 ReasonText string `json:"reasonText,omitempty"` 5749 5750 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5751 // unconditionally include in API requests. By default, fields with 5752 // empty values are omitted from API requests. However, any non-pointer, 5753 // non-interface field appearing in ForceSendFields will be sent to the 5754 // server regardless of whether the field is empty or not. This may be 5755 // used to include empty fields in Patch requests. 5756 ForceSendFields []string `json:"-"` 5757 5758 // NullFields is a list of field names (e.g. "LineItemId") to include in 5759 // API requests with the JSON null value. By default, fields with empty 5760 // values are omitted from API requests. However, any field with an 5761 // empty value appearing in NullFields will be sent to the server as 5762 // null. It is an error if a field in this list has a non-empty value. 5763 // This may be used to include null fields in Patch requests. 5764 NullFields []string `json:"-"` 5765} 5766 5767func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { 5768 type NoMethod OrdersRejectReturnLineItemRequest 5769 raw := NoMethod(*s) 5770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5771} 5772 5773type OrdersRejectReturnLineItemResponse struct { 5774 // ExecutionStatus: The status of the execution. 5775 ExecutionStatus string `json:"executionStatus,omitempty"` 5776 5777 // Kind: Identifies what kind of resource this is. Value: the fixed 5778 // string "content#ordersRejectReturnLineItemResponse". 5779 Kind string `json:"kind,omitempty"` 5780 5781 // ServerResponse contains the HTTP response code and headers from the 5782 // server. 5783 googleapi.ServerResponse `json:"-"` 5784 5785 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5786 // unconditionally include in API requests. By default, fields with 5787 // empty values are omitted from API requests. However, any non-pointer, 5788 // non-interface field appearing in ForceSendFields will be sent to the 5789 // server regardless of whether the field is empty or not. This may be 5790 // used to include empty fields in Patch requests. 5791 ForceSendFields []string `json:"-"` 5792 5793 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5794 // include in API requests with the JSON null value. By default, fields 5795 // with empty values are omitted from API requests. However, any field 5796 // with an empty value appearing in NullFields will be sent to the 5797 // server as null. It is an error if a field in this list has a 5798 // non-empty value. This may be used to include null fields in Patch 5799 // requests. 5800 NullFields []string `json:"-"` 5801} 5802 5803func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { 5804 type NoMethod OrdersRejectReturnLineItemResponse 5805 raw := NoMethod(*s) 5806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5807} 5808 5809type OrdersReturnLineItemRequest struct { 5810 // LineItemId: The ID of the line item to return. Either lineItemId or 5811 // productId is required. 5812 LineItemId string `json:"lineItemId,omitempty"` 5813 5814 // OperationId: The ID of the operation. Unique across all operations 5815 // for a given order. 5816 OperationId string `json:"operationId,omitempty"` 5817 5818 // ProductId: The ID of the product to return. This is the REST ID used 5819 // in the products service. Either lineItemId or productId is required. 5820 ProductId string `json:"productId,omitempty"` 5821 5822 // Quantity: The quantity to return. 5823 Quantity int64 `json:"quantity,omitempty"` 5824 5825 // Reason: The reason for the return. 5826 Reason string `json:"reason,omitempty"` 5827 5828 // ReasonText: The explanation of the reason. 5829 ReasonText string `json:"reasonText,omitempty"` 5830 5831 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5832 // unconditionally include in API requests. By default, fields with 5833 // empty values are omitted from API requests. However, any non-pointer, 5834 // non-interface field appearing in ForceSendFields will be sent to the 5835 // server regardless of whether the field is empty or not. This may be 5836 // used to include empty fields in Patch requests. 5837 ForceSendFields []string `json:"-"` 5838 5839 // NullFields is a list of field names (e.g. "LineItemId") to include in 5840 // API requests with the JSON null value. By default, fields with empty 5841 // values are omitted from API requests. However, any field with an 5842 // empty value appearing in NullFields will be sent to the server as 5843 // null. It is an error if a field in this list has a non-empty value. 5844 // This may be used to include null fields in Patch requests. 5845 NullFields []string `json:"-"` 5846} 5847 5848func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) { 5849 type NoMethod OrdersReturnLineItemRequest 5850 raw := NoMethod(*s) 5851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5852} 5853 5854type OrdersReturnLineItemResponse struct { 5855 // ExecutionStatus: The status of the execution. 5856 ExecutionStatus string `json:"executionStatus,omitempty"` 5857 5858 // Kind: Identifies what kind of resource this is. Value: the fixed 5859 // string "content#ordersReturnLineItemResponse". 5860 Kind string `json:"kind,omitempty"` 5861 5862 // ServerResponse contains the HTTP response code and headers from the 5863 // server. 5864 googleapi.ServerResponse `json:"-"` 5865 5866 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5867 // unconditionally include in API requests. By default, fields with 5868 // empty values are omitted from API requests. However, any non-pointer, 5869 // non-interface field appearing in ForceSendFields will be sent to the 5870 // server regardless of whether the field is empty or not. This may be 5871 // used to include empty fields in Patch requests. 5872 ForceSendFields []string `json:"-"` 5873 5874 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5875 // include in API requests with the JSON null value. By default, fields 5876 // with empty values are omitted from API requests. However, any field 5877 // with an empty value appearing in NullFields will be sent to the 5878 // server as null. It is an error if a field in this list has a 5879 // non-empty value. This may be used to include null fields in Patch 5880 // requests. 5881 NullFields []string `json:"-"` 5882} 5883 5884func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { 5885 type NoMethod OrdersReturnLineItemResponse 5886 raw := NoMethod(*s) 5887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5888} 5889 5890type OrdersReturnRefundLineItemRequest struct { 5891 // AmountPretax: The amount that is refunded. Optional, but if filled 5892 // then both amountPretax and amountTax must be set. 5893 AmountPretax *Price `json:"amountPretax,omitempty"` 5894 5895 // AmountTax: Tax amount that correspond to refund amount in 5896 // amountPretax. 5897 AmountTax *Price `json:"amountTax,omitempty"` 5898 5899 // LineItemId: The ID of the line item to return. Either lineItemId or 5900 // productId is required. 5901 LineItemId string `json:"lineItemId,omitempty"` 5902 5903 // OperationId: The ID of the operation. Unique across all operations 5904 // for a given order. 5905 OperationId string `json:"operationId,omitempty"` 5906 5907 // ProductId: The ID of the product to return. This is the REST ID used 5908 // in the products service. Either lineItemId or productId is required. 5909 ProductId string `json:"productId,omitempty"` 5910 5911 // Quantity: The quantity to return and refund. 5912 Quantity int64 `json:"quantity,omitempty"` 5913 5914 // Reason: The reason for the return. 5915 Reason string `json:"reason,omitempty"` 5916 5917 // ReasonText: The explanation of the reason. 5918 ReasonText string `json:"reasonText,omitempty"` 5919 5920 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 5921 // unconditionally include in API requests. By default, fields with 5922 // empty values are omitted from API requests. However, any non-pointer, 5923 // non-interface field appearing in ForceSendFields will be sent to the 5924 // server regardless of whether the field is empty or not. This may be 5925 // used to include empty fields in Patch requests. 5926 ForceSendFields []string `json:"-"` 5927 5928 // NullFields is a list of field names (e.g. "AmountPretax") to include 5929 // in API requests with the JSON null value. By default, fields with 5930 // empty values are omitted from API requests. However, any field with 5931 // an empty value appearing in NullFields will be sent to the server as 5932 // null. It is an error if a field in this list has a non-empty value. 5933 // This may be used to include null fields in Patch requests. 5934 NullFields []string `json:"-"` 5935} 5936 5937func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { 5938 type NoMethod OrdersReturnRefundLineItemRequest 5939 raw := NoMethod(*s) 5940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5941} 5942 5943type OrdersReturnRefundLineItemResponse struct { 5944 // ExecutionStatus: The status of the execution. 5945 ExecutionStatus string `json:"executionStatus,omitempty"` 5946 5947 // Kind: Identifies what kind of resource this is. Value: the fixed 5948 // string "content#ordersReturnRefundLineItemResponse". 5949 Kind string `json:"kind,omitempty"` 5950 5951 // ServerResponse contains the HTTP response code and headers from the 5952 // server. 5953 googleapi.ServerResponse `json:"-"` 5954 5955 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5956 // unconditionally include in API requests. By default, fields with 5957 // empty values are omitted from API requests. However, any non-pointer, 5958 // non-interface field appearing in ForceSendFields will be sent to the 5959 // server regardless of whether the field is empty or not. This may be 5960 // used to include empty fields in Patch requests. 5961 ForceSendFields []string `json:"-"` 5962 5963 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5964 // include in API requests with the JSON null value. By default, fields 5965 // with empty values are omitted from API requests. However, any field 5966 // with an empty value appearing in NullFields will be sent to the 5967 // server as null. It is an error if a field in this list has a 5968 // non-empty value. This may be used to include null fields in Patch 5969 // requests. 5970 NullFields []string `json:"-"` 5971} 5972 5973func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { 5974 type NoMethod OrdersReturnRefundLineItemResponse 5975 raw := NoMethod(*s) 5976 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5977} 5978 5979type OrdersSetLineItemMetadataRequest struct { 5980 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 5981 5982 // LineItemId: The ID of the line item to set metadata. Either 5983 // lineItemId or productId is required. 5984 LineItemId string `json:"lineItemId,omitempty"` 5985 5986 // OperationId: The ID of the operation. Unique across all operations 5987 // for a given order. 5988 OperationId string `json:"operationId,omitempty"` 5989 5990 // ProductId: The ID of the product to set metadata. This is the REST ID 5991 // used in the products service. Either lineItemId or productId is 5992 // required. 5993 ProductId string `json:"productId,omitempty"` 5994 5995 // ForceSendFields is a list of field names (e.g. "Annotations") to 5996 // unconditionally include in API requests. By default, fields with 5997 // empty values are omitted from API requests. However, any non-pointer, 5998 // non-interface field appearing in ForceSendFields will be sent to the 5999 // server regardless of whether the field is empty or not. This may be 6000 // used to include empty fields in Patch requests. 6001 ForceSendFields []string `json:"-"` 6002 6003 // NullFields is a list of field names (e.g. "Annotations") to include 6004 // in API requests with the JSON null value. By default, fields with 6005 // empty values are omitted from API requests. However, any field with 6006 // an empty value appearing in NullFields will be sent to the server as 6007 // null. It is an error if a field in this list has a non-empty value. 6008 // This may be used to include null fields in Patch requests. 6009 NullFields []string `json:"-"` 6010} 6011 6012func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { 6013 type NoMethod OrdersSetLineItemMetadataRequest 6014 raw := NoMethod(*s) 6015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6016} 6017 6018type OrdersSetLineItemMetadataResponse struct { 6019 // ExecutionStatus: The status of the execution. 6020 ExecutionStatus string `json:"executionStatus,omitempty"` 6021 6022 // Kind: Identifies what kind of resource this is. Value: the fixed 6023 // string "content#ordersSetLineItemMetadataResponse". 6024 Kind string `json:"kind,omitempty"` 6025 6026 // ServerResponse contains the HTTP response code and headers from the 6027 // server. 6028 googleapi.ServerResponse `json:"-"` 6029 6030 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6031 // unconditionally include in API requests. By default, fields with 6032 // empty values are omitted from API requests. However, any non-pointer, 6033 // non-interface field appearing in ForceSendFields will be sent to the 6034 // server regardless of whether the field is empty or not. This may be 6035 // used to include empty fields in Patch requests. 6036 ForceSendFields []string `json:"-"` 6037 6038 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6039 // include in API requests with the JSON null value. By default, fields 6040 // with empty values are omitted from API requests. However, any field 6041 // with an empty value appearing in NullFields will be sent to the 6042 // server as null. It is an error if a field in this list has a 6043 // non-empty value. This may be used to include null fields in Patch 6044 // requests. 6045 NullFields []string `json:"-"` 6046} 6047 6048func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { 6049 type NoMethod OrdersSetLineItemMetadataResponse 6050 raw := NoMethod(*s) 6051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6052} 6053 6054type OrdersShipLineItemsRequest struct { 6055 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 6056 // handling the shipment. See shipments[].carrier in the Orders 6057 // resource representation for a list of acceptable values. 6058 Carrier string `json:"carrier,omitempty"` 6059 6060 // LineItems: Line items to ship. 6061 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 6062 6063 // OperationId: The ID of the operation. Unique across all operations 6064 // for a given order. 6065 OperationId string `json:"operationId,omitempty"` 6066 6067 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 6068 // the shipment. 6069 ShipmentId string `json:"shipmentId,omitempty"` 6070 6071 // ShipmentInfos: Shipment information. This field is repeated because a 6072 // single line item can be shipped in several packages (and have several 6073 // tracking IDs). 6074 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 6075 6076 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 6077 // id for the shipment. 6078 TrackingId string `json:"trackingId,omitempty"` 6079 6080 // ForceSendFields is a list of field names (e.g. "Carrier") to 6081 // unconditionally include in API requests. By default, fields with 6082 // empty values are omitted from API requests. However, any non-pointer, 6083 // non-interface field appearing in ForceSendFields will be sent to the 6084 // server regardless of whether the field is empty or not. This may be 6085 // used to include empty fields in Patch requests. 6086 ForceSendFields []string `json:"-"` 6087 6088 // NullFields is a list of field names (e.g. "Carrier") to include in 6089 // API requests with the JSON null value. By default, fields with empty 6090 // values are omitted from API requests. However, any field with an 6091 // empty value appearing in NullFields will be sent to the server as 6092 // null. It is an error if a field in this list has a non-empty value. 6093 // This may be used to include null fields in Patch requests. 6094 NullFields []string `json:"-"` 6095} 6096 6097func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { 6098 type NoMethod OrdersShipLineItemsRequest 6099 raw := NoMethod(*s) 6100 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6101} 6102 6103type OrdersShipLineItemsResponse struct { 6104 // ExecutionStatus: The status of the execution. 6105 ExecutionStatus string `json:"executionStatus,omitempty"` 6106 6107 // Kind: Identifies what kind of resource this is. Value: the fixed 6108 // string "content#ordersShipLineItemsResponse". 6109 Kind string `json:"kind,omitempty"` 6110 6111 // ServerResponse contains the HTTP response code and headers from the 6112 // server. 6113 googleapi.ServerResponse `json:"-"` 6114 6115 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6116 // unconditionally include in API requests. By default, fields with 6117 // empty values are omitted from API requests. However, any non-pointer, 6118 // non-interface field appearing in ForceSendFields will be sent to the 6119 // server regardless of whether the field is empty or not. This may be 6120 // used to include empty fields in Patch requests. 6121 ForceSendFields []string `json:"-"` 6122 6123 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6124 // include in API requests with the JSON null value. By default, fields 6125 // with empty values are omitted from API requests. However, any field 6126 // with an empty value appearing in NullFields will be sent to the 6127 // server as null. It is an error if a field in this list has a 6128 // non-empty value. This may be used to include null fields in Patch 6129 // requests. 6130 NullFields []string `json:"-"` 6131} 6132 6133func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { 6134 type NoMethod OrdersShipLineItemsResponse 6135 raw := NoMethod(*s) 6136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6137} 6138 6139type OrdersUpdateLineItemShippingDetailsRequest struct { 6140 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 6141 // specified only ship by date is updated. 6142 DeliverByDate string `json:"deliverByDate,omitempty"` 6143 6144 // LineItemId: The ID of the line item to set metadata. Either 6145 // lineItemId or productId is required. 6146 LineItemId string `json:"lineItemId,omitempty"` 6147 6148 // OperationId: The ID of the operation. Unique across all operations 6149 // for a given order. 6150 OperationId string `json:"operationId,omitempty"` 6151 6152 // ProductId: The ID of the product to set metadata. This is the REST ID 6153 // used in the products service. Either lineItemId or productId is 6154 // required. 6155 ProductId string `json:"productId,omitempty"` 6156 6157 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 6158 // specified only deliver by date is updated. 6159 ShipByDate string `json:"shipByDate,omitempty"` 6160 6161 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 6162 // unconditionally include in API requests. By default, fields with 6163 // empty values are omitted from API requests. However, any non-pointer, 6164 // non-interface field appearing in ForceSendFields will be sent to the 6165 // server regardless of whether the field is empty or not. This may be 6166 // used to include empty fields in Patch requests. 6167 ForceSendFields []string `json:"-"` 6168 6169 // NullFields is a list of field names (e.g. "DeliverByDate") to include 6170 // in API requests with the JSON null value. By default, fields with 6171 // empty values are omitted from API requests. However, any field with 6172 // an empty value appearing in NullFields will be sent to the server as 6173 // null. It is an error if a field in this list has a non-empty value. 6174 // This may be used to include null fields in Patch requests. 6175 NullFields []string `json:"-"` 6176} 6177 6178func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { 6179 type NoMethod OrdersUpdateLineItemShippingDetailsRequest 6180 raw := NoMethod(*s) 6181 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6182} 6183 6184type OrdersUpdateLineItemShippingDetailsResponse struct { 6185 // ExecutionStatus: The status of the execution. 6186 ExecutionStatus string `json:"executionStatus,omitempty"` 6187 6188 // Kind: Identifies what kind of resource this is. Value: the fixed 6189 // string "content#ordersUpdateLineItemShippingDetailsResponse". 6190 Kind string `json:"kind,omitempty"` 6191 6192 // ServerResponse contains the HTTP response code and headers from the 6193 // server. 6194 googleapi.ServerResponse `json:"-"` 6195 6196 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6197 // unconditionally include in API requests. By default, fields with 6198 // empty values are omitted from API requests. However, any non-pointer, 6199 // non-interface field appearing in ForceSendFields will be sent to the 6200 // server regardless of whether the field is empty or not. This may be 6201 // used to include empty fields in Patch requests. 6202 ForceSendFields []string `json:"-"` 6203 6204 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6205 // include in API requests with the JSON null value. By default, fields 6206 // with empty values are omitted from API requests. However, any field 6207 // with an empty value appearing in NullFields will be sent to the 6208 // server as null. It is an error if a field in this list has a 6209 // non-empty value. This may be used to include null fields in Patch 6210 // requests. 6211 NullFields []string `json:"-"` 6212} 6213 6214func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { 6215 type NoMethod OrdersUpdateLineItemShippingDetailsResponse 6216 raw := NoMethod(*s) 6217 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6218} 6219 6220type OrdersUpdateMerchantOrderIdRequest struct { 6221 // MerchantOrderId: The merchant order id to be assigned to the order. 6222 // Must be unique per merchant. 6223 MerchantOrderId string `json:"merchantOrderId,omitempty"` 6224 6225 // OperationId: The ID of the operation. Unique across all operations 6226 // for a given order. 6227 OperationId string `json:"operationId,omitempty"` 6228 6229 // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to 6230 // unconditionally include in API requests. By default, fields with 6231 // empty values are omitted from API requests. However, any non-pointer, 6232 // non-interface field appearing in ForceSendFields will be sent to the 6233 // server regardless of whether the field is empty or not. This may be 6234 // used to include empty fields in Patch requests. 6235 ForceSendFields []string `json:"-"` 6236 6237 // NullFields is a list of field names (e.g. "MerchantOrderId") to 6238 // include in API requests with the JSON null value. By default, fields 6239 // with empty values are omitted from API requests. However, any field 6240 // with an empty value appearing in NullFields will be sent to the 6241 // server as null. It is an error if a field in this list has a 6242 // non-empty value. This may be used to include null fields in Patch 6243 // requests. 6244 NullFields []string `json:"-"` 6245} 6246 6247func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { 6248 type NoMethod OrdersUpdateMerchantOrderIdRequest 6249 raw := NoMethod(*s) 6250 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6251} 6252 6253type OrdersUpdateMerchantOrderIdResponse struct { 6254 // ExecutionStatus: The status of the execution. 6255 ExecutionStatus string `json:"executionStatus,omitempty"` 6256 6257 // Kind: Identifies what kind of resource this is. Value: the fixed 6258 // string "content#ordersUpdateMerchantOrderIdResponse". 6259 Kind string `json:"kind,omitempty"` 6260 6261 // ServerResponse contains the HTTP response code and headers from the 6262 // server. 6263 googleapi.ServerResponse `json:"-"` 6264 6265 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6266 // unconditionally include in API requests. By default, fields with 6267 // empty values are omitted from API requests. However, any non-pointer, 6268 // non-interface field appearing in ForceSendFields will be sent to the 6269 // server regardless of whether the field is empty or not. This may be 6270 // used to include empty fields in Patch requests. 6271 ForceSendFields []string `json:"-"` 6272 6273 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6274 // include in API requests with the JSON null value. By default, fields 6275 // with empty values are omitted from API requests. However, any field 6276 // with an empty value appearing in NullFields will be sent to the 6277 // server as null. It is an error if a field in this list has a 6278 // non-empty value. This may be used to include null fields in Patch 6279 // requests. 6280 NullFields []string `json:"-"` 6281} 6282 6283func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 6284 type NoMethod OrdersUpdateMerchantOrderIdResponse 6285 raw := NoMethod(*s) 6286 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6287} 6288 6289type OrdersUpdateShipmentRequest struct { 6290 // Carrier: The carrier handling the shipment. Not updated if missing. 6291 // See shipments[].carrier in the Orders resource representation for a 6292 // list of acceptable values. 6293 Carrier string `json:"carrier,omitempty"` 6294 6295 // OperationId: The ID of the operation. Unique across all operations 6296 // for a given order. 6297 OperationId string `json:"operationId,omitempty"` 6298 6299 // ShipmentId: The ID of the shipment. 6300 ShipmentId string `json:"shipmentId,omitempty"` 6301 6302 // Status: New status for the shipment. Not updated if missing. 6303 Status string `json:"status,omitempty"` 6304 6305 // TrackingId: The tracking id for the shipment. Not updated if missing. 6306 TrackingId string `json:"trackingId,omitempty"` 6307 6308 // ForceSendFields is a list of field names (e.g. "Carrier") to 6309 // unconditionally include in API requests. By default, fields with 6310 // empty values are omitted from API requests. However, any non-pointer, 6311 // non-interface field appearing in ForceSendFields will be sent to the 6312 // server regardless of whether the field is empty or not. This may be 6313 // used to include empty fields in Patch requests. 6314 ForceSendFields []string `json:"-"` 6315 6316 // NullFields is a list of field names (e.g. "Carrier") to include in 6317 // API requests with the JSON null value. By default, fields with empty 6318 // values are omitted from API requests. However, any field with an 6319 // empty value appearing in NullFields will be sent to the server as 6320 // null. It is an error if a field in this list has a non-empty value. 6321 // This may be used to include null fields in Patch requests. 6322 NullFields []string `json:"-"` 6323} 6324 6325func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { 6326 type NoMethod OrdersUpdateShipmentRequest 6327 raw := NoMethod(*s) 6328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6329} 6330 6331type OrdersUpdateShipmentResponse struct { 6332 // ExecutionStatus: The status of the execution. 6333 ExecutionStatus string `json:"executionStatus,omitempty"` 6334 6335 // Kind: Identifies what kind of resource this is. Value: the fixed 6336 // string "content#ordersUpdateShipmentResponse". 6337 Kind string `json:"kind,omitempty"` 6338 6339 // ServerResponse contains the HTTP response code and headers from the 6340 // server. 6341 googleapi.ServerResponse `json:"-"` 6342 6343 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6344 // unconditionally include in API requests. By default, fields with 6345 // empty values are omitted from API requests. However, any non-pointer, 6346 // non-interface field appearing in ForceSendFields will be sent to the 6347 // server regardless of whether the field is empty or not. This may be 6348 // used to include empty fields in Patch requests. 6349 ForceSendFields []string `json:"-"` 6350 6351 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6352 // include in API requests with the JSON null value. By default, fields 6353 // with empty values are omitted from API requests. However, any field 6354 // with an empty value appearing in NullFields will be sent to the 6355 // server as null. It is an error if a field in this list has a 6356 // non-empty value. This may be used to include null fields in Patch 6357 // requests. 6358 NullFields []string `json:"-"` 6359} 6360 6361func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { 6362 type NoMethod OrdersUpdateShipmentResponse 6363 raw := NoMethod(*s) 6364 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6365} 6366 6367type PosCustomBatchRequest struct { 6368 // Entries: The request entries to be processed in the batch. 6369 Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` 6370 6371 // ForceSendFields is a list of field names (e.g. "Entries") to 6372 // unconditionally include in API requests. By default, fields with 6373 // empty values are omitted from API requests. However, any non-pointer, 6374 // non-interface field appearing in ForceSendFields will be sent to the 6375 // server regardless of whether the field is empty or not. This may be 6376 // used to include empty fields in Patch requests. 6377 ForceSendFields []string `json:"-"` 6378 6379 // NullFields is a list of field names (e.g. "Entries") to include in 6380 // API requests with the JSON null value. By default, fields with empty 6381 // values are omitted from API requests. However, any field with an 6382 // empty value appearing in NullFields will be sent to the server as 6383 // null. It is an error if a field in this list has a non-empty value. 6384 // This may be used to include null fields in Patch requests. 6385 NullFields []string `json:"-"` 6386} 6387 6388func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) { 6389 type NoMethod PosCustomBatchRequest 6390 raw := NoMethod(*s) 6391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6392} 6393 6394type PosCustomBatchRequestEntry struct { 6395 // BatchId: An entry ID, unique within the batch request. 6396 BatchId int64 `json:"batchId,omitempty"` 6397 6398 // Inventory: The inventory to submit. Set this only if the method is 6399 // inventory. 6400 Inventory *PosInventory `json:"inventory,omitempty"` 6401 6402 // MerchantId: The ID of the POS provider. 6403 MerchantId uint64 `json:"merchantId,omitempty,string"` 6404 6405 Method string `json:"method,omitempty"` 6406 6407 // Sale: The sale information to submit. Set this only if the method is 6408 // sale. 6409 Sale *PosSale `json:"sale,omitempty"` 6410 6411 // Store: The store information to submit. Set this only if the method 6412 // is insert. 6413 Store *PosStore `json:"store,omitempty"` 6414 6415 // StoreCode: The store code. Set this only if the method is delete or 6416 // get. 6417 StoreCode string `json:"storeCode,omitempty"` 6418 6419 // TargetMerchantId: The ID of the account for which to get/submit data. 6420 TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` 6421 6422 // ForceSendFields is a list of field names (e.g. "BatchId") to 6423 // unconditionally include in API requests. By default, fields with 6424 // empty values are omitted from API requests. However, any non-pointer, 6425 // non-interface field appearing in ForceSendFields will be sent to the 6426 // server regardless of whether the field is empty or not. This may be 6427 // used to include empty fields in Patch requests. 6428 ForceSendFields []string `json:"-"` 6429 6430 // NullFields is a list of field names (e.g. "BatchId") to include in 6431 // API requests with the JSON null value. By default, fields with empty 6432 // values are omitted from API requests. However, any field with an 6433 // empty value appearing in NullFields will be sent to the server as 6434 // null. It is an error if a field in this list has a non-empty value. 6435 // This may be used to include null fields in Patch requests. 6436 NullFields []string `json:"-"` 6437} 6438 6439func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 6440 type NoMethod PosCustomBatchRequestEntry 6441 raw := NoMethod(*s) 6442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6443} 6444 6445type PosCustomBatchResponse struct { 6446 // Entries: The result of the execution of the batch requests. 6447 Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` 6448 6449 // Kind: Identifies what kind of resource this is. Value: the fixed 6450 // string "content#posCustomBatchResponse". 6451 Kind string `json:"kind,omitempty"` 6452 6453 // ServerResponse contains the HTTP response code and headers from the 6454 // server. 6455 googleapi.ServerResponse `json:"-"` 6456 6457 // ForceSendFields is a list of field names (e.g. "Entries") to 6458 // unconditionally include in API requests. By default, fields with 6459 // empty values are omitted from API requests. However, any non-pointer, 6460 // non-interface field appearing in ForceSendFields will be sent to the 6461 // server regardless of whether the field is empty or not. This may be 6462 // used to include empty fields in Patch requests. 6463 ForceSendFields []string `json:"-"` 6464 6465 // NullFields is a list of field names (e.g. "Entries") to include in 6466 // API requests with the JSON null value. By default, fields with empty 6467 // values are omitted from API requests. However, any field with an 6468 // empty value appearing in NullFields will be sent to the server as 6469 // null. It is an error if a field in this list has a non-empty value. 6470 // This may be used to include null fields in Patch requests. 6471 NullFields []string `json:"-"` 6472} 6473 6474func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) { 6475 type NoMethod PosCustomBatchResponse 6476 raw := NoMethod(*s) 6477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6478} 6479 6480type PosCustomBatchResponseEntry struct { 6481 // BatchId: The ID of the request entry to which this entry responds. 6482 BatchId int64 `json:"batchId,omitempty"` 6483 6484 // Errors: A list of errors defined if, and only if, the request failed. 6485 Errors *Errors `json:"errors,omitempty"` 6486 6487 // Inventory: The updated inventory information. 6488 Inventory *PosInventory `json:"inventory,omitempty"` 6489 6490 // Kind: Identifies what kind of resource this is. Value: the fixed 6491 // string "content#posCustomBatchResponseEntry". 6492 Kind string `json:"kind,omitempty"` 6493 6494 // Sale: The updated sale information. 6495 Sale *PosSale `json:"sale,omitempty"` 6496 6497 // Store: The retrieved or updated store information. 6498 Store *PosStore `json:"store,omitempty"` 6499 6500 // ForceSendFields is a list of field names (e.g. "BatchId") to 6501 // unconditionally include in API requests. By default, fields with 6502 // empty values are omitted from API requests. However, any non-pointer, 6503 // non-interface field appearing in ForceSendFields will be sent to the 6504 // server regardless of whether the field is empty or not. This may be 6505 // used to include empty fields in Patch requests. 6506 ForceSendFields []string `json:"-"` 6507 6508 // NullFields is a list of field names (e.g. "BatchId") to include in 6509 // API requests with the JSON null value. By default, fields with empty 6510 // values are omitted from API requests. However, any field with an 6511 // empty value appearing in NullFields will be sent to the server as 6512 // null. It is an error if a field in this list has a non-empty value. 6513 // This may be used to include null fields in Patch requests. 6514 NullFields []string `json:"-"` 6515} 6516 6517func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 6518 type NoMethod PosCustomBatchResponseEntry 6519 raw := NoMethod(*s) 6520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6521} 6522 6523// PosInventory: The absolute quantity of an item available at the given 6524// store. 6525type PosInventory struct { 6526 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6527 ContentLanguage string `json:"contentLanguage,omitempty"` 6528 6529 // Gtin: Global Trade Item Number. 6530 Gtin string `json:"gtin,omitempty"` 6531 6532 // ItemId: A unique identifier for the item. 6533 ItemId string `json:"itemId,omitempty"` 6534 6535 // Kind: Identifies what kind of resource this is. Value: the fixed 6536 // string "content#posInventory". 6537 Kind string `json:"kind,omitempty"` 6538 6539 // Price: The current price of the item. 6540 Price *Price `json:"price,omitempty"` 6541 6542 // Quantity: The available quantity of the item. 6543 Quantity int64 `json:"quantity,omitempty,string"` 6544 6545 // StoreCode: The identifier of the merchant's store. Either a storeCode 6546 // inserted via the API or the code of the store in Google My Business. 6547 StoreCode string `json:"storeCode,omitempty"` 6548 6549 // TargetCountry: The CLDR territory code for the item. 6550 TargetCountry string `json:"targetCountry,omitempty"` 6551 6552 // Timestamp: The inventory timestamp, in ISO 8601 format. 6553 Timestamp string `json:"timestamp,omitempty"` 6554 6555 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6556 // unconditionally include in API requests. By default, fields with 6557 // empty values are omitted from API requests. However, any non-pointer, 6558 // non-interface field appearing in ForceSendFields will be sent to the 6559 // server regardless of whether the field is empty or not. This may be 6560 // used to include empty fields in Patch requests. 6561 ForceSendFields []string `json:"-"` 6562 6563 // NullFields is a list of field names (e.g. "ContentLanguage") to 6564 // include in API requests with the JSON null value. By default, fields 6565 // with empty values are omitted from API requests. However, any field 6566 // with an empty value appearing in NullFields will be sent to the 6567 // server as null. It is an error if a field in this list has a 6568 // non-empty value. This may be used to include null fields in Patch 6569 // requests. 6570 NullFields []string `json:"-"` 6571} 6572 6573func (s *PosInventory) MarshalJSON() ([]byte, error) { 6574 type NoMethod PosInventory 6575 raw := NoMethod(*s) 6576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6577} 6578 6579type PosInventoryRequest struct { 6580 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6581 ContentLanguage string `json:"contentLanguage,omitempty"` 6582 6583 // Gtin: Global Trade Item Number. 6584 Gtin string `json:"gtin,omitempty"` 6585 6586 // ItemId: A unique identifier for the item. 6587 ItemId string `json:"itemId,omitempty"` 6588 6589 // Price: The current price of the item. 6590 Price *Price `json:"price,omitempty"` 6591 6592 // Quantity: The available quantity of the item. 6593 Quantity int64 `json:"quantity,omitempty,string"` 6594 6595 // StoreCode: The identifier of the merchant's store. Either a storeCode 6596 // inserted via the API or the code of the store in Google My Business. 6597 StoreCode string `json:"storeCode,omitempty"` 6598 6599 // TargetCountry: The CLDR territory code for the item. 6600 TargetCountry string `json:"targetCountry,omitempty"` 6601 6602 // Timestamp: The inventory timestamp, in ISO 8601 format. 6603 Timestamp string `json:"timestamp,omitempty"` 6604 6605 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6606 // unconditionally include in API requests. By default, fields with 6607 // empty values are omitted from API requests. However, any non-pointer, 6608 // non-interface field appearing in ForceSendFields will be sent to the 6609 // server regardless of whether the field is empty or not. This may be 6610 // used to include empty fields in Patch requests. 6611 ForceSendFields []string `json:"-"` 6612 6613 // NullFields is a list of field names (e.g. "ContentLanguage") to 6614 // include in API requests with the JSON null value. By default, fields 6615 // with empty values are omitted from API requests. However, any field 6616 // with an empty value appearing in NullFields will be sent to the 6617 // server as null. It is an error if a field in this list has a 6618 // non-empty value. This may be used to include null fields in Patch 6619 // requests. 6620 NullFields []string `json:"-"` 6621} 6622 6623func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) { 6624 type NoMethod PosInventoryRequest 6625 raw := NoMethod(*s) 6626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6627} 6628 6629type PosInventoryResponse struct { 6630 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6631 ContentLanguage string `json:"contentLanguage,omitempty"` 6632 6633 // Gtin: Global Trade Item Number. 6634 Gtin string `json:"gtin,omitempty"` 6635 6636 // ItemId: A unique identifier for the item. 6637 ItemId string `json:"itemId,omitempty"` 6638 6639 // Kind: Identifies what kind of resource this is. Value: the fixed 6640 // string "content#posInventoryResponse". 6641 Kind string `json:"kind,omitempty"` 6642 6643 // Price: The current price of the item. 6644 Price *Price `json:"price,omitempty"` 6645 6646 // Quantity: The available quantity of the item. 6647 Quantity int64 `json:"quantity,omitempty,string"` 6648 6649 // StoreCode: The identifier of the merchant's store. Either a storeCode 6650 // inserted via the API or the code of the store in Google My Business. 6651 StoreCode string `json:"storeCode,omitempty"` 6652 6653 // TargetCountry: The CLDR territory code for the item. 6654 TargetCountry string `json:"targetCountry,omitempty"` 6655 6656 // Timestamp: The inventory timestamp, in ISO 8601 format. 6657 Timestamp string `json:"timestamp,omitempty"` 6658 6659 // ServerResponse contains the HTTP response code and headers from the 6660 // server. 6661 googleapi.ServerResponse `json:"-"` 6662 6663 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6664 // unconditionally include in API requests. By default, fields with 6665 // empty values are omitted from API requests. However, any non-pointer, 6666 // non-interface field appearing in ForceSendFields will be sent to the 6667 // server regardless of whether the field is empty or not. This may be 6668 // used to include empty fields in Patch requests. 6669 ForceSendFields []string `json:"-"` 6670 6671 // NullFields is a list of field names (e.g. "ContentLanguage") to 6672 // include in API requests with the JSON null value. By default, fields 6673 // with empty values are omitted from API requests. However, any field 6674 // with an empty value appearing in NullFields will be sent to the 6675 // server as null. It is an error if a field in this list has a 6676 // non-empty value. This may be used to include null fields in Patch 6677 // requests. 6678 NullFields []string `json:"-"` 6679} 6680 6681func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) { 6682 type NoMethod PosInventoryResponse 6683 raw := NoMethod(*s) 6684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6685} 6686 6687type PosListResponse struct { 6688 // Kind: Identifies what kind of resource this is. Value: the fixed 6689 // string "content#posListResponse". 6690 Kind string `json:"kind,omitempty"` 6691 6692 Resources []*PosStore `json:"resources,omitempty"` 6693 6694 // ServerResponse contains the HTTP response code and headers from the 6695 // server. 6696 googleapi.ServerResponse `json:"-"` 6697 6698 // ForceSendFields is a list of field names (e.g. "Kind") to 6699 // unconditionally include in API requests. By default, fields with 6700 // empty values are omitted from API requests. However, any non-pointer, 6701 // non-interface field appearing in ForceSendFields will be sent to the 6702 // server regardless of whether the field is empty or not. This may be 6703 // used to include empty fields in Patch requests. 6704 ForceSendFields []string `json:"-"` 6705 6706 // NullFields is a list of field names (e.g. "Kind") to include in API 6707 // requests with the JSON null value. By default, fields with empty 6708 // values are omitted from API requests. However, any field with an 6709 // empty value appearing in NullFields will be sent to the server as 6710 // null. It is an error if a field in this list has a non-empty value. 6711 // This may be used to include null fields in Patch requests. 6712 NullFields []string `json:"-"` 6713} 6714 6715func (s *PosListResponse) MarshalJSON() ([]byte, error) { 6716 type NoMethod PosListResponse 6717 raw := NoMethod(*s) 6718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6719} 6720 6721// PosSale: The change of the available quantity of an item at the given 6722// store. 6723type PosSale struct { 6724 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6725 ContentLanguage string `json:"contentLanguage,omitempty"` 6726 6727 // Gtin: Global Trade Item Number. 6728 Gtin string `json:"gtin,omitempty"` 6729 6730 // ItemId: A unique identifier for the item. 6731 ItemId string `json:"itemId,omitempty"` 6732 6733 // Kind: Identifies what kind of resource this is. Value: the fixed 6734 // string "content#posSale". 6735 Kind string `json:"kind,omitempty"` 6736 6737 // Price: The price of the item. 6738 Price *Price `json:"price,omitempty"` 6739 6740 // Quantity: The relative change of the available quantity. Negative for 6741 // items sold. 6742 Quantity int64 `json:"quantity,omitempty,string"` 6743 6744 // SaleId: A unique ID to group items from the same sale event. 6745 SaleId string `json:"saleId,omitempty"` 6746 6747 // StoreCode: The identifier of the merchant's store. Either a storeCode 6748 // inserted via the API or the code of the store in Google My Business. 6749 StoreCode string `json:"storeCode,omitempty"` 6750 6751 // TargetCountry: The CLDR territory code for the item. 6752 TargetCountry string `json:"targetCountry,omitempty"` 6753 6754 // Timestamp: The inventory timestamp, in ISO 8601 format. 6755 Timestamp string `json:"timestamp,omitempty"` 6756 6757 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6758 // unconditionally include in API requests. By default, fields with 6759 // empty values are omitted from API requests. However, any non-pointer, 6760 // non-interface field appearing in ForceSendFields will be sent to the 6761 // server regardless of whether the field is empty or not. This may be 6762 // used to include empty fields in Patch requests. 6763 ForceSendFields []string `json:"-"` 6764 6765 // NullFields is a list of field names (e.g. "ContentLanguage") to 6766 // include in API requests with the JSON null value. By default, fields 6767 // with empty values are omitted from API requests. However, any field 6768 // with an empty value appearing in NullFields will be sent to the 6769 // server as null. It is an error if a field in this list has a 6770 // non-empty value. This may be used to include null fields in Patch 6771 // requests. 6772 NullFields []string `json:"-"` 6773} 6774 6775func (s *PosSale) MarshalJSON() ([]byte, error) { 6776 type NoMethod PosSale 6777 raw := NoMethod(*s) 6778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6779} 6780 6781type PosSaleRequest struct { 6782 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6783 ContentLanguage string `json:"contentLanguage,omitempty"` 6784 6785 // Gtin: Global Trade Item Number. 6786 Gtin string `json:"gtin,omitempty"` 6787 6788 // ItemId: A unique identifier for the item. 6789 ItemId string `json:"itemId,omitempty"` 6790 6791 // Price: The price of the item. 6792 Price *Price `json:"price,omitempty"` 6793 6794 // Quantity: The relative change of the available quantity. Negative for 6795 // items sold. 6796 Quantity int64 `json:"quantity,omitempty,string"` 6797 6798 // SaleId: A unique ID to group items from the same sale event. 6799 SaleId string `json:"saleId,omitempty"` 6800 6801 // StoreCode: The identifier of the merchant's store. Either a storeCode 6802 // inserted via the API or the code of the store in Google My Business. 6803 StoreCode string `json:"storeCode,omitempty"` 6804 6805 // TargetCountry: The CLDR territory code for the item. 6806 TargetCountry string `json:"targetCountry,omitempty"` 6807 6808 // Timestamp: The inventory timestamp, in ISO 8601 format. 6809 Timestamp string `json:"timestamp,omitempty"` 6810 6811 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6812 // unconditionally include in API requests. By default, fields with 6813 // empty values are omitted from API requests. However, any non-pointer, 6814 // non-interface field appearing in ForceSendFields will be sent to the 6815 // server regardless of whether the field is empty or not. This may be 6816 // used to include empty fields in Patch requests. 6817 ForceSendFields []string `json:"-"` 6818 6819 // NullFields is a list of field names (e.g. "ContentLanguage") to 6820 // include in API requests with the JSON null value. By default, fields 6821 // with empty values are omitted from API requests. However, any field 6822 // with an empty value appearing in NullFields will be sent to the 6823 // server as null. It is an error if a field in this list has a 6824 // non-empty value. This may be used to include null fields in Patch 6825 // requests. 6826 NullFields []string `json:"-"` 6827} 6828 6829func (s *PosSaleRequest) MarshalJSON() ([]byte, error) { 6830 type NoMethod PosSaleRequest 6831 raw := NoMethod(*s) 6832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6833} 6834 6835type PosSaleResponse struct { 6836 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 6837 ContentLanguage string `json:"contentLanguage,omitempty"` 6838 6839 // Gtin: Global Trade Item Number. 6840 Gtin string `json:"gtin,omitempty"` 6841 6842 // ItemId: A unique identifier for the item. 6843 ItemId string `json:"itemId,omitempty"` 6844 6845 // Kind: Identifies what kind of resource this is. Value: the fixed 6846 // string "content#posSaleResponse". 6847 Kind string `json:"kind,omitempty"` 6848 6849 // Price: The price of the item. 6850 Price *Price `json:"price,omitempty"` 6851 6852 // Quantity: The relative change of the available quantity. Negative for 6853 // items sold. 6854 Quantity int64 `json:"quantity,omitempty,string"` 6855 6856 // SaleId: A unique ID to group items from the same sale event. 6857 SaleId string `json:"saleId,omitempty"` 6858 6859 // StoreCode: The identifier of the merchant's store. Either a storeCode 6860 // inserted via the API or the code of the store in Google My Business. 6861 StoreCode string `json:"storeCode,omitempty"` 6862 6863 // TargetCountry: The CLDR territory code for the item. 6864 TargetCountry string `json:"targetCountry,omitempty"` 6865 6866 // Timestamp: The inventory timestamp, in ISO 8601 format. 6867 Timestamp string `json:"timestamp,omitempty"` 6868 6869 // ServerResponse contains the HTTP response code and headers from the 6870 // server. 6871 googleapi.ServerResponse `json:"-"` 6872 6873 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 6874 // unconditionally include in API requests. By default, fields with 6875 // empty values are omitted from API requests. However, any non-pointer, 6876 // non-interface field appearing in ForceSendFields will be sent to the 6877 // server regardless of whether the field is empty or not. This may be 6878 // used to include empty fields in Patch requests. 6879 ForceSendFields []string `json:"-"` 6880 6881 // NullFields is a list of field names (e.g. "ContentLanguage") to 6882 // include in API requests with the JSON null value. By default, fields 6883 // with empty values are omitted from API requests. However, any field 6884 // with an empty value appearing in NullFields will be sent to the 6885 // server as null. It is an error if a field in this list has a 6886 // non-empty value. This may be used to include null fields in Patch 6887 // requests. 6888 NullFields []string `json:"-"` 6889} 6890 6891func (s *PosSaleResponse) MarshalJSON() ([]byte, error) { 6892 type NoMethod PosSaleResponse 6893 raw := NoMethod(*s) 6894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6895} 6896 6897// PosStore: Store resource. 6898type PosStore struct { 6899 // Kind: Identifies what kind of resource this is. Value: the fixed 6900 // string "content#posStore". 6901 Kind string `json:"kind,omitempty"` 6902 6903 // StoreAddress: The street address of the store. 6904 StoreAddress string `json:"storeAddress,omitempty"` 6905 6906 // StoreCode: A store identifier that is unique for the given merchant. 6907 StoreCode string `json:"storeCode,omitempty"` 6908 6909 // ServerResponse contains the HTTP response code and headers from the 6910 // server. 6911 googleapi.ServerResponse `json:"-"` 6912 6913 // ForceSendFields is a list of field names (e.g. "Kind") to 6914 // unconditionally include in API requests. By default, fields with 6915 // empty values are omitted from API requests. However, any non-pointer, 6916 // non-interface field appearing in ForceSendFields will be sent to the 6917 // server regardless of whether the field is empty or not. This may be 6918 // used to include empty fields in Patch requests. 6919 ForceSendFields []string `json:"-"` 6920 6921 // NullFields is a list of field names (e.g. "Kind") to include in API 6922 // requests with the JSON null value. By default, fields with empty 6923 // values are omitted from API requests. However, any field with an 6924 // empty value appearing in NullFields will be sent to the server as 6925 // null. It is an error if a field in this list has a non-empty value. 6926 // This may be used to include null fields in Patch requests. 6927 NullFields []string `json:"-"` 6928} 6929 6930func (s *PosStore) MarshalJSON() ([]byte, error) { 6931 type NoMethod PosStore 6932 raw := NoMethod(*s) 6933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6934} 6935 6936type PostalCodeGroup struct { 6937 // Country: The CLDR territory code of the country the postal code group 6938 // applies to. Required. 6939 Country string `json:"country,omitempty"` 6940 6941 // Name: The name of the postal code group, referred to in headers. 6942 // Required. 6943 Name string `json:"name,omitempty"` 6944 6945 // PostalCodeRanges: A range of postal codes. Required. 6946 PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` 6947 6948 // ForceSendFields is a list of field names (e.g. "Country") to 6949 // unconditionally include in API requests. By default, fields with 6950 // empty values are omitted from API requests. However, any non-pointer, 6951 // non-interface field appearing in ForceSendFields will be sent to the 6952 // server regardless of whether the field is empty or not. This may be 6953 // used to include empty fields in Patch requests. 6954 ForceSendFields []string `json:"-"` 6955 6956 // NullFields is a list of field names (e.g. "Country") to include in 6957 // API requests with the JSON null value. By default, fields with empty 6958 // values are omitted from API requests. However, any field with an 6959 // empty value appearing in NullFields will be sent to the server as 6960 // null. It is an error if a field in this list has a non-empty value. 6961 // This may be used to include null fields in Patch requests. 6962 NullFields []string `json:"-"` 6963} 6964 6965func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) { 6966 type NoMethod PostalCodeGroup 6967 raw := NoMethod(*s) 6968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6969} 6970 6971type PostalCodeRange struct { 6972 // PostalCodeRangeBegin: A postal code or a pattern of the form prefix* 6973 // denoting the inclusive lower bound of the range defining the area. 6974 // Examples values: "94108", "9410*", "9*". Required. 6975 PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` 6976 6977 // PostalCodeRangeEnd: A postal code or a pattern of the form prefix* 6978 // denoting the inclusive upper bound of the range defining the area. It 6979 // must have the same length as postalCodeRangeBegin: if 6980 // postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be 6981 // a postal code too; if postalCodeRangeBegin is a pattern then 6982 // postalCodeRangeEnd must be a pattern with the same prefix length. 6983 // Optional: if not set, then the area is defined as being all the 6984 // postal codes matching postalCodeRangeBegin. 6985 PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` 6986 6987 // ForceSendFields is a list of field names (e.g. 6988 // "PostalCodeRangeBegin") to unconditionally include in API requests. 6989 // By default, fields with empty values are omitted from API requests. 6990 // However, any non-pointer, non-interface field appearing in 6991 // ForceSendFields will be sent to the server regardless of whether the 6992 // field is empty or not. This may be used to include empty fields in 6993 // Patch requests. 6994 ForceSendFields []string `json:"-"` 6995 6996 // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to 6997 // include in API requests with the JSON null value. By default, fields 6998 // with empty values are omitted from API requests. However, any field 6999 // with an empty value appearing in NullFields will be sent to the 7000 // server as null. It is an error if a field in this list has a 7001 // non-empty value. This may be used to include null fields in Patch 7002 // requests. 7003 NullFields []string `json:"-"` 7004} 7005 7006func (s *PostalCodeRange) MarshalJSON() ([]byte, error) { 7007 type NoMethod PostalCodeRange 7008 raw := NoMethod(*s) 7009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7010} 7011 7012type Price struct { 7013 // Currency: The currency of the price. 7014 Currency string `json:"currency,omitempty"` 7015 7016 // Value: The price represented as a number. 7017 Value string `json:"value,omitempty"` 7018 7019 // ForceSendFields is a list of field names (e.g. "Currency") to 7020 // unconditionally include in API requests. By default, fields with 7021 // empty values are omitted from API requests. However, any non-pointer, 7022 // non-interface field appearing in ForceSendFields will be sent to the 7023 // server regardless of whether the field is empty or not. This may be 7024 // used to include empty fields in Patch requests. 7025 ForceSendFields []string `json:"-"` 7026 7027 // NullFields is a list of field names (e.g. "Currency") to include in 7028 // API requests with the JSON null value. By default, fields with empty 7029 // values are omitted from API requests. However, any field with an 7030 // empty value appearing in NullFields will be sent to the server as 7031 // null. It is an error if a field in this list has a non-empty value. 7032 // This may be used to include null fields in Patch requests. 7033 NullFields []string `json:"-"` 7034} 7035 7036func (s *Price) MarshalJSON() ([]byte, error) { 7037 type NoMethod Price 7038 raw := NoMethod(*s) 7039 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7040} 7041 7042// Product: Product data. 7043type Product struct { 7044 // AdditionalImageLinks: Additional URLs of images of the item. 7045 AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` 7046 7047 // AdditionalProductTypes: Additional categories of the item (formatted 7048 // as in products feed specification). 7049 AdditionalProductTypes []string `json:"additionalProductTypes,omitempty"` 7050 7051 // Adult: Set to true if the item is targeted towards adults. 7052 Adult bool `json:"adult,omitempty"` 7053 7054 // AdwordsGrouping: Used to group items in an arbitrary way. Only for 7055 // CPA%, discouraged otherwise. 7056 AdwordsGrouping string `json:"adwordsGrouping,omitempty"` 7057 7058 // AdwordsLabels: Similar to adwords_grouping, but only works on CPC. 7059 AdwordsLabels []string `json:"adwordsLabels,omitempty"` 7060 7061 // AdwordsRedirect: Allows advertisers to override the item URL when the 7062 // product is shown within the context of Product Ads. 7063 AdwordsRedirect string `json:"adwordsRedirect,omitempty"` 7064 7065 // AgeGroup: Target age group of the item. 7066 AgeGroup string `json:"ageGroup,omitempty"` 7067 7068 // Aspects: Specifies the intended aspects for the product. 7069 Aspects []*ProductAspect `json:"aspects,omitempty"` 7070 7071 // Availability: Availability status of the item. 7072 Availability string `json:"availability,omitempty"` 7073 7074 // AvailabilityDate: The day a pre-ordered product becomes available for 7075 // delivery, in ISO 8601 format. 7076 AvailabilityDate string `json:"availabilityDate,omitempty"` 7077 7078 // Brand: Brand of the item. 7079 Brand string `json:"brand,omitempty"` 7080 7081 // Channel: The item's channel (online or local). 7082 Channel string `json:"channel,omitempty"` 7083 7084 // Color: Color of the item. 7085 Color string `json:"color,omitempty"` 7086 7087 // Condition: Condition or state of the item. 7088 Condition string `json:"condition,omitempty"` 7089 7090 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 7091 ContentLanguage string `json:"contentLanguage,omitempty"` 7092 7093 // CustomAttributes: A list of custom (merchant-provided) attributes. It 7094 // can also be used for submitting any attribute of the feed 7095 // specification in its generic form (e.g., { "name": "size type", 7096 // "type": "text", "value": "regular" }). This is useful for submitting 7097 // attributes not explicitly exposed by the API. 7098 CustomAttributes []*ProductCustomAttribute `json:"customAttributes,omitempty"` 7099 7100 // CustomGroups: A list of custom (merchant-provided) custom attribute 7101 // groups. 7102 CustomGroups []*ProductCustomGroup `json:"customGroups,omitempty"` 7103 7104 // CustomLabel0: Custom label 0 for custom grouping of items in a 7105 // Shopping campaign. 7106 CustomLabel0 string `json:"customLabel0,omitempty"` 7107 7108 // CustomLabel1: Custom label 1 for custom grouping of items in a 7109 // Shopping campaign. 7110 CustomLabel1 string `json:"customLabel1,omitempty"` 7111 7112 // CustomLabel2: Custom label 2 for custom grouping of items in a 7113 // Shopping campaign. 7114 CustomLabel2 string `json:"customLabel2,omitempty"` 7115 7116 // CustomLabel3: Custom label 3 for custom grouping of items in a 7117 // Shopping campaign. 7118 CustomLabel3 string `json:"customLabel3,omitempty"` 7119 7120 // CustomLabel4: Custom label 4 for custom grouping of items in a 7121 // Shopping campaign. 7122 CustomLabel4 string `json:"customLabel4,omitempty"` 7123 7124 // Description: Description of the item. 7125 Description string `json:"description,omitempty"` 7126 7127 // Destinations: Specifies the intended destinations for the product. 7128 Destinations []*ProductDestination `json:"destinations,omitempty"` 7129 7130 // DisplayAdsId: An identifier for an item for dynamic remarketing 7131 // campaigns. 7132 DisplayAdsId string `json:"displayAdsId,omitempty"` 7133 7134 // DisplayAdsLink: URL directly to your item's landing page for dynamic 7135 // remarketing campaigns. 7136 DisplayAdsLink string `json:"displayAdsLink,omitempty"` 7137 7138 // DisplayAdsSimilarIds: Advertiser-specified recommendations. 7139 DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` 7140 7141 // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. 7142 DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` 7143 7144 // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. 7145 DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` 7146 7147 // EnergyEfficiencyClass: The energy efficiency class as defined in EU 7148 // directive 2010/30/EU. 7149 EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` 7150 7151 // ExpirationDate: Date on which the item should expire, as specified 7152 // upon insertion, in ISO 8601 format. The actual expiration date in 7153 // Google Shopping is exposed in productstatuses as googleExpirationDate 7154 // and might be earlier if expirationDate is too far in the future. 7155 ExpirationDate string `json:"expirationDate,omitempty"` 7156 7157 // Gender: Target gender of the item. 7158 Gender string `json:"gender,omitempty"` 7159 7160 // GoogleProductCategory: Google's category of the item (see Google 7161 // product taxonomy). 7162 GoogleProductCategory string `json:"googleProductCategory,omitempty"` 7163 7164 // Gtin: Global Trade Item Number (GTIN) of the item. 7165 Gtin string `json:"gtin,omitempty"` 7166 7167 // Id: The REST id of the product. Content API methods that operate on 7168 // products take this as their productId parameter. 7169 // The REST id for a product is of the form 7170 // channel:contentLanguage:targetCountry:offerId. 7171 Id string `json:"id,omitempty"` 7172 7173 // IdentifierExists: False when the item does not have unique product 7174 // identifiers appropriate to its category, such as GTIN, MPN, and 7175 // brand. Required according to the Unique Product Identifier Rules for 7176 // all target countries except for Canada. 7177 IdentifierExists bool `json:"identifierExists,omitempty"` 7178 7179 // ImageLink: URL of an image of the item. 7180 ImageLink string `json:"imageLink,omitempty"` 7181 7182 // Installment: Number and amount of installments to pay for an item. 7183 // Brazil only. 7184 Installment *Installment `json:"installment,omitempty"` 7185 7186 // IsBundle: Whether the item is a merchant-defined bundle. A bundle is 7187 // a custom grouping of different products sold by a merchant for a 7188 // single price. 7189 IsBundle bool `json:"isBundle,omitempty"` 7190 7191 // ItemGroupId: Shared identifier for all variants of the same product. 7192 ItemGroupId string `json:"itemGroupId,omitempty"` 7193 7194 // Kind: Identifies what kind of resource this is. Value: the fixed 7195 // string "content#product". 7196 Kind string `json:"kind,omitempty"` 7197 7198 // Link: URL directly linking to your item's page on your website. 7199 Link string `json:"link,omitempty"` 7200 7201 // LoyaltyPoints: Loyalty points that users receive after purchasing the 7202 // item. Japan only. 7203 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 7204 7205 // Material: The material of which the item is made. 7206 Material string `json:"material,omitempty"` 7207 7208 // MaxHandlingTime: Maximal product handling time (in business days). 7209 MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` 7210 7211 // MinHandlingTime: Minimal product handling time (in business days). 7212 MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` 7213 7214 // MobileLink: Link to a mobile-optimized version of the landing page. 7215 MobileLink string `json:"mobileLink,omitempty"` 7216 7217 // Mpn: Manufacturer Part Number (MPN) of the item. 7218 Mpn string `json:"mpn,omitempty"` 7219 7220 // Multipack: The number of identical products in a merchant-defined 7221 // multipack. 7222 Multipack int64 `json:"multipack,omitempty,string"` 7223 7224 // OfferId: A unique identifier for the item. Leading and trailing 7225 // whitespaces are stripped and multiple whitespaces are replaced by a 7226 // single whitespace upon submission. Only valid unicode characters are 7227 // accepted. See the products feed specification for details. 7228 // Note: Content API methods that operate on products take the REST id 7229 // of the product, not this identifier. 7230 OfferId string `json:"offerId,omitempty"` 7231 7232 // OnlineOnly: Whether an item is available for purchase only online. 7233 OnlineOnly bool `json:"onlineOnly,omitempty"` 7234 7235 // Pattern: The item's pattern (e.g. polka dots). 7236 Pattern string `json:"pattern,omitempty"` 7237 7238 // Price: Price of the item. 7239 Price *Price `json:"price,omitempty"` 7240 7241 // ProductType: Your category of the item (formatted as in products feed 7242 // specification). 7243 ProductType string `json:"productType,omitempty"` 7244 7245 // PromotionIds: The unique ID of a promotion. 7246 PromotionIds []string `json:"promotionIds,omitempty"` 7247 7248 // SalePrice: Advertised sale price of the item. 7249 SalePrice *Price `json:"salePrice,omitempty"` 7250 7251 // SalePriceEffectiveDate: Date range during which the item is on sale 7252 // (see products feed specification). 7253 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 7254 7255 // SellOnGoogleQuantity: The quantity of the product that is reserved 7256 // for sell-on-google ads. 7257 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` 7258 7259 // Shipping: Shipping rules. 7260 Shipping []*ProductShipping `json:"shipping,omitempty"` 7261 7262 // ShippingHeight: Height of the item for shipping. 7263 ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` 7264 7265 // ShippingLabel: The shipping label of the product, used to group 7266 // product in account-level shipping rules. 7267 ShippingLabel string `json:"shippingLabel,omitempty"` 7268 7269 // ShippingLength: Length of the item for shipping. 7270 ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` 7271 7272 // ShippingWeight: Weight of the item for shipping. 7273 ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` 7274 7275 // ShippingWidth: Width of the item for shipping. 7276 ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` 7277 7278 // SizeSystem: System in which the size is specified. Recommended for 7279 // apparel items. 7280 SizeSystem string `json:"sizeSystem,omitempty"` 7281 7282 // SizeType: The cut of the item. Recommended for apparel items. 7283 SizeType string `json:"sizeType,omitempty"` 7284 7285 // Sizes: Size of the item. 7286 Sizes []string `json:"sizes,omitempty"` 7287 7288 // TargetCountry: The CLDR territory code for the item. 7289 TargetCountry string `json:"targetCountry,omitempty"` 7290 7291 // Taxes: Tax information. 7292 Taxes []*ProductTax `json:"taxes,omitempty"` 7293 7294 // Title: Title of the item. 7295 Title string `json:"title,omitempty"` 7296 7297 // UnitPricingBaseMeasure: The preference of the denominator of the unit 7298 // price. 7299 UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` 7300 7301 // UnitPricingMeasure: The measure and dimension of an item. 7302 UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` 7303 7304 // ValidatedDestinations: The read-only list of intended destinations 7305 // which passed validation. 7306 ValidatedDestinations []string `json:"validatedDestinations,omitempty"` 7307 7308 // Warnings: Read-only warnings. 7309 Warnings []*Error `json:"warnings,omitempty"` 7310 7311 // ServerResponse contains the HTTP response code and headers from the 7312 // server. 7313 googleapi.ServerResponse `json:"-"` 7314 7315 // ForceSendFields is a list of field names (e.g. 7316 // "AdditionalImageLinks") to unconditionally include in API requests. 7317 // By default, fields with empty values are omitted from API requests. 7318 // However, any non-pointer, non-interface field appearing in 7319 // ForceSendFields will be sent to the server regardless of whether the 7320 // field is empty or not. This may be used to include empty fields in 7321 // Patch requests. 7322 ForceSendFields []string `json:"-"` 7323 7324 // NullFields is a list of field names (e.g. "AdditionalImageLinks") to 7325 // include in API requests with the JSON null value. By default, fields 7326 // with empty values are omitted from API requests. However, any field 7327 // with an empty value appearing in NullFields will be sent to the 7328 // server as null. It is an error if a field in this list has a 7329 // non-empty value. This may be used to include null fields in Patch 7330 // requests. 7331 NullFields []string `json:"-"` 7332} 7333 7334func (s *Product) MarshalJSON() ([]byte, error) { 7335 type NoMethod Product 7336 raw := NoMethod(*s) 7337 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7338} 7339 7340func (s *Product) UnmarshalJSON(data []byte) error { 7341 type NoMethod Product 7342 var s1 struct { 7343 DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` 7344 *NoMethod 7345 } 7346 s1.NoMethod = (*NoMethod)(s) 7347 if err := json.Unmarshal(data, &s1); err != nil { 7348 return err 7349 } 7350 s.DisplayAdsValue = float64(s1.DisplayAdsValue) 7351 return nil 7352} 7353 7354type ProductAspect struct { 7355 // AspectName: The name of the aspect. 7356 AspectName string `json:"aspectName,omitempty"` 7357 7358 // DestinationName: The name of the destination. Leave out to apply to 7359 // all destinations. 7360 DestinationName string `json:"destinationName,omitempty"` 7361 7362 // Intention: Whether the aspect is required, excluded or should be 7363 // validated. 7364 Intention string `json:"intention,omitempty"` 7365 7366 // ForceSendFields is a list of field names (e.g. "AspectName") to 7367 // unconditionally include in API requests. By default, fields with 7368 // empty values are omitted from API requests. However, any non-pointer, 7369 // non-interface field appearing in ForceSendFields will be sent to the 7370 // server regardless of whether the field is empty or not. This may be 7371 // used to include empty fields in Patch requests. 7372 ForceSendFields []string `json:"-"` 7373 7374 // NullFields is a list of field names (e.g. "AspectName") to include in 7375 // API requests with the JSON null value. By default, fields with empty 7376 // values are omitted from API requests. However, any field with an 7377 // empty value appearing in NullFields will be sent to the server as 7378 // null. It is an error if a field in this list has a non-empty value. 7379 // This may be used to include null fields in Patch requests. 7380 NullFields []string `json:"-"` 7381} 7382 7383func (s *ProductAspect) MarshalJSON() ([]byte, error) { 7384 type NoMethod ProductAspect 7385 raw := NoMethod(*s) 7386 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7387} 7388 7389type ProductCustomAttribute struct { 7390 // Name: The name of the attribute. Underscores will be replaced by 7391 // spaces upon insertion. 7392 Name string `json:"name,omitempty"` 7393 7394 // Type: The type of the attribute. 7395 Type string `json:"type,omitempty"` 7396 7397 // Unit: Free-form unit of the attribute. Unit can only be used for 7398 // values of type INT or FLOAT. 7399 Unit string `json:"unit,omitempty"` 7400 7401 // Value: The value of the attribute. 7402 Value string `json:"value,omitempty"` 7403 7404 // ForceSendFields is a list of field names (e.g. "Name") to 7405 // unconditionally include in API requests. By default, fields with 7406 // empty values are omitted from API requests. However, any non-pointer, 7407 // non-interface field appearing in ForceSendFields will be sent to the 7408 // server regardless of whether the field is empty or not. This may be 7409 // used to include empty fields in Patch requests. 7410 ForceSendFields []string `json:"-"` 7411 7412 // NullFields is a list of field names (e.g. "Name") to include in API 7413 // requests with the JSON null value. By default, fields with empty 7414 // values are omitted from API requests. However, any field with an 7415 // empty value appearing in NullFields will be sent to the server as 7416 // null. It is an error if a field in this list has a non-empty value. 7417 // This may be used to include null fields in Patch requests. 7418 NullFields []string `json:"-"` 7419} 7420 7421func (s *ProductCustomAttribute) MarshalJSON() ([]byte, error) { 7422 type NoMethod ProductCustomAttribute 7423 raw := NoMethod(*s) 7424 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7425} 7426 7427type ProductCustomGroup struct { 7428 // Attributes: The sub-attributes. 7429 Attributes []*ProductCustomAttribute `json:"attributes,omitempty"` 7430 7431 // Name: The name of the group. Underscores will be replaced by spaces 7432 // upon insertion. 7433 Name string `json:"name,omitempty"` 7434 7435 // ForceSendFields is a list of field names (e.g. "Attributes") to 7436 // unconditionally include in API requests. By default, fields with 7437 // empty values are omitted from API requests. However, any non-pointer, 7438 // non-interface field appearing in ForceSendFields will be sent to the 7439 // server regardless of whether the field is empty or not. This may be 7440 // used to include empty fields in Patch requests. 7441 ForceSendFields []string `json:"-"` 7442 7443 // NullFields is a list of field names (e.g. "Attributes") to include in 7444 // API requests with the JSON null value. By default, fields with empty 7445 // values are omitted from API requests. However, any field with an 7446 // empty value appearing in NullFields will be sent to the server as 7447 // null. It is an error if a field in this list has a non-empty value. 7448 // This may be used to include null fields in Patch requests. 7449 NullFields []string `json:"-"` 7450} 7451 7452func (s *ProductCustomGroup) MarshalJSON() ([]byte, error) { 7453 type NoMethod ProductCustomGroup 7454 raw := NoMethod(*s) 7455 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7456} 7457 7458type ProductDestination struct { 7459 // DestinationName: The name of the destination. 7460 DestinationName string `json:"destinationName,omitempty"` 7461 7462 // Intention: Whether the destination is required, excluded or should be 7463 // validated. 7464 Intention string `json:"intention,omitempty"` 7465 7466 // ForceSendFields is a list of field names (e.g. "DestinationName") to 7467 // unconditionally include in API requests. By default, fields with 7468 // empty values are omitted from API requests. However, any non-pointer, 7469 // non-interface field appearing in ForceSendFields will be sent to the 7470 // server regardless of whether the field is empty or not. This may be 7471 // used to include empty fields in Patch requests. 7472 ForceSendFields []string `json:"-"` 7473 7474 // NullFields is a list of field names (e.g. "DestinationName") to 7475 // include in API requests with the JSON null value. By default, fields 7476 // with empty values are omitted from API requests. However, any field 7477 // with an empty value appearing in NullFields will be sent to the 7478 // server as null. It is an error if a field in this list has a 7479 // non-empty value. This may be used to include null fields in Patch 7480 // requests. 7481 NullFields []string `json:"-"` 7482} 7483 7484func (s *ProductDestination) MarshalJSON() ([]byte, error) { 7485 type NoMethod ProductDestination 7486 raw := NoMethod(*s) 7487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7488} 7489 7490type ProductShipping struct { 7491 // Country: The CLDR territory code of the country to which an item will 7492 // ship. 7493 Country string `json:"country,omitempty"` 7494 7495 // LocationGroupName: The location where the shipping is applicable, 7496 // represented by a location group name. 7497 LocationGroupName string `json:"locationGroupName,omitempty"` 7498 7499 // LocationId: The numeric id of a location that the shipping rate 7500 // applies to as defined in the AdWords API. 7501 LocationId int64 `json:"locationId,omitempty,string"` 7502 7503 // PostalCode: The postal code range that the shipping rate applies to, 7504 // represented by a postal code, a postal code prefix followed by a * 7505 // wildcard, a range between two postal codes or two postal code 7506 // prefixes of equal length. 7507 PostalCode string `json:"postalCode,omitempty"` 7508 7509 // Price: Fixed shipping price, represented as a number. 7510 Price *Price `json:"price,omitempty"` 7511 7512 // Region: The geographic region to which a shipping rate applies. 7513 Region string `json:"region,omitempty"` 7514 7515 // Service: A free-form description of the service class or delivery 7516 // speed. 7517 Service string `json:"service,omitempty"` 7518 7519 // ForceSendFields is a list of field names (e.g. "Country") to 7520 // unconditionally include in API requests. By default, fields with 7521 // empty values are omitted from API requests. However, any non-pointer, 7522 // non-interface field appearing in ForceSendFields will be sent to the 7523 // server regardless of whether the field is empty or not. This may be 7524 // used to include empty fields in Patch requests. 7525 ForceSendFields []string `json:"-"` 7526 7527 // NullFields is a list of field names (e.g. "Country") to include in 7528 // API requests with the JSON null value. By default, fields with empty 7529 // values are omitted from API requests. However, any field with an 7530 // empty value appearing in NullFields will be sent to the server as 7531 // null. It is an error if a field in this list has a non-empty value. 7532 // This may be used to include null fields in Patch requests. 7533 NullFields []string `json:"-"` 7534} 7535 7536func (s *ProductShipping) MarshalJSON() ([]byte, error) { 7537 type NoMethod ProductShipping 7538 raw := NoMethod(*s) 7539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7540} 7541 7542type ProductShippingDimension struct { 7543 // Unit: The unit of value. 7544 // 7545 // Acceptable values are: 7546 // - "cm" 7547 // - "in" 7548 Unit string `json:"unit,omitempty"` 7549 7550 // Value: The dimension of the product used to calculate the shipping 7551 // cost of the item. 7552 Value float64 `json:"value,omitempty"` 7553 7554 // ForceSendFields is a list of field names (e.g. "Unit") to 7555 // unconditionally include in API requests. By default, fields with 7556 // empty values are omitted from API requests. However, any non-pointer, 7557 // non-interface field appearing in ForceSendFields will be sent to the 7558 // server regardless of whether the field is empty or not. This may be 7559 // used to include empty fields in Patch requests. 7560 ForceSendFields []string `json:"-"` 7561 7562 // NullFields is a list of field names (e.g. "Unit") to include in API 7563 // requests with the JSON null value. By default, fields with empty 7564 // values are omitted from API requests. However, any field with an 7565 // empty value appearing in NullFields will be sent to the server as 7566 // null. It is an error if a field in this list has a non-empty value. 7567 // This may be used to include null fields in Patch requests. 7568 NullFields []string `json:"-"` 7569} 7570 7571func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) { 7572 type NoMethod ProductShippingDimension 7573 raw := NoMethod(*s) 7574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7575} 7576 7577func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { 7578 type NoMethod ProductShippingDimension 7579 var s1 struct { 7580 Value gensupport.JSONFloat64 `json:"value"` 7581 *NoMethod 7582 } 7583 s1.NoMethod = (*NoMethod)(s) 7584 if err := json.Unmarshal(data, &s1); err != nil { 7585 return err 7586 } 7587 s.Value = float64(s1.Value) 7588 return nil 7589} 7590 7591type ProductShippingWeight struct { 7592 // Unit: The unit of value. 7593 Unit string `json:"unit,omitempty"` 7594 7595 // Value: The weight of the product used to calculate the shipping cost 7596 // of the item. 7597 Value float64 `json:"value,omitempty"` 7598 7599 // ForceSendFields is a list of field names (e.g. "Unit") to 7600 // unconditionally include in API requests. By default, fields with 7601 // empty values are omitted from API requests. However, any non-pointer, 7602 // non-interface field appearing in ForceSendFields will be sent to the 7603 // server regardless of whether the field is empty or not. This may be 7604 // used to include empty fields in Patch requests. 7605 ForceSendFields []string `json:"-"` 7606 7607 // NullFields is a list of field names (e.g. "Unit") to include in API 7608 // requests with the JSON null value. By default, fields with empty 7609 // values are omitted from API requests. However, any field with an 7610 // empty value appearing in NullFields will be sent to the server as 7611 // null. It is an error if a field in this list has a non-empty value. 7612 // This may be used to include null fields in Patch requests. 7613 NullFields []string `json:"-"` 7614} 7615 7616func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) { 7617 type NoMethod ProductShippingWeight 7618 raw := NoMethod(*s) 7619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7620} 7621 7622func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { 7623 type NoMethod ProductShippingWeight 7624 var s1 struct { 7625 Value gensupport.JSONFloat64 `json:"value"` 7626 *NoMethod 7627 } 7628 s1.NoMethod = (*NoMethod)(s) 7629 if err := json.Unmarshal(data, &s1); err != nil { 7630 return err 7631 } 7632 s.Value = float64(s1.Value) 7633 return nil 7634} 7635 7636// ProductStatus: The status of a product, i.e., information about a 7637// product computed asynchronously by the data quality analysis. 7638type ProductStatus struct { 7639 // CreationDate: Date on which the item has been created, in ISO 8601 7640 // format. 7641 CreationDate string `json:"creationDate,omitempty"` 7642 7643 // DataQualityIssues: A list of data quality issues associated with the 7644 // product. 7645 DataQualityIssues []*ProductStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 7646 7647 // DestinationStatuses: The intended destinations for the product. 7648 DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` 7649 7650 // GoogleExpirationDate: Date on which the item expires in Google 7651 // Shopping, in ISO 8601 format. 7652 GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` 7653 7654 // ItemLevelIssues: A list of all issues associated with the product. 7655 ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 7656 7657 // Kind: Identifies what kind of resource this is. Value: the fixed 7658 // string "content#productStatus". 7659 Kind string `json:"kind,omitempty"` 7660 7661 // LastUpdateDate: Date on which the item has been last updated, in ISO 7662 // 8601 format. 7663 LastUpdateDate string `json:"lastUpdateDate,omitempty"` 7664 7665 // Link: The link to the product. 7666 Link string `json:"link,omitempty"` 7667 7668 // Product: Product data after applying all the join inputs. 7669 Product *Product `json:"product,omitempty"` 7670 7671 // ProductId: The id of the product for which status is reported. 7672 ProductId string `json:"productId,omitempty"` 7673 7674 // Title: The title of the product. 7675 Title string `json:"title,omitempty"` 7676 7677 // ServerResponse contains the HTTP response code and headers from the 7678 // server. 7679 googleapi.ServerResponse `json:"-"` 7680 7681 // ForceSendFields is a list of field names (e.g. "CreationDate") to 7682 // unconditionally include in API requests. By default, fields with 7683 // empty values are omitted from API requests. However, any non-pointer, 7684 // non-interface field appearing in ForceSendFields will be sent to the 7685 // server regardless of whether the field is empty or not. This may be 7686 // used to include empty fields in Patch requests. 7687 ForceSendFields []string `json:"-"` 7688 7689 // NullFields is a list of field names (e.g. "CreationDate") to include 7690 // in API requests with the JSON null value. By default, fields with 7691 // empty values are omitted from API requests. However, any field with 7692 // an empty value appearing in NullFields will be sent to the server as 7693 // null. It is an error if a field in this list has a non-empty value. 7694 // This may be used to include null fields in Patch requests. 7695 NullFields []string `json:"-"` 7696} 7697 7698func (s *ProductStatus) MarshalJSON() ([]byte, error) { 7699 type NoMethod ProductStatus 7700 raw := NoMethod(*s) 7701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7702} 7703 7704type ProductStatusDataQualityIssue struct { 7705 // Destination: The destination the issue applies to. 7706 Destination string `json:"destination,omitempty"` 7707 7708 // Detail: A more detailed error string. 7709 Detail string `json:"detail,omitempty"` 7710 7711 // FetchStatus: The fetch status for landing_page_errors. 7712 FetchStatus string `json:"fetchStatus,omitempty"` 7713 7714 // Id: The id of the data quality issue. 7715 Id string `json:"id,omitempty"` 7716 7717 // Location: The attribute name that is relevant for the issue. 7718 Location string `json:"location,omitempty"` 7719 7720 // Severity: The severity of the data quality issue. 7721 Severity string `json:"severity,omitempty"` 7722 7723 // Timestamp: The time stamp of the data quality issue. 7724 Timestamp string `json:"timestamp,omitempty"` 7725 7726 // ValueOnLandingPage: The value of that attribute that was found on the 7727 // landing page 7728 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 7729 7730 // ValueProvided: The value the attribute had at time of evaluation. 7731 ValueProvided string `json:"valueProvided,omitempty"` 7732 7733 // ForceSendFields is a list of field names (e.g. "Destination") to 7734 // unconditionally include in API requests. By default, fields with 7735 // empty values are omitted from API requests. However, any non-pointer, 7736 // non-interface field appearing in ForceSendFields will be sent to the 7737 // server regardless of whether the field is empty or not. This may be 7738 // used to include empty fields in Patch requests. 7739 ForceSendFields []string `json:"-"` 7740 7741 // NullFields is a list of field names (e.g. "Destination") to include 7742 // in API requests with the JSON null value. By default, fields with 7743 // empty values are omitted from API requests. However, any field with 7744 // an empty value appearing in NullFields will be sent to the server as 7745 // null. It is an error if a field in this list has a non-empty value. 7746 // This may be used to include null fields in Patch requests. 7747 NullFields []string `json:"-"` 7748} 7749 7750func (s *ProductStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 7751 type NoMethod ProductStatusDataQualityIssue 7752 raw := NoMethod(*s) 7753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7754} 7755 7756type ProductStatusDestinationStatus struct { 7757 // ApprovalPending: Whether the approval status might change due to 7758 // further processing. 7759 ApprovalPending bool `json:"approvalPending,omitempty"` 7760 7761 // ApprovalStatus: The destination's approval status. 7762 ApprovalStatus string `json:"approvalStatus,omitempty"` 7763 7764 // Destination: The name of the destination 7765 Destination string `json:"destination,omitempty"` 7766 7767 // Intention: Provided for backward compatibility only. Always set to 7768 // "required". 7769 Intention string `json:"intention,omitempty"` 7770 7771 // ForceSendFields is a list of field names (e.g. "ApprovalPending") to 7772 // unconditionally include in API requests. By default, fields with 7773 // empty values are omitted from API requests. However, any non-pointer, 7774 // non-interface field appearing in ForceSendFields will be sent to the 7775 // server regardless of whether the field is empty or not. This may be 7776 // used to include empty fields in Patch requests. 7777 ForceSendFields []string `json:"-"` 7778 7779 // NullFields is a list of field names (e.g. "ApprovalPending") to 7780 // include in API requests with the JSON null value. By default, fields 7781 // with empty values are omitted from API requests. However, any field 7782 // with an empty value appearing in NullFields will be sent to the 7783 // server as null. It is an error if a field in this list has a 7784 // non-empty value. This may be used to include null fields in Patch 7785 // requests. 7786 NullFields []string `json:"-"` 7787} 7788 7789func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { 7790 type NoMethod ProductStatusDestinationStatus 7791 raw := NoMethod(*s) 7792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7793} 7794 7795type ProductStatusItemLevelIssue struct { 7796 // AttributeName: The attribute's name, if the issue is caused by a 7797 // single attribute. 7798 AttributeName string `json:"attributeName,omitempty"` 7799 7800 // Code: The error code of the issue. 7801 Code string `json:"code,omitempty"` 7802 7803 // Description: A short issue description in English. 7804 Description string `json:"description,omitempty"` 7805 7806 // Destination: The destination the issue applies to. 7807 Destination string `json:"destination,omitempty"` 7808 7809 // Detail: A detailed issue description in English. 7810 Detail string `json:"detail,omitempty"` 7811 7812 // Documentation: The URL of a web page to help with resolving this 7813 // issue. 7814 Documentation string `json:"documentation,omitempty"` 7815 7816 // Resolution: Whether the issue can be resolved by the merchant. 7817 Resolution string `json:"resolution,omitempty"` 7818 7819 // Servability: How this issue affects serving of the offer. 7820 Servability string `json:"servability,omitempty"` 7821 7822 // ForceSendFields is a list of field names (e.g. "AttributeName") to 7823 // unconditionally include in API requests. By default, fields with 7824 // empty values are omitted from API requests. However, any non-pointer, 7825 // non-interface field appearing in ForceSendFields will be sent to the 7826 // server regardless of whether the field is empty or not. This may be 7827 // used to include empty fields in Patch requests. 7828 ForceSendFields []string `json:"-"` 7829 7830 // NullFields is a list of field names (e.g. "AttributeName") to include 7831 // in API requests with the JSON null value. By default, fields with 7832 // empty values are omitted from API requests. However, any field with 7833 // an empty value appearing in NullFields will be sent to the server as 7834 // null. It is an error if a field in this list has a non-empty value. 7835 // This may be used to include null fields in Patch requests. 7836 NullFields []string `json:"-"` 7837} 7838 7839func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 7840 type NoMethod ProductStatusItemLevelIssue 7841 raw := NoMethod(*s) 7842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7843} 7844 7845type ProductTax struct { 7846 // Country: The country within which the item is taxed, specified as a 7847 // CLDR territory code. 7848 Country string `json:"country,omitempty"` 7849 7850 // LocationId: The numeric id of a location that the tax rate applies to 7851 // as defined in the AdWords API. 7852 LocationId int64 `json:"locationId,omitempty,string"` 7853 7854 // PostalCode: The postal code range that the tax rate applies to, 7855 // represented by a ZIP code, a ZIP code prefix using * wildcard, a 7856 // range between two ZIP codes or two ZIP code prefixes of equal length. 7857 // Examples: 94114, 94*, 94002-95460, 94*-95*. 7858 PostalCode string `json:"postalCode,omitempty"` 7859 7860 // Rate: The percentage of tax rate that applies to the item price. 7861 Rate float64 `json:"rate,omitempty"` 7862 7863 // Region: The geographic region to which the tax rate applies. 7864 Region string `json:"region,omitempty"` 7865 7866 // TaxShip: Set to true if tax is charged on shipping. 7867 TaxShip bool `json:"taxShip,omitempty"` 7868 7869 // ForceSendFields is a list of field names (e.g. "Country") to 7870 // unconditionally include in API requests. By default, fields with 7871 // empty values are omitted from API requests. However, any non-pointer, 7872 // non-interface field appearing in ForceSendFields will be sent to the 7873 // server regardless of whether the field is empty or not. This may be 7874 // used to include empty fields in Patch requests. 7875 ForceSendFields []string `json:"-"` 7876 7877 // NullFields is a list of field names (e.g. "Country") to include in 7878 // API requests with the JSON null value. By default, fields with empty 7879 // values are omitted from API requests. However, any field with an 7880 // empty value appearing in NullFields will be sent to the server as 7881 // null. It is an error if a field in this list has a non-empty value. 7882 // This may be used to include null fields in Patch requests. 7883 NullFields []string `json:"-"` 7884} 7885 7886func (s *ProductTax) MarshalJSON() ([]byte, error) { 7887 type NoMethod ProductTax 7888 raw := NoMethod(*s) 7889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7890} 7891 7892func (s *ProductTax) UnmarshalJSON(data []byte) error { 7893 type NoMethod ProductTax 7894 var s1 struct { 7895 Rate gensupport.JSONFloat64 `json:"rate"` 7896 *NoMethod 7897 } 7898 s1.NoMethod = (*NoMethod)(s) 7899 if err := json.Unmarshal(data, &s1); err != nil { 7900 return err 7901 } 7902 s.Rate = float64(s1.Rate) 7903 return nil 7904} 7905 7906type ProductUnitPricingBaseMeasure struct { 7907 // Unit: The unit of the denominator. 7908 Unit string `json:"unit,omitempty"` 7909 7910 // Value: The denominator of the unit price. 7911 Value int64 `json:"value,omitempty,string"` 7912 7913 // ForceSendFields is a list of field names (e.g. "Unit") to 7914 // unconditionally include in API requests. By default, fields with 7915 // empty values are omitted from API requests. However, any non-pointer, 7916 // non-interface field appearing in ForceSendFields will be sent to the 7917 // server regardless of whether the field is empty or not. This may be 7918 // used to include empty fields in Patch requests. 7919 ForceSendFields []string `json:"-"` 7920 7921 // NullFields is a list of field names (e.g. "Unit") to include in API 7922 // requests with the JSON null value. By default, fields with empty 7923 // values are omitted from API requests. However, any field with an 7924 // empty value appearing in NullFields will be sent to the server as 7925 // null. It is an error if a field in this list has a non-empty value. 7926 // This may be used to include null fields in Patch requests. 7927 NullFields []string `json:"-"` 7928} 7929 7930func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { 7931 type NoMethod ProductUnitPricingBaseMeasure 7932 raw := NoMethod(*s) 7933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7934} 7935 7936type ProductUnitPricingMeasure struct { 7937 // Unit: The unit of the measure. 7938 Unit string `json:"unit,omitempty"` 7939 7940 // Value: The measure of an item. 7941 Value float64 `json:"value,omitempty"` 7942 7943 // ForceSendFields is a list of field names (e.g. "Unit") to 7944 // unconditionally include in API requests. By default, fields with 7945 // empty values are omitted from API requests. However, any non-pointer, 7946 // non-interface field appearing in ForceSendFields will be sent to the 7947 // server regardless of whether the field is empty or not. This may be 7948 // used to include empty fields in Patch requests. 7949 ForceSendFields []string `json:"-"` 7950 7951 // NullFields is a list of field names (e.g. "Unit") to include in API 7952 // requests with the JSON null value. By default, fields with empty 7953 // values are omitted from API requests. However, any field with an 7954 // empty value appearing in NullFields will be sent to the server as 7955 // null. It is an error if a field in this list has a non-empty value. 7956 // This may be used to include null fields in Patch requests. 7957 NullFields []string `json:"-"` 7958} 7959 7960func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { 7961 type NoMethod ProductUnitPricingMeasure 7962 raw := NoMethod(*s) 7963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7964} 7965 7966func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { 7967 type NoMethod ProductUnitPricingMeasure 7968 var s1 struct { 7969 Value gensupport.JSONFloat64 `json:"value"` 7970 *NoMethod 7971 } 7972 s1.NoMethod = (*NoMethod)(s) 7973 if err := json.Unmarshal(data, &s1); err != nil { 7974 return err 7975 } 7976 s.Value = float64(s1.Value) 7977 return nil 7978} 7979 7980type ProductsCustomBatchRequest struct { 7981 // Entries: The request entries to be processed in the batch. 7982 Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` 7983 7984 // ForceSendFields is a list of field names (e.g. "Entries") to 7985 // unconditionally include in API requests. By default, fields with 7986 // empty values are omitted from API requests. However, any non-pointer, 7987 // non-interface field appearing in ForceSendFields will be sent to the 7988 // server regardless of whether the field is empty or not. This may be 7989 // used to include empty fields in Patch requests. 7990 ForceSendFields []string `json:"-"` 7991 7992 // NullFields is a list of field names (e.g. "Entries") to include in 7993 // API requests with the JSON null value. By default, fields with empty 7994 // values are omitted from API requests. However, any field with an 7995 // empty value appearing in NullFields will be sent to the server as 7996 // null. It is an error if a field in this list has a non-empty value. 7997 // This may be used to include null fields in Patch requests. 7998 NullFields []string `json:"-"` 7999} 8000 8001func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { 8002 type NoMethod ProductsCustomBatchRequest 8003 raw := NoMethod(*s) 8004 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8005} 8006 8007// ProductsCustomBatchRequestEntry: A batch entry encoding a single 8008// non-batch products request. 8009type ProductsCustomBatchRequestEntry struct { 8010 // BatchId: An entry ID, unique within the batch request. 8011 BatchId int64 `json:"batchId,omitempty"` 8012 8013 // MerchantId: The ID of the managing account. 8014 MerchantId uint64 `json:"merchantId,omitempty,string"` 8015 8016 Method string `json:"method,omitempty"` 8017 8018 // Product: The product to insert. Only required if the method is 8019 // insert. 8020 Product *Product `json:"product,omitempty"` 8021 8022 // ProductId: The ID of the product to get or delete. Only defined if 8023 // the method is get or delete. 8024 ProductId string `json:"productId,omitempty"` 8025 8026 // ForceSendFields is a list of field names (e.g. "BatchId") to 8027 // unconditionally include in API requests. By default, fields with 8028 // empty values are omitted from API requests. However, any non-pointer, 8029 // non-interface field appearing in ForceSendFields will be sent to the 8030 // server regardless of whether the field is empty or not. This may be 8031 // used to include empty fields in Patch requests. 8032 ForceSendFields []string `json:"-"` 8033 8034 // NullFields is a list of field names (e.g. "BatchId") to include in 8035 // API requests with the JSON null value. By default, fields with empty 8036 // values are omitted from API requests. However, any field with an 8037 // empty value appearing in NullFields will be sent to the server as 8038 // null. It is an error if a field in this list has a non-empty value. 8039 // This may be used to include null fields in Patch requests. 8040 NullFields []string `json:"-"` 8041} 8042 8043func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 8044 type NoMethod ProductsCustomBatchRequestEntry 8045 raw := NoMethod(*s) 8046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8047} 8048 8049type ProductsCustomBatchResponse struct { 8050 // Entries: The result of the execution of the batch requests. 8051 Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` 8052 8053 // Kind: Identifies what kind of resource this is. Value: the fixed 8054 // string "content#productsCustomBatchResponse". 8055 Kind string `json:"kind,omitempty"` 8056 8057 // ServerResponse contains the HTTP response code and headers from the 8058 // server. 8059 googleapi.ServerResponse `json:"-"` 8060 8061 // ForceSendFields is a list of field names (e.g. "Entries") to 8062 // unconditionally include in API requests. By default, fields with 8063 // empty values are omitted from API requests. However, any non-pointer, 8064 // non-interface field appearing in ForceSendFields will be sent to the 8065 // server regardless of whether the field is empty or not. This may be 8066 // used to include empty fields in Patch requests. 8067 ForceSendFields []string `json:"-"` 8068 8069 // NullFields is a list of field names (e.g. "Entries") to include in 8070 // API requests with the JSON null value. By default, fields with empty 8071 // values are omitted from API requests. However, any field with an 8072 // empty value appearing in NullFields will be sent to the server as 8073 // null. It is an error if a field in this list has a non-empty value. 8074 // This may be used to include null fields in Patch requests. 8075 NullFields []string `json:"-"` 8076} 8077 8078func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { 8079 type NoMethod ProductsCustomBatchResponse 8080 raw := NoMethod(*s) 8081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8082} 8083 8084// ProductsCustomBatchResponseEntry: A batch entry encoding a single 8085// non-batch products response. 8086type ProductsCustomBatchResponseEntry struct { 8087 // BatchId: The ID of the request entry this entry responds to. 8088 BatchId int64 `json:"batchId,omitempty"` 8089 8090 // Errors: A list of errors defined if and only if the request failed. 8091 Errors *Errors `json:"errors,omitempty"` 8092 8093 // Kind: Identifies what kind of resource this is. Value: the fixed 8094 // string "content#productsCustomBatchResponseEntry". 8095 Kind string `json:"kind,omitempty"` 8096 8097 // Product: The inserted product. Only defined if the method is insert 8098 // and if the request was successful. 8099 Product *Product `json:"product,omitempty"` 8100 8101 // ForceSendFields is a list of field names (e.g. "BatchId") to 8102 // unconditionally include in API requests. By default, fields with 8103 // empty values are omitted from API requests. However, any non-pointer, 8104 // non-interface field appearing in ForceSendFields will be sent to the 8105 // server regardless of whether the field is empty or not. This may be 8106 // used to include empty fields in Patch requests. 8107 ForceSendFields []string `json:"-"` 8108 8109 // NullFields is a list of field names (e.g. "BatchId") to include in 8110 // API requests with the JSON null value. By default, fields with empty 8111 // values are omitted from API requests. However, any field with an 8112 // empty value appearing in NullFields will be sent to the server as 8113 // null. It is an error if a field in this list has a non-empty value. 8114 // This may be used to include null fields in Patch requests. 8115 NullFields []string `json:"-"` 8116} 8117 8118func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 8119 type NoMethod ProductsCustomBatchResponseEntry 8120 raw := NoMethod(*s) 8121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8122} 8123 8124type ProductsListResponse struct { 8125 // Kind: Identifies what kind of resource this is. Value: the fixed 8126 // string "content#productsListResponse". 8127 Kind string `json:"kind,omitempty"` 8128 8129 // NextPageToken: The token for the retrieval of the next page of 8130 // products. 8131 NextPageToken string `json:"nextPageToken,omitempty"` 8132 8133 Resources []*Product `json:"resources,omitempty"` 8134 8135 // ServerResponse contains the HTTP response code and headers from the 8136 // server. 8137 googleapi.ServerResponse `json:"-"` 8138 8139 // ForceSendFields is a list of field names (e.g. "Kind") to 8140 // unconditionally include in API requests. By default, fields with 8141 // empty values are omitted from API requests. However, any non-pointer, 8142 // non-interface field appearing in ForceSendFields will be sent to the 8143 // server regardless of whether the field is empty or not. This may be 8144 // used to include empty fields in Patch requests. 8145 ForceSendFields []string `json:"-"` 8146 8147 // NullFields is a list of field names (e.g. "Kind") to include in API 8148 // requests with the JSON null value. By default, fields with empty 8149 // values are omitted from API requests. However, any field with an 8150 // empty value appearing in NullFields will be sent to the server as 8151 // null. It is an error if a field in this list has a non-empty value. 8152 // This may be used to include null fields in Patch requests. 8153 NullFields []string `json:"-"` 8154} 8155 8156func (s *ProductsListResponse) MarshalJSON() ([]byte, error) { 8157 type NoMethod ProductsListResponse 8158 raw := NoMethod(*s) 8159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8160} 8161 8162type ProductstatusesCustomBatchRequest struct { 8163 // Entries: The request entries to be processed in the batch. 8164 Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 8165 8166 // ForceSendFields is a list of field names (e.g. "Entries") to 8167 // unconditionally include in API requests. By default, fields with 8168 // empty values are omitted from API requests. However, any non-pointer, 8169 // non-interface field appearing in ForceSendFields will be sent to the 8170 // server regardless of whether the field is empty or not. This may be 8171 // used to include empty fields in Patch requests. 8172 ForceSendFields []string `json:"-"` 8173 8174 // NullFields is a list of field names (e.g. "Entries") to include in 8175 // API requests with the JSON null value. By default, fields with empty 8176 // values are omitted from API requests. However, any field with an 8177 // empty value appearing in NullFields will be sent to the server as 8178 // null. It is an error if a field in this list has a non-empty value. 8179 // This may be used to include null fields in Patch requests. 8180 NullFields []string `json:"-"` 8181} 8182 8183func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 8184 type NoMethod ProductstatusesCustomBatchRequest 8185 raw := NoMethod(*s) 8186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8187} 8188 8189// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a 8190// single non-batch productstatuses request. 8191type ProductstatusesCustomBatchRequestEntry struct { 8192 // BatchId: An entry ID, unique within the batch request. 8193 BatchId int64 `json:"batchId,omitempty"` 8194 8195 // Destinations: If set, only issues for the specified destinations are 8196 // returned, otherwise only issues for the Shopping destination. 8197 Destinations []string `json:"destinations,omitempty"` 8198 8199 IncludeAttributes bool `json:"includeAttributes,omitempty"` 8200 8201 // MerchantId: The ID of the managing account. 8202 MerchantId uint64 `json:"merchantId,omitempty,string"` 8203 8204 Method string `json:"method,omitempty"` 8205 8206 // ProductId: The ID of the product whose status to get. 8207 ProductId string `json:"productId,omitempty"` 8208 8209 // ForceSendFields is a list of field names (e.g. "BatchId") to 8210 // unconditionally include in API requests. By default, fields with 8211 // empty values are omitted from API requests. However, any non-pointer, 8212 // non-interface field appearing in ForceSendFields will be sent to the 8213 // server regardless of whether the field is empty or not. This may be 8214 // used to include empty fields in Patch requests. 8215 ForceSendFields []string `json:"-"` 8216 8217 // NullFields is a list of field names (e.g. "BatchId") to include in 8218 // API requests with the JSON null value. By default, fields with empty 8219 // values are omitted from API requests. However, any field with an 8220 // empty value appearing in NullFields will be sent to the server as 8221 // null. It is an error if a field in this list has a non-empty value. 8222 // This may be used to include null fields in Patch requests. 8223 NullFields []string `json:"-"` 8224} 8225 8226func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 8227 type NoMethod ProductstatusesCustomBatchRequestEntry 8228 raw := NoMethod(*s) 8229 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8230} 8231 8232type ProductstatusesCustomBatchResponse struct { 8233 // Entries: The result of the execution of the batch requests. 8234 Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 8235 8236 // Kind: Identifies what kind of resource this is. Value: the fixed 8237 // string "content#productstatusesCustomBatchResponse". 8238 Kind string `json:"kind,omitempty"` 8239 8240 // ServerResponse contains the HTTP response code and headers from the 8241 // server. 8242 googleapi.ServerResponse `json:"-"` 8243 8244 // ForceSendFields is a list of field names (e.g. "Entries") to 8245 // unconditionally include in API requests. By default, fields with 8246 // empty values are omitted from API requests. However, any non-pointer, 8247 // non-interface field appearing in ForceSendFields will be sent to the 8248 // server regardless of whether the field is empty or not. This may be 8249 // used to include empty fields in Patch requests. 8250 ForceSendFields []string `json:"-"` 8251 8252 // NullFields is a list of field names (e.g. "Entries") to include in 8253 // API requests with the JSON null value. By default, fields with empty 8254 // values are omitted from API requests. However, any field with an 8255 // empty value appearing in NullFields will be sent to the server as 8256 // null. It is an error if a field in this list has a non-empty value. 8257 // This may be used to include null fields in Patch requests. 8258 NullFields []string `json:"-"` 8259} 8260 8261func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 8262 type NoMethod ProductstatusesCustomBatchResponse 8263 raw := NoMethod(*s) 8264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8265} 8266 8267// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a 8268// single non-batch productstatuses response. 8269type ProductstatusesCustomBatchResponseEntry struct { 8270 // BatchId: The ID of the request entry this entry responds to. 8271 BatchId int64 `json:"batchId,omitempty"` 8272 8273 // Errors: A list of errors, if the request failed. 8274 Errors *Errors `json:"errors,omitempty"` 8275 8276 // Kind: Identifies what kind of resource this is. Value: the fixed 8277 // string "content#productstatusesCustomBatchResponseEntry". 8278 Kind string `json:"kind,omitempty"` 8279 8280 // ProductStatus: The requested product status. Only defined if the 8281 // request was successful. 8282 ProductStatus *ProductStatus `json:"productStatus,omitempty"` 8283 8284 // ForceSendFields is a list of field names (e.g. "BatchId") to 8285 // unconditionally include in API requests. By default, fields with 8286 // empty values are omitted from API requests. However, any non-pointer, 8287 // non-interface field appearing in ForceSendFields will be sent to the 8288 // server regardless of whether the field is empty or not. This may be 8289 // used to include empty fields in Patch requests. 8290 ForceSendFields []string `json:"-"` 8291 8292 // NullFields is a list of field names (e.g. "BatchId") to include in 8293 // API requests with the JSON null value. By default, fields with empty 8294 // values are omitted from API requests. However, any field with an 8295 // empty value appearing in NullFields will be sent to the server as 8296 // null. It is an error if a field in this list has a non-empty value. 8297 // This may be used to include null fields in Patch requests. 8298 NullFields []string `json:"-"` 8299} 8300 8301func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 8302 type NoMethod ProductstatusesCustomBatchResponseEntry 8303 raw := NoMethod(*s) 8304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8305} 8306 8307type ProductstatusesListResponse struct { 8308 // Kind: Identifies what kind of resource this is. Value: the fixed 8309 // string "content#productstatusesListResponse". 8310 Kind string `json:"kind,omitempty"` 8311 8312 // NextPageToken: The token for the retrieval of the next page of 8313 // products statuses. 8314 NextPageToken string `json:"nextPageToken,omitempty"` 8315 8316 Resources []*ProductStatus `json:"resources,omitempty"` 8317 8318 // ServerResponse contains the HTTP response code and headers from the 8319 // server. 8320 googleapi.ServerResponse `json:"-"` 8321 8322 // ForceSendFields is a list of field names (e.g. "Kind") to 8323 // unconditionally include in API requests. By default, fields with 8324 // empty values are omitted from API requests. However, any non-pointer, 8325 // non-interface field appearing in ForceSendFields will be sent to the 8326 // server regardless of whether the field is empty or not. This may be 8327 // used to include empty fields in Patch requests. 8328 ForceSendFields []string `json:"-"` 8329 8330 // NullFields is a list of field names (e.g. "Kind") to include in API 8331 // requests with the JSON null value. By default, fields with empty 8332 // values are omitted from API requests. However, any field with an 8333 // empty value appearing in NullFields will be sent to the server as 8334 // null. It is an error if a field in this list has a non-empty value. 8335 // This may be used to include null fields in Patch requests. 8336 NullFields []string `json:"-"` 8337} 8338 8339func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) { 8340 type NoMethod ProductstatusesListResponse 8341 raw := NoMethod(*s) 8342 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8343} 8344 8345type RateGroup struct { 8346 // ApplicableShippingLabels: A list of shipping labels defining the 8347 // products to which this rate group applies to. This is a disjunction: 8348 // only one of the labels has to match for the rate group to apply. May 8349 // only be empty for the last rate group of a service. Required. 8350 ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` 8351 8352 // CarrierRates: A list of carrier rates that can be referred to by 8353 // mainTable or singleValue. 8354 CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` 8355 8356 // MainTable: A table defining the rate group, when singleValue is not 8357 // expressive enough. Can only be set if singleValue is not set. 8358 MainTable *Table `json:"mainTable,omitempty"` 8359 8360 // SingleValue: The value of the rate group (e.g. flat rate $10). Can 8361 // only be set if mainTable and subtables are not set. 8362 SingleValue *Value `json:"singleValue,omitempty"` 8363 8364 // Subtables: A list of subtables referred to by mainTable. Can only be 8365 // set if mainTable is set. 8366 Subtables []*Table `json:"subtables,omitempty"` 8367 8368 // ForceSendFields is a list of field names (e.g. 8369 // "ApplicableShippingLabels") to unconditionally include in API 8370 // requests. By default, fields with empty values are omitted from API 8371 // requests. However, any non-pointer, non-interface field appearing in 8372 // ForceSendFields will be sent to the server regardless of whether the 8373 // field is empty or not. This may be used to include empty fields in 8374 // Patch requests. 8375 ForceSendFields []string `json:"-"` 8376 8377 // NullFields is a list of field names (e.g. "ApplicableShippingLabels") 8378 // to include in API requests with the JSON null value. By default, 8379 // fields with empty values are omitted from API requests. However, any 8380 // field with an empty value appearing in NullFields will be sent to the 8381 // server as null. It is an error if a field in this list has a 8382 // non-empty value. This may be used to include null fields in Patch 8383 // requests. 8384 NullFields []string `json:"-"` 8385} 8386 8387func (s *RateGroup) MarshalJSON() ([]byte, error) { 8388 type NoMethod RateGroup 8389 raw := NoMethod(*s) 8390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8391} 8392 8393type Row struct { 8394 // Cells: The list of cells that constitute the row. Must have the same 8395 // length as columnHeaders for two-dimensional tables, a length of 1 for 8396 // one-dimensional tables. Required. 8397 Cells []*Value `json:"cells,omitempty"` 8398 8399 // ForceSendFields is a list of field names (e.g. "Cells") to 8400 // unconditionally include in API requests. By default, fields with 8401 // empty values are omitted from API requests. However, any non-pointer, 8402 // non-interface field appearing in ForceSendFields will be sent to the 8403 // server regardless of whether the field is empty or not. This may be 8404 // used to include empty fields in Patch requests. 8405 ForceSendFields []string `json:"-"` 8406 8407 // NullFields is a list of field names (e.g. "Cells") to include in API 8408 // requests with the JSON null value. By default, fields with empty 8409 // values are omitted from API requests. However, any field with an 8410 // empty value appearing in NullFields will be sent to the server as 8411 // null. It is an error if a field in this list has a non-empty value. 8412 // This may be used to include null fields in Patch requests. 8413 NullFields []string `json:"-"` 8414} 8415 8416func (s *Row) MarshalJSON() ([]byte, error) { 8417 type NoMethod Row 8418 raw := NoMethod(*s) 8419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8420} 8421 8422type Service struct { 8423 // Active: A boolean exposing the active status of the shipping service. 8424 // Required. 8425 Active bool `json:"active,omitempty"` 8426 8427 // Currency: The CLDR code of the currency to which this service 8428 // applies. Must match that of the prices in rate groups. 8429 Currency string `json:"currency,omitempty"` 8430 8431 // DeliveryCountry: The CLDR territory code of the country to which the 8432 // service applies. Required. 8433 DeliveryCountry string `json:"deliveryCountry,omitempty"` 8434 8435 // DeliveryTime: Time spent in various aspects from order to the 8436 // delivery of the product. Required. 8437 DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` 8438 8439 // Eligibility: Eligibility for this service. 8440 Eligibility string `json:"eligibility,omitempty"` 8441 8442 // MinimumOrderValue: Minimum order value for this service. If set, 8443 // indicates that customers will have to spend at least this amount. All 8444 // prices within a service must have the same currency. 8445 MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` 8446 8447 // Name: Free-form name of the service. Must be unique within target 8448 // account. Required. 8449 Name string `json:"name,omitempty"` 8450 8451 // RateGroups: Shipping rate group definitions. Only the last one is 8452 // allowed to have an empty applicableShippingLabels, which means 8453 // "everything else". The other applicableShippingLabels must not 8454 // overlap. 8455 RateGroups []*RateGroup `json:"rateGroups,omitempty"` 8456 8457 // ForceSendFields is a list of field names (e.g. "Active") to 8458 // unconditionally include in API requests. By default, fields with 8459 // empty values are omitted from API requests. However, any non-pointer, 8460 // non-interface field appearing in ForceSendFields will be sent to the 8461 // server regardless of whether the field is empty or not. This may be 8462 // used to include empty fields in Patch requests. 8463 ForceSendFields []string `json:"-"` 8464 8465 // NullFields is a list of field names (e.g. "Active") to include in API 8466 // requests with the JSON null value. By default, fields with empty 8467 // values are omitted from API requests. However, any field with an 8468 // empty value appearing in NullFields will be sent to the server as 8469 // null. It is an error if a field in this list has a non-empty value. 8470 // This may be used to include null fields in Patch requests. 8471 NullFields []string `json:"-"` 8472} 8473 8474func (s *Service) MarshalJSON() ([]byte, error) { 8475 type NoMethod Service 8476 raw := NoMethod(*s) 8477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8478} 8479 8480// ShippingSettings: The merchant account's shipping settings. 8481type ShippingSettings struct { 8482 // AccountId: The ID of the account to which these account shipping 8483 // settings belong. Ignored upon update, always present in get request 8484 // responses. 8485 AccountId uint64 `json:"accountId,omitempty,string"` 8486 8487 // PostalCodeGroups: A list of postal code groups that can be referred 8488 // to in services. Optional. 8489 PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` 8490 8491 // Services: The target account's list of services. Optional. 8492 Services []*Service `json:"services,omitempty"` 8493 8494 // ServerResponse contains the HTTP response code and headers from the 8495 // server. 8496 googleapi.ServerResponse `json:"-"` 8497 8498 // ForceSendFields is a list of field names (e.g. "AccountId") to 8499 // unconditionally include in API requests. By default, fields with 8500 // empty values are omitted from API requests. However, any non-pointer, 8501 // non-interface field appearing in ForceSendFields will be sent to the 8502 // server regardless of whether the field is empty or not. This may be 8503 // used to include empty fields in Patch requests. 8504 ForceSendFields []string `json:"-"` 8505 8506 // NullFields is a list of field names (e.g. "AccountId") to include in 8507 // API requests with the JSON null value. By default, fields with empty 8508 // values are omitted from API requests. However, any field with an 8509 // empty value appearing in NullFields will be sent to the server as 8510 // null. It is an error if a field in this list has a non-empty value. 8511 // This may be used to include null fields in Patch requests. 8512 NullFields []string `json:"-"` 8513} 8514 8515func (s *ShippingSettings) MarshalJSON() ([]byte, error) { 8516 type NoMethod ShippingSettings 8517 raw := NoMethod(*s) 8518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8519} 8520 8521type ShippingsettingsCustomBatchRequest struct { 8522 // Entries: The request entries to be processed in the batch. 8523 Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` 8524 8525 // ForceSendFields is a list of field names (e.g. "Entries") to 8526 // unconditionally include in API requests. By default, fields with 8527 // empty values are omitted from API requests. However, any non-pointer, 8528 // non-interface field appearing in ForceSendFields will be sent to the 8529 // server regardless of whether the field is empty or not. This may be 8530 // used to include empty fields in Patch requests. 8531 ForceSendFields []string `json:"-"` 8532 8533 // NullFields is a list of field names (e.g. "Entries") to include in 8534 // API requests with the JSON null value. By default, fields with empty 8535 // values are omitted from API requests. However, any field with an 8536 // empty value appearing in NullFields will be sent to the server as 8537 // null. It is an error if a field in this list has a non-empty value. 8538 // This may be used to include null fields in Patch requests. 8539 NullFields []string `json:"-"` 8540} 8541 8542func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 8543 type NoMethod ShippingsettingsCustomBatchRequest 8544 raw := NoMethod(*s) 8545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8546} 8547 8548// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a 8549// single non-batch shippingsettings request. 8550type ShippingsettingsCustomBatchRequestEntry struct { 8551 // AccountId: The ID of the account for which to get/update account 8552 // shipping settings. 8553 AccountId uint64 `json:"accountId,omitempty,string"` 8554 8555 // BatchId: An entry ID, unique within the batch request. 8556 BatchId int64 `json:"batchId,omitempty"` 8557 8558 // MerchantId: The ID of the managing account. 8559 MerchantId uint64 `json:"merchantId,omitempty,string"` 8560 8561 Method string `json:"method,omitempty"` 8562 8563 // ShippingSettings: The account shipping settings to update. Only 8564 // defined if the method is update. 8565 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 8566 8567 // ForceSendFields is a list of field names (e.g. "AccountId") to 8568 // unconditionally include in API requests. By default, fields with 8569 // empty values are omitted from API requests. However, any non-pointer, 8570 // non-interface field appearing in ForceSendFields will be sent to the 8571 // server regardless of whether the field is empty or not. This may be 8572 // used to include empty fields in Patch requests. 8573 ForceSendFields []string `json:"-"` 8574 8575 // NullFields is a list of field names (e.g. "AccountId") to include in 8576 // API requests with the JSON null value. By default, fields with empty 8577 // values are omitted from API requests. However, any field with an 8578 // empty value appearing in NullFields will be sent to the server as 8579 // null. It is an error if a field in this list has a non-empty value. 8580 // This may be used to include null fields in Patch requests. 8581 NullFields []string `json:"-"` 8582} 8583 8584func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 8585 type NoMethod ShippingsettingsCustomBatchRequestEntry 8586 raw := NoMethod(*s) 8587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8588} 8589 8590type ShippingsettingsCustomBatchResponse struct { 8591 // Entries: The result of the execution of the batch requests. 8592 Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` 8593 8594 // Kind: Identifies what kind of resource this is. Value: the fixed 8595 // string "content#shippingsettingsCustomBatchResponse". 8596 Kind string `json:"kind,omitempty"` 8597 8598 // ServerResponse contains the HTTP response code and headers from the 8599 // server. 8600 googleapi.ServerResponse `json:"-"` 8601 8602 // ForceSendFields is a list of field names (e.g. "Entries") to 8603 // unconditionally include in API requests. By default, fields with 8604 // empty values are omitted from API requests. However, any non-pointer, 8605 // non-interface field appearing in ForceSendFields will be sent to the 8606 // server regardless of whether the field is empty or not. This may be 8607 // used to include empty fields in Patch requests. 8608 ForceSendFields []string `json:"-"` 8609 8610 // NullFields is a list of field names (e.g. "Entries") to include in 8611 // API requests with the JSON null value. By default, fields with empty 8612 // values are omitted from API requests. However, any field with an 8613 // empty value appearing in NullFields will be sent to the server as 8614 // null. It is an error if a field in this list has a non-empty value. 8615 // This may be used to include null fields in Patch requests. 8616 NullFields []string `json:"-"` 8617} 8618 8619func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 8620 type NoMethod ShippingsettingsCustomBatchResponse 8621 raw := NoMethod(*s) 8622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8623} 8624 8625// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a 8626// single non-batch shipping settings response. 8627type ShippingsettingsCustomBatchResponseEntry struct { 8628 // BatchId: The ID of the request entry to which this entry responds. 8629 BatchId int64 `json:"batchId,omitempty"` 8630 8631 // Errors: A list of errors defined if, and only if, the request failed. 8632 Errors *Errors `json:"errors,omitempty"` 8633 8634 // Kind: Identifies what kind of resource this is. Value: the fixed 8635 // string "content#shippingsettingsCustomBatchResponseEntry". 8636 Kind string `json:"kind,omitempty"` 8637 8638 // ShippingSettings: The retrieved or updated account shipping settings. 8639 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 8640 8641 // ForceSendFields is a list of field names (e.g. "BatchId") to 8642 // unconditionally include in API requests. By default, fields with 8643 // empty values are omitted from API requests. However, any non-pointer, 8644 // non-interface field appearing in ForceSendFields will be sent to the 8645 // server regardless of whether the field is empty or not. This may be 8646 // used to include empty fields in Patch requests. 8647 ForceSendFields []string `json:"-"` 8648 8649 // NullFields is a list of field names (e.g. "BatchId") to include in 8650 // API requests with the JSON null value. By default, fields with empty 8651 // values are omitted from API requests. However, any field with an 8652 // empty value appearing in NullFields will be sent to the server as 8653 // null. It is an error if a field in this list has a non-empty value. 8654 // This may be used to include null fields in Patch requests. 8655 NullFields []string `json:"-"` 8656} 8657 8658func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 8659 type NoMethod ShippingsettingsCustomBatchResponseEntry 8660 raw := NoMethod(*s) 8661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8662} 8663 8664type ShippingsettingsGetSupportedCarriersResponse struct { 8665 // Carriers: A list of supported carriers. May be empty. 8666 Carriers []*CarriersCarrier `json:"carriers,omitempty"` 8667 8668 // Kind: Identifies what kind of resource this is. Value: the fixed 8669 // string "content#shippingsettingsGetSupportedCarriersResponse". 8670 Kind string `json:"kind,omitempty"` 8671 8672 // ServerResponse contains the HTTP response code and headers from the 8673 // server. 8674 googleapi.ServerResponse `json:"-"` 8675 8676 // ForceSendFields is a list of field names (e.g. "Carriers") to 8677 // unconditionally include in API requests. By default, fields with 8678 // empty values are omitted from API requests. However, any non-pointer, 8679 // non-interface field appearing in ForceSendFields will be sent to the 8680 // server regardless of whether the field is empty or not. This may be 8681 // used to include empty fields in Patch requests. 8682 ForceSendFields []string `json:"-"` 8683 8684 // NullFields is a list of field names (e.g. "Carriers") to include in 8685 // API requests with the JSON null value. By default, fields with empty 8686 // values are omitted from API requests. However, any field with an 8687 // empty value appearing in NullFields will be sent to the server as 8688 // null. It is an error if a field in this list has a non-empty value. 8689 // This may be used to include null fields in Patch requests. 8690 NullFields []string `json:"-"` 8691} 8692 8693func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { 8694 type NoMethod ShippingsettingsGetSupportedCarriersResponse 8695 raw := NoMethod(*s) 8696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8697} 8698 8699type ShippingsettingsGetSupportedHolidaysResponse struct { 8700 // Holidays: A list of holidays applicable for delivery guarantees. May 8701 // be empty. 8702 Holidays []*HolidaysHoliday `json:"holidays,omitempty"` 8703 8704 // Kind: Identifies what kind of resource this is. Value: the fixed 8705 // string "content#shippingsettingsGetSupportedHolidaysResponse". 8706 Kind string `json:"kind,omitempty"` 8707 8708 // ServerResponse contains the HTTP response code and headers from the 8709 // server. 8710 googleapi.ServerResponse `json:"-"` 8711 8712 // ForceSendFields is a list of field names (e.g. "Holidays") to 8713 // unconditionally include in API requests. By default, fields with 8714 // empty values are omitted from API requests. However, any non-pointer, 8715 // non-interface field appearing in ForceSendFields will be sent to the 8716 // server regardless of whether the field is empty or not. This may be 8717 // used to include empty fields in Patch requests. 8718 ForceSendFields []string `json:"-"` 8719 8720 // NullFields is a list of field names (e.g. "Holidays") to include in 8721 // API requests with the JSON null value. By default, fields with empty 8722 // values are omitted from API requests. However, any field with an 8723 // empty value appearing in NullFields will be sent to the server as 8724 // null. It is an error if a field in this list has a non-empty value. 8725 // This may be used to include null fields in Patch requests. 8726 NullFields []string `json:"-"` 8727} 8728 8729func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { 8730 type NoMethod ShippingsettingsGetSupportedHolidaysResponse 8731 raw := NoMethod(*s) 8732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8733} 8734 8735type ShippingsettingsListResponse struct { 8736 // Kind: Identifies what kind of resource this is. Value: the fixed 8737 // string "content#shippingsettingsListResponse". 8738 Kind string `json:"kind,omitempty"` 8739 8740 // NextPageToken: The token for the retrieval of the next page of 8741 // shipping settings. 8742 NextPageToken string `json:"nextPageToken,omitempty"` 8743 8744 Resources []*ShippingSettings `json:"resources,omitempty"` 8745 8746 // ServerResponse contains the HTTP response code and headers from the 8747 // server. 8748 googleapi.ServerResponse `json:"-"` 8749 8750 // ForceSendFields is a list of field names (e.g. "Kind") to 8751 // unconditionally include in API requests. By default, fields with 8752 // empty values are omitted from API requests. However, any non-pointer, 8753 // non-interface field appearing in ForceSendFields will be sent to the 8754 // server regardless of whether the field is empty or not. This may be 8755 // used to include empty fields in Patch requests. 8756 ForceSendFields []string `json:"-"` 8757 8758 // NullFields is a list of field names (e.g. "Kind") to include in API 8759 // requests with the JSON null value. By default, fields with empty 8760 // values are omitted from API requests. However, any field with an 8761 // empty value appearing in NullFields will be sent to the server as 8762 // null. It is an error if a field in this list has a non-empty value. 8763 // This may be used to include null fields in Patch requests. 8764 NullFields []string `json:"-"` 8765} 8766 8767func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { 8768 type NoMethod ShippingsettingsListResponse 8769 raw := NoMethod(*s) 8770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8771} 8772 8773type Table struct { 8774 // ColumnHeaders: Headers of the table's columns. Optional: if not set 8775 // then the table has only one dimension. 8776 ColumnHeaders *Headers `json:"columnHeaders,omitempty"` 8777 8778 // Name: Name of the table. Required for subtables, ignored for the main 8779 // table. 8780 Name string `json:"name,omitempty"` 8781 8782 // RowHeaders: Headers of the table's rows. Required. 8783 RowHeaders *Headers `json:"rowHeaders,omitempty"` 8784 8785 // Rows: The list of rows that constitute the table. Must have the same 8786 // length as rowHeaders. Required. 8787 Rows []*Row `json:"rows,omitempty"` 8788 8789 // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to 8790 // unconditionally include in API requests. By default, fields with 8791 // empty values are omitted from API requests. However, any non-pointer, 8792 // non-interface field appearing in ForceSendFields will be sent to the 8793 // server regardless of whether the field is empty or not. This may be 8794 // used to include empty fields in Patch requests. 8795 ForceSendFields []string `json:"-"` 8796 8797 // NullFields is a list of field names (e.g. "ColumnHeaders") to include 8798 // in API requests with the JSON null value. By default, fields with 8799 // empty values are omitted from API requests. However, any field with 8800 // an empty value appearing in NullFields will be sent to the server as 8801 // null. It is an error if a field in this list has a non-empty value. 8802 // This may be used to include null fields in Patch requests. 8803 NullFields []string `json:"-"` 8804} 8805 8806func (s *Table) MarshalJSON() ([]byte, error) { 8807 type NoMethod Table 8808 raw := NoMethod(*s) 8809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8810} 8811 8812type TestOrder struct { 8813 // Customer: The details of the customer who placed the order. 8814 Customer *TestOrderCustomer `json:"customer,omitempty"` 8815 8816 // Kind: Identifies what kind of resource this is. Value: the fixed 8817 // string "content#testOrder". 8818 Kind string `json:"kind,omitempty"` 8819 8820 // LineItems: Line items that are ordered. At least one line item must 8821 // be provided. 8822 LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` 8823 8824 // NotificationMode: Determines if test order must be pulled by merchant 8825 // or pushed to merchant via push integration. 8826 NotificationMode string `json:"notificationMode,omitempty"` 8827 8828 // PaymentMethod: The details of the payment method. 8829 PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"` 8830 8831 // PredefinedDeliveryAddress: Identifier of one of the predefined 8832 // delivery addresses for the delivery. 8833 PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` 8834 8835 // Promotions: The details of the merchant provided promotions applied 8836 // to the order. More details about the program are here. 8837 Promotions []*OrderPromotion `json:"promotions,omitempty"` 8838 8839 // ShippingCost: The total cost of shipping for all items. 8840 ShippingCost *Price `json:"shippingCost,omitempty"` 8841 8842 // ShippingCostTax: The tax for the total shipping cost. 8843 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 8844 8845 // ShippingOption: The requested shipping option. 8846 ShippingOption string `json:"shippingOption,omitempty"` 8847 8848 // ForceSendFields is a list of field names (e.g. "Customer") to 8849 // unconditionally include in API requests. By default, fields with 8850 // empty values are omitted from API requests. However, any non-pointer, 8851 // non-interface field appearing in ForceSendFields will be sent to the 8852 // server regardless of whether the field is empty or not. This may be 8853 // used to include empty fields in Patch requests. 8854 ForceSendFields []string `json:"-"` 8855 8856 // NullFields is a list of field names (e.g. "Customer") to include in 8857 // API requests with the JSON null value. By default, fields with empty 8858 // values are omitted from API requests. However, any field with an 8859 // empty value appearing in NullFields will be sent to the server as 8860 // null. It is an error if a field in this list has a non-empty value. 8861 // This may be used to include null fields in Patch requests. 8862 NullFields []string `json:"-"` 8863} 8864 8865func (s *TestOrder) MarshalJSON() ([]byte, error) { 8866 type NoMethod TestOrder 8867 raw := NoMethod(*s) 8868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8869} 8870 8871type TestOrderCustomer struct { 8872 // Email: Email address of the customer. 8873 Email string `json:"email,omitempty"` 8874 8875 // ExplicitMarketingPreference: Deprecated. Please use 8876 // marketingRightsInfo instead. 8877 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 8878 8879 // FullName: Full name of the customer. 8880 FullName string `json:"fullName,omitempty"` 8881 8882 // MarketingRightsInfo: Customer's marketing preferences. 8883 MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 8884 8885 // ForceSendFields is a list of field names (e.g. "Email") to 8886 // unconditionally include in API requests. By default, fields with 8887 // empty values are omitted from API requests. However, any non-pointer, 8888 // non-interface field appearing in ForceSendFields will be sent to the 8889 // server regardless of whether the field is empty or not. This may be 8890 // used to include empty fields in Patch requests. 8891 ForceSendFields []string `json:"-"` 8892 8893 // NullFields is a list of field names (e.g. "Email") to include in API 8894 // requests with the JSON null value. By default, fields with empty 8895 // values are omitted from API requests. However, any field with an 8896 // empty value appearing in NullFields will be sent to the server as 8897 // null. It is an error if a field in this list has a non-empty value. 8898 // This may be used to include null fields in Patch requests. 8899 NullFields []string `json:"-"` 8900} 8901 8902func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) { 8903 type NoMethod TestOrderCustomer 8904 raw := NoMethod(*s) 8905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8906} 8907 8908type TestOrderCustomerMarketingRightsInfo struct { 8909 // ExplicitMarketingPreference: Last know user use selection regards 8910 // marketing preferences. In certain cases selection might not be known, 8911 // so this field would be empty. 8912 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 8913 8914 // LastUpdatedTimestamp: Timestamp when last time marketing preference 8915 // was updated. Could be empty, if user wasn't offered a selection yet. 8916 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 8917 8918 // ForceSendFields is a list of field names (e.g. 8919 // "ExplicitMarketingPreference") to unconditionally include in API 8920 // requests. By default, fields with empty values are omitted from API 8921 // requests. However, any non-pointer, non-interface field appearing in 8922 // ForceSendFields will be sent to the server regardless of whether the 8923 // field is empty or not. This may be used to include empty fields in 8924 // Patch requests. 8925 ForceSendFields []string `json:"-"` 8926 8927 // NullFields is a list of field names (e.g. 8928 // "ExplicitMarketingPreference") to include in API requests with the 8929 // JSON null value. By default, fields with empty values are omitted 8930 // from API requests. However, any field with an empty value appearing 8931 // in NullFields will be sent to the server as null. It is an error if a 8932 // field in this list has a non-empty value. This may be used to include 8933 // null fields in Patch requests. 8934 NullFields []string `json:"-"` 8935} 8936 8937func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 8938 type NoMethod TestOrderCustomerMarketingRightsInfo 8939 raw := NoMethod(*s) 8940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8941} 8942 8943type TestOrderLineItem struct { 8944 // Product: Product data from the time of the order placement. 8945 Product *TestOrderLineItemProduct `json:"product,omitempty"` 8946 8947 // QuantityOrdered: Number of items ordered. 8948 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 8949 8950 // ReturnInfo: Details of the return policy for the line item. 8951 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 8952 8953 // ShippingDetails: Details of the requested shipping for the line item. 8954 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 8955 8956 // UnitTax: Unit tax for the line item. 8957 UnitTax *Price `json:"unitTax,omitempty"` 8958 8959 // ForceSendFields is a list of field names (e.g. "Product") to 8960 // unconditionally include in API requests. By default, fields with 8961 // empty values are omitted from API requests. However, any non-pointer, 8962 // non-interface field appearing in ForceSendFields will be sent to the 8963 // server regardless of whether the field is empty or not. This may be 8964 // used to include empty fields in Patch requests. 8965 ForceSendFields []string `json:"-"` 8966 8967 // NullFields is a list of field names (e.g. "Product") to include in 8968 // API requests with the JSON null value. By default, fields with empty 8969 // values are omitted from API requests. However, any field with an 8970 // empty value appearing in NullFields will be sent to the server as 8971 // null. It is an error if a field in this list has a non-empty value. 8972 // This may be used to include null fields in Patch requests. 8973 NullFields []string `json:"-"` 8974} 8975 8976func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) { 8977 type NoMethod TestOrderLineItem 8978 raw := NoMethod(*s) 8979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8980} 8981 8982type TestOrderLineItemProduct struct { 8983 // Brand: Brand of the item. 8984 Brand string `json:"brand,omitempty"` 8985 8986 // Channel: The item's channel. 8987 Channel string `json:"channel,omitempty"` 8988 8989 // Condition: Condition or state of the item. 8990 Condition string `json:"condition,omitempty"` 8991 8992 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 8993 ContentLanguage string `json:"contentLanguage,omitempty"` 8994 8995 // Gtin: Global Trade Item Number (GTIN) of the item. Optional. 8996 Gtin string `json:"gtin,omitempty"` 8997 8998 // ImageLink: URL of an image of the item. 8999 ImageLink string `json:"imageLink,omitempty"` 9000 9001 // ItemGroupId: Shared identifier for all variants of the same product. 9002 // Optional. 9003 ItemGroupId string `json:"itemGroupId,omitempty"` 9004 9005 // Mpn: Manufacturer Part Number (MPN) of the item. Optional. 9006 Mpn string `json:"mpn,omitempty"` 9007 9008 // OfferId: An identifier of the item. 9009 OfferId string `json:"offerId,omitempty"` 9010 9011 // Price: The price for the product. 9012 Price *Price `json:"price,omitempty"` 9013 9014 // TargetCountry: The CLDR territory code of the target country of the 9015 // product. 9016 TargetCountry string `json:"targetCountry,omitempty"` 9017 9018 // Title: The title of the product. 9019 Title string `json:"title,omitempty"` 9020 9021 // VariantAttributes: Variant attributes for the item. Optional. 9022 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 9023 9024 // ForceSendFields is a list of field names (e.g. "Brand") to 9025 // unconditionally include in API requests. By default, fields with 9026 // empty values are omitted from API requests. However, any non-pointer, 9027 // non-interface field appearing in ForceSendFields will be sent to the 9028 // server regardless of whether the field is empty or not. This may be 9029 // used to include empty fields in Patch requests. 9030 ForceSendFields []string `json:"-"` 9031 9032 // NullFields is a list of field names (e.g. "Brand") to include in API 9033 // requests with the JSON null value. By default, fields with empty 9034 // values are omitted from API requests. However, any field with an 9035 // empty value appearing in NullFields will be sent to the server as 9036 // null. It is an error if a field in this list has a non-empty value. 9037 // This may be used to include null fields in Patch requests. 9038 NullFields []string `json:"-"` 9039} 9040 9041func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { 9042 type NoMethod TestOrderLineItemProduct 9043 raw := NoMethod(*s) 9044 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9045} 9046 9047type TestOrderPaymentMethod struct { 9048 // ExpirationMonth: The card expiration month (January = 1, February = 2 9049 // etc.). 9050 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 9051 9052 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 9053 ExpirationYear int64 `json:"expirationYear,omitempty"` 9054 9055 // LastFourDigits: The last four digits of the card number. 9056 LastFourDigits string `json:"lastFourDigits,omitempty"` 9057 9058 // PredefinedBillingAddress: The billing address. 9059 PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` 9060 9061 // Type: The type of instrument. Note that real orders might have 9062 // different values than the four values accepted by createTestOrder. 9063 Type string `json:"type,omitempty"` 9064 9065 // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to 9066 // unconditionally include in API requests. By default, fields with 9067 // empty values are omitted from API requests. However, any non-pointer, 9068 // non-interface field appearing in ForceSendFields will be sent to the 9069 // server regardless of whether the field is empty or not. This may be 9070 // used to include empty fields in Patch requests. 9071 ForceSendFields []string `json:"-"` 9072 9073 // NullFields is a list of field names (e.g. "ExpirationMonth") to 9074 // include in API requests with the JSON null value. By default, fields 9075 // with empty values are omitted from API requests. However, any field 9076 // with an empty value appearing in NullFields will be sent to the 9077 // server as null. It is an error if a field in this list has a 9078 // non-empty value. This may be used to include null fields in Patch 9079 // requests. 9080 NullFields []string `json:"-"` 9081} 9082 9083func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) { 9084 type NoMethod TestOrderPaymentMethod 9085 raw := NoMethod(*s) 9086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9087} 9088 9089// Value: The single value of a rate group or the value of a rate group 9090// table's cell. Exactly one of noShipping, flatRate, pricePercentage, 9091// carrierRateName, subtableName must be set. 9092type Value struct { 9093 // CarrierRateName: The name of a carrier rate referring to a carrier 9094 // rate defined in the same rate group. Can only be set if all other 9095 // fields are not set. 9096 CarrierRateName string `json:"carrierRateName,omitempty"` 9097 9098 // FlatRate: A flat rate. Can only be set if all other fields are not 9099 // set. 9100 FlatRate *Price `json:"flatRate,omitempty"` 9101 9102 // NoShipping: If true, then the product can't ship. Must be true when 9103 // set, can only be set if all other fields are not set. 9104 NoShipping bool `json:"noShipping,omitempty"` 9105 9106 // PricePercentage: A percentage of the price represented as a number in 9107 // decimal notation (e.g., "5.4"). Can only be set if all other fields 9108 // are not set. 9109 PricePercentage string `json:"pricePercentage,omitempty"` 9110 9111 // SubtableName: The name of a subtable. Can only be set in table cells 9112 // (i.e., not for single values), and only if all other fields are not 9113 // set. 9114 SubtableName string `json:"subtableName,omitempty"` 9115 9116 // ForceSendFields is a list of field names (e.g. "CarrierRateName") to 9117 // unconditionally include in API requests. By default, fields with 9118 // empty values are omitted from API requests. However, any non-pointer, 9119 // non-interface field appearing in ForceSendFields will be sent to the 9120 // server regardless of whether the field is empty or not. This may be 9121 // used to include empty fields in Patch requests. 9122 ForceSendFields []string `json:"-"` 9123 9124 // NullFields is a list of field names (e.g. "CarrierRateName") to 9125 // include in API requests with the JSON null value. By default, fields 9126 // with empty values are omitted from API requests. However, any field 9127 // with an empty value appearing in NullFields will be sent to the 9128 // server as null. It is an error if a field in this list has a 9129 // non-empty value. This may be used to include null fields in Patch 9130 // requests. 9131 NullFields []string `json:"-"` 9132} 9133 9134func (s *Value) MarshalJSON() ([]byte, error) { 9135 type NoMethod Value 9136 raw := NoMethod(*s) 9137 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9138} 9139 9140type Weight struct { 9141 // Unit: The weight unit. 9142 Unit string `json:"unit,omitempty"` 9143 9144 // Value: The weight represented as a number. 9145 Value string `json:"value,omitempty"` 9146 9147 // ForceSendFields is a list of field names (e.g. "Unit") to 9148 // unconditionally include in API requests. By default, fields with 9149 // empty values are omitted from API requests. However, any non-pointer, 9150 // non-interface field appearing in ForceSendFields will be sent to the 9151 // server regardless of whether the field is empty or not. This may be 9152 // used to include empty fields in Patch requests. 9153 ForceSendFields []string `json:"-"` 9154 9155 // NullFields is a list of field names (e.g. "Unit") to include in API 9156 // requests with the JSON null value. By default, fields with empty 9157 // values are omitted from API requests. However, any field with an 9158 // empty value appearing in NullFields will be sent to the server as 9159 // null. It is an error if a field in this list has a non-empty value. 9160 // This may be used to include null fields in Patch requests. 9161 NullFields []string `json:"-"` 9162} 9163 9164func (s *Weight) MarshalJSON() ([]byte, error) { 9165 type NoMethod Weight 9166 raw := NoMethod(*s) 9167 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9168} 9169 9170// method id "content.accounts.authinfo": 9171 9172type AccountsAuthinfoCall struct { 9173 s *APIService 9174 urlParams_ gensupport.URLParams 9175 ifNoneMatch_ string 9176 ctx_ context.Context 9177 header_ http.Header 9178} 9179 9180// Authinfo: Returns information about the authenticated user. 9181func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { 9182 c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9183 return c 9184} 9185 9186// Fields allows partial responses to be retrieved. See 9187// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9188// for more information. 9189func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { 9190 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9191 return c 9192} 9193 9194// IfNoneMatch sets the optional parameter which makes the operation 9195// fail if the object's ETag matches the given value. This is useful for 9196// getting updates only after the object has changed since the last 9197// request. Use googleapi.IsNotModified to check whether the response 9198// error from Do is the result of In-None-Match. 9199func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { 9200 c.ifNoneMatch_ = entityTag 9201 return c 9202} 9203 9204// Context sets the context to be used in this call's Do method. Any 9205// pending HTTP request will be aborted if the provided context is 9206// canceled. 9207func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 9208 c.ctx_ = ctx 9209 return c 9210} 9211 9212// Header returns an http.Header that can be modified by the caller to 9213// add HTTP headers to the request. 9214func (c *AccountsAuthinfoCall) Header() http.Header { 9215 if c.header_ == nil { 9216 c.header_ = make(http.Header) 9217 } 9218 return c.header_ 9219} 9220 9221func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { 9222 reqHeaders := make(http.Header) 9223 for k, v := range c.header_ { 9224 reqHeaders[k] = v 9225 } 9226 reqHeaders.Set("User-Agent", c.s.userAgent()) 9227 if c.ifNoneMatch_ != "" { 9228 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9229 } 9230 var body io.Reader = nil 9231 c.urlParams_.Set("alt", alt) 9232 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") 9233 urls += "?" + c.urlParams_.Encode() 9234 req, _ := http.NewRequest("GET", urls, body) 9235 req.Header = reqHeaders 9236 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9237} 9238 9239// Do executes the "content.accounts.authinfo" call. 9240// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. 9241// Any non-2xx status code is an error. Response headers are in either 9242// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was 9243// returned at all) in error.(*googleapi.Error).Header. Use 9244// googleapi.IsNotModified to check whether the returned error was 9245// because http.StatusNotModified was returned. 9246func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { 9247 gensupport.SetOptions(c.urlParams_, opts...) 9248 res, err := c.doRequest("json") 9249 if res != nil && res.StatusCode == http.StatusNotModified { 9250 if res.Body != nil { 9251 res.Body.Close() 9252 } 9253 return nil, &googleapi.Error{ 9254 Code: res.StatusCode, 9255 Header: res.Header, 9256 } 9257 } 9258 if err != nil { 9259 return nil, err 9260 } 9261 defer googleapi.CloseBody(res) 9262 if err := googleapi.CheckResponse(res); err != nil { 9263 return nil, err 9264 } 9265 ret := &AccountsAuthInfoResponse{ 9266 ServerResponse: googleapi.ServerResponse{ 9267 Header: res.Header, 9268 HTTPStatusCode: res.StatusCode, 9269 }, 9270 } 9271 target := &ret 9272 if err := gensupport.DecodeResponse(target, res); err != nil { 9273 return nil, err 9274 } 9275 return ret, nil 9276 // { 9277 // "description": "Returns information about the authenticated user.", 9278 // "httpMethod": "GET", 9279 // "id": "content.accounts.authinfo", 9280 // "path": "accounts/authinfo", 9281 // "response": { 9282 // "$ref": "AccountsAuthInfoResponse" 9283 // }, 9284 // "scopes": [ 9285 // "https://www.googleapis.com/auth/content" 9286 // ] 9287 // } 9288 9289} 9290 9291// method id "content.accounts.claimwebsite": 9292 9293type AccountsClaimwebsiteCall struct { 9294 s *APIService 9295 merchantId uint64 9296 accountId uint64 9297 urlParams_ gensupport.URLParams 9298 ctx_ context.Context 9299 header_ http.Header 9300} 9301 9302// Claimwebsite: Claims the website of a Merchant Center sub-account. 9303func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { 9304 c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9305 c.merchantId = merchantId 9306 c.accountId = accountId 9307 return c 9308} 9309 9310// Overwrite sets the optional parameter "overwrite": Only available to 9311// selected merchants. When set to True, this flag removes any existing 9312// claim on the requested website by another account and replaces it 9313// with a claim from this account. 9314func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { 9315 c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 9316 return c 9317} 9318 9319// Fields allows partial responses to be retrieved. See 9320// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9321// for more information. 9322func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 9323 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9324 return c 9325} 9326 9327// Context sets the context to be used in this call's Do method. Any 9328// pending HTTP request will be aborted if the provided context is 9329// canceled. 9330func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 9331 c.ctx_ = ctx 9332 return c 9333} 9334 9335// Header returns an http.Header that can be modified by the caller to 9336// add HTTP headers to the request. 9337func (c *AccountsClaimwebsiteCall) Header() http.Header { 9338 if c.header_ == nil { 9339 c.header_ = make(http.Header) 9340 } 9341 return c.header_ 9342} 9343 9344func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { 9345 reqHeaders := make(http.Header) 9346 for k, v := range c.header_ { 9347 reqHeaders[k] = v 9348 } 9349 reqHeaders.Set("User-Agent", c.s.userAgent()) 9350 var body io.Reader = nil 9351 c.urlParams_.Set("alt", alt) 9352 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") 9353 urls += "?" + c.urlParams_.Encode() 9354 req, _ := http.NewRequest("POST", urls, body) 9355 req.Header = reqHeaders 9356 googleapi.Expand(req.URL, map[string]string{ 9357 "merchantId": strconv.FormatUint(c.merchantId, 10), 9358 "accountId": strconv.FormatUint(c.accountId, 10), 9359 }) 9360 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9361} 9362 9363// Do executes the "content.accounts.claimwebsite" call. 9364// Exactly one of *AccountsClaimWebsiteResponse or error will be 9365// non-nil. Any non-2xx status code is an error. Response headers are in 9366// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a 9367// response was returned at all) in error.(*googleapi.Error).Header. Use 9368// googleapi.IsNotModified to check whether the returned error was 9369// because http.StatusNotModified was returned. 9370func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { 9371 gensupport.SetOptions(c.urlParams_, opts...) 9372 res, err := c.doRequest("json") 9373 if res != nil && res.StatusCode == http.StatusNotModified { 9374 if res.Body != nil { 9375 res.Body.Close() 9376 } 9377 return nil, &googleapi.Error{ 9378 Code: res.StatusCode, 9379 Header: res.Header, 9380 } 9381 } 9382 if err != nil { 9383 return nil, err 9384 } 9385 defer googleapi.CloseBody(res) 9386 if err := googleapi.CheckResponse(res); err != nil { 9387 return nil, err 9388 } 9389 ret := &AccountsClaimWebsiteResponse{ 9390 ServerResponse: googleapi.ServerResponse{ 9391 Header: res.Header, 9392 HTTPStatusCode: res.StatusCode, 9393 }, 9394 } 9395 target := &ret 9396 if err := gensupport.DecodeResponse(target, res); err != nil { 9397 return nil, err 9398 } 9399 return ret, nil 9400 // { 9401 // "description": "Claims the website of a Merchant Center sub-account.", 9402 // "httpMethod": "POST", 9403 // "id": "content.accounts.claimwebsite", 9404 // "parameterOrder": [ 9405 // "merchantId", 9406 // "accountId" 9407 // ], 9408 // "parameters": { 9409 // "accountId": { 9410 // "description": "The ID of the account whose website is claimed.", 9411 // "format": "uint64", 9412 // "location": "path", 9413 // "required": true, 9414 // "type": "string" 9415 // }, 9416 // "merchantId": { 9417 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 9418 // "format": "uint64", 9419 // "location": "path", 9420 // "required": true, 9421 // "type": "string" 9422 // }, 9423 // "overwrite": { 9424 // "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.", 9425 // "location": "query", 9426 // "type": "boolean" 9427 // } 9428 // }, 9429 // "path": "{merchantId}/accounts/{accountId}/claimwebsite", 9430 // "response": { 9431 // "$ref": "AccountsClaimWebsiteResponse" 9432 // }, 9433 // "scopes": [ 9434 // "https://www.googleapis.com/auth/content" 9435 // ] 9436 // } 9437 9438} 9439 9440// method id "content.accounts.custombatch": 9441 9442type AccountsCustombatchCall struct { 9443 s *APIService 9444 accountscustombatchrequest *AccountsCustomBatchRequest 9445 urlParams_ gensupport.URLParams 9446 ctx_ context.Context 9447 header_ http.Header 9448} 9449 9450// Custombatch: Retrieves, inserts, updates, and deletes multiple 9451// Merchant Center (sub-)accounts in a single request. 9452func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { 9453 c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9454 c.accountscustombatchrequest = accountscustombatchrequest 9455 return c 9456} 9457 9458// DryRun sets the optional parameter "dryRun": Flag to run the request 9459// in dry-run mode. 9460func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { 9461 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 9462 return c 9463} 9464 9465// Fields allows partial responses to be retrieved. See 9466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9467// for more information. 9468func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { 9469 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9470 return c 9471} 9472 9473// Context sets the context to be used in this call's Do method. Any 9474// pending HTTP request will be aborted if the provided context is 9475// canceled. 9476func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 9477 c.ctx_ = ctx 9478 return c 9479} 9480 9481// Header returns an http.Header that can be modified by the caller to 9482// add HTTP headers to the request. 9483func (c *AccountsCustombatchCall) Header() http.Header { 9484 if c.header_ == nil { 9485 c.header_ = make(http.Header) 9486 } 9487 return c.header_ 9488} 9489 9490func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { 9491 reqHeaders := make(http.Header) 9492 for k, v := range c.header_ { 9493 reqHeaders[k] = v 9494 } 9495 reqHeaders.Set("User-Agent", c.s.userAgent()) 9496 var body io.Reader = nil 9497 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) 9498 if err != nil { 9499 return nil, err 9500 } 9501 reqHeaders.Set("Content-Type", "application/json") 9502 c.urlParams_.Set("alt", alt) 9503 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 9504 urls += "?" + c.urlParams_.Encode() 9505 req, _ := http.NewRequest("POST", urls, body) 9506 req.Header = reqHeaders 9507 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9508} 9509 9510// Do executes the "content.accounts.custombatch" call. 9511// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. 9512// Any non-2xx status code is an error. Response headers are in either 9513// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response 9514// was returned at all) in error.(*googleapi.Error).Header. Use 9515// googleapi.IsNotModified to check whether the returned error was 9516// because http.StatusNotModified was returned. 9517func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { 9518 gensupport.SetOptions(c.urlParams_, opts...) 9519 res, err := c.doRequest("json") 9520 if res != nil && res.StatusCode == http.StatusNotModified { 9521 if res.Body != nil { 9522 res.Body.Close() 9523 } 9524 return nil, &googleapi.Error{ 9525 Code: res.StatusCode, 9526 Header: res.Header, 9527 } 9528 } 9529 if err != nil { 9530 return nil, err 9531 } 9532 defer googleapi.CloseBody(res) 9533 if err := googleapi.CheckResponse(res); err != nil { 9534 return nil, err 9535 } 9536 ret := &AccountsCustomBatchResponse{ 9537 ServerResponse: googleapi.ServerResponse{ 9538 Header: res.Header, 9539 HTTPStatusCode: res.StatusCode, 9540 }, 9541 } 9542 target := &ret 9543 if err := gensupport.DecodeResponse(target, res); err != nil { 9544 return nil, err 9545 } 9546 return ret, nil 9547 // { 9548 // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", 9549 // "httpMethod": "POST", 9550 // "id": "content.accounts.custombatch", 9551 // "parameters": { 9552 // "dryRun": { 9553 // "description": "Flag to run the request in dry-run mode.", 9554 // "location": "query", 9555 // "type": "boolean" 9556 // } 9557 // }, 9558 // "path": "accounts/batch", 9559 // "request": { 9560 // "$ref": "AccountsCustomBatchRequest" 9561 // }, 9562 // "response": { 9563 // "$ref": "AccountsCustomBatchResponse" 9564 // }, 9565 // "scopes": [ 9566 // "https://www.googleapis.com/auth/content" 9567 // ] 9568 // } 9569 9570} 9571 9572// method id "content.accounts.delete": 9573 9574type AccountsDeleteCall struct { 9575 s *APIService 9576 merchantId uint64 9577 accountId uint64 9578 urlParams_ gensupport.URLParams 9579 ctx_ context.Context 9580 header_ http.Header 9581} 9582 9583// Delete: Deletes a Merchant Center sub-account. 9584func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { 9585 c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9586 c.merchantId = merchantId 9587 c.accountId = accountId 9588 return c 9589} 9590 9591// DryRun sets the optional parameter "dryRun": Flag to run the request 9592// in dry-run mode. 9593func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { 9594 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 9595 return c 9596} 9597 9598// Force sets the optional parameter "force": Flag to delete 9599// sub-accounts with products. The default value is false. 9600func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { 9601 c.urlParams_.Set("force", fmt.Sprint(force)) 9602 return c 9603} 9604 9605// Fields allows partial responses to be retrieved. See 9606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9607// for more information. 9608func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { 9609 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9610 return c 9611} 9612 9613// Context sets the context to be used in this call's Do method. Any 9614// pending HTTP request will be aborted if the provided context is 9615// canceled. 9616func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 9617 c.ctx_ = ctx 9618 return c 9619} 9620 9621// Header returns an http.Header that can be modified by the caller to 9622// add HTTP headers to the request. 9623func (c *AccountsDeleteCall) Header() http.Header { 9624 if c.header_ == nil { 9625 c.header_ = make(http.Header) 9626 } 9627 return c.header_ 9628} 9629 9630func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { 9631 reqHeaders := make(http.Header) 9632 for k, v := range c.header_ { 9633 reqHeaders[k] = v 9634 } 9635 reqHeaders.Set("User-Agent", c.s.userAgent()) 9636 var body io.Reader = nil 9637 c.urlParams_.Set("alt", alt) 9638 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 9639 urls += "?" + c.urlParams_.Encode() 9640 req, _ := http.NewRequest("DELETE", urls, body) 9641 req.Header = reqHeaders 9642 googleapi.Expand(req.URL, map[string]string{ 9643 "merchantId": strconv.FormatUint(c.merchantId, 10), 9644 "accountId": strconv.FormatUint(c.accountId, 10), 9645 }) 9646 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9647} 9648 9649// Do executes the "content.accounts.delete" call. 9650func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { 9651 gensupport.SetOptions(c.urlParams_, opts...) 9652 res, err := c.doRequest("json") 9653 if err != nil { 9654 return err 9655 } 9656 defer googleapi.CloseBody(res) 9657 if err := googleapi.CheckResponse(res); err != nil { 9658 return err 9659 } 9660 return nil 9661 // { 9662 // "description": "Deletes a Merchant Center sub-account.", 9663 // "httpMethod": "DELETE", 9664 // "id": "content.accounts.delete", 9665 // "parameterOrder": [ 9666 // "merchantId", 9667 // "accountId" 9668 // ], 9669 // "parameters": { 9670 // "accountId": { 9671 // "description": "The ID of the account.", 9672 // "format": "uint64", 9673 // "location": "path", 9674 // "required": true, 9675 // "type": "string" 9676 // }, 9677 // "dryRun": { 9678 // "description": "Flag to run the request in dry-run mode.", 9679 // "location": "query", 9680 // "type": "boolean" 9681 // }, 9682 // "force": { 9683 // "default": "false", 9684 // "description": "Flag to delete sub-accounts with products. The default value is false.", 9685 // "location": "query", 9686 // "type": "boolean" 9687 // }, 9688 // "merchantId": { 9689 // "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.", 9690 // "format": "uint64", 9691 // "location": "path", 9692 // "required": true, 9693 // "type": "string" 9694 // } 9695 // }, 9696 // "path": "{merchantId}/accounts/{accountId}", 9697 // "scopes": [ 9698 // "https://www.googleapis.com/auth/content" 9699 // ] 9700 // } 9701 9702} 9703 9704// method id "content.accounts.get": 9705 9706type AccountsGetCall struct { 9707 s *APIService 9708 merchantId uint64 9709 accountId uint64 9710 urlParams_ gensupport.URLParams 9711 ifNoneMatch_ string 9712 ctx_ context.Context 9713 header_ http.Header 9714} 9715 9716// Get: Retrieves a Merchant Center account. 9717func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { 9718 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9719 c.merchantId = merchantId 9720 c.accountId = accountId 9721 return c 9722} 9723 9724// Fields allows partial responses to be retrieved. See 9725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9726// for more information. 9727func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 9728 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9729 return c 9730} 9731 9732// IfNoneMatch sets the optional parameter which makes the operation 9733// fail if the object's ETag matches the given value. This is useful for 9734// getting updates only after the object has changed since the last 9735// request. Use googleapi.IsNotModified to check whether the response 9736// error from Do is the result of In-None-Match. 9737func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 9738 c.ifNoneMatch_ = entityTag 9739 return c 9740} 9741 9742// Context sets the context to be used in this call's Do method. Any 9743// pending HTTP request will be aborted if the provided context is 9744// canceled. 9745func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 9746 c.ctx_ = ctx 9747 return c 9748} 9749 9750// Header returns an http.Header that can be modified by the caller to 9751// add HTTP headers to the request. 9752func (c *AccountsGetCall) Header() http.Header { 9753 if c.header_ == nil { 9754 c.header_ = make(http.Header) 9755 } 9756 return c.header_ 9757} 9758 9759func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 9760 reqHeaders := make(http.Header) 9761 for k, v := range c.header_ { 9762 reqHeaders[k] = v 9763 } 9764 reqHeaders.Set("User-Agent", c.s.userAgent()) 9765 if c.ifNoneMatch_ != "" { 9766 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9767 } 9768 var body io.Reader = nil 9769 c.urlParams_.Set("alt", alt) 9770 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 9771 urls += "?" + c.urlParams_.Encode() 9772 req, _ := http.NewRequest("GET", urls, body) 9773 req.Header = reqHeaders 9774 googleapi.Expand(req.URL, map[string]string{ 9775 "merchantId": strconv.FormatUint(c.merchantId, 10), 9776 "accountId": strconv.FormatUint(c.accountId, 10), 9777 }) 9778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9779} 9780 9781// Do executes the "content.accounts.get" call. 9782// Exactly one of *Account or error will be non-nil. Any non-2xx status 9783// code is an error. Response headers are in either 9784// *Account.ServerResponse.Header or (if a response was returned at all) 9785// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9786// check whether the returned error was because http.StatusNotModified 9787// was returned. 9788func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { 9789 gensupport.SetOptions(c.urlParams_, opts...) 9790 res, err := c.doRequest("json") 9791 if res != nil && res.StatusCode == http.StatusNotModified { 9792 if res.Body != nil { 9793 res.Body.Close() 9794 } 9795 return nil, &googleapi.Error{ 9796 Code: res.StatusCode, 9797 Header: res.Header, 9798 } 9799 } 9800 if err != nil { 9801 return nil, err 9802 } 9803 defer googleapi.CloseBody(res) 9804 if err := googleapi.CheckResponse(res); err != nil { 9805 return nil, err 9806 } 9807 ret := &Account{ 9808 ServerResponse: googleapi.ServerResponse{ 9809 Header: res.Header, 9810 HTTPStatusCode: res.StatusCode, 9811 }, 9812 } 9813 target := &ret 9814 if err := gensupport.DecodeResponse(target, res); err != nil { 9815 return nil, err 9816 } 9817 return ret, nil 9818 // { 9819 // "description": "Retrieves a Merchant Center account.", 9820 // "httpMethod": "GET", 9821 // "id": "content.accounts.get", 9822 // "parameterOrder": [ 9823 // "merchantId", 9824 // "accountId" 9825 // ], 9826 // "parameters": { 9827 // "accountId": { 9828 // "description": "The ID of the account.", 9829 // "format": "uint64", 9830 // "location": "path", 9831 // "required": true, 9832 // "type": "string" 9833 // }, 9834 // "merchantId": { 9835 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 9836 // "format": "uint64", 9837 // "location": "path", 9838 // "required": true, 9839 // "type": "string" 9840 // } 9841 // }, 9842 // "path": "{merchantId}/accounts/{accountId}", 9843 // "response": { 9844 // "$ref": "Account" 9845 // }, 9846 // "scopes": [ 9847 // "https://www.googleapis.com/auth/content" 9848 // ] 9849 // } 9850 9851} 9852 9853// method id "content.accounts.insert": 9854 9855type AccountsInsertCall struct { 9856 s *APIService 9857 merchantId uint64 9858 account *Account 9859 urlParams_ gensupport.URLParams 9860 ctx_ context.Context 9861 header_ http.Header 9862} 9863 9864// Insert: Creates a Merchant Center sub-account. 9865func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { 9866 c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9867 c.merchantId = merchantId 9868 c.account = account 9869 return c 9870} 9871 9872// DryRun sets the optional parameter "dryRun": Flag to run the request 9873// in dry-run mode. 9874func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { 9875 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 9876 return c 9877} 9878 9879// Fields allows partial responses to be retrieved. See 9880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9881// for more information. 9882func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 9883 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9884 return c 9885} 9886 9887// Context sets the context to be used in this call's Do method. Any 9888// pending HTTP request will be aborted if the provided context is 9889// canceled. 9890func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 9891 c.ctx_ = ctx 9892 return c 9893} 9894 9895// Header returns an http.Header that can be modified by the caller to 9896// add HTTP headers to the request. 9897func (c *AccountsInsertCall) Header() http.Header { 9898 if c.header_ == nil { 9899 c.header_ = make(http.Header) 9900 } 9901 return c.header_ 9902} 9903 9904func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { 9905 reqHeaders := make(http.Header) 9906 for k, v := range c.header_ { 9907 reqHeaders[k] = v 9908 } 9909 reqHeaders.Set("User-Agent", c.s.userAgent()) 9910 var body io.Reader = nil 9911 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 9912 if err != nil { 9913 return nil, err 9914 } 9915 reqHeaders.Set("Content-Type", "application/json") 9916 c.urlParams_.Set("alt", alt) 9917 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 9918 urls += "?" + c.urlParams_.Encode() 9919 req, _ := http.NewRequest("POST", urls, body) 9920 req.Header = reqHeaders 9921 googleapi.Expand(req.URL, map[string]string{ 9922 "merchantId": strconv.FormatUint(c.merchantId, 10), 9923 }) 9924 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9925} 9926 9927// Do executes the "content.accounts.insert" call. 9928// Exactly one of *Account or error will be non-nil. Any non-2xx status 9929// code is an error. Response headers are in either 9930// *Account.ServerResponse.Header or (if a response was returned at all) 9931// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9932// check whether the returned error was because http.StatusNotModified 9933// was returned. 9934func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { 9935 gensupport.SetOptions(c.urlParams_, opts...) 9936 res, err := c.doRequest("json") 9937 if res != nil && res.StatusCode == http.StatusNotModified { 9938 if res.Body != nil { 9939 res.Body.Close() 9940 } 9941 return nil, &googleapi.Error{ 9942 Code: res.StatusCode, 9943 Header: res.Header, 9944 } 9945 } 9946 if err != nil { 9947 return nil, err 9948 } 9949 defer googleapi.CloseBody(res) 9950 if err := googleapi.CheckResponse(res); err != nil { 9951 return nil, err 9952 } 9953 ret := &Account{ 9954 ServerResponse: googleapi.ServerResponse{ 9955 Header: res.Header, 9956 HTTPStatusCode: res.StatusCode, 9957 }, 9958 } 9959 target := &ret 9960 if err := gensupport.DecodeResponse(target, res); err != nil { 9961 return nil, err 9962 } 9963 return ret, nil 9964 // { 9965 // "description": "Creates a Merchant Center sub-account.", 9966 // "httpMethod": "POST", 9967 // "id": "content.accounts.insert", 9968 // "parameterOrder": [ 9969 // "merchantId" 9970 // ], 9971 // "parameters": { 9972 // "dryRun": { 9973 // "description": "Flag to run the request in dry-run mode.", 9974 // "location": "query", 9975 // "type": "boolean" 9976 // }, 9977 // "merchantId": { 9978 // "description": "The ID of the managing account. This must be a multi-client account.", 9979 // "format": "uint64", 9980 // "location": "path", 9981 // "required": true, 9982 // "type": "string" 9983 // } 9984 // }, 9985 // "path": "{merchantId}/accounts", 9986 // "request": { 9987 // "$ref": "Account" 9988 // }, 9989 // "response": { 9990 // "$ref": "Account" 9991 // }, 9992 // "scopes": [ 9993 // "https://www.googleapis.com/auth/content" 9994 // ] 9995 // } 9996 9997} 9998 9999// method id "content.accounts.list": 10000 10001type AccountsListCall struct { 10002 s *APIService 10003 merchantId uint64 10004 urlParams_ gensupport.URLParams 10005 ifNoneMatch_ string 10006 ctx_ context.Context 10007 header_ http.Header 10008} 10009 10010// List: Lists the sub-accounts in your Merchant Center account. 10011func (r *AccountsService) List(merchantId uint64) *AccountsListCall { 10012 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10013 c.merchantId = merchantId 10014 return c 10015} 10016 10017// MaxResults sets the optional parameter "maxResults": The maximum 10018// number of accounts to return in the response, used for paging. 10019func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { 10020 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 10021 return c 10022} 10023 10024// PageToken sets the optional parameter "pageToken": The token returned 10025// by the previous request. 10026func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { 10027 c.urlParams_.Set("pageToken", pageToken) 10028 return c 10029} 10030 10031// Fields allows partial responses to be retrieved. See 10032// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10033// for more information. 10034func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 10035 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10036 return c 10037} 10038 10039// IfNoneMatch sets the optional parameter which makes the operation 10040// fail if the object's ETag matches the given value. This is useful for 10041// getting updates only after the object has changed since the last 10042// request. Use googleapi.IsNotModified to check whether the response 10043// error from Do is the result of In-None-Match. 10044func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 10045 c.ifNoneMatch_ = entityTag 10046 return c 10047} 10048 10049// Context sets the context to be used in this call's Do method. Any 10050// pending HTTP request will be aborted if the provided context is 10051// canceled. 10052func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 10053 c.ctx_ = ctx 10054 return c 10055} 10056 10057// Header returns an http.Header that can be modified by the caller to 10058// add HTTP headers to the request. 10059func (c *AccountsListCall) Header() http.Header { 10060 if c.header_ == nil { 10061 c.header_ = make(http.Header) 10062 } 10063 return c.header_ 10064} 10065 10066func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 10067 reqHeaders := make(http.Header) 10068 for k, v := range c.header_ { 10069 reqHeaders[k] = v 10070 } 10071 reqHeaders.Set("User-Agent", c.s.userAgent()) 10072 if c.ifNoneMatch_ != "" { 10073 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10074 } 10075 var body io.Reader = nil 10076 c.urlParams_.Set("alt", alt) 10077 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 10078 urls += "?" + c.urlParams_.Encode() 10079 req, _ := http.NewRequest("GET", urls, body) 10080 req.Header = reqHeaders 10081 googleapi.Expand(req.URL, map[string]string{ 10082 "merchantId": strconv.FormatUint(c.merchantId, 10), 10083 }) 10084 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10085} 10086 10087// Do executes the "content.accounts.list" call. 10088// Exactly one of *AccountsListResponse or error will be non-nil. Any 10089// non-2xx status code is an error. Response headers are in either 10090// *AccountsListResponse.ServerResponse.Header or (if a response was 10091// returned at all) in error.(*googleapi.Error).Header. Use 10092// googleapi.IsNotModified to check whether the returned error was 10093// because http.StatusNotModified was returned. 10094func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { 10095 gensupport.SetOptions(c.urlParams_, opts...) 10096 res, err := c.doRequest("json") 10097 if res != nil && res.StatusCode == http.StatusNotModified { 10098 if res.Body != nil { 10099 res.Body.Close() 10100 } 10101 return nil, &googleapi.Error{ 10102 Code: res.StatusCode, 10103 Header: res.Header, 10104 } 10105 } 10106 if err != nil { 10107 return nil, err 10108 } 10109 defer googleapi.CloseBody(res) 10110 if err := googleapi.CheckResponse(res); err != nil { 10111 return nil, err 10112 } 10113 ret := &AccountsListResponse{ 10114 ServerResponse: googleapi.ServerResponse{ 10115 Header: res.Header, 10116 HTTPStatusCode: res.StatusCode, 10117 }, 10118 } 10119 target := &ret 10120 if err := gensupport.DecodeResponse(target, res); err != nil { 10121 return nil, err 10122 } 10123 return ret, nil 10124 // { 10125 // "description": "Lists the sub-accounts in your Merchant Center account.", 10126 // "httpMethod": "GET", 10127 // "id": "content.accounts.list", 10128 // "parameterOrder": [ 10129 // "merchantId" 10130 // ], 10131 // "parameters": { 10132 // "maxResults": { 10133 // "description": "The maximum number of accounts to return in the response, used for paging.", 10134 // "format": "uint32", 10135 // "location": "query", 10136 // "type": "integer" 10137 // }, 10138 // "merchantId": { 10139 // "description": "The ID of the managing account. This must be a multi-client account.", 10140 // "format": "uint64", 10141 // "location": "path", 10142 // "required": true, 10143 // "type": "string" 10144 // }, 10145 // "pageToken": { 10146 // "description": "The token returned by the previous request.", 10147 // "location": "query", 10148 // "type": "string" 10149 // } 10150 // }, 10151 // "path": "{merchantId}/accounts", 10152 // "response": { 10153 // "$ref": "AccountsListResponse" 10154 // }, 10155 // "scopes": [ 10156 // "https://www.googleapis.com/auth/content" 10157 // ] 10158 // } 10159 10160} 10161 10162// Pages invokes f for each page of results. 10163// A non-nil error returned from f will halt the iteration. 10164// The provided context supersedes any context provided to the Context method. 10165func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { 10166 c.ctx_ = ctx 10167 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10168 for { 10169 x, err := c.Do() 10170 if err != nil { 10171 return err 10172 } 10173 if err := f(x); err != nil { 10174 return err 10175 } 10176 if x.NextPageToken == "" { 10177 return nil 10178 } 10179 c.PageToken(x.NextPageToken) 10180 } 10181} 10182 10183// method id "content.accounts.patch": 10184 10185type AccountsPatchCall struct { 10186 s *APIService 10187 merchantId uint64 10188 accountId uint64 10189 account *Account 10190 urlParams_ gensupport.URLParams 10191 ctx_ context.Context 10192 header_ http.Header 10193} 10194 10195// Patch: Updates a Merchant Center account. This method supports patch 10196// semantics. 10197func (r *AccountsService) Patch(merchantId uint64, accountId uint64, account *Account) *AccountsPatchCall { 10198 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10199 c.merchantId = merchantId 10200 c.accountId = accountId 10201 c.account = account 10202 return c 10203} 10204 10205// DryRun sets the optional parameter "dryRun": Flag to run the request 10206// in dry-run mode. 10207func (c *AccountsPatchCall) DryRun(dryRun bool) *AccountsPatchCall { 10208 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 10209 return c 10210} 10211 10212// Fields allows partial responses to be retrieved. See 10213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10214// for more information. 10215func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { 10216 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10217 return c 10218} 10219 10220// Context sets the context to be used in this call's Do method. Any 10221// pending HTTP request will be aborted if the provided context is 10222// canceled. 10223func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall { 10224 c.ctx_ = ctx 10225 return c 10226} 10227 10228// Header returns an http.Header that can be modified by the caller to 10229// add HTTP headers to the request. 10230func (c *AccountsPatchCall) Header() http.Header { 10231 if c.header_ == nil { 10232 c.header_ = make(http.Header) 10233 } 10234 return c.header_ 10235} 10236 10237func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { 10238 reqHeaders := make(http.Header) 10239 for k, v := range c.header_ { 10240 reqHeaders[k] = v 10241 } 10242 reqHeaders.Set("User-Agent", c.s.userAgent()) 10243 var body io.Reader = nil 10244 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 10245 if err != nil { 10246 return nil, err 10247 } 10248 reqHeaders.Set("Content-Type", "application/json") 10249 c.urlParams_.Set("alt", alt) 10250 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 10251 urls += "?" + c.urlParams_.Encode() 10252 req, _ := http.NewRequest("PATCH", urls, body) 10253 req.Header = reqHeaders 10254 googleapi.Expand(req.URL, map[string]string{ 10255 "merchantId": strconv.FormatUint(c.merchantId, 10), 10256 "accountId": strconv.FormatUint(c.accountId, 10), 10257 }) 10258 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10259} 10260 10261// Do executes the "content.accounts.patch" call. 10262// Exactly one of *Account or error will be non-nil. Any non-2xx status 10263// code is an error. Response headers are in either 10264// *Account.ServerResponse.Header or (if a response was returned at all) 10265// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10266// check whether the returned error was because http.StatusNotModified 10267// was returned. 10268func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) { 10269 gensupport.SetOptions(c.urlParams_, opts...) 10270 res, err := c.doRequest("json") 10271 if res != nil && res.StatusCode == http.StatusNotModified { 10272 if res.Body != nil { 10273 res.Body.Close() 10274 } 10275 return nil, &googleapi.Error{ 10276 Code: res.StatusCode, 10277 Header: res.Header, 10278 } 10279 } 10280 if err != nil { 10281 return nil, err 10282 } 10283 defer googleapi.CloseBody(res) 10284 if err := googleapi.CheckResponse(res); err != nil { 10285 return nil, err 10286 } 10287 ret := &Account{ 10288 ServerResponse: googleapi.ServerResponse{ 10289 Header: res.Header, 10290 HTTPStatusCode: res.StatusCode, 10291 }, 10292 } 10293 target := &ret 10294 if err := gensupport.DecodeResponse(target, res); err != nil { 10295 return nil, err 10296 } 10297 return ret, nil 10298 // { 10299 // "description": "Updates a Merchant Center account. This method supports patch semantics.", 10300 // "httpMethod": "PATCH", 10301 // "id": "content.accounts.patch", 10302 // "parameterOrder": [ 10303 // "merchantId", 10304 // "accountId" 10305 // ], 10306 // "parameters": { 10307 // "accountId": { 10308 // "description": "The ID of the account.", 10309 // "format": "uint64", 10310 // "location": "path", 10311 // "required": true, 10312 // "type": "string" 10313 // }, 10314 // "dryRun": { 10315 // "description": "Flag to run the request in dry-run mode.", 10316 // "location": "query", 10317 // "type": "boolean" 10318 // }, 10319 // "merchantId": { 10320 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 10321 // "format": "uint64", 10322 // "location": "path", 10323 // "required": true, 10324 // "type": "string" 10325 // } 10326 // }, 10327 // "path": "{merchantId}/accounts/{accountId}", 10328 // "request": { 10329 // "$ref": "Account" 10330 // }, 10331 // "response": { 10332 // "$ref": "Account" 10333 // }, 10334 // "scopes": [ 10335 // "https://www.googleapis.com/auth/content" 10336 // ] 10337 // } 10338 10339} 10340 10341// method id "content.accounts.update": 10342 10343type AccountsUpdateCall struct { 10344 s *APIService 10345 merchantId uint64 10346 accountId uint64 10347 account *Account 10348 urlParams_ gensupport.URLParams 10349 ctx_ context.Context 10350 header_ http.Header 10351} 10352 10353// Update: Updates a Merchant Center account. 10354func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { 10355 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10356 c.merchantId = merchantId 10357 c.accountId = accountId 10358 c.account = account 10359 return c 10360} 10361 10362// DryRun sets the optional parameter "dryRun": Flag to run the request 10363// in dry-run mode. 10364func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { 10365 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 10366 return c 10367} 10368 10369// Fields allows partial responses to be retrieved. See 10370// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10371// for more information. 10372func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 10373 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10374 return c 10375} 10376 10377// Context sets the context to be used in this call's Do method. Any 10378// pending HTTP request will be aborted if the provided context is 10379// canceled. 10380func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 10381 c.ctx_ = ctx 10382 return c 10383} 10384 10385// Header returns an http.Header that can be modified by the caller to 10386// add HTTP headers to the request. 10387func (c *AccountsUpdateCall) Header() http.Header { 10388 if c.header_ == nil { 10389 c.header_ = make(http.Header) 10390 } 10391 return c.header_ 10392} 10393 10394func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { 10395 reqHeaders := make(http.Header) 10396 for k, v := range c.header_ { 10397 reqHeaders[k] = v 10398 } 10399 reqHeaders.Set("User-Agent", c.s.userAgent()) 10400 var body io.Reader = nil 10401 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 10402 if err != nil { 10403 return nil, err 10404 } 10405 reqHeaders.Set("Content-Type", "application/json") 10406 c.urlParams_.Set("alt", alt) 10407 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 10408 urls += "?" + c.urlParams_.Encode() 10409 req, _ := http.NewRequest("PUT", urls, body) 10410 req.Header = reqHeaders 10411 googleapi.Expand(req.URL, map[string]string{ 10412 "merchantId": strconv.FormatUint(c.merchantId, 10), 10413 "accountId": strconv.FormatUint(c.accountId, 10), 10414 }) 10415 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10416} 10417 10418// Do executes the "content.accounts.update" call. 10419// Exactly one of *Account or error will be non-nil. Any non-2xx status 10420// code is an error. Response headers are in either 10421// *Account.ServerResponse.Header or (if a response was returned at all) 10422// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10423// check whether the returned error was because http.StatusNotModified 10424// was returned. 10425func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { 10426 gensupport.SetOptions(c.urlParams_, opts...) 10427 res, err := c.doRequest("json") 10428 if res != nil && res.StatusCode == http.StatusNotModified { 10429 if res.Body != nil { 10430 res.Body.Close() 10431 } 10432 return nil, &googleapi.Error{ 10433 Code: res.StatusCode, 10434 Header: res.Header, 10435 } 10436 } 10437 if err != nil { 10438 return nil, err 10439 } 10440 defer googleapi.CloseBody(res) 10441 if err := googleapi.CheckResponse(res); err != nil { 10442 return nil, err 10443 } 10444 ret := &Account{ 10445 ServerResponse: googleapi.ServerResponse{ 10446 Header: res.Header, 10447 HTTPStatusCode: res.StatusCode, 10448 }, 10449 } 10450 target := &ret 10451 if err := gensupport.DecodeResponse(target, res); err != nil { 10452 return nil, err 10453 } 10454 return ret, nil 10455 // { 10456 // "description": "Updates a Merchant Center account.", 10457 // "httpMethod": "PUT", 10458 // "id": "content.accounts.update", 10459 // "parameterOrder": [ 10460 // "merchantId", 10461 // "accountId" 10462 // ], 10463 // "parameters": { 10464 // "accountId": { 10465 // "description": "The ID of the account.", 10466 // "format": "uint64", 10467 // "location": "path", 10468 // "required": true, 10469 // "type": "string" 10470 // }, 10471 // "dryRun": { 10472 // "description": "Flag to run the request in dry-run mode.", 10473 // "location": "query", 10474 // "type": "boolean" 10475 // }, 10476 // "merchantId": { 10477 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 10478 // "format": "uint64", 10479 // "location": "path", 10480 // "required": true, 10481 // "type": "string" 10482 // } 10483 // }, 10484 // "path": "{merchantId}/accounts/{accountId}", 10485 // "request": { 10486 // "$ref": "Account" 10487 // }, 10488 // "response": { 10489 // "$ref": "Account" 10490 // }, 10491 // "scopes": [ 10492 // "https://www.googleapis.com/auth/content" 10493 // ] 10494 // } 10495 10496} 10497 10498// method id "content.accountstatuses.custombatch": 10499 10500type AccountstatusesCustombatchCall struct { 10501 s *APIService 10502 accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest 10503 urlParams_ gensupport.URLParams 10504 ctx_ context.Context 10505 header_ http.Header 10506} 10507 10508// Custombatch: 10509func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { 10510 c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10511 c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 10512 return c 10513} 10514 10515// Fields allows partial responses to be retrieved. See 10516// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10517// for more information. 10518func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { 10519 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10520 return c 10521} 10522 10523// Context sets the context to be used in this call's Do method. Any 10524// pending HTTP request will be aborted if the provided context is 10525// canceled. 10526func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 10527 c.ctx_ = ctx 10528 return c 10529} 10530 10531// Header returns an http.Header that can be modified by the caller to 10532// add HTTP headers to the request. 10533func (c *AccountstatusesCustombatchCall) Header() http.Header { 10534 if c.header_ == nil { 10535 c.header_ = make(http.Header) 10536 } 10537 return c.header_ 10538} 10539 10540func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 10541 reqHeaders := make(http.Header) 10542 for k, v := range c.header_ { 10543 reqHeaders[k] = v 10544 } 10545 reqHeaders.Set("User-Agent", c.s.userAgent()) 10546 var body io.Reader = nil 10547 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) 10548 if err != nil { 10549 return nil, err 10550 } 10551 reqHeaders.Set("Content-Type", "application/json") 10552 c.urlParams_.Set("alt", alt) 10553 urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 10554 urls += "?" + c.urlParams_.Encode() 10555 req, _ := http.NewRequest("POST", urls, body) 10556 req.Header = reqHeaders 10557 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10558} 10559 10560// Do executes the "content.accountstatuses.custombatch" call. 10561// Exactly one of *AccountstatusesCustomBatchResponse or error will be 10562// non-nil. Any non-2xx status code is an error. Response headers are in 10563// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or 10564// (if a response was returned at all) in 10565// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10566// whether the returned error was because http.StatusNotModified was 10567// returned. 10568func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { 10569 gensupport.SetOptions(c.urlParams_, opts...) 10570 res, err := c.doRequest("json") 10571 if res != nil && res.StatusCode == http.StatusNotModified { 10572 if res.Body != nil { 10573 res.Body.Close() 10574 } 10575 return nil, &googleapi.Error{ 10576 Code: res.StatusCode, 10577 Header: res.Header, 10578 } 10579 } 10580 if err != nil { 10581 return nil, err 10582 } 10583 defer googleapi.CloseBody(res) 10584 if err := googleapi.CheckResponse(res); err != nil { 10585 return nil, err 10586 } 10587 ret := &AccountstatusesCustomBatchResponse{ 10588 ServerResponse: googleapi.ServerResponse{ 10589 Header: res.Header, 10590 HTTPStatusCode: res.StatusCode, 10591 }, 10592 } 10593 target := &ret 10594 if err := gensupport.DecodeResponse(target, res); err != nil { 10595 return nil, err 10596 } 10597 return ret, nil 10598 // { 10599 // "httpMethod": "POST", 10600 // "id": "content.accountstatuses.custombatch", 10601 // "path": "accountstatuses/batch", 10602 // "request": { 10603 // "$ref": "AccountstatusesCustomBatchRequest" 10604 // }, 10605 // "response": { 10606 // "$ref": "AccountstatusesCustomBatchResponse" 10607 // }, 10608 // "scopes": [ 10609 // "https://www.googleapis.com/auth/content" 10610 // ] 10611 // } 10612 10613} 10614 10615// method id "content.accountstatuses.get": 10616 10617type AccountstatusesGetCall struct { 10618 s *APIService 10619 merchantId uint64 10620 accountId uint64 10621 urlParams_ gensupport.URLParams 10622 ifNoneMatch_ string 10623 ctx_ context.Context 10624 header_ http.Header 10625} 10626 10627// Get: Retrieves the status of a Merchant Center account. 10628func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { 10629 c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10630 c.merchantId = merchantId 10631 c.accountId = accountId 10632 return c 10633} 10634 10635// Destinations sets the optional parameter "destinations": If set, only 10636// issues for the specified destinations are returned, otherwise only 10637// issues for the Shopping destination. 10638func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { 10639 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 10640 return c 10641} 10642 10643// Fields allows partial responses to be retrieved. See 10644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10645// for more information. 10646func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 10647 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10648 return c 10649} 10650 10651// IfNoneMatch sets the optional parameter which makes the operation 10652// fail if the object's ETag matches the given value. This is useful for 10653// getting updates only after the object has changed since the last 10654// request. Use googleapi.IsNotModified to check whether the response 10655// error from Do is the result of In-None-Match. 10656func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { 10657 c.ifNoneMatch_ = entityTag 10658 return c 10659} 10660 10661// Context sets the context to be used in this call's Do method. Any 10662// pending HTTP request will be aborted if the provided context is 10663// canceled. 10664func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 10665 c.ctx_ = ctx 10666 return c 10667} 10668 10669// Header returns an http.Header that can be modified by the caller to 10670// add HTTP headers to the request. 10671func (c *AccountstatusesGetCall) Header() http.Header { 10672 if c.header_ == nil { 10673 c.header_ = make(http.Header) 10674 } 10675 return c.header_ 10676} 10677 10678func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { 10679 reqHeaders := make(http.Header) 10680 for k, v := range c.header_ { 10681 reqHeaders[k] = v 10682 } 10683 reqHeaders.Set("User-Agent", c.s.userAgent()) 10684 if c.ifNoneMatch_ != "" { 10685 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10686 } 10687 var body io.Reader = nil 10688 c.urlParams_.Set("alt", alt) 10689 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") 10690 urls += "?" + c.urlParams_.Encode() 10691 req, _ := http.NewRequest("GET", urls, body) 10692 req.Header = reqHeaders 10693 googleapi.Expand(req.URL, map[string]string{ 10694 "merchantId": strconv.FormatUint(c.merchantId, 10), 10695 "accountId": strconv.FormatUint(c.accountId, 10), 10696 }) 10697 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10698} 10699 10700// Do executes the "content.accountstatuses.get" call. 10701// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx 10702// status code is an error. Response headers are in either 10703// *AccountStatus.ServerResponse.Header or (if a response was returned 10704// at all) in error.(*googleapi.Error).Header. Use 10705// googleapi.IsNotModified to check whether the returned error was 10706// because http.StatusNotModified was returned. 10707func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { 10708 gensupport.SetOptions(c.urlParams_, opts...) 10709 res, err := c.doRequest("json") 10710 if res != nil && res.StatusCode == http.StatusNotModified { 10711 if res.Body != nil { 10712 res.Body.Close() 10713 } 10714 return nil, &googleapi.Error{ 10715 Code: res.StatusCode, 10716 Header: res.Header, 10717 } 10718 } 10719 if err != nil { 10720 return nil, err 10721 } 10722 defer googleapi.CloseBody(res) 10723 if err := googleapi.CheckResponse(res); err != nil { 10724 return nil, err 10725 } 10726 ret := &AccountStatus{ 10727 ServerResponse: googleapi.ServerResponse{ 10728 Header: res.Header, 10729 HTTPStatusCode: res.StatusCode, 10730 }, 10731 } 10732 target := &ret 10733 if err := gensupport.DecodeResponse(target, res); err != nil { 10734 return nil, err 10735 } 10736 return ret, nil 10737 // { 10738 // "description": "Retrieves the status of a Merchant Center account.", 10739 // "httpMethod": "GET", 10740 // "id": "content.accountstatuses.get", 10741 // "parameterOrder": [ 10742 // "merchantId", 10743 // "accountId" 10744 // ], 10745 // "parameters": { 10746 // "accountId": { 10747 // "description": "The ID of the account.", 10748 // "format": "uint64", 10749 // "location": "path", 10750 // "required": true, 10751 // "type": "string" 10752 // }, 10753 // "destinations": { 10754 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 10755 // "location": "query", 10756 // "repeated": true, 10757 // "type": "string" 10758 // }, 10759 // "merchantId": { 10760 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 10761 // "format": "uint64", 10762 // "location": "path", 10763 // "required": true, 10764 // "type": "string" 10765 // } 10766 // }, 10767 // "path": "{merchantId}/accountstatuses/{accountId}", 10768 // "response": { 10769 // "$ref": "AccountStatus" 10770 // }, 10771 // "scopes": [ 10772 // "https://www.googleapis.com/auth/content" 10773 // ] 10774 // } 10775 10776} 10777 10778// method id "content.accountstatuses.list": 10779 10780type AccountstatusesListCall struct { 10781 s *APIService 10782 merchantId uint64 10783 urlParams_ gensupport.URLParams 10784 ifNoneMatch_ string 10785 ctx_ context.Context 10786 header_ http.Header 10787} 10788 10789// List: Lists the statuses of the sub-accounts in your Merchant Center 10790// account. 10791func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { 10792 c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10793 c.merchantId = merchantId 10794 return c 10795} 10796 10797// Destinations sets the optional parameter "destinations": If set, only 10798// issues for the specified destinations are returned, otherwise only 10799// issues for the Shopping destination. 10800func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { 10801 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 10802 return c 10803} 10804 10805// MaxResults sets the optional parameter "maxResults": The maximum 10806// number of account statuses to return in the response, used for 10807// paging. 10808func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { 10809 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 10810 return c 10811} 10812 10813// PageToken sets the optional parameter "pageToken": The token returned 10814// by the previous request. 10815func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { 10816 c.urlParams_.Set("pageToken", pageToken) 10817 return c 10818} 10819 10820// Fields allows partial responses to be retrieved. See 10821// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10822// for more information. 10823func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { 10824 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10825 return c 10826} 10827 10828// IfNoneMatch sets the optional parameter which makes the operation 10829// fail if the object's ETag matches the given value. This is useful for 10830// getting updates only after the object has changed since the last 10831// request. Use googleapi.IsNotModified to check whether the response 10832// error from Do is the result of In-None-Match. 10833func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { 10834 c.ifNoneMatch_ = entityTag 10835 return c 10836} 10837 10838// Context sets the context to be used in this call's Do method. Any 10839// pending HTTP request will be aborted if the provided context is 10840// canceled. 10841func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 10842 c.ctx_ = ctx 10843 return c 10844} 10845 10846// Header returns an http.Header that can be modified by the caller to 10847// add HTTP headers to the request. 10848func (c *AccountstatusesListCall) Header() http.Header { 10849 if c.header_ == nil { 10850 c.header_ = make(http.Header) 10851 } 10852 return c.header_ 10853} 10854 10855func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { 10856 reqHeaders := make(http.Header) 10857 for k, v := range c.header_ { 10858 reqHeaders[k] = v 10859 } 10860 reqHeaders.Set("User-Agent", c.s.userAgent()) 10861 if c.ifNoneMatch_ != "" { 10862 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10863 } 10864 var body io.Reader = nil 10865 c.urlParams_.Set("alt", alt) 10866 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") 10867 urls += "?" + c.urlParams_.Encode() 10868 req, _ := http.NewRequest("GET", urls, body) 10869 req.Header = reqHeaders 10870 googleapi.Expand(req.URL, map[string]string{ 10871 "merchantId": strconv.FormatUint(c.merchantId, 10), 10872 }) 10873 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10874} 10875 10876// Do executes the "content.accountstatuses.list" call. 10877// Exactly one of *AccountstatusesListResponse or error will be non-nil. 10878// Any non-2xx status code is an error. Response headers are in either 10879// *AccountstatusesListResponse.ServerResponse.Header or (if a response 10880// was returned at all) in error.(*googleapi.Error).Header. Use 10881// googleapi.IsNotModified to check whether the returned error was 10882// because http.StatusNotModified was returned. 10883func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { 10884 gensupport.SetOptions(c.urlParams_, opts...) 10885 res, err := c.doRequest("json") 10886 if res != nil && res.StatusCode == http.StatusNotModified { 10887 if res.Body != nil { 10888 res.Body.Close() 10889 } 10890 return nil, &googleapi.Error{ 10891 Code: res.StatusCode, 10892 Header: res.Header, 10893 } 10894 } 10895 if err != nil { 10896 return nil, err 10897 } 10898 defer googleapi.CloseBody(res) 10899 if err := googleapi.CheckResponse(res); err != nil { 10900 return nil, err 10901 } 10902 ret := &AccountstatusesListResponse{ 10903 ServerResponse: googleapi.ServerResponse{ 10904 Header: res.Header, 10905 HTTPStatusCode: res.StatusCode, 10906 }, 10907 } 10908 target := &ret 10909 if err := gensupport.DecodeResponse(target, res); err != nil { 10910 return nil, err 10911 } 10912 return ret, nil 10913 // { 10914 // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", 10915 // "httpMethod": "GET", 10916 // "id": "content.accountstatuses.list", 10917 // "parameterOrder": [ 10918 // "merchantId" 10919 // ], 10920 // "parameters": { 10921 // "destinations": { 10922 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 10923 // "location": "query", 10924 // "repeated": true, 10925 // "type": "string" 10926 // }, 10927 // "maxResults": { 10928 // "description": "The maximum number of account statuses to return in the response, used for paging.", 10929 // "format": "uint32", 10930 // "location": "query", 10931 // "type": "integer" 10932 // }, 10933 // "merchantId": { 10934 // "description": "The ID of the managing account. This must be a multi-client account.", 10935 // "format": "uint64", 10936 // "location": "path", 10937 // "required": true, 10938 // "type": "string" 10939 // }, 10940 // "pageToken": { 10941 // "description": "The token returned by the previous request.", 10942 // "location": "query", 10943 // "type": "string" 10944 // } 10945 // }, 10946 // "path": "{merchantId}/accountstatuses", 10947 // "response": { 10948 // "$ref": "AccountstatusesListResponse" 10949 // }, 10950 // "scopes": [ 10951 // "https://www.googleapis.com/auth/content" 10952 // ] 10953 // } 10954 10955} 10956 10957// Pages invokes f for each page of results. 10958// A non-nil error returned from f will halt the iteration. 10959// The provided context supersedes any context provided to the Context method. 10960func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { 10961 c.ctx_ = ctx 10962 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10963 for { 10964 x, err := c.Do() 10965 if err != nil { 10966 return err 10967 } 10968 if err := f(x); err != nil { 10969 return err 10970 } 10971 if x.NextPageToken == "" { 10972 return nil 10973 } 10974 c.PageToken(x.NextPageToken) 10975 } 10976} 10977 10978// method id "content.accounttax.custombatch": 10979 10980type AccounttaxCustombatchCall struct { 10981 s *APIService 10982 accounttaxcustombatchrequest *AccounttaxCustomBatchRequest 10983 urlParams_ gensupport.URLParams 10984 ctx_ context.Context 10985 header_ http.Header 10986} 10987 10988// Custombatch: Retrieves and updates tax settings of multiple accounts 10989// in a single request. 10990func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { 10991 c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10992 c.accounttaxcustombatchrequest = accounttaxcustombatchrequest 10993 return c 10994} 10995 10996// DryRun sets the optional parameter "dryRun": Flag to run the request 10997// in dry-run mode. 10998func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { 10999 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 11000 return c 11001} 11002 11003// Fields allows partial responses to be retrieved. See 11004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11005// for more information. 11006func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { 11007 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11008 return c 11009} 11010 11011// Context sets the context to be used in this call's Do method. Any 11012// pending HTTP request will be aborted if the provided context is 11013// canceled. 11014func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 11015 c.ctx_ = ctx 11016 return c 11017} 11018 11019// Header returns an http.Header that can be modified by the caller to 11020// add HTTP headers to the request. 11021func (c *AccounttaxCustombatchCall) Header() http.Header { 11022 if c.header_ == nil { 11023 c.header_ = make(http.Header) 11024 } 11025 return c.header_ 11026} 11027 11028func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { 11029 reqHeaders := make(http.Header) 11030 for k, v := range c.header_ { 11031 reqHeaders[k] = v 11032 } 11033 reqHeaders.Set("User-Agent", c.s.userAgent()) 11034 var body io.Reader = nil 11035 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) 11036 if err != nil { 11037 return nil, err 11038 } 11039 reqHeaders.Set("Content-Type", "application/json") 11040 c.urlParams_.Set("alt", alt) 11041 urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 11042 urls += "?" + c.urlParams_.Encode() 11043 req, _ := http.NewRequest("POST", urls, body) 11044 req.Header = reqHeaders 11045 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11046} 11047 11048// Do executes the "content.accounttax.custombatch" call. 11049// Exactly one of *AccounttaxCustomBatchResponse or error will be 11050// non-nil. Any non-2xx status code is an error. Response headers are in 11051// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a 11052// response was returned at all) in error.(*googleapi.Error).Header. Use 11053// googleapi.IsNotModified to check whether the returned error was 11054// because http.StatusNotModified was returned. 11055func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { 11056 gensupport.SetOptions(c.urlParams_, opts...) 11057 res, err := c.doRequest("json") 11058 if res != nil && res.StatusCode == http.StatusNotModified { 11059 if res.Body != nil { 11060 res.Body.Close() 11061 } 11062 return nil, &googleapi.Error{ 11063 Code: res.StatusCode, 11064 Header: res.Header, 11065 } 11066 } 11067 if err != nil { 11068 return nil, err 11069 } 11070 defer googleapi.CloseBody(res) 11071 if err := googleapi.CheckResponse(res); err != nil { 11072 return nil, err 11073 } 11074 ret := &AccounttaxCustomBatchResponse{ 11075 ServerResponse: googleapi.ServerResponse{ 11076 Header: res.Header, 11077 HTTPStatusCode: res.StatusCode, 11078 }, 11079 } 11080 target := &ret 11081 if err := gensupport.DecodeResponse(target, res); err != nil { 11082 return nil, err 11083 } 11084 return ret, nil 11085 // { 11086 // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", 11087 // "httpMethod": "POST", 11088 // "id": "content.accounttax.custombatch", 11089 // "parameters": { 11090 // "dryRun": { 11091 // "description": "Flag to run the request in dry-run mode.", 11092 // "location": "query", 11093 // "type": "boolean" 11094 // } 11095 // }, 11096 // "path": "accounttax/batch", 11097 // "request": { 11098 // "$ref": "AccounttaxCustomBatchRequest" 11099 // }, 11100 // "response": { 11101 // "$ref": "AccounttaxCustomBatchResponse" 11102 // }, 11103 // "scopes": [ 11104 // "https://www.googleapis.com/auth/content" 11105 // ] 11106 // } 11107 11108} 11109 11110// method id "content.accounttax.get": 11111 11112type AccounttaxGetCall struct { 11113 s *APIService 11114 merchantId uint64 11115 accountId uint64 11116 urlParams_ gensupport.URLParams 11117 ifNoneMatch_ string 11118 ctx_ context.Context 11119 header_ http.Header 11120} 11121 11122// Get: Retrieves the tax settings of the account. 11123func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { 11124 c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11125 c.merchantId = merchantId 11126 c.accountId = accountId 11127 return c 11128} 11129 11130// Fields allows partial responses to be retrieved. See 11131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11132// for more information. 11133func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 11134 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11135 return c 11136} 11137 11138// IfNoneMatch sets the optional parameter which makes the operation 11139// fail if the object's ETag matches the given value. This is useful for 11140// getting updates only after the object has changed since the last 11141// request. Use googleapi.IsNotModified to check whether the response 11142// error from Do is the result of In-None-Match. 11143func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { 11144 c.ifNoneMatch_ = entityTag 11145 return c 11146} 11147 11148// Context sets the context to be used in this call's Do method. Any 11149// pending HTTP request will be aborted if the provided context is 11150// canceled. 11151func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 11152 c.ctx_ = ctx 11153 return c 11154} 11155 11156// Header returns an http.Header that can be modified by the caller to 11157// add HTTP headers to the request. 11158func (c *AccounttaxGetCall) Header() http.Header { 11159 if c.header_ == nil { 11160 c.header_ = make(http.Header) 11161 } 11162 return c.header_ 11163} 11164 11165func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { 11166 reqHeaders := make(http.Header) 11167 for k, v := range c.header_ { 11168 reqHeaders[k] = v 11169 } 11170 reqHeaders.Set("User-Agent", c.s.userAgent()) 11171 if c.ifNoneMatch_ != "" { 11172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11173 } 11174 var body io.Reader = nil 11175 c.urlParams_.Set("alt", alt) 11176 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 11177 urls += "?" + c.urlParams_.Encode() 11178 req, _ := http.NewRequest("GET", urls, body) 11179 req.Header = reqHeaders 11180 googleapi.Expand(req.URL, map[string]string{ 11181 "merchantId": strconv.FormatUint(c.merchantId, 10), 11182 "accountId": strconv.FormatUint(c.accountId, 10), 11183 }) 11184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11185} 11186 11187// Do executes the "content.accounttax.get" call. 11188// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 11189// status code is an error. Response headers are in either 11190// *AccountTax.ServerResponse.Header or (if a response was returned at 11191// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11192// to check whether the returned error was because 11193// http.StatusNotModified was returned. 11194func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 11195 gensupport.SetOptions(c.urlParams_, opts...) 11196 res, err := c.doRequest("json") 11197 if res != nil && res.StatusCode == http.StatusNotModified { 11198 if res.Body != nil { 11199 res.Body.Close() 11200 } 11201 return nil, &googleapi.Error{ 11202 Code: res.StatusCode, 11203 Header: res.Header, 11204 } 11205 } 11206 if err != nil { 11207 return nil, err 11208 } 11209 defer googleapi.CloseBody(res) 11210 if err := googleapi.CheckResponse(res); err != nil { 11211 return nil, err 11212 } 11213 ret := &AccountTax{ 11214 ServerResponse: googleapi.ServerResponse{ 11215 Header: res.Header, 11216 HTTPStatusCode: res.StatusCode, 11217 }, 11218 } 11219 target := &ret 11220 if err := gensupport.DecodeResponse(target, res); err != nil { 11221 return nil, err 11222 } 11223 return ret, nil 11224 // { 11225 // "description": "Retrieves the tax settings of the account.", 11226 // "httpMethod": "GET", 11227 // "id": "content.accounttax.get", 11228 // "parameterOrder": [ 11229 // "merchantId", 11230 // "accountId" 11231 // ], 11232 // "parameters": { 11233 // "accountId": { 11234 // "description": "The ID of the account for which to get/update account tax settings.", 11235 // "format": "uint64", 11236 // "location": "path", 11237 // "required": true, 11238 // "type": "string" 11239 // }, 11240 // "merchantId": { 11241 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 11242 // "format": "uint64", 11243 // "location": "path", 11244 // "required": true, 11245 // "type": "string" 11246 // } 11247 // }, 11248 // "path": "{merchantId}/accounttax/{accountId}", 11249 // "response": { 11250 // "$ref": "AccountTax" 11251 // }, 11252 // "scopes": [ 11253 // "https://www.googleapis.com/auth/content" 11254 // ] 11255 // } 11256 11257} 11258 11259// method id "content.accounttax.list": 11260 11261type AccounttaxListCall struct { 11262 s *APIService 11263 merchantId uint64 11264 urlParams_ gensupport.URLParams 11265 ifNoneMatch_ string 11266 ctx_ context.Context 11267 header_ http.Header 11268} 11269 11270// List: Lists the tax settings of the sub-accounts in your Merchant 11271// Center account. 11272func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { 11273 c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11274 c.merchantId = merchantId 11275 return c 11276} 11277 11278// MaxResults sets the optional parameter "maxResults": The maximum 11279// number of tax settings to return in the response, used for paging. 11280func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { 11281 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 11282 return c 11283} 11284 11285// PageToken sets the optional parameter "pageToken": The token returned 11286// by the previous request. 11287func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { 11288 c.urlParams_.Set("pageToken", pageToken) 11289 return c 11290} 11291 11292// Fields allows partial responses to be retrieved. See 11293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11294// for more information. 11295func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { 11296 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11297 return c 11298} 11299 11300// IfNoneMatch sets the optional parameter which makes the operation 11301// fail if the object's ETag matches the given value. This is useful for 11302// getting updates only after the object has changed since the last 11303// request. Use googleapi.IsNotModified to check whether the response 11304// error from Do is the result of In-None-Match. 11305func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { 11306 c.ifNoneMatch_ = entityTag 11307 return c 11308} 11309 11310// Context sets the context to be used in this call's Do method. Any 11311// pending HTTP request will be aborted if the provided context is 11312// canceled. 11313func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 11314 c.ctx_ = ctx 11315 return c 11316} 11317 11318// Header returns an http.Header that can be modified by the caller to 11319// add HTTP headers to the request. 11320func (c *AccounttaxListCall) Header() http.Header { 11321 if c.header_ == nil { 11322 c.header_ = make(http.Header) 11323 } 11324 return c.header_ 11325} 11326 11327func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { 11328 reqHeaders := make(http.Header) 11329 for k, v := range c.header_ { 11330 reqHeaders[k] = v 11331 } 11332 reqHeaders.Set("User-Agent", c.s.userAgent()) 11333 if c.ifNoneMatch_ != "" { 11334 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11335 } 11336 var body io.Reader = nil 11337 c.urlParams_.Set("alt", alt) 11338 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") 11339 urls += "?" + c.urlParams_.Encode() 11340 req, _ := http.NewRequest("GET", urls, body) 11341 req.Header = reqHeaders 11342 googleapi.Expand(req.URL, map[string]string{ 11343 "merchantId": strconv.FormatUint(c.merchantId, 10), 11344 }) 11345 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11346} 11347 11348// Do executes the "content.accounttax.list" call. 11349// Exactly one of *AccounttaxListResponse or error will be non-nil. Any 11350// non-2xx status code is an error. Response headers are in either 11351// *AccounttaxListResponse.ServerResponse.Header or (if a response was 11352// returned at all) in error.(*googleapi.Error).Header. Use 11353// googleapi.IsNotModified to check whether the returned error was 11354// because http.StatusNotModified was returned. 11355func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { 11356 gensupport.SetOptions(c.urlParams_, opts...) 11357 res, err := c.doRequest("json") 11358 if res != nil && res.StatusCode == http.StatusNotModified { 11359 if res.Body != nil { 11360 res.Body.Close() 11361 } 11362 return nil, &googleapi.Error{ 11363 Code: res.StatusCode, 11364 Header: res.Header, 11365 } 11366 } 11367 if err != nil { 11368 return nil, err 11369 } 11370 defer googleapi.CloseBody(res) 11371 if err := googleapi.CheckResponse(res); err != nil { 11372 return nil, err 11373 } 11374 ret := &AccounttaxListResponse{ 11375 ServerResponse: googleapi.ServerResponse{ 11376 Header: res.Header, 11377 HTTPStatusCode: res.StatusCode, 11378 }, 11379 } 11380 target := &ret 11381 if err := gensupport.DecodeResponse(target, res); err != nil { 11382 return nil, err 11383 } 11384 return ret, nil 11385 // { 11386 // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", 11387 // "httpMethod": "GET", 11388 // "id": "content.accounttax.list", 11389 // "parameterOrder": [ 11390 // "merchantId" 11391 // ], 11392 // "parameters": { 11393 // "maxResults": { 11394 // "description": "The maximum number of tax settings to return in the response, used for paging.", 11395 // "format": "uint32", 11396 // "location": "query", 11397 // "type": "integer" 11398 // }, 11399 // "merchantId": { 11400 // "description": "The ID of the managing account. This must be a multi-client account.", 11401 // "format": "uint64", 11402 // "location": "path", 11403 // "required": true, 11404 // "type": "string" 11405 // }, 11406 // "pageToken": { 11407 // "description": "The token returned by the previous request.", 11408 // "location": "query", 11409 // "type": "string" 11410 // } 11411 // }, 11412 // "path": "{merchantId}/accounttax", 11413 // "response": { 11414 // "$ref": "AccounttaxListResponse" 11415 // }, 11416 // "scopes": [ 11417 // "https://www.googleapis.com/auth/content" 11418 // ] 11419 // } 11420 11421} 11422 11423// Pages invokes f for each page of results. 11424// A non-nil error returned from f will halt the iteration. 11425// The provided context supersedes any context provided to the Context method. 11426func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { 11427 c.ctx_ = ctx 11428 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11429 for { 11430 x, err := c.Do() 11431 if err != nil { 11432 return err 11433 } 11434 if err := f(x); err != nil { 11435 return err 11436 } 11437 if x.NextPageToken == "" { 11438 return nil 11439 } 11440 c.PageToken(x.NextPageToken) 11441 } 11442} 11443 11444// method id "content.accounttax.patch": 11445 11446type AccounttaxPatchCall struct { 11447 s *APIService 11448 merchantId uint64 11449 accountId uint64 11450 accounttax *AccountTax 11451 urlParams_ gensupport.URLParams 11452 ctx_ context.Context 11453 header_ http.Header 11454} 11455 11456// Patch: Updates the tax settings of the account. This method supports 11457// patch semantics. 11458func (r *AccounttaxService) Patch(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxPatchCall { 11459 c := &AccounttaxPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11460 c.merchantId = merchantId 11461 c.accountId = accountId 11462 c.accounttax = accounttax 11463 return c 11464} 11465 11466// DryRun sets the optional parameter "dryRun": Flag to run the request 11467// in dry-run mode. 11468func (c *AccounttaxPatchCall) DryRun(dryRun bool) *AccounttaxPatchCall { 11469 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 11470 return c 11471} 11472 11473// Fields allows partial responses to be retrieved. See 11474// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11475// for more information. 11476func (c *AccounttaxPatchCall) Fields(s ...googleapi.Field) *AccounttaxPatchCall { 11477 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11478 return c 11479} 11480 11481// Context sets the context to be used in this call's Do method. Any 11482// pending HTTP request will be aborted if the provided context is 11483// canceled. 11484func (c *AccounttaxPatchCall) Context(ctx context.Context) *AccounttaxPatchCall { 11485 c.ctx_ = ctx 11486 return c 11487} 11488 11489// Header returns an http.Header that can be modified by the caller to 11490// add HTTP headers to the request. 11491func (c *AccounttaxPatchCall) Header() http.Header { 11492 if c.header_ == nil { 11493 c.header_ = make(http.Header) 11494 } 11495 return c.header_ 11496} 11497 11498func (c *AccounttaxPatchCall) doRequest(alt string) (*http.Response, error) { 11499 reqHeaders := make(http.Header) 11500 for k, v := range c.header_ { 11501 reqHeaders[k] = v 11502 } 11503 reqHeaders.Set("User-Agent", c.s.userAgent()) 11504 var body io.Reader = nil 11505 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) 11506 if err != nil { 11507 return nil, err 11508 } 11509 reqHeaders.Set("Content-Type", "application/json") 11510 c.urlParams_.Set("alt", alt) 11511 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 11512 urls += "?" + c.urlParams_.Encode() 11513 req, _ := http.NewRequest("PATCH", urls, body) 11514 req.Header = reqHeaders 11515 googleapi.Expand(req.URL, map[string]string{ 11516 "merchantId": strconv.FormatUint(c.merchantId, 10), 11517 "accountId": strconv.FormatUint(c.accountId, 10), 11518 }) 11519 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11520} 11521 11522// Do executes the "content.accounttax.patch" call. 11523// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 11524// status code is an error. Response headers are in either 11525// *AccountTax.ServerResponse.Header or (if a response was returned at 11526// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11527// to check whether the returned error was because 11528// http.StatusNotModified was returned. 11529func (c *AccounttaxPatchCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 11530 gensupport.SetOptions(c.urlParams_, opts...) 11531 res, err := c.doRequest("json") 11532 if res != nil && res.StatusCode == http.StatusNotModified { 11533 if res.Body != nil { 11534 res.Body.Close() 11535 } 11536 return nil, &googleapi.Error{ 11537 Code: res.StatusCode, 11538 Header: res.Header, 11539 } 11540 } 11541 if err != nil { 11542 return nil, err 11543 } 11544 defer googleapi.CloseBody(res) 11545 if err := googleapi.CheckResponse(res); err != nil { 11546 return nil, err 11547 } 11548 ret := &AccountTax{ 11549 ServerResponse: googleapi.ServerResponse{ 11550 Header: res.Header, 11551 HTTPStatusCode: res.StatusCode, 11552 }, 11553 } 11554 target := &ret 11555 if err := gensupport.DecodeResponse(target, res); err != nil { 11556 return nil, err 11557 } 11558 return ret, nil 11559 // { 11560 // "description": "Updates the tax settings of the account. This method supports patch semantics.", 11561 // "httpMethod": "PATCH", 11562 // "id": "content.accounttax.patch", 11563 // "parameterOrder": [ 11564 // "merchantId", 11565 // "accountId" 11566 // ], 11567 // "parameters": { 11568 // "accountId": { 11569 // "description": "The ID of the account for which to get/update account tax settings.", 11570 // "format": "uint64", 11571 // "location": "path", 11572 // "required": true, 11573 // "type": "string" 11574 // }, 11575 // "dryRun": { 11576 // "description": "Flag to run the request in dry-run mode.", 11577 // "location": "query", 11578 // "type": "boolean" 11579 // }, 11580 // "merchantId": { 11581 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 11582 // "format": "uint64", 11583 // "location": "path", 11584 // "required": true, 11585 // "type": "string" 11586 // } 11587 // }, 11588 // "path": "{merchantId}/accounttax/{accountId}", 11589 // "request": { 11590 // "$ref": "AccountTax" 11591 // }, 11592 // "response": { 11593 // "$ref": "AccountTax" 11594 // }, 11595 // "scopes": [ 11596 // "https://www.googleapis.com/auth/content" 11597 // ] 11598 // } 11599 11600} 11601 11602// method id "content.accounttax.update": 11603 11604type AccounttaxUpdateCall struct { 11605 s *APIService 11606 merchantId uint64 11607 accountId uint64 11608 accounttax *AccountTax 11609 urlParams_ gensupport.URLParams 11610 ctx_ context.Context 11611 header_ http.Header 11612} 11613 11614// Update: Updates the tax settings of the account. 11615func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { 11616 c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11617 c.merchantId = merchantId 11618 c.accountId = accountId 11619 c.accounttax = accounttax 11620 return c 11621} 11622 11623// DryRun sets the optional parameter "dryRun": Flag to run the request 11624// in dry-run mode. 11625func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { 11626 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 11627 return c 11628} 11629 11630// Fields allows partial responses to be retrieved. See 11631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11632// for more information. 11633func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { 11634 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11635 return c 11636} 11637 11638// Context sets the context to be used in this call's Do method. Any 11639// pending HTTP request will be aborted if the provided context is 11640// canceled. 11641func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 11642 c.ctx_ = ctx 11643 return c 11644} 11645 11646// Header returns an http.Header that can be modified by the caller to 11647// add HTTP headers to the request. 11648func (c *AccounttaxUpdateCall) Header() http.Header { 11649 if c.header_ == nil { 11650 c.header_ = make(http.Header) 11651 } 11652 return c.header_ 11653} 11654 11655func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { 11656 reqHeaders := make(http.Header) 11657 for k, v := range c.header_ { 11658 reqHeaders[k] = v 11659 } 11660 reqHeaders.Set("User-Agent", c.s.userAgent()) 11661 var body io.Reader = nil 11662 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) 11663 if err != nil { 11664 return nil, err 11665 } 11666 reqHeaders.Set("Content-Type", "application/json") 11667 c.urlParams_.Set("alt", alt) 11668 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 11669 urls += "?" + c.urlParams_.Encode() 11670 req, _ := http.NewRequest("PUT", urls, body) 11671 req.Header = reqHeaders 11672 googleapi.Expand(req.URL, map[string]string{ 11673 "merchantId": strconv.FormatUint(c.merchantId, 10), 11674 "accountId": strconv.FormatUint(c.accountId, 10), 11675 }) 11676 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11677} 11678 11679// Do executes the "content.accounttax.update" call. 11680// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 11681// status code is an error. Response headers are in either 11682// *AccountTax.ServerResponse.Header or (if a response was returned at 11683// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11684// to check whether the returned error was because 11685// http.StatusNotModified was returned. 11686func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 11687 gensupport.SetOptions(c.urlParams_, opts...) 11688 res, err := c.doRequest("json") 11689 if res != nil && res.StatusCode == http.StatusNotModified { 11690 if res.Body != nil { 11691 res.Body.Close() 11692 } 11693 return nil, &googleapi.Error{ 11694 Code: res.StatusCode, 11695 Header: res.Header, 11696 } 11697 } 11698 if err != nil { 11699 return nil, err 11700 } 11701 defer googleapi.CloseBody(res) 11702 if err := googleapi.CheckResponse(res); err != nil { 11703 return nil, err 11704 } 11705 ret := &AccountTax{ 11706 ServerResponse: googleapi.ServerResponse{ 11707 Header: res.Header, 11708 HTTPStatusCode: res.StatusCode, 11709 }, 11710 } 11711 target := &ret 11712 if err := gensupport.DecodeResponse(target, res); err != nil { 11713 return nil, err 11714 } 11715 return ret, nil 11716 // { 11717 // "description": "Updates the tax settings of the account.", 11718 // "httpMethod": "PUT", 11719 // "id": "content.accounttax.update", 11720 // "parameterOrder": [ 11721 // "merchantId", 11722 // "accountId" 11723 // ], 11724 // "parameters": { 11725 // "accountId": { 11726 // "description": "The ID of the account for which to get/update account tax settings.", 11727 // "format": "uint64", 11728 // "location": "path", 11729 // "required": true, 11730 // "type": "string" 11731 // }, 11732 // "dryRun": { 11733 // "description": "Flag to run the request in dry-run mode.", 11734 // "location": "query", 11735 // "type": "boolean" 11736 // }, 11737 // "merchantId": { 11738 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 11739 // "format": "uint64", 11740 // "location": "path", 11741 // "required": true, 11742 // "type": "string" 11743 // } 11744 // }, 11745 // "path": "{merchantId}/accounttax/{accountId}", 11746 // "request": { 11747 // "$ref": "AccountTax" 11748 // }, 11749 // "response": { 11750 // "$ref": "AccountTax" 11751 // }, 11752 // "scopes": [ 11753 // "https://www.googleapis.com/auth/content" 11754 // ] 11755 // } 11756 11757} 11758 11759// method id "content.datafeeds.custombatch": 11760 11761type DatafeedsCustombatchCall struct { 11762 s *APIService 11763 datafeedscustombatchrequest *DatafeedsCustomBatchRequest 11764 urlParams_ gensupport.URLParams 11765 ctx_ context.Context 11766 header_ http.Header 11767} 11768 11769// Custombatch: 11770func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { 11771 c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11772 c.datafeedscustombatchrequest = datafeedscustombatchrequest 11773 return c 11774} 11775 11776// DryRun sets the optional parameter "dryRun": Flag to run the request 11777// in dry-run mode. 11778func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { 11779 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 11780 return c 11781} 11782 11783// Fields allows partial responses to be retrieved. See 11784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11785// for more information. 11786func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 11787 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11788 return c 11789} 11790 11791// Context sets the context to be used in this call's Do method. Any 11792// pending HTTP request will be aborted if the provided context is 11793// canceled. 11794func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 11795 c.ctx_ = ctx 11796 return c 11797} 11798 11799// Header returns an http.Header that can be modified by the caller to 11800// add HTTP headers to the request. 11801func (c *DatafeedsCustombatchCall) Header() http.Header { 11802 if c.header_ == nil { 11803 c.header_ = make(http.Header) 11804 } 11805 return c.header_ 11806} 11807 11808func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { 11809 reqHeaders := make(http.Header) 11810 for k, v := range c.header_ { 11811 reqHeaders[k] = v 11812 } 11813 reqHeaders.Set("User-Agent", c.s.userAgent()) 11814 var body io.Reader = nil 11815 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) 11816 if err != nil { 11817 return nil, err 11818 } 11819 reqHeaders.Set("Content-Type", "application/json") 11820 c.urlParams_.Set("alt", alt) 11821 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") 11822 urls += "?" + c.urlParams_.Encode() 11823 req, _ := http.NewRequest("POST", urls, body) 11824 req.Header = reqHeaders 11825 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11826} 11827 11828// Do executes the "content.datafeeds.custombatch" call. 11829// Exactly one of *DatafeedsCustomBatchResponse or error will be 11830// non-nil. Any non-2xx status code is an error. Response headers are in 11831// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a 11832// response was returned at all) in error.(*googleapi.Error).Header. Use 11833// googleapi.IsNotModified to check whether the returned error was 11834// because http.StatusNotModified was returned. 11835func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { 11836 gensupport.SetOptions(c.urlParams_, opts...) 11837 res, err := c.doRequest("json") 11838 if res != nil && res.StatusCode == http.StatusNotModified { 11839 if res.Body != nil { 11840 res.Body.Close() 11841 } 11842 return nil, &googleapi.Error{ 11843 Code: res.StatusCode, 11844 Header: res.Header, 11845 } 11846 } 11847 if err != nil { 11848 return nil, err 11849 } 11850 defer googleapi.CloseBody(res) 11851 if err := googleapi.CheckResponse(res); err != nil { 11852 return nil, err 11853 } 11854 ret := &DatafeedsCustomBatchResponse{ 11855 ServerResponse: googleapi.ServerResponse{ 11856 Header: res.Header, 11857 HTTPStatusCode: res.StatusCode, 11858 }, 11859 } 11860 target := &ret 11861 if err := gensupport.DecodeResponse(target, res); err != nil { 11862 return nil, err 11863 } 11864 return ret, nil 11865 // { 11866 // "httpMethod": "POST", 11867 // "id": "content.datafeeds.custombatch", 11868 // "parameters": { 11869 // "dryRun": { 11870 // "description": "Flag to run the request in dry-run mode.", 11871 // "location": "query", 11872 // "type": "boolean" 11873 // } 11874 // }, 11875 // "path": "datafeeds/batch", 11876 // "request": { 11877 // "$ref": "DatafeedsCustomBatchRequest" 11878 // }, 11879 // "response": { 11880 // "$ref": "DatafeedsCustomBatchResponse" 11881 // }, 11882 // "scopes": [ 11883 // "https://www.googleapis.com/auth/content" 11884 // ] 11885 // } 11886 11887} 11888 11889// method id "content.datafeeds.delete": 11890 11891type DatafeedsDeleteCall struct { 11892 s *APIService 11893 merchantId uint64 11894 datafeedId uint64 11895 urlParams_ gensupport.URLParams 11896 ctx_ context.Context 11897 header_ http.Header 11898} 11899 11900// Delete: Deletes a datafeed configuration from your Merchant Center 11901// account. 11902func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { 11903 c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11904 c.merchantId = merchantId 11905 c.datafeedId = datafeedId 11906 return c 11907} 11908 11909// DryRun sets the optional parameter "dryRun": Flag to run the request 11910// in dry-run mode. 11911func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { 11912 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 11913 return c 11914} 11915 11916// Fields allows partial responses to be retrieved. See 11917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11918// for more information. 11919func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 11920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11921 return c 11922} 11923 11924// Context sets the context to be used in this call's Do method. Any 11925// pending HTTP request will be aborted if the provided context is 11926// canceled. 11927func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 11928 c.ctx_ = ctx 11929 return c 11930} 11931 11932// Header returns an http.Header that can be modified by the caller to 11933// add HTTP headers to the request. 11934func (c *DatafeedsDeleteCall) Header() http.Header { 11935 if c.header_ == nil { 11936 c.header_ = make(http.Header) 11937 } 11938 return c.header_ 11939} 11940 11941func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { 11942 reqHeaders := make(http.Header) 11943 for k, v := range c.header_ { 11944 reqHeaders[k] = v 11945 } 11946 reqHeaders.Set("User-Agent", c.s.userAgent()) 11947 var body io.Reader = nil 11948 c.urlParams_.Set("alt", alt) 11949 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 11950 urls += "?" + c.urlParams_.Encode() 11951 req, _ := http.NewRequest("DELETE", urls, body) 11952 req.Header = reqHeaders 11953 googleapi.Expand(req.URL, map[string]string{ 11954 "merchantId": strconv.FormatUint(c.merchantId, 10), 11955 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 11956 }) 11957 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11958} 11959 11960// Do executes the "content.datafeeds.delete" call. 11961func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { 11962 gensupport.SetOptions(c.urlParams_, opts...) 11963 res, err := c.doRequest("json") 11964 if err != nil { 11965 return err 11966 } 11967 defer googleapi.CloseBody(res) 11968 if err := googleapi.CheckResponse(res); err != nil { 11969 return err 11970 } 11971 return nil 11972 // { 11973 // "description": "Deletes a datafeed configuration from your Merchant Center account.", 11974 // "httpMethod": "DELETE", 11975 // "id": "content.datafeeds.delete", 11976 // "parameterOrder": [ 11977 // "merchantId", 11978 // "datafeedId" 11979 // ], 11980 // "parameters": { 11981 // "datafeedId": { 11982 // "description": "The ID of the datafeed.", 11983 // "format": "uint64", 11984 // "location": "path", 11985 // "required": true, 11986 // "type": "string" 11987 // }, 11988 // "dryRun": { 11989 // "description": "Flag to run the request in dry-run mode.", 11990 // "location": "query", 11991 // "type": "boolean" 11992 // }, 11993 // "merchantId": { 11994 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 11995 // "format": "uint64", 11996 // "location": "path", 11997 // "required": true, 11998 // "type": "string" 11999 // } 12000 // }, 12001 // "path": "{merchantId}/datafeeds/{datafeedId}", 12002 // "scopes": [ 12003 // "https://www.googleapis.com/auth/content" 12004 // ] 12005 // } 12006 12007} 12008 12009// method id "content.datafeeds.fetchnow": 12010 12011type DatafeedsFetchnowCall struct { 12012 s *APIService 12013 merchantId uint64 12014 datafeedId uint64 12015 urlParams_ gensupport.URLParams 12016 ctx_ context.Context 12017 header_ http.Header 12018} 12019 12020// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center 12021// account. 12022func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { 12023 c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12024 c.merchantId = merchantId 12025 c.datafeedId = datafeedId 12026 return c 12027} 12028 12029// DryRun sets the optional parameter "dryRun": Flag to run the request 12030// in dry-run mode. 12031func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { 12032 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12033 return c 12034} 12035 12036// Fields allows partial responses to be retrieved. See 12037// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12038// for more information. 12039func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { 12040 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12041 return c 12042} 12043 12044// Context sets the context to be used in this call's Do method. Any 12045// pending HTTP request will be aborted if the provided context is 12046// canceled. 12047func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 12048 c.ctx_ = ctx 12049 return c 12050} 12051 12052// Header returns an http.Header that can be modified by the caller to 12053// add HTTP headers to the request. 12054func (c *DatafeedsFetchnowCall) Header() http.Header { 12055 if c.header_ == nil { 12056 c.header_ = make(http.Header) 12057 } 12058 return c.header_ 12059} 12060 12061func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { 12062 reqHeaders := make(http.Header) 12063 for k, v := range c.header_ { 12064 reqHeaders[k] = v 12065 } 12066 reqHeaders.Set("User-Agent", c.s.userAgent()) 12067 var body io.Reader = nil 12068 c.urlParams_.Set("alt", alt) 12069 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") 12070 urls += "?" + c.urlParams_.Encode() 12071 req, _ := http.NewRequest("POST", urls, body) 12072 req.Header = reqHeaders 12073 googleapi.Expand(req.URL, map[string]string{ 12074 "merchantId": strconv.FormatUint(c.merchantId, 10), 12075 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 12076 }) 12077 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12078} 12079 12080// Do executes the "content.datafeeds.fetchnow" call. 12081// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. 12082// Any non-2xx status code is an error. Response headers are in either 12083// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response 12084// was returned at all) in error.(*googleapi.Error).Header. Use 12085// googleapi.IsNotModified to check whether the returned error was 12086// because http.StatusNotModified was returned. 12087func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { 12088 gensupport.SetOptions(c.urlParams_, opts...) 12089 res, err := c.doRequest("json") 12090 if res != nil && res.StatusCode == http.StatusNotModified { 12091 if res.Body != nil { 12092 res.Body.Close() 12093 } 12094 return nil, &googleapi.Error{ 12095 Code: res.StatusCode, 12096 Header: res.Header, 12097 } 12098 } 12099 if err != nil { 12100 return nil, err 12101 } 12102 defer googleapi.CloseBody(res) 12103 if err := googleapi.CheckResponse(res); err != nil { 12104 return nil, err 12105 } 12106 ret := &DatafeedsFetchNowResponse{ 12107 ServerResponse: googleapi.ServerResponse{ 12108 Header: res.Header, 12109 HTTPStatusCode: res.StatusCode, 12110 }, 12111 } 12112 target := &ret 12113 if err := gensupport.DecodeResponse(target, res); err != nil { 12114 return nil, err 12115 } 12116 return ret, nil 12117 // { 12118 // "description": "Invokes a fetch for the datafeed in your Merchant Center account.", 12119 // "httpMethod": "POST", 12120 // "id": "content.datafeeds.fetchnow", 12121 // "parameterOrder": [ 12122 // "merchantId", 12123 // "datafeedId" 12124 // ], 12125 // "parameters": { 12126 // "datafeedId": { 12127 // "description": "The ID of the datafeed to be fetched.", 12128 // "format": "uint64", 12129 // "location": "path", 12130 // "required": true, 12131 // "type": "string" 12132 // }, 12133 // "dryRun": { 12134 // "description": "Flag to run the request in dry-run mode.", 12135 // "location": "query", 12136 // "type": "boolean" 12137 // }, 12138 // "merchantId": { 12139 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 12140 // "format": "uint64", 12141 // "location": "path", 12142 // "required": true, 12143 // "type": "string" 12144 // } 12145 // }, 12146 // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 12147 // "response": { 12148 // "$ref": "DatafeedsFetchNowResponse" 12149 // }, 12150 // "scopes": [ 12151 // "https://www.googleapis.com/auth/content" 12152 // ] 12153 // } 12154 12155} 12156 12157// method id "content.datafeeds.get": 12158 12159type DatafeedsGetCall struct { 12160 s *APIService 12161 merchantId uint64 12162 datafeedId uint64 12163 urlParams_ gensupport.URLParams 12164 ifNoneMatch_ string 12165 ctx_ context.Context 12166 header_ http.Header 12167} 12168 12169// Get: Retrieves a datafeed configuration from your Merchant Center 12170// account. 12171func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { 12172 c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12173 c.merchantId = merchantId 12174 c.datafeedId = datafeedId 12175 return c 12176} 12177 12178// Fields allows partial responses to be retrieved. See 12179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12180// for more information. 12181func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { 12182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12183 return c 12184} 12185 12186// IfNoneMatch sets the optional parameter which makes the operation 12187// fail if the object's ETag matches the given value. This is useful for 12188// getting updates only after the object has changed since the last 12189// request. Use googleapi.IsNotModified to check whether the response 12190// error from Do is the result of In-None-Match. 12191func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { 12192 c.ifNoneMatch_ = entityTag 12193 return c 12194} 12195 12196// Context sets the context to be used in this call's Do method. Any 12197// pending HTTP request will be aborted if the provided context is 12198// canceled. 12199func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 12200 c.ctx_ = ctx 12201 return c 12202} 12203 12204// Header returns an http.Header that can be modified by the caller to 12205// add HTTP headers to the request. 12206func (c *DatafeedsGetCall) Header() http.Header { 12207 if c.header_ == nil { 12208 c.header_ = make(http.Header) 12209 } 12210 return c.header_ 12211} 12212 12213func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { 12214 reqHeaders := make(http.Header) 12215 for k, v := range c.header_ { 12216 reqHeaders[k] = v 12217 } 12218 reqHeaders.Set("User-Agent", c.s.userAgent()) 12219 if c.ifNoneMatch_ != "" { 12220 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12221 } 12222 var body io.Reader = nil 12223 c.urlParams_.Set("alt", alt) 12224 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 12225 urls += "?" + c.urlParams_.Encode() 12226 req, _ := http.NewRequest("GET", urls, body) 12227 req.Header = reqHeaders 12228 googleapi.Expand(req.URL, map[string]string{ 12229 "merchantId": strconv.FormatUint(c.merchantId, 10), 12230 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 12231 }) 12232 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12233} 12234 12235// Do executes the "content.datafeeds.get" call. 12236// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 12237// code is an error. Response headers are in either 12238// *Datafeed.ServerResponse.Header or (if a response was returned at 12239// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12240// to check whether the returned error was because 12241// http.StatusNotModified was returned. 12242func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 12243 gensupport.SetOptions(c.urlParams_, opts...) 12244 res, err := c.doRequest("json") 12245 if res != nil && res.StatusCode == http.StatusNotModified { 12246 if res.Body != nil { 12247 res.Body.Close() 12248 } 12249 return nil, &googleapi.Error{ 12250 Code: res.StatusCode, 12251 Header: res.Header, 12252 } 12253 } 12254 if err != nil { 12255 return nil, err 12256 } 12257 defer googleapi.CloseBody(res) 12258 if err := googleapi.CheckResponse(res); err != nil { 12259 return nil, err 12260 } 12261 ret := &Datafeed{ 12262 ServerResponse: googleapi.ServerResponse{ 12263 Header: res.Header, 12264 HTTPStatusCode: res.StatusCode, 12265 }, 12266 } 12267 target := &ret 12268 if err := gensupport.DecodeResponse(target, res); err != nil { 12269 return nil, err 12270 } 12271 return ret, nil 12272 // { 12273 // "description": "Retrieves a datafeed configuration from your Merchant Center account.", 12274 // "httpMethod": "GET", 12275 // "id": "content.datafeeds.get", 12276 // "parameterOrder": [ 12277 // "merchantId", 12278 // "datafeedId" 12279 // ], 12280 // "parameters": { 12281 // "datafeedId": { 12282 // "description": "The ID of the datafeed.", 12283 // "format": "uint64", 12284 // "location": "path", 12285 // "required": true, 12286 // "type": "string" 12287 // }, 12288 // "merchantId": { 12289 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 12290 // "format": "uint64", 12291 // "location": "path", 12292 // "required": true, 12293 // "type": "string" 12294 // } 12295 // }, 12296 // "path": "{merchantId}/datafeeds/{datafeedId}", 12297 // "response": { 12298 // "$ref": "Datafeed" 12299 // }, 12300 // "scopes": [ 12301 // "https://www.googleapis.com/auth/content" 12302 // ] 12303 // } 12304 12305} 12306 12307// method id "content.datafeeds.insert": 12308 12309type DatafeedsInsertCall struct { 12310 s *APIService 12311 merchantId uint64 12312 datafeed *Datafeed 12313 urlParams_ gensupport.URLParams 12314 ctx_ context.Context 12315 header_ http.Header 12316} 12317 12318// Insert: Registers a datafeed configuration with your Merchant Center 12319// account. 12320func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { 12321 c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12322 c.merchantId = merchantId 12323 c.datafeed = datafeed 12324 return c 12325} 12326 12327// DryRun sets the optional parameter "dryRun": Flag to run the request 12328// in dry-run mode. 12329func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { 12330 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12331 return c 12332} 12333 12334// Fields allows partial responses to be retrieved. See 12335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12336// for more information. 12337func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { 12338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12339 return c 12340} 12341 12342// Context sets the context to be used in this call's Do method. Any 12343// pending HTTP request will be aborted if the provided context is 12344// canceled. 12345func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 12346 c.ctx_ = ctx 12347 return c 12348} 12349 12350// Header returns an http.Header that can be modified by the caller to 12351// add HTTP headers to the request. 12352func (c *DatafeedsInsertCall) Header() http.Header { 12353 if c.header_ == nil { 12354 c.header_ = make(http.Header) 12355 } 12356 return c.header_ 12357} 12358 12359func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { 12360 reqHeaders := make(http.Header) 12361 for k, v := range c.header_ { 12362 reqHeaders[k] = v 12363 } 12364 reqHeaders.Set("User-Agent", c.s.userAgent()) 12365 var body io.Reader = nil 12366 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 12367 if err != nil { 12368 return nil, err 12369 } 12370 reqHeaders.Set("Content-Type", "application/json") 12371 c.urlParams_.Set("alt", alt) 12372 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 12373 urls += "?" + c.urlParams_.Encode() 12374 req, _ := http.NewRequest("POST", urls, body) 12375 req.Header = reqHeaders 12376 googleapi.Expand(req.URL, map[string]string{ 12377 "merchantId": strconv.FormatUint(c.merchantId, 10), 12378 }) 12379 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12380} 12381 12382// Do executes the "content.datafeeds.insert" call. 12383// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 12384// code is an error. Response headers are in either 12385// *Datafeed.ServerResponse.Header or (if a response was returned at 12386// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12387// to check whether the returned error was because 12388// http.StatusNotModified was returned. 12389func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 12390 gensupport.SetOptions(c.urlParams_, opts...) 12391 res, err := c.doRequest("json") 12392 if res != nil && res.StatusCode == http.StatusNotModified { 12393 if res.Body != nil { 12394 res.Body.Close() 12395 } 12396 return nil, &googleapi.Error{ 12397 Code: res.StatusCode, 12398 Header: res.Header, 12399 } 12400 } 12401 if err != nil { 12402 return nil, err 12403 } 12404 defer googleapi.CloseBody(res) 12405 if err := googleapi.CheckResponse(res); err != nil { 12406 return nil, err 12407 } 12408 ret := &Datafeed{ 12409 ServerResponse: googleapi.ServerResponse{ 12410 Header: res.Header, 12411 HTTPStatusCode: res.StatusCode, 12412 }, 12413 } 12414 target := &ret 12415 if err := gensupport.DecodeResponse(target, res); err != nil { 12416 return nil, err 12417 } 12418 return ret, nil 12419 // { 12420 // "description": "Registers a datafeed configuration with your Merchant Center account.", 12421 // "httpMethod": "POST", 12422 // "id": "content.datafeeds.insert", 12423 // "parameterOrder": [ 12424 // "merchantId" 12425 // ], 12426 // "parameters": { 12427 // "dryRun": { 12428 // "description": "Flag to run the request in dry-run mode.", 12429 // "location": "query", 12430 // "type": "boolean" 12431 // }, 12432 // "merchantId": { 12433 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 12434 // "format": "uint64", 12435 // "location": "path", 12436 // "required": true, 12437 // "type": "string" 12438 // } 12439 // }, 12440 // "path": "{merchantId}/datafeeds", 12441 // "request": { 12442 // "$ref": "Datafeed" 12443 // }, 12444 // "response": { 12445 // "$ref": "Datafeed" 12446 // }, 12447 // "scopes": [ 12448 // "https://www.googleapis.com/auth/content" 12449 // ] 12450 // } 12451 12452} 12453 12454// method id "content.datafeeds.list": 12455 12456type DatafeedsListCall struct { 12457 s *APIService 12458 merchantId uint64 12459 urlParams_ gensupport.URLParams 12460 ifNoneMatch_ string 12461 ctx_ context.Context 12462 header_ http.Header 12463} 12464 12465// List: Lists the configurations for datafeeds in your Merchant Center 12466// account. 12467func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { 12468 c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12469 c.merchantId = merchantId 12470 return c 12471} 12472 12473// MaxResults sets the optional parameter "maxResults": The maximum 12474// number of products to return in the response, used for paging. 12475func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { 12476 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 12477 return c 12478} 12479 12480// PageToken sets the optional parameter "pageToken": The token returned 12481// by the previous request. 12482func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { 12483 c.urlParams_.Set("pageToken", pageToken) 12484 return c 12485} 12486 12487// Fields allows partial responses to be retrieved. See 12488// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12489// for more information. 12490func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { 12491 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12492 return c 12493} 12494 12495// IfNoneMatch sets the optional parameter which makes the operation 12496// fail if the object's ETag matches the given value. This is useful for 12497// getting updates only after the object has changed since the last 12498// request. Use googleapi.IsNotModified to check whether the response 12499// error from Do is the result of In-None-Match. 12500func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { 12501 c.ifNoneMatch_ = entityTag 12502 return c 12503} 12504 12505// Context sets the context to be used in this call's Do method. Any 12506// pending HTTP request will be aborted if the provided context is 12507// canceled. 12508func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 12509 c.ctx_ = ctx 12510 return c 12511} 12512 12513// Header returns an http.Header that can be modified by the caller to 12514// add HTTP headers to the request. 12515func (c *DatafeedsListCall) Header() http.Header { 12516 if c.header_ == nil { 12517 c.header_ = make(http.Header) 12518 } 12519 return c.header_ 12520} 12521 12522func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { 12523 reqHeaders := make(http.Header) 12524 for k, v := range c.header_ { 12525 reqHeaders[k] = v 12526 } 12527 reqHeaders.Set("User-Agent", c.s.userAgent()) 12528 if c.ifNoneMatch_ != "" { 12529 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12530 } 12531 var body io.Reader = nil 12532 c.urlParams_.Set("alt", alt) 12533 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 12534 urls += "?" + c.urlParams_.Encode() 12535 req, _ := http.NewRequest("GET", urls, body) 12536 req.Header = reqHeaders 12537 googleapi.Expand(req.URL, map[string]string{ 12538 "merchantId": strconv.FormatUint(c.merchantId, 10), 12539 }) 12540 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12541} 12542 12543// Do executes the "content.datafeeds.list" call. 12544// Exactly one of *DatafeedsListResponse or error will be non-nil. Any 12545// non-2xx status code is an error. Response headers are in either 12546// *DatafeedsListResponse.ServerResponse.Header or (if a response was 12547// returned at all) in error.(*googleapi.Error).Header. Use 12548// googleapi.IsNotModified to check whether the returned error was 12549// because http.StatusNotModified was returned. 12550func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { 12551 gensupport.SetOptions(c.urlParams_, opts...) 12552 res, err := c.doRequest("json") 12553 if res != nil && res.StatusCode == http.StatusNotModified { 12554 if res.Body != nil { 12555 res.Body.Close() 12556 } 12557 return nil, &googleapi.Error{ 12558 Code: res.StatusCode, 12559 Header: res.Header, 12560 } 12561 } 12562 if err != nil { 12563 return nil, err 12564 } 12565 defer googleapi.CloseBody(res) 12566 if err := googleapi.CheckResponse(res); err != nil { 12567 return nil, err 12568 } 12569 ret := &DatafeedsListResponse{ 12570 ServerResponse: googleapi.ServerResponse{ 12571 Header: res.Header, 12572 HTTPStatusCode: res.StatusCode, 12573 }, 12574 } 12575 target := &ret 12576 if err := gensupport.DecodeResponse(target, res); err != nil { 12577 return nil, err 12578 } 12579 return ret, nil 12580 // { 12581 // "description": "Lists the configurations for datafeeds in your Merchant Center account.", 12582 // "httpMethod": "GET", 12583 // "id": "content.datafeeds.list", 12584 // "parameterOrder": [ 12585 // "merchantId" 12586 // ], 12587 // "parameters": { 12588 // "maxResults": { 12589 // "description": "The maximum number of products to return in the response, used for paging.", 12590 // "format": "uint32", 12591 // "location": "query", 12592 // "type": "integer" 12593 // }, 12594 // "merchantId": { 12595 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 12596 // "format": "uint64", 12597 // "location": "path", 12598 // "required": true, 12599 // "type": "string" 12600 // }, 12601 // "pageToken": { 12602 // "description": "The token returned by the previous request.", 12603 // "location": "query", 12604 // "type": "string" 12605 // } 12606 // }, 12607 // "path": "{merchantId}/datafeeds", 12608 // "response": { 12609 // "$ref": "DatafeedsListResponse" 12610 // }, 12611 // "scopes": [ 12612 // "https://www.googleapis.com/auth/content" 12613 // ] 12614 // } 12615 12616} 12617 12618// Pages invokes f for each page of results. 12619// A non-nil error returned from f will halt the iteration. 12620// The provided context supersedes any context provided to the Context method. 12621func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { 12622 c.ctx_ = ctx 12623 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12624 for { 12625 x, err := c.Do() 12626 if err != nil { 12627 return err 12628 } 12629 if err := f(x); err != nil { 12630 return err 12631 } 12632 if x.NextPageToken == "" { 12633 return nil 12634 } 12635 c.PageToken(x.NextPageToken) 12636 } 12637} 12638 12639// method id "content.datafeeds.patch": 12640 12641type DatafeedsPatchCall struct { 12642 s *APIService 12643 merchantId uint64 12644 datafeedId uint64 12645 datafeed *Datafeed 12646 urlParams_ gensupport.URLParams 12647 ctx_ context.Context 12648 header_ http.Header 12649} 12650 12651// Patch: Updates a datafeed configuration of your Merchant Center 12652// account. This method supports patch semantics. 12653func (r *DatafeedsService) Patch(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsPatchCall { 12654 c := &DatafeedsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12655 c.merchantId = merchantId 12656 c.datafeedId = datafeedId 12657 c.datafeed = datafeed 12658 return c 12659} 12660 12661// DryRun sets the optional parameter "dryRun": Flag to run the request 12662// in dry-run mode. 12663func (c *DatafeedsPatchCall) DryRun(dryRun bool) *DatafeedsPatchCall { 12664 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12665 return c 12666} 12667 12668// Fields allows partial responses to be retrieved. See 12669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12670// for more information. 12671func (c *DatafeedsPatchCall) Fields(s ...googleapi.Field) *DatafeedsPatchCall { 12672 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12673 return c 12674} 12675 12676// Context sets the context to be used in this call's Do method. Any 12677// pending HTTP request will be aborted if the provided context is 12678// canceled. 12679func (c *DatafeedsPatchCall) Context(ctx context.Context) *DatafeedsPatchCall { 12680 c.ctx_ = ctx 12681 return c 12682} 12683 12684// Header returns an http.Header that can be modified by the caller to 12685// add HTTP headers to the request. 12686func (c *DatafeedsPatchCall) Header() http.Header { 12687 if c.header_ == nil { 12688 c.header_ = make(http.Header) 12689 } 12690 return c.header_ 12691} 12692 12693func (c *DatafeedsPatchCall) doRequest(alt string) (*http.Response, error) { 12694 reqHeaders := make(http.Header) 12695 for k, v := range c.header_ { 12696 reqHeaders[k] = v 12697 } 12698 reqHeaders.Set("User-Agent", c.s.userAgent()) 12699 var body io.Reader = nil 12700 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 12701 if err != nil { 12702 return nil, err 12703 } 12704 reqHeaders.Set("Content-Type", "application/json") 12705 c.urlParams_.Set("alt", alt) 12706 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 12707 urls += "?" + c.urlParams_.Encode() 12708 req, _ := http.NewRequest("PATCH", urls, body) 12709 req.Header = reqHeaders 12710 googleapi.Expand(req.URL, map[string]string{ 12711 "merchantId": strconv.FormatUint(c.merchantId, 10), 12712 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 12713 }) 12714 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12715} 12716 12717// Do executes the "content.datafeeds.patch" call. 12718// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 12719// code is an error. Response headers are in either 12720// *Datafeed.ServerResponse.Header or (if a response was returned at 12721// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12722// to check whether the returned error was because 12723// http.StatusNotModified was returned. 12724func (c *DatafeedsPatchCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 12725 gensupport.SetOptions(c.urlParams_, opts...) 12726 res, err := c.doRequest("json") 12727 if res != nil && res.StatusCode == http.StatusNotModified { 12728 if res.Body != nil { 12729 res.Body.Close() 12730 } 12731 return nil, &googleapi.Error{ 12732 Code: res.StatusCode, 12733 Header: res.Header, 12734 } 12735 } 12736 if err != nil { 12737 return nil, err 12738 } 12739 defer googleapi.CloseBody(res) 12740 if err := googleapi.CheckResponse(res); err != nil { 12741 return nil, err 12742 } 12743 ret := &Datafeed{ 12744 ServerResponse: googleapi.ServerResponse{ 12745 Header: res.Header, 12746 HTTPStatusCode: res.StatusCode, 12747 }, 12748 } 12749 target := &ret 12750 if err := gensupport.DecodeResponse(target, res); err != nil { 12751 return nil, err 12752 } 12753 return ret, nil 12754 // { 12755 // "description": "Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics.", 12756 // "httpMethod": "PATCH", 12757 // "id": "content.datafeeds.patch", 12758 // "parameterOrder": [ 12759 // "merchantId", 12760 // "datafeedId" 12761 // ], 12762 // "parameters": { 12763 // "datafeedId": { 12764 // "description": "The ID of the datafeed.", 12765 // "format": "uint64", 12766 // "location": "path", 12767 // "required": true, 12768 // "type": "string" 12769 // }, 12770 // "dryRun": { 12771 // "description": "Flag to run the request in dry-run mode.", 12772 // "location": "query", 12773 // "type": "boolean" 12774 // }, 12775 // "merchantId": { 12776 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 12777 // "format": "uint64", 12778 // "location": "path", 12779 // "required": true, 12780 // "type": "string" 12781 // } 12782 // }, 12783 // "path": "{merchantId}/datafeeds/{datafeedId}", 12784 // "request": { 12785 // "$ref": "Datafeed" 12786 // }, 12787 // "response": { 12788 // "$ref": "Datafeed" 12789 // }, 12790 // "scopes": [ 12791 // "https://www.googleapis.com/auth/content" 12792 // ] 12793 // } 12794 12795} 12796 12797// method id "content.datafeeds.update": 12798 12799type DatafeedsUpdateCall struct { 12800 s *APIService 12801 merchantId uint64 12802 datafeedId uint64 12803 datafeed *Datafeed 12804 urlParams_ gensupport.URLParams 12805 ctx_ context.Context 12806 header_ http.Header 12807} 12808 12809// Update: Updates a datafeed configuration of your Merchant Center 12810// account. 12811func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { 12812 c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12813 c.merchantId = merchantId 12814 c.datafeedId = datafeedId 12815 c.datafeed = datafeed 12816 return c 12817} 12818 12819// DryRun sets the optional parameter "dryRun": Flag to run the request 12820// in dry-run mode. 12821func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { 12822 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12823 return c 12824} 12825 12826// Fields allows partial responses to be retrieved. See 12827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12828// for more information. 12829func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { 12830 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12831 return c 12832} 12833 12834// Context sets the context to be used in this call's Do method. Any 12835// pending HTTP request will be aborted if the provided context is 12836// canceled. 12837func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 12838 c.ctx_ = ctx 12839 return c 12840} 12841 12842// Header returns an http.Header that can be modified by the caller to 12843// add HTTP headers to the request. 12844func (c *DatafeedsUpdateCall) Header() http.Header { 12845 if c.header_ == nil { 12846 c.header_ = make(http.Header) 12847 } 12848 return c.header_ 12849} 12850 12851func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { 12852 reqHeaders := make(http.Header) 12853 for k, v := range c.header_ { 12854 reqHeaders[k] = v 12855 } 12856 reqHeaders.Set("User-Agent", c.s.userAgent()) 12857 var body io.Reader = nil 12858 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 12859 if err != nil { 12860 return nil, err 12861 } 12862 reqHeaders.Set("Content-Type", "application/json") 12863 c.urlParams_.Set("alt", alt) 12864 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 12865 urls += "?" + c.urlParams_.Encode() 12866 req, _ := http.NewRequest("PUT", urls, body) 12867 req.Header = reqHeaders 12868 googleapi.Expand(req.URL, map[string]string{ 12869 "merchantId": strconv.FormatUint(c.merchantId, 10), 12870 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 12871 }) 12872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12873} 12874 12875// Do executes the "content.datafeeds.update" call. 12876// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 12877// code is an error. Response headers are in either 12878// *Datafeed.ServerResponse.Header or (if a response was returned at 12879// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12880// to check whether the returned error was because 12881// http.StatusNotModified was returned. 12882func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 12883 gensupport.SetOptions(c.urlParams_, opts...) 12884 res, err := c.doRequest("json") 12885 if res != nil && res.StatusCode == http.StatusNotModified { 12886 if res.Body != nil { 12887 res.Body.Close() 12888 } 12889 return nil, &googleapi.Error{ 12890 Code: res.StatusCode, 12891 Header: res.Header, 12892 } 12893 } 12894 if err != nil { 12895 return nil, err 12896 } 12897 defer googleapi.CloseBody(res) 12898 if err := googleapi.CheckResponse(res); err != nil { 12899 return nil, err 12900 } 12901 ret := &Datafeed{ 12902 ServerResponse: googleapi.ServerResponse{ 12903 Header: res.Header, 12904 HTTPStatusCode: res.StatusCode, 12905 }, 12906 } 12907 target := &ret 12908 if err := gensupport.DecodeResponse(target, res); err != nil { 12909 return nil, err 12910 } 12911 return ret, nil 12912 // { 12913 // "description": "Updates a datafeed configuration of your Merchant Center account.", 12914 // "httpMethod": "PUT", 12915 // "id": "content.datafeeds.update", 12916 // "parameterOrder": [ 12917 // "merchantId", 12918 // "datafeedId" 12919 // ], 12920 // "parameters": { 12921 // "datafeedId": { 12922 // "description": "The ID of the datafeed.", 12923 // "format": "uint64", 12924 // "location": "path", 12925 // "required": true, 12926 // "type": "string" 12927 // }, 12928 // "dryRun": { 12929 // "description": "Flag to run the request in dry-run mode.", 12930 // "location": "query", 12931 // "type": "boolean" 12932 // }, 12933 // "merchantId": { 12934 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 12935 // "format": "uint64", 12936 // "location": "path", 12937 // "required": true, 12938 // "type": "string" 12939 // } 12940 // }, 12941 // "path": "{merchantId}/datafeeds/{datafeedId}", 12942 // "request": { 12943 // "$ref": "Datafeed" 12944 // }, 12945 // "response": { 12946 // "$ref": "Datafeed" 12947 // }, 12948 // "scopes": [ 12949 // "https://www.googleapis.com/auth/content" 12950 // ] 12951 // } 12952 12953} 12954 12955// method id "content.datafeedstatuses.custombatch": 12956 12957type DatafeedstatusesCustombatchCall struct { 12958 s *APIService 12959 datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest 12960 urlParams_ gensupport.URLParams 12961 ctx_ context.Context 12962 header_ http.Header 12963} 12964 12965// Custombatch: 12966func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { 12967 c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12968 c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 12969 return c 12970} 12971 12972// Fields allows partial responses to be retrieved. See 12973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12974// for more information. 12975func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { 12976 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12977 return c 12978} 12979 12980// Context sets the context to be used in this call's Do method. Any 12981// pending HTTP request will be aborted if the provided context is 12982// canceled. 12983func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 12984 c.ctx_ = ctx 12985 return c 12986} 12987 12988// Header returns an http.Header that can be modified by the caller to 12989// add HTTP headers to the request. 12990func (c *DatafeedstatusesCustombatchCall) Header() http.Header { 12991 if c.header_ == nil { 12992 c.header_ = make(http.Header) 12993 } 12994 return c.header_ 12995} 12996 12997func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 12998 reqHeaders := make(http.Header) 12999 for k, v := range c.header_ { 13000 reqHeaders[k] = v 13001 } 13002 reqHeaders.Set("User-Agent", c.s.userAgent()) 13003 var body io.Reader = nil 13004 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) 13005 if err != nil { 13006 return nil, err 13007 } 13008 reqHeaders.Set("Content-Type", "application/json") 13009 c.urlParams_.Set("alt", alt) 13010 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 13011 urls += "?" + c.urlParams_.Encode() 13012 req, _ := http.NewRequest("POST", urls, body) 13013 req.Header = reqHeaders 13014 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13015} 13016 13017// Do executes the "content.datafeedstatuses.custombatch" call. 13018// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be 13019// non-nil. Any non-2xx status code is an error. Response headers are in 13020// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or 13021// (if a response was returned at all) in 13022// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13023// whether the returned error was because http.StatusNotModified was 13024// returned. 13025func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { 13026 gensupport.SetOptions(c.urlParams_, opts...) 13027 res, err := c.doRequest("json") 13028 if res != nil && res.StatusCode == http.StatusNotModified { 13029 if res.Body != nil { 13030 res.Body.Close() 13031 } 13032 return nil, &googleapi.Error{ 13033 Code: res.StatusCode, 13034 Header: res.Header, 13035 } 13036 } 13037 if err != nil { 13038 return nil, err 13039 } 13040 defer googleapi.CloseBody(res) 13041 if err := googleapi.CheckResponse(res); err != nil { 13042 return nil, err 13043 } 13044 ret := &DatafeedstatusesCustomBatchResponse{ 13045 ServerResponse: googleapi.ServerResponse{ 13046 Header: res.Header, 13047 HTTPStatusCode: res.StatusCode, 13048 }, 13049 } 13050 target := &ret 13051 if err := gensupport.DecodeResponse(target, res); err != nil { 13052 return nil, err 13053 } 13054 return ret, nil 13055 // { 13056 // "httpMethod": "POST", 13057 // "id": "content.datafeedstatuses.custombatch", 13058 // "path": "datafeedstatuses/batch", 13059 // "request": { 13060 // "$ref": "DatafeedstatusesCustomBatchRequest" 13061 // }, 13062 // "response": { 13063 // "$ref": "DatafeedstatusesCustomBatchResponse" 13064 // }, 13065 // "scopes": [ 13066 // "https://www.googleapis.com/auth/content" 13067 // ] 13068 // } 13069 13070} 13071 13072// method id "content.datafeedstatuses.get": 13073 13074type DatafeedstatusesGetCall struct { 13075 s *APIService 13076 merchantId uint64 13077 datafeedId uint64 13078 urlParams_ gensupport.URLParams 13079 ifNoneMatch_ string 13080 ctx_ context.Context 13081 header_ http.Header 13082} 13083 13084// Get: Retrieves the status of a datafeed from your Merchant Center 13085// account. 13086func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { 13087 c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13088 c.merchantId = merchantId 13089 c.datafeedId = datafeedId 13090 return c 13091} 13092 13093// Country sets the optional parameter "country": The country for which 13094// to get the datafeed status. If this parameter is provided then 13095// language must also be provided. Note that this parameter is required 13096// for feeds targeting multiple countries and languages, since a feed 13097// may have a different status for each target. 13098func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { 13099 c.urlParams_.Set("country", country) 13100 return c 13101} 13102 13103// Language sets the optional parameter "language": The language for 13104// which to get the datafeed status. If this parameter is provided then 13105// country must also be provided. Note that this parameter is required 13106// for feeds targeting multiple countries and languages, since a feed 13107// may have a different status for each target. 13108func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { 13109 c.urlParams_.Set("language", language) 13110 return c 13111} 13112 13113// Fields allows partial responses to be retrieved. See 13114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13115// for more information. 13116func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 13117 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13118 return c 13119} 13120 13121// IfNoneMatch sets the optional parameter which makes the operation 13122// fail if the object's ETag matches the given value. This is useful for 13123// getting updates only after the object has changed since the last 13124// request. Use googleapi.IsNotModified to check whether the response 13125// error from Do is the result of In-None-Match. 13126func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { 13127 c.ifNoneMatch_ = entityTag 13128 return c 13129} 13130 13131// Context sets the context to be used in this call's Do method. Any 13132// pending HTTP request will be aborted if the provided context is 13133// canceled. 13134func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 13135 c.ctx_ = ctx 13136 return c 13137} 13138 13139// Header returns an http.Header that can be modified by the caller to 13140// add HTTP headers to the request. 13141func (c *DatafeedstatusesGetCall) Header() http.Header { 13142 if c.header_ == nil { 13143 c.header_ = make(http.Header) 13144 } 13145 return c.header_ 13146} 13147 13148func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { 13149 reqHeaders := make(http.Header) 13150 for k, v := range c.header_ { 13151 reqHeaders[k] = v 13152 } 13153 reqHeaders.Set("User-Agent", c.s.userAgent()) 13154 if c.ifNoneMatch_ != "" { 13155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13156 } 13157 var body io.Reader = nil 13158 c.urlParams_.Set("alt", alt) 13159 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") 13160 urls += "?" + c.urlParams_.Encode() 13161 req, _ := http.NewRequest("GET", urls, body) 13162 req.Header = reqHeaders 13163 googleapi.Expand(req.URL, map[string]string{ 13164 "merchantId": strconv.FormatUint(c.merchantId, 10), 13165 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 13166 }) 13167 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13168} 13169 13170// Do executes the "content.datafeedstatuses.get" call. 13171// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx 13172// status code is an error. Response headers are in either 13173// *DatafeedStatus.ServerResponse.Header or (if a response was returned 13174// at all) in error.(*googleapi.Error).Header. Use 13175// googleapi.IsNotModified to check whether the returned error was 13176// because http.StatusNotModified was returned. 13177func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { 13178 gensupport.SetOptions(c.urlParams_, opts...) 13179 res, err := c.doRequest("json") 13180 if res != nil && res.StatusCode == http.StatusNotModified { 13181 if res.Body != nil { 13182 res.Body.Close() 13183 } 13184 return nil, &googleapi.Error{ 13185 Code: res.StatusCode, 13186 Header: res.Header, 13187 } 13188 } 13189 if err != nil { 13190 return nil, err 13191 } 13192 defer googleapi.CloseBody(res) 13193 if err := googleapi.CheckResponse(res); err != nil { 13194 return nil, err 13195 } 13196 ret := &DatafeedStatus{ 13197 ServerResponse: googleapi.ServerResponse{ 13198 Header: res.Header, 13199 HTTPStatusCode: res.StatusCode, 13200 }, 13201 } 13202 target := &ret 13203 if err := gensupport.DecodeResponse(target, res); err != nil { 13204 return nil, err 13205 } 13206 return ret, nil 13207 // { 13208 // "description": "Retrieves the status of a datafeed from your Merchant Center account.", 13209 // "httpMethod": "GET", 13210 // "id": "content.datafeedstatuses.get", 13211 // "parameterOrder": [ 13212 // "merchantId", 13213 // "datafeedId" 13214 // ], 13215 // "parameters": { 13216 // "country": { 13217 // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", 13218 // "location": "query", 13219 // "type": "string" 13220 // }, 13221 // "datafeedId": { 13222 // "description": "The ID of the datafeed.", 13223 // "format": "uint64", 13224 // "location": "path", 13225 // "required": true, 13226 // "type": "string" 13227 // }, 13228 // "language": { 13229 // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", 13230 // "location": "query", 13231 // "type": "string" 13232 // }, 13233 // "merchantId": { 13234 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 13235 // "format": "uint64", 13236 // "location": "path", 13237 // "required": true, 13238 // "type": "string" 13239 // } 13240 // }, 13241 // "path": "{merchantId}/datafeedstatuses/{datafeedId}", 13242 // "response": { 13243 // "$ref": "DatafeedStatus" 13244 // }, 13245 // "scopes": [ 13246 // "https://www.googleapis.com/auth/content" 13247 // ] 13248 // } 13249 13250} 13251 13252// method id "content.datafeedstatuses.list": 13253 13254type DatafeedstatusesListCall struct { 13255 s *APIService 13256 merchantId uint64 13257 urlParams_ gensupport.URLParams 13258 ifNoneMatch_ string 13259 ctx_ context.Context 13260 header_ http.Header 13261} 13262 13263// List: Lists the statuses of the datafeeds in your Merchant Center 13264// account. 13265func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { 13266 c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13267 c.merchantId = merchantId 13268 return c 13269} 13270 13271// MaxResults sets the optional parameter "maxResults": The maximum 13272// number of products to return in the response, used for paging. 13273func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { 13274 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13275 return c 13276} 13277 13278// PageToken sets the optional parameter "pageToken": The token returned 13279// by the previous request. 13280func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { 13281 c.urlParams_.Set("pageToken", pageToken) 13282 return c 13283} 13284 13285// Fields allows partial responses to be retrieved. See 13286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13287// for more information. 13288func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 13289 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13290 return c 13291} 13292 13293// IfNoneMatch sets the optional parameter which makes the operation 13294// fail if the object's ETag matches the given value. This is useful for 13295// getting updates only after the object has changed since the last 13296// request. Use googleapi.IsNotModified to check whether the response 13297// error from Do is the result of In-None-Match. 13298func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { 13299 c.ifNoneMatch_ = entityTag 13300 return c 13301} 13302 13303// Context sets the context to be used in this call's Do method. Any 13304// pending HTTP request will be aborted if the provided context is 13305// canceled. 13306func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 13307 c.ctx_ = ctx 13308 return c 13309} 13310 13311// Header returns an http.Header that can be modified by the caller to 13312// add HTTP headers to the request. 13313func (c *DatafeedstatusesListCall) Header() http.Header { 13314 if c.header_ == nil { 13315 c.header_ = make(http.Header) 13316 } 13317 return c.header_ 13318} 13319 13320func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { 13321 reqHeaders := make(http.Header) 13322 for k, v := range c.header_ { 13323 reqHeaders[k] = v 13324 } 13325 reqHeaders.Set("User-Agent", c.s.userAgent()) 13326 if c.ifNoneMatch_ != "" { 13327 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13328 } 13329 var body io.Reader = nil 13330 c.urlParams_.Set("alt", alt) 13331 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") 13332 urls += "?" + c.urlParams_.Encode() 13333 req, _ := http.NewRequest("GET", urls, body) 13334 req.Header = reqHeaders 13335 googleapi.Expand(req.URL, map[string]string{ 13336 "merchantId": strconv.FormatUint(c.merchantId, 10), 13337 }) 13338 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13339} 13340 13341// Do executes the "content.datafeedstatuses.list" call. 13342// Exactly one of *DatafeedstatusesListResponse or error will be 13343// non-nil. Any non-2xx status code is an error. Response headers are in 13344// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a 13345// response was returned at all) in error.(*googleapi.Error).Header. Use 13346// googleapi.IsNotModified to check whether the returned error was 13347// because http.StatusNotModified was returned. 13348func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { 13349 gensupport.SetOptions(c.urlParams_, opts...) 13350 res, err := c.doRequest("json") 13351 if res != nil && res.StatusCode == http.StatusNotModified { 13352 if res.Body != nil { 13353 res.Body.Close() 13354 } 13355 return nil, &googleapi.Error{ 13356 Code: res.StatusCode, 13357 Header: res.Header, 13358 } 13359 } 13360 if err != nil { 13361 return nil, err 13362 } 13363 defer googleapi.CloseBody(res) 13364 if err := googleapi.CheckResponse(res); err != nil { 13365 return nil, err 13366 } 13367 ret := &DatafeedstatusesListResponse{ 13368 ServerResponse: googleapi.ServerResponse{ 13369 Header: res.Header, 13370 HTTPStatusCode: res.StatusCode, 13371 }, 13372 } 13373 target := &ret 13374 if err := gensupport.DecodeResponse(target, res); err != nil { 13375 return nil, err 13376 } 13377 return ret, nil 13378 // { 13379 // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", 13380 // "httpMethod": "GET", 13381 // "id": "content.datafeedstatuses.list", 13382 // "parameterOrder": [ 13383 // "merchantId" 13384 // ], 13385 // "parameters": { 13386 // "maxResults": { 13387 // "description": "The maximum number of products to return in the response, used for paging.", 13388 // "format": "uint32", 13389 // "location": "query", 13390 // "type": "integer" 13391 // }, 13392 // "merchantId": { 13393 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 13394 // "format": "uint64", 13395 // "location": "path", 13396 // "required": true, 13397 // "type": "string" 13398 // }, 13399 // "pageToken": { 13400 // "description": "The token returned by the previous request.", 13401 // "location": "query", 13402 // "type": "string" 13403 // } 13404 // }, 13405 // "path": "{merchantId}/datafeedstatuses", 13406 // "response": { 13407 // "$ref": "DatafeedstatusesListResponse" 13408 // }, 13409 // "scopes": [ 13410 // "https://www.googleapis.com/auth/content" 13411 // ] 13412 // } 13413 13414} 13415 13416// Pages invokes f for each page of results. 13417// A non-nil error returned from f will halt the iteration. 13418// The provided context supersedes any context provided to the Context method. 13419func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { 13420 c.ctx_ = ctx 13421 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13422 for { 13423 x, err := c.Do() 13424 if err != nil { 13425 return err 13426 } 13427 if err := f(x); err != nil { 13428 return err 13429 } 13430 if x.NextPageToken == "" { 13431 return nil 13432 } 13433 c.PageToken(x.NextPageToken) 13434 } 13435} 13436 13437// method id "content.inventory.custombatch": 13438 13439type InventoryCustombatchCall struct { 13440 s *APIService 13441 inventorycustombatchrequest *InventoryCustomBatchRequest 13442 urlParams_ gensupport.URLParams 13443 ctx_ context.Context 13444 header_ http.Header 13445} 13446 13447// Custombatch: Updates price and availability for multiple products or 13448// stores in a single request. This operation does not update the 13449// expiration date of the products. 13450func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall { 13451 c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13452 c.inventorycustombatchrequest = inventorycustombatchrequest 13453 return c 13454} 13455 13456// DryRun sets the optional parameter "dryRun": Flag to run the request 13457// in dry-run mode. 13458func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall { 13459 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13460 return c 13461} 13462 13463// Fields allows partial responses to be retrieved. See 13464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13465// for more information. 13466func (c *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall { 13467 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13468 return c 13469} 13470 13471// Context sets the context to be used in this call's Do method. Any 13472// pending HTTP request will be aborted if the provided context is 13473// canceled. 13474func (c *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall { 13475 c.ctx_ = ctx 13476 return c 13477} 13478 13479// Header returns an http.Header that can be modified by the caller to 13480// add HTTP headers to the request. 13481func (c *InventoryCustombatchCall) Header() http.Header { 13482 if c.header_ == nil { 13483 c.header_ = make(http.Header) 13484 } 13485 return c.header_ 13486} 13487 13488func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { 13489 reqHeaders := make(http.Header) 13490 for k, v := range c.header_ { 13491 reqHeaders[k] = v 13492 } 13493 reqHeaders.Set("User-Agent", c.s.userAgent()) 13494 var body io.Reader = nil 13495 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest) 13496 if err != nil { 13497 return nil, err 13498 } 13499 reqHeaders.Set("Content-Type", "application/json") 13500 c.urlParams_.Set("alt", alt) 13501 urls := googleapi.ResolveRelative(c.s.BasePath, "inventory/batch") 13502 urls += "?" + c.urlParams_.Encode() 13503 req, _ := http.NewRequest("POST", urls, body) 13504 req.Header = reqHeaders 13505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13506} 13507 13508// Do executes the "content.inventory.custombatch" call. 13509// Exactly one of *InventoryCustomBatchResponse or error will be 13510// non-nil. Any non-2xx status code is an error. Response headers are in 13511// either *InventoryCustomBatchResponse.ServerResponse.Header or (if a 13512// response was returned at all) in error.(*googleapi.Error).Header. Use 13513// googleapi.IsNotModified to check whether the returned error was 13514// because http.StatusNotModified was returned. 13515func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) { 13516 gensupport.SetOptions(c.urlParams_, opts...) 13517 res, err := c.doRequest("json") 13518 if res != nil && res.StatusCode == http.StatusNotModified { 13519 if res.Body != nil { 13520 res.Body.Close() 13521 } 13522 return nil, &googleapi.Error{ 13523 Code: res.StatusCode, 13524 Header: res.Header, 13525 } 13526 } 13527 if err != nil { 13528 return nil, err 13529 } 13530 defer googleapi.CloseBody(res) 13531 if err := googleapi.CheckResponse(res); err != nil { 13532 return nil, err 13533 } 13534 ret := &InventoryCustomBatchResponse{ 13535 ServerResponse: googleapi.ServerResponse{ 13536 Header: res.Header, 13537 HTTPStatusCode: res.StatusCode, 13538 }, 13539 } 13540 target := &ret 13541 if err := gensupport.DecodeResponse(target, res); err != nil { 13542 return nil, err 13543 } 13544 return ret, nil 13545 // { 13546 // "description": "Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.", 13547 // "httpMethod": "POST", 13548 // "id": "content.inventory.custombatch", 13549 // "parameters": { 13550 // "dryRun": { 13551 // "description": "Flag to run the request in dry-run mode.", 13552 // "location": "query", 13553 // "type": "boolean" 13554 // } 13555 // }, 13556 // "path": "inventory/batch", 13557 // "request": { 13558 // "$ref": "InventoryCustomBatchRequest" 13559 // }, 13560 // "response": { 13561 // "$ref": "InventoryCustomBatchResponse" 13562 // }, 13563 // "scopes": [ 13564 // "https://www.googleapis.com/auth/content" 13565 // ] 13566 // } 13567 13568} 13569 13570// method id "content.inventory.set": 13571 13572type InventorySetCall struct { 13573 s *APIService 13574 merchantId uint64 13575 storeCode string 13576 productId string 13577 inventorysetrequest *InventorySetRequest 13578 urlParams_ gensupport.URLParams 13579 ctx_ context.Context 13580 header_ http.Header 13581} 13582 13583// Set: Updates price and availability of a product in your Merchant 13584// Center account. 13585func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall { 13586 c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13587 c.merchantId = merchantId 13588 c.storeCode = storeCode 13589 c.productId = productId 13590 c.inventorysetrequest = inventorysetrequest 13591 return c 13592} 13593 13594// DryRun sets the optional parameter "dryRun": Flag to run the request 13595// in dry-run mode. 13596func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall { 13597 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13598 return c 13599} 13600 13601// Fields allows partial responses to be retrieved. See 13602// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13603// for more information. 13604func (c *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall { 13605 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13606 return c 13607} 13608 13609// Context sets the context to be used in this call's Do method. Any 13610// pending HTTP request will be aborted if the provided context is 13611// canceled. 13612func (c *InventorySetCall) Context(ctx context.Context) *InventorySetCall { 13613 c.ctx_ = ctx 13614 return c 13615} 13616 13617// Header returns an http.Header that can be modified by the caller to 13618// add HTTP headers to the request. 13619func (c *InventorySetCall) Header() http.Header { 13620 if c.header_ == nil { 13621 c.header_ = make(http.Header) 13622 } 13623 return c.header_ 13624} 13625 13626func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) { 13627 reqHeaders := make(http.Header) 13628 for k, v := range c.header_ { 13629 reqHeaders[k] = v 13630 } 13631 reqHeaders.Set("User-Agent", c.s.userAgent()) 13632 var body io.Reader = nil 13633 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest) 13634 if err != nil { 13635 return nil, err 13636 } 13637 reqHeaders.Set("Content-Type", "application/json") 13638 c.urlParams_.Set("alt", alt) 13639 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/inventory/{storeCode}/products/{productId}") 13640 urls += "?" + c.urlParams_.Encode() 13641 req, _ := http.NewRequest("POST", urls, body) 13642 req.Header = reqHeaders 13643 googleapi.Expand(req.URL, map[string]string{ 13644 "merchantId": strconv.FormatUint(c.merchantId, 10), 13645 "storeCode": c.storeCode, 13646 "productId": c.productId, 13647 }) 13648 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13649} 13650 13651// Do executes the "content.inventory.set" call. 13652// Exactly one of *InventorySetResponse or error will be non-nil. Any 13653// non-2xx status code is an error. Response headers are in either 13654// *InventorySetResponse.ServerResponse.Header or (if a response was 13655// returned at all) in error.(*googleapi.Error).Header. Use 13656// googleapi.IsNotModified to check whether the returned error was 13657// because http.StatusNotModified was returned. 13658func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) { 13659 gensupport.SetOptions(c.urlParams_, opts...) 13660 res, err := c.doRequest("json") 13661 if res != nil && res.StatusCode == http.StatusNotModified { 13662 if res.Body != nil { 13663 res.Body.Close() 13664 } 13665 return nil, &googleapi.Error{ 13666 Code: res.StatusCode, 13667 Header: res.Header, 13668 } 13669 } 13670 if err != nil { 13671 return nil, err 13672 } 13673 defer googleapi.CloseBody(res) 13674 if err := googleapi.CheckResponse(res); err != nil { 13675 return nil, err 13676 } 13677 ret := &InventorySetResponse{ 13678 ServerResponse: googleapi.ServerResponse{ 13679 Header: res.Header, 13680 HTTPStatusCode: res.StatusCode, 13681 }, 13682 } 13683 target := &ret 13684 if err := gensupport.DecodeResponse(target, res); err != nil { 13685 return nil, err 13686 } 13687 return ret, nil 13688 // { 13689 // "description": "Updates price and availability of a product in your Merchant Center account.", 13690 // "httpMethod": "POST", 13691 // "id": "content.inventory.set", 13692 // "parameterOrder": [ 13693 // "merchantId", 13694 // "storeCode", 13695 // "productId" 13696 // ], 13697 // "parameters": { 13698 // "dryRun": { 13699 // "description": "Flag to run the request in dry-run mode.", 13700 // "location": "query", 13701 // "type": "boolean" 13702 // }, 13703 // "merchantId": { 13704 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 13705 // "format": "uint64", 13706 // "location": "path", 13707 // "required": true, 13708 // "type": "string" 13709 // }, 13710 // "productId": { 13711 // "description": "The REST id of the product for which to update price and availability.", 13712 // "location": "path", 13713 // "required": true, 13714 // "type": "string" 13715 // }, 13716 // "storeCode": { 13717 // "description": "The code of the store for which to update price and availability. Use online to update price and availability of an online product.", 13718 // "location": "path", 13719 // "required": true, 13720 // "type": "string" 13721 // } 13722 // }, 13723 // "path": "{merchantId}/inventory/{storeCode}/products/{productId}", 13724 // "request": { 13725 // "$ref": "InventorySetRequest" 13726 // }, 13727 // "response": { 13728 // "$ref": "InventorySetResponse" 13729 // }, 13730 // "scopes": [ 13731 // "https://www.googleapis.com/auth/content" 13732 // ] 13733 // } 13734 13735} 13736 13737// method id "content.liasettings.custombatch": 13738 13739type LiasettingsCustombatchCall struct { 13740 s *APIService 13741 liasettingscustombatchrequest *LiasettingsCustomBatchRequest 13742 urlParams_ gensupport.URLParams 13743 ctx_ context.Context 13744 header_ http.Header 13745} 13746 13747// Custombatch: Retrieves and/or updates the LIA settings of multiple 13748// accounts in a single request. 13749func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { 13750 c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13751 c.liasettingscustombatchrequest = liasettingscustombatchrequest 13752 return c 13753} 13754 13755// DryRun sets the optional parameter "dryRun": Flag to run the request 13756// in dry-run mode. 13757func (c *LiasettingsCustombatchCall) DryRun(dryRun bool) *LiasettingsCustombatchCall { 13758 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13759 return c 13760} 13761 13762// Fields allows partial responses to be retrieved. See 13763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13764// for more information. 13765func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { 13766 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13767 return c 13768} 13769 13770// Context sets the context to be used in this call's Do method. Any 13771// pending HTTP request will be aborted if the provided context is 13772// canceled. 13773func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { 13774 c.ctx_ = ctx 13775 return c 13776} 13777 13778// Header returns an http.Header that can be modified by the caller to 13779// add HTTP headers to the request. 13780func (c *LiasettingsCustombatchCall) Header() http.Header { 13781 if c.header_ == nil { 13782 c.header_ = make(http.Header) 13783 } 13784 return c.header_ 13785} 13786 13787func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 13788 reqHeaders := make(http.Header) 13789 for k, v := range c.header_ { 13790 reqHeaders[k] = v 13791 } 13792 reqHeaders.Set("User-Agent", c.s.userAgent()) 13793 var body io.Reader = nil 13794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) 13795 if err != nil { 13796 return nil, err 13797 } 13798 reqHeaders.Set("Content-Type", "application/json") 13799 c.urlParams_.Set("alt", alt) 13800 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") 13801 urls += "?" + c.urlParams_.Encode() 13802 req, _ := http.NewRequest("POST", urls, body) 13803 req.Header = reqHeaders 13804 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13805} 13806 13807// Do executes the "content.liasettings.custombatch" call. 13808// Exactly one of *LiasettingsCustomBatchResponse or error will be 13809// non-nil. Any non-2xx status code is an error. Response headers are in 13810// either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a 13811// response was returned at all) in error.(*googleapi.Error).Header. Use 13812// googleapi.IsNotModified to check whether the returned error was 13813// because http.StatusNotModified was returned. 13814func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { 13815 gensupport.SetOptions(c.urlParams_, opts...) 13816 res, err := c.doRequest("json") 13817 if res != nil && res.StatusCode == http.StatusNotModified { 13818 if res.Body != nil { 13819 res.Body.Close() 13820 } 13821 return nil, &googleapi.Error{ 13822 Code: res.StatusCode, 13823 Header: res.Header, 13824 } 13825 } 13826 if err != nil { 13827 return nil, err 13828 } 13829 defer googleapi.CloseBody(res) 13830 if err := googleapi.CheckResponse(res); err != nil { 13831 return nil, err 13832 } 13833 ret := &LiasettingsCustomBatchResponse{ 13834 ServerResponse: googleapi.ServerResponse{ 13835 Header: res.Header, 13836 HTTPStatusCode: res.StatusCode, 13837 }, 13838 } 13839 target := &ret 13840 if err := gensupport.DecodeResponse(target, res); err != nil { 13841 return nil, err 13842 } 13843 return ret, nil 13844 // { 13845 // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", 13846 // "httpMethod": "POST", 13847 // "id": "content.liasettings.custombatch", 13848 // "parameters": { 13849 // "dryRun": { 13850 // "description": "Flag to run the request in dry-run mode.", 13851 // "location": "query", 13852 // "type": "boolean" 13853 // } 13854 // }, 13855 // "path": "liasettings/batch", 13856 // "request": { 13857 // "$ref": "LiasettingsCustomBatchRequest" 13858 // }, 13859 // "response": { 13860 // "$ref": "LiasettingsCustomBatchResponse" 13861 // }, 13862 // "scopes": [ 13863 // "https://www.googleapis.com/auth/content" 13864 // ] 13865 // } 13866 13867} 13868 13869// method id "content.liasettings.get": 13870 13871type LiasettingsGetCall struct { 13872 s *APIService 13873 merchantId uint64 13874 accountId uint64 13875 urlParams_ gensupport.URLParams 13876 ifNoneMatch_ string 13877 ctx_ context.Context 13878 header_ http.Header 13879} 13880 13881// Get: Retrieves the LIA settings of the account. 13882func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { 13883 c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13884 c.merchantId = merchantId 13885 c.accountId = accountId 13886 return c 13887} 13888 13889// Fields allows partial responses to be retrieved. See 13890// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13891// for more information. 13892func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { 13893 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13894 return c 13895} 13896 13897// IfNoneMatch sets the optional parameter which makes the operation 13898// fail if the object's ETag matches the given value. This is useful for 13899// getting updates only after the object has changed since the last 13900// request. Use googleapi.IsNotModified to check whether the response 13901// error from Do is the result of In-None-Match. 13902func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { 13903 c.ifNoneMatch_ = entityTag 13904 return c 13905} 13906 13907// Context sets the context to be used in this call's Do method. Any 13908// pending HTTP request will be aborted if the provided context is 13909// canceled. 13910func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { 13911 c.ctx_ = ctx 13912 return c 13913} 13914 13915// Header returns an http.Header that can be modified by the caller to 13916// add HTTP headers to the request. 13917func (c *LiasettingsGetCall) Header() http.Header { 13918 if c.header_ == nil { 13919 c.header_ = make(http.Header) 13920 } 13921 return c.header_ 13922} 13923 13924func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { 13925 reqHeaders := make(http.Header) 13926 for k, v := range c.header_ { 13927 reqHeaders[k] = v 13928 } 13929 reqHeaders.Set("User-Agent", c.s.userAgent()) 13930 if c.ifNoneMatch_ != "" { 13931 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13932 } 13933 var body io.Reader = nil 13934 c.urlParams_.Set("alt", alt) 13935 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 13936 urls += "?" + c.urlParams_.Encode() 13937 req, _ := http.NewRequest("GET", urls, body) 13938 req.Header = reqHeaders 13939 googleapi.Expand(req.URL, map[string]string{ 13940 "merchantId": strconv.FormatUint(c.merchantId, 10), 13941 "accountId": strconv.FormatUint(c.accountId, 10), 13942 }) 13943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13944} 13945 13946// Do executes the "content.liasettings.get" call. 13947// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 13948// status code is an error. Response headers are in either 13949// *LiaSettings.ServerResponse.Header or (if a response was returned at 13950// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13951// to check whether the returned error was because 13952// http.StatusNotModified was returned. 13953func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 13954 gensupport.SetOptions(c.urlParams_, opts...) 13955 res, err := c.doRequest("json") 13956 if res != nil && res.StatusCode == http.StatusNotModified { 13957 if res.Body != nil { 13958 res.Body.Close() 13959 } 13960 return nil, &googleapi.Error{ 13961 Code: res.StatusCode, 13962 Header: res.Header, 13963 } 13964 } 13965 if err != nil { 13966 return nil, err 13967 } 13968 defer googleapi.CloseBody(res) 13969 if err := googleapi.CheckResponse(res); err != nil { 13970 return nil, err 13971 } 13972 ret := &LiaSettings{ 13973 ServerResponse: googleapi.ServerResponse{ 13974 Header: res.Header, 13975 HTTPStatusCode: res.StatusCode, 13976 }, 13977 } 13978 target := &ret 13979 if err := gensupport.DecodeResponse(target, res); err != nil { 13980 return nil, err 13981 } 13982 return ret, nil 13983 // { 13984 // "description": "Retrieves the LIA settings of the account.", 13985 // "httpMethod": "GET", 13986 // "id": "content.liasettings.get", 13987 // "parameterOrder": [ 13988 // "merchantId", 13989 // "accountId" 13990 // ], 13991 // "parameters": { 13992 // "accountId": { 13993 // "description": "The ID of the account for which to get or update LIA settings.", 13994 // "format": "uint64", 13995 // "location": "path", 13996 // "required": true, 13997 // "type": "string" 13998 // }, 13999 // "merchantId": { 14000 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14001 // "format": "uint64", 14002 // "location": "path", 14003 // "required": true, 14004 // "type": "string" 14005 // } 14006 // }, 14007 // "path": "{merchantId}/liasettings/{accountId}", 14008 // "response": { 14009 // "$ref": "LiaSettings" 14010 // }, 14011 // "scopes": [ 14012 // "https://www.googleapis.com/auth/content" 14013 // ] 14014 // } 14015 14016} 14017 14018// method id "content.liasettings.getaccessiblegmbaccounts": 14019 14020type LiasettingsGetaccessiblegmbaccountsCall struct { 14021 s *APIService 14022 merchantId uint64 14023 accountId uint64 14024 urlParams_ gensupport.URLParams 14025 ifNoneMatch_ string 14026 ctx_ context.Context 14027 header_ http.Header 14028} 14029 14030// Getaccessiblegmbaccounts: Retrieves the list of accessible Google My 14031// Business accounts. 14032func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { 14033 c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14034 c.merchantId = merchantId 14035 c.accountId = accountId 14036 return c 14037} 14038 14039// Fields allows partial responses to be retrieved. See 14040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14041// for more information. 14042func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { 14043 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14044 return c 14045} 14046 14047// IfNoneMatch sets the optional parameter which makes the operation 14048// fail if the object's ETag matches the given value. This is useful for 14049// getting updates only after the object has changed since the last 14050// request. Use googleapi.IsNotModified to check whether the response 14051// error from Do is the result of In-None-Match. 14052func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { 14053 c.ifNoneMatch_ = entityTag 14054 return c 14055} 14056 14057// Context sets the context to be used in this call's Do method. Any 14058// pending HTTP request will be aborted if the provided context is 14059// canceled. 14060func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { 14061 c.ctx_ = ctx 14062 return c 14063} 14064 14065// Header returns an http.Header that can be modified by the caller to 14066// add HTTP headers to the request. 14067func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { 14068 if c.header_ == nil { 14069 c.header_ = make(http.Header) 14070 } 14071 return c.header_ 14072} 14073 14074func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { 14075 reqHeaders := make(http.Header) 14076 for k, v := range c.header_ { 14077 reqHeaders[k] = v 14078 } 14079 reqHeaders.Set("User-Agent", c.s.userAgent()) 14080 if c.ifNoneMatch_ != "" { 14081 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14082 } 14083 var body io.Reader = nil 14084 c.urlParams_.Set("alt", alt) 14085 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") 14086 urls += "?" + c.urlParams_.Encode() 14087 req, _ := http.NewRequest("GET", urls, body) 14088 req.Header = reqHeaders 14089 googleapi.Expand(req.URL, map[string]string{ 14090 "merchantId": strconv.FormatUint(c.merchantId, 10), 14091 "accountId": strconv.FormatUint(c.accountId, 10), 14092 }) 14093 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14094} 14095 14096// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. 14097// Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error 14098// will be non-nil. Any non-2xx status code is an error. Response 14099// headers are in either 14100// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or 14101// (if a response was returned at all) in 14102// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14103// whether the returned error was because http.StatusNotModified was 14104// returned. 14105func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { 14106 gensupport.SetOptions(c.urlParams_, opts...) 14107 res, err := c.doRequest("json") 14108 if res != nil && res.StatusCode == http.StatusNotModified { 14109 if res.Body != nil { 14110 res.Body.Close() 14111 } 14112 return nil, &googleapi.Error{ 14113 Code: res.StatusCode, 14114 Header: res.Header, 14115 } 14116 } 14117 if err != nil { 14118 return nil, err 14119 } 14120 defer googleapi.CloseBody(res) 14121 if err := googleapi.CheckResponse(res); err != nil { 14122 return nil, err 14123 } 14124 ret := &LiasettingsGetAccessibleGmbAccountsResponse{ 14125 ServerResponse: googleapi.ServerResponse{ 14126 Header: res.Header, 14127 HTTPStatusCode: res.StatusCode, 14128 }, 14129 } 14130 target := &ret 14131 if err := gensupport.DecodeResponse(target, res); err != nil { 14132 return nil, err 14133 } 14134 return ret, nil 14135 // { 14136 // "description": "Retrieves the list of accessible Google My Business accounts.", 14137 // "httpMethod": "GET", 14138 // "id": "content.liasettings.getaccessiblegmbaccounts", 14139 // "parameterOrder": [ 14140 // "merchantId", 14141 // "accountId" 14142 // ], 14143 // "parameters": { 14144 // "accountId": { 14145 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 14146 // "format": "uint64", 14147 // "location": "path", 14148 // "required": true, 14149 // "type": "string" 14150 // }, 14151 // "merchantId": { 14152 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14153 // "format": "uint64", 14154 // "location": "path", 14155 // "required": true, 14156 // "type": "string" 14157 // } 14158 // }, 14159 // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 14160 // "response": { 14161 // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" 14162 // }, 14163 // "scopes": [ 14164 // "https://www.googleapis.com/auth/content" 14165 // ] 14166 // } 14167 14168} 14169 14170// method id "content.liasettings.list": 14171 14172type LiasettingsListCall struct { 14173 s *APIService 14174 merchantId uint64 14175 urlParams_ gensupport.URLParams 14176 ifNoneMatch_ string 14177 ctx_ context.Context 14178 header_ http.Header 14179} 14180 14181// List: Lists the LIA settings of the sub-accounts in your Merchant 14182// Center account. 14183func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { 14184 c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14185 c.merchantId = merchantId 14186 return c 14187} 14188 14189// MaxResults sets the optional parameter "maxResults": The maximum 14190// number of LIA settings to return in the response, used for paging. 14191func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { 14192 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14193 return c 14194} 14195 14196// PageToken sets the optional parameter "pageToken": The token returned 14197// by the previous request. 14198func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { 14199 c.urlParams_.Set("pageToken", pageToken) 14200 return c 14201} 14202 14203// Fields allows partial responses to be retrieved. See 14204// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14205// for more information. 14206func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { 14207 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14208 return c 14209} 14210 14211// IfNoneMatch sets the optional parameter which makes the operation 14212// fail if the object's ETag matches the given value. This is useful for 14213// getting updates only after the object has changed since the last 14214// request. Use googleapi.IsNotModified to check whether the response 14215// error from Do is the result of In-None-Match. 14216func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { 14217 c.ifNoneMatch_ = entityTag 14218 return c 14219} 14220 14221// Context sets the context to be used in this call's Do method. Any 14222// pending HTTP request will be aborted if the provided context is 14223// canceled. 14224func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { 14225 c.ctx_ = ctx 14226 return c 14227} 14228 14229// Header returns an http.Header that can be modified by the caller to 14230// add HTTP headers to the request. 14231func (c *LiasettingsListCall) Header() http.Header { 14232 if c.header_ == nil { 14233 c.header_ = make(http.Header) 14234 } 14235 return c.header_ 14236} 14237 14238func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { 14239 reqHeaders := make(http.Header) 14240 for k, v := range c.header_ { 14241 reqHeaders[k] = v 14242 } 14243 reqHeaders.Set("User-Agent", c.s.userAgent()) 14244 if c.ifNoneMatch_ != "" { 14245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14246 } 14247 var body io.Reader = nil 14248 c.urlParams_.Set("alt", alt) 14249 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") 14250 urls += "?" + c.urlParams_.Encode() 14251 req, _ := http.NewRequest("GET", urls, body) 14252 req.Header = reqHeaders 14253 googleapi.Expand(req.URL, map[string]string{ 14254 "merchantId": strconv.FormatUint(c.merchantId, 10), 14255 }) 14256 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14257} 14258 14259// Do executes the "content.liasettings.list" call. 14260// Exactly one of *LiasettingsListResponse or error will be non-nil. Any 14261// non-2xx status code is an error. Response headers are in either 14262// *LiasettingsListResponse.ServerResponse.Header or (if a response was 14263// returned at all) in error.(*googleapi.Error).Header. Use 14264// googleapi.IsNotModified to check whether the returned error was 14265// because http.StatusNotModified was returned. 14266func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { 14267 gensupport.SetOptions(c.urlParams_, opts...) 14268 res, err := c.doRequest("json") 14269 if res != nil && res.StatusCode == http.StatusNotModified { 14270 if res.Body != nil { 14271 res.Body.Close() 14272 } 14273 return nil, &googleapi.Error{ 14274 Code: res.StatusCode, 14275 Header: res.Header, 14276 } 14277 } 14278 if err != nil { 14279 return nil, err 14280 } 14281 defer googleapi.CloseBody(res) 14282 if err := googleapi.CheckResponse(res); err != nil { 14283 return nil, err 14284 } 14285 ret := &LiasettingsListResponse{ 14286 ServerResponse: googleapi.ServerResponse{ 14287 Header: res.Header, 14288 HTTPStatusCode: res.StatusCode, 14289 }, 14290 } 14291 target := &ret 14292 if err := gensupport.DecodeResponse(target, res); err != nil { 14293 return nil, err 14294 } 14295 return ret, nil 14296 // { 14297 // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", 14298 // "httpMethod": "GET", 14299 // "id": "content.liasettings.list", 14300 // "parameterOrder": [ 14301 // "merchantId" 14302 // ], 14303 // "parameters": { 14304 // "maxResults": { 14305 // "description": "The maximum number of LIA settings to return in the response, used for paging.", 14306 // "format": "uint32", 14307 // "location": "query", 14308 // "type": "integer" 14309 // }, 14310 // "merchantId": { 14311 // "description": "The ID of the managing account. This must be a multi-client account.", 14312 // "format": "uint64", 14313 // "location": "path", 14314 // "required": true, 14315 // "type": "string" 14316 // }, 14317 // "pageToken": { 14318 // "description": "The token returned by the previous request.", 14319 // "location": "query", 14320 // "type": "string" 14321 // } 14322 // }, 14323 // "path": "{merchantId}/liasettings", 14324 // "response": { 14325 // "$ref": "LiasettingsListResponse" 14326 // }, 14327 // "scopes": [ 14328 // "https://www.googleapis.com/auth/content" 14329 // ] 14330 // } 14331 14332} 14333 14334// Pages invokes f for each page of results. 14335// A non-nil error returned from f will halt the iteration. 14336// The provided context supersedes any context provided to the Context method. 14337func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { 14338 c.ctx_ = ctx 14339 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14340 for { 14341 x, err := c.Do() 14342 if err != nil { 14343 return err 14344 } 14345 if err := f(x); err != nil { 14346 return err 14347 } 14348 if x.NextPageToken == "" { 14349 return nil 14350 } 14351 c.PageToken(x.NextPageToken) 14352 } 14353} 14354 14355// method id "content.liasettings.patch": 14356 14357type LiasettingsPatchCall struct { 14358 s *APIService 14359 merchantId uint64 14360 accountId uint64 14361 liasettings *LiaSettings 14362 urlParams_ gensupport.URLParams 14363 ctx_ context.Context 14364 header_ http.Header 14365} 14366 14367// Patch: Updates the LIA settings of the account. This method supports 14368// patch semantics. 14369func (r *LiasettingsService) Patch(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsPatchCall { 14370 c := &LiasettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14371 c.merchantId = merchantId 14372 c.accountId = accountId 14373 c.liasettings = liasettings 14374 return c 14375} 14376 14377// DryRun sets the optional parameter "dryRun": Flag to run the request 14378// in dry-run mode. 14379func (c *LiasettingsPatchCall) DryRun(dryRun bool) *LiasettingsPatchCall { 14380 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14381 return c 14382} 14383 14384// Fields allows partial responses to be retrieved. See 14385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14386// for more information. 14387func (c *LiasettingsPatchCall) Fields(s ...googleapi.Field) *LiasettingsPatchCall { 14388 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14389 return c 14390} 14391 14392// Context sets the context to be used in this call's Do method. Any 14393// pending HTTP request will be aborted if the provided context is 14394// canceled. 14395func (c *LiasettingsPatchCall) Context(ctx context.Context) *LiasettingsPatchCall { 14396 c.ctx_ = ctx 14397 return c 14398} 14399 14400// Header returns an http.Header that can be modified by the caller to 14401// add HTTP headers to the request. 14402func (c *LiasettingsPatchCall) Header() http.Header { 14403 if c.header_ == nil { 14404 c.header_ = make(http.Header) 14405 } 14406 return c.header_ 14407} 14408 14409func (c *LiasettingsPatchCall) doRequest(alt string) (*http.Response, error) { 14410 reqHeaders := make(http.Header) 14411 for k, v := range c.header_ { 14412 reqHeaders[k] = v 14413 } 14414 reqHeaders.Set("User-Agent", c.s.userAgent()) 14415 var body io.Reader = nil 14416 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) 14417 if err != nil { 14418 return nil, err 14419 } 14420 reqHeaders.Set("Content-Type", "application/json") 14421 c.urlParams_.Set("alt", alt) 14422 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 14423 urls += "?" + c.urlParams_.Encode() 14424 req, _ := http.NewRequest("PATCH", urls, body) 14425 req.Header = reqHeaders 14426 googleapi.Expand(req.URL, map[string]string{ 14427 "merchantId": strconv.FormatUint(c.merchantId, 10), 14428 "accountId": strconv.FormatUint(c.accountId, 10), 14429 }) 14430 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14431} 14432 14433// Do executes the "content.liasettings.patch" call. 14434// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 14435// status code is an error. Response headers are in either 14436// *LiaSettings.ServerResponse.Header or (if a response was returned at 14437// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14438// to check whether the returned error was because 14439// http.StatusNotModified was returned. 14440func (c *LiasettingsPatchCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 14441 gensupport.SetOptions(c.urlParams_, opts...) 14442 res, err := c.doRequest("json") 14443 if res != nil && res.StatusCode == http.StatusNotModified { 14444 if res.Body != nil { 14445 res.Body.Close() 14446 } 14447 return nil, &googleapi.Error{ 14448 Code: res.StatusCode, 14449 Header: res.Header, 14450 } 14451 } 14452 if err != nil { 14453 return nil, err 14454 } 14455 defer googleapi.CloseBody(res) 14456 if err := googleapi.CheckResponse(res); err != nil { 14457 return nil, err 14458 } 14459 ret := &LiaSettings{ 14460 ServerResponse: googleapi.ServerResponse{ 14461 Header: res.Header, 14462 HTTPStatusCode: res.StatusCode, 14463 }, 14464 } 14465 target := &ret 14466 if err := gensupport.DecodeResponse(target, res); err != nil { 14467 return nil, err 14468 } 14469 return ret, nil 14470 // { 14471 // "description": "Updates the LIA settings of the account. This method supports patch semantics.", 14472 // "httpMethod": "PATCH", 14473 // "id": "content.liasettings.patch", 14474 // "parameterOrder": [ 14475 // "merchantId", 14476 // "accountId" 14477 // ], 14478 // "parameters": { 14479 // "accountId": { 14480 // "description": "The ID of the account for which to get or update LIA settings.", 14481 // "format": "uint64", 14482 // "location": "path", 14483 // "required": true, 14484 // "type": "string" 14485 // }, 14486 // "dryRun": { 14487 // "description": "Flag to run the request in dry-run mode.", 14488 // "location": "query", 14489 // "type": "boolean" 14490 // }, 14491 // "merchantId": { 14492 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14493 // "format": "uint64", 14494 // "location": "path", 14495 // "required": true, 14496 // "type": "string" 14497 // } 14498 // }, 14499 // "path": "{merchantId}/liasettings/{accountId}", 14500 // "request": { 14501 // "$ref": "LiaSettings" 14502 // }, 14503 // "response": { 14504 // "$ref": "LiaSettings" 14505 // }, 14506 // "scopes": [ 14507 // "https://www.googleapis.com/auth/content" 14508 // ] 14509 // } 14510 14511} 14512 14513// method id "content.liasettings.requestgmbaccess": 14514 14515type LiasettingsRequestgmbaccessCall struct { 14516 s *APIService 14517 merchantId uint64 14518 accountId uint64 14519 urlParams_ gensupport.URLParams 14520 ctx_ context.Context 14521 header_ http.Header 14522} 14523 14524// Requestgmbaccess: Requests access to a specified Google My Business 14525// account. 14526func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64) *LiasettingsRequestgmbaccessCall { 14527 c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14528 c.merchantId = merchantId 14529 c.accountId = accountId 14530 return c 14531} 14532 14533// GmbEmail sets the optional parameter "gmbEmail": The email of the 14534// Google My Business account. 14535func (c *LiasettingsRequestgmbaccessCall) GmbEmail(gmbEmail string) *LiasettingsRequestgmbaccessCall { 14536 c.urlParams_.Set("gmbEmail", gmbEmail) 14537 return c 14538} 14539 14540// Fields allows partial responses to be retrieved. See 14541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14542// for more information. 14543func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { 14544 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14545 return c 14546} 14547 14548// Context sets the context to be used in this call's Do method. Any 14549// pending HTTP request will be aborted if the provided context is 14550// canceled. 14551func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { 14552 c.ctx_ = ctx 14553 return c 14554} 14555 14556// Header returns an http.Header that can be modified by the caller to 14557// add HTTP headers to the request. 14558func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { 14559 if c.header_ == nil { 14560 c.header_ = make(http.Header) 14561 } 14562 return c.header_ 14563} 14564 14565func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { 14566 reqHeaders := make(http.Header) 14567 for k, v := range c.header_ { 14568 reqHeaders[k] = v 14569 } 14570 reqHeaders.Set("User-Agent", c.s.userAgent()) 14571 var body io.Reader = nil 14572 c.urlParams_.Set("alt", alt) 14573 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") 14574 urls += "?" + c.urlParams_.Encode() 14575 req, _ := http.NewRequest("POST", urls, body) 14576 req.Header = reqHeaders 14577 googleapi.Expand(req.URL, map[string]string{ 14578 "merchantId": strconv.FormatUint(c.merchantId, 10), 14579 "accountId": strconv.FormatUint(c.accountId, 10), 14580 }) 14581 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14582} 14583 14584// Do executes the "content.liasettings.requestgmbaccess" call. 14585// Exactly one of *LiasettingsRequestGmbAccessResponse or error will be 14586// non-nil. Any non-2xx status code is an error. Response headers are in 14587// either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or 14588// (if a response was returned at all) in 14589// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14590// whether the returned error was because http.StatusNotModified was 14591// returned. 14592func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { 14593 gensupport.SetOptions(c.urlParams_, opts...) 14594 res, err := c.doRequest("json") 14595 if res != nil && res.StatusCode == http.StatusNotModified { 14596 if res.Body != nil { 14597 res.Body.Close() 14598 } 14599 return nil, &googleapi.Error{ 14600 Code: res.StatusCode, 14601 Header: res.Header, 14602 } 14603 } 14604 if err != nil { 14605 return nil, err 14606 } 14607 defer googleapi.CloseBody(res) 14608 if err := googleapi.CheckResponse(res); err != nil { 14609 return nil, err 14610 } 14611 ret := &LiasettingsRequestGmbAccessResponse{ 14612 ServerResponse: googleapi.ServerResponse{ 14613 Header: res.Header, 14614 HTTPStatusCode: res.StatusCode, 14615 }, 14616 } 14617 target := &ret 14618 if err := gensupport.DecodeResponse(target, res); err != nil { 14619 return nil, err 14620 } 14621 return ret, nil 14622 // { 14623 // "description": "Requests access to a specified Google My Business account.", 14624 // "httpMethod": "POST", 14625 // "id": "content.liasettings.requestgmbaccess", 14626 // "parameterOrder": [ 14627 // "merchantId", 14628 // "accountId" 14629 // ], 14630 // "parameters": { 14631 // "accountId": { 14632 // "description": "The ID of the account for which GMB access is requested.", 14633 // "format": "uint64", 14634 // "location": "path", 14635 // "required": true, 14636 // "type": "string" 14637 // }, 14638 // "gmbEmail": { 14639 // "description": "The email of the Google My Business account.", 14640 // "location": "query", 14641 // "type": "string" 14642 // }, 14643 // "merchantId": { 14644 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14645 // "format": "uint64", 14646 // "location": "path", 14647 // "required": true, 14648 // "type": "string" 14649 // } 14650 // }, 14651 // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 14652 // "response": { 14653 // "$ref": "LiasettingsRequestGmbAccessResponse" 14654 // }, 14655 // "scopes": [ 14656 // "https://www.googleapis.com/auth/content" 14657 // ] 14658 // } 14659 14660} 14661 14662// method id "content.liasettings.requestinventoryverification": 14663 14664type LiasettingsRequestinventoryverificationCall struct { 14665 s *APIService 14666 merchantId uint64 14667 accountId uint64 14668 country string 14669 urlParams_ gensupport.URLParams 14670 ctx_ context.Context 14671 header_ http.Header 14672} 14673 14674// Requestinventoryverification: Requests inventory validation for the 14675// specified country. 14676func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { 14677 c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14678 c.merchantId = merchantId 14679 c.accountId = accountId 14680 c.country = country 14681 return c 14682} 14683 14684// Fields allows partial responses to be retrieved. See 14685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14686// for more information. 14687func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 14688 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14689 return c 14690} 14691 14692// Context sets the context to be used in this call's Do method. Any 14693// pending HTTP request will be aborted if the provided context is 14694// canceled. 14695func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { 14696 c.ctx_ = ctx 14697 return c 14698} 14699 14700// Header returns an http.Header that can be modified by the caller to 14701// add HTTP headers to the request. 14702func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { 14703 if c.header_ == nil { 14704 c.header_ = make(http.Header) 14705 } 14706 return c.header_ 14707} 14708 14709func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { 14710 reqHeaders := make(http.Header) 14711 for k, v := range c.header_ { 14712 reqHeaders[k] = v 14713 } 14714 reqHeaders.Set("User-Agent", c.s.userAgent()) 14715 var body io.Reader = nil 14716 c.urlParams_.Set("alt", alt) 14717 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") 14718 urls += "?" + c.urlParams_.Encode() 14719 req, _ := http.NewRequest("POST", urls, body) 14720 req.Header = reqHeaders 14721 googleapi.Expand(req.URL, map[string]string{ 14722 "merchantId": strconv.FormatUint(c.merchantId, 10), 14723 "accountId": strconv.FormatUint(c.accountId, 10), 14724 "country": c.country, 14725 }) 14726 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14727} 14728 14729// Do executes the "content.liasettings.requestinventoryverification" call. 14730// Exactly one of *LiasettingsRequestInventoryVerificationResponse or 14731// error will be non-nil. Any non-2xx status code is an error. Response 14732// headers are in either 14733// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header 14734// or (if a response was returned at all) in 14735// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14736// whether the returned error was because http.StatusNotModified was 14737// returned. 14738func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { 14739 gensupport.SetOptions(c.urlParams_, opts...) 14740 res, err := c.doRequest("json") 14741 if res != nil && res.StatusCode == http.StatusNotModified { 14742 if res.Body != nil { 14743 res.Body.Close() 14744 } 14745 return nil, &googleapi.Error{ 14746 Code: res.StatusCode, 14747 Header: res.Header, 14748 } 14749 } 14750 if err != nil { 14751 return nil, err 14752 } 14753 defer googleapi.CloseBody(res) 14754 if err := googleapi.CheckResponse(res); err != nil { 14755 return nil, err 14756 } 14757 ret := &LiasettingsRequestInventoryVerificationResponse{ 14758 ServerResponse: googleapi.ServerResponse{ 14759 Header: res.Header, 14760 HTTPStatusCode: res.StatusCode, 14761 }, 14762 } 14763 target := &ret 14764 if err := gensupport.DecodeResponse(target, res); err != nil { 14765 return nil, err 14766 } 14767 return ret, nil 14768 // { 14769 // "description": "Requests inventory validation for the specified country.", 14770 // "httpMethod": "POST", 14771 // "id": "content.liasettings.requestinventoryverification", 14772 // "parameterOrder": [ 14773 // "merchantId", 14774 // "accountId", 14775 // "country" 14776 // ], 14777 // "parameters": { 14778 // "accountId": { 14779 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 14780 // "format": "uint64", 14781 // "location": "path", 14782 // "required": true, 14783 // "type": "string" 14784 // }, 14785 // "country": { 14786 // "description": "The country for which inventory validation is requested.", 14787 // "location": "path", 14788 // "required": true, 14789 // "type": "string" 14790 // }, 14791 // "merchantId": { 14792 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14793 // "format": "uint64", 14794 // "location": "path", 14795 // "required": true, 14796 // "type": "string" 14797 // } 14798 // }, 14799 // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 14800 // "response": { 14801 // "$ref": "LiasettingsRequestInventoryVerificationResponse" 14802 // }, 14803 // "scopes": [ 14804 // "https://www.googleapis.com/auth/content" 14805 // ] 14806 // } 14807 14808} 14809 14810// method id "content.liasettings.setinventoryverificationcontact": 14811 14812type LiasettingsSetinventoryverificationcontactCall struct { 14813 s *APIService 14814 merchantId uint64 14815 accountId uint64 14816 urlParams_ gensupport.URLParams 14817 ctx_ context.Context 14818 header_ http.Header 14819} 14820 14821// Setinventoryverificationcontact: Sets the inventory verification 14822// contract for the specified country. 14823func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64) *LiasettingsSetinventoryverificationcontactCall { 14824 c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14825 c.merchantId = merchantId 14826 c.accountId = accountId 14827 return c 14828} 14829 14830// ContactEmail sets the optional parameter "contactEmail": The email of 14831// the inventory verification contact. 14832func (c *LiasettingsSetinventoryverificationcontactCall) ContactEmail(contactEmail string) *LiasettingsSetinventoryverificationcontactCall { 14833 c.urlParams_.Set("contactEmail", contactEmail) 14834 return c 14835} 14836 14837// ContactName sets the optional parameter "contactName": The name of 14838// the inventory verification contact. 14839func (c *LiasettingsSetinventoryverificationcontactCall) ContactName(contactName string) *LiasettingsSetinventoryverificationcontactCall { 14840 c.urlParams_.Set("contactName", contactName) 14841 return c 14842} 14843 14844// Country sets the optional parameter "country": The country for which 14845// inventory verification is requested. 14846func (c *LiasettingsSetinventoryverificationcontactCall) Country(country string) *LiasettingsSetinventoryverificationcontactCall { 14847 c.urlParams_.Set("country", country) 14848 return c 14849} 14850 14851// Language sets the optional parameter "language": The language for 14852// which inventory verification is requested. 14853func (c *LiasettingsSetinventoryverificationcontactCall) Language(language string) *LiasettingsSetinventoryverificationcontactCall { 14854 c.urlParams_.Set("language", language) 14855 return c 14856} 14857 14858// Fields allows partial responses to be retrieved. See 14859// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14860// for more information. 14861func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { 14862 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14863 return c 14864} 14865 14866// Context sets the context to be used in this call's Do method. Any 14867// pending HTTP request will be aborted if the provided context is 14868// canceled. 14869func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { 14870 c.ctx_ = ctx 14871 return c 14872} 14873 14874// Header returns an http.Header that can be modified by the caller to 14875// add HTTP headers to the request. 14876func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { 14877 if c.header_ == nil { 14878 c.header_ = make(http.Header) 14879 } 14880 return c.header_ 14881} 14882 14883func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { 14884 reqHeaders := make(http.Header) 14885 for k, v := range c.header_ { 14886 reqHeaders[k] = v 14887 } 14888 reqHeaders.Set("User-Agent", c.s.userAgent()) 14889 var body io.Reader = nil 14890 c.urlParams_.Set("alt", alt) 14891 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") 14892 urls += "?" + c.urlParams_.Encode() 14893 req, _ := http.NewRequest("POST", urls, body) 14894 req.Header = reqHeaders 14895 googleapi.Expand(req.URL, map[string]string{ 14896 "merchantId": strconv.FormatUint(c.merchantId, 10), 14897 "accountId": strconv.FormatUint(c.accountId, 10), 14898 }) 14899 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14900} 14901 14902// Do executes the "content.liasettings.setinventoryverificationcontact" call. 14903// Exactly one of *LiasettingsSetInventoryVerificationContactResponse or 14904// error will be non-nil. Any non-2xx status code is an error. Response 14905// headers are in either 14906// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea 14907// der or (if a response was returned at all) in 14908// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14909// whether the returned error was because http.StatusNotModified was 14910// returned. 14911func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { 14912 gensupport.SetOptions(c.urlParams_, opts...) 14913 res, err := c.doRequest("json") 14914 if res != nil && res.StatusCode == http.StatusNotModified { 14915 if res.Body != nil { 14916 res.Body.Close() 14917 } 14918 return nil, &googleapi.Error{ 14919 Code: res.StatusCode, 14920 Header: res.Header, 14921 } 14922 } 14923 if err != nil { 14924 return nil, err 14925 } 14926 defer googleapi.CloseBody(res) 14927 if err := googleapi.CheckResponse(res); err != nil { 14928 return nil, err 14929 } 14930 ret := &LiasettingsSetInventoryVerificationContactResponse{ 14931 ServerResponse: googleapi.ServerResponse{ 14932 Header: res.Header, 14933 HTTPStatusCode: res.StatusCode, 14934 }, 14935 } 14936 target := &ret 14937 if err := gensupport.DecodeResponse(target, res); err != nil { 14938 return nil, err 14939 } 14940 return ret, nil 14941 // { 14942 // "description": "Sets the inventory verification contract for the specified country.", 14943 // "httpMethod": "POST", 14944 // "id": "content.liasettings.setinventoryverificationcontact", 14945 // "parameterOrder": [ 14946 // "merchantId", 14947 // "accountId" 14948 // ], 14949 // "parameters": { 14950 // "accountId": { 14951 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 14952 // "format": "uint64", 14953 // "location": "path", 14954 // "required": true, 14955 // "type": "string" 14956 // }, 14957 // "contactEmail": { 14958 // "description": "The email of the inventory verification contact.", 14959 // "location": "query", 14960 // "type": "string" 14961 // }, 14962 // "contactName": { 14963 // "description": "The name of the inventory verification contact.", 14964 // "location": "query", 14965 // "type": "string" 14966 // }, 14967 // "country": { 14968 // "description": "The country for which inventory verification is requested.", 14969 // "location": "query", 14970 // "type": "string" 14971 // }, 14972 // "language": { 14973 // "description": "The language for which inventory verification is requested.", 14974 // "location": "query", 14975 // "type": "string" 14976 // }, 14977 // "merchantId": { 14978 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 14979 // "format": "uint64", 14980 // "location": "path", 14981 // "required": true, 14982 // "type": "string" 14983 // } 14984 // }, 14985 // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 14986 // "response": { 14987 // "$ref": "LiasettingsSetInventoryVerificationContactResponse" 14988 // }, 14989 // "scopes": [ 14990 // "https://www.googleapis.com/auth/content" 14991 // ] 14992 // } 14993 14994} 14995 14996// method id "content.liasettings.update": 14997 14998type LiasettingsUpdateCall struct { 14999 s *APIService 15000 merchantId uint64 15001 accountId uint64 15002 liasettings *LiaSettings 15003 urlParams_ gensupport.URLParams 15004 ctx_ context.Context 15005 header_ http.Header 15006} 15007 15008// Update: Updates the LIA settings of the account. 15009func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { 15010 c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15011 c.merchantId = merchantId 15012 c.accountId = accountId 15013 c.liasettings = liasettings 15014 return c 15015} 15016 15017// DryRun sets the optional parameter "dryRun": Flag to run the request 15018// in dry-run mode. 15019func (c *LiasettingsUpdateCall) DryRun(dryRun bool) *LiasettingsUpdateCall { 15020 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15021 return c 15022} 15023 15024// Fields allows partial responses to be retrieved. See 15025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15026// for more information. 15027func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { 15028 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15029 return c 15030} 15031 15032// Context sets the context to be used in this call's Do method. Any 15033// pending HTTP request will be aborted if the provided context is 15034// canceled. 15035func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { 15036 c.ctx_ = ctx 15037 return c 15038} 15039 15040// Header returns an http.Header that can be modified by the caller to 15041// add HTTP headers to the request. 15042func (c *LiasettingsUpdateCall) Header() http.Header { 15043 if c.header_ == nil { 15044 c.header_ = make(http.Header) 15045 } 15046 return c.header_ 15047} 15048 15049func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 15050 reqHeaders := make(http.Header) 15051 for k, v := range c.header_ { 15052 reqHeaders[k] = v 15053 } 15054 reqHeaders.Set("User-Agent", c.s.userAgent()) 15055 var body io.Reader = nil 15056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) 15057 if err != nil { 15058 return nil, err 15059 } 15060 reqHeaders.Set("Content-Type", "application/json") 15061 c.urlParams_.Set("alt", alt) 15062 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 15063 urls += "?" + c.urlParams_.Encode() 15064 req, _ := http.NewRequest("PUT", urls, body) 15065 req.Header = reqHeaders 15066 googleapi.Expand(req.URL, map[string]string{ 15067 "merchantId": strconv.FormatUint(c.merchantId, 10), 15068 "accountId": strconv.FormatUint(c.accountId, 10), 15069 }) 15070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15071} 15072 15073// Do executes the "content.liasettings.update" call. 15074// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 15075// status code is an error. Response headers are in either 15076// *LiaSettings.ServerResponse.Header or (if a response was returned at 15077// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15078// to check whether the returned error was because 15079// http.StatusNotModified was returned. 15080func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 15081 gensupport.SetOptions(c.urlParams_, opts...) 15082 res, err := c.doRequest("json") 15083 if res != nil && res.StatusCode == http.StatusNotModified { 15084 if res.Body != nil { 15085 res.Body.Close() 15086 } 15087 return nil, &googleapi.Error{ 15088 Code: res.StatusCode, 15089 Header: res.Header, 15090 } 15091 } 15092 if err != nil { 15093 return nil, err 15094 } 15095 defer googleapi.CloseBody(res) 15096 if err := googleapi.CheckResponse(res); err != nil { 15097 return nil, err 15098 } 15099 ret := &LiaSettings{ 15100 ServerResponse: googleapi.ServerResponse{ 15101 Header: res.Header, 15102 HTTPStatusCode: res.StatusCode, 15103 }, 15104 } 15105 target := &ret 15106 if err := gensupport.DecodeResponse(target, res); err != nil { 15107 return nil, err 15108 } 15109 return ret, nil 15110 // { 15111 // "description": "Updates the LIA settings of the account.", 15112 // "httpMethod": "PUT", 15113 // "id": "content.liasettings.update", 15114 // "parameterOrder": [ 15115 // "merchantId", 15116 // "accountId" 15117 // ], 15118 // "parameters": { 15119 // "accountId": { 15120 // "description": "The ID of the account for which to get or update LIA settings.", 15121 // "format": "uint64", 15122 // "location": "path", 15123 // "required": true, 15124 // "type": "string" 15125 // }, 15126 // "dryRun": { 15127 // "description": "Flag to run the request in dry-run mode.", 15128 // "location": "query", 15129 // "type": "boolean" 15130 // }, 15131 // "merchantId": { 15132 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 15133 // "format": "uint64", 15134 // "location": "path", 15135 // "required": true, 15136 // "type": "string" 15137 // } 15138 // }, 15139 // "path": "{merchantId}/liasettings/{accountId}", 15140 // "request": { 15141 // "$ref": "LiaSettings" 15142 // }, 15143 // "response": { 15144 // "$ref": "LiaSettings" 15145 // }, 15146 // "scopes": [ 15147 // "https://www.googleapis.com/auth/content" 15148 // ] 15149 // } 15150 15151} 15152 15153// method id "content.orders.acknowledge": 15154 15155type OrdersAcknowledgeCall struct { 15156 s *APIService 15157 merchantId uint64 15158 orderId string 15159 ordersacknowledgerequest *OrdersAcknowledgeRequest 15160 urlParams_ gensupport.URLParams 15161 ctx_ context.Context 15162 header_ http.Header 15163} 15164 15165// Acknowledge: Marks an order as acknowledged. 15166func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { 15167 c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15168 c.merchantId = merchantId 15169 c.orderId = orderId 15170 c.ordersacknowledgerequest = ordersacknowledgerequest 15171 return c 15172} 15173 15174// Fields allows partial responses to be retrieved. See 15175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15176// for more information. 15177func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { 15178 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15179 return c 15180} 15181 15182// Context sets the context to be used in this call's Do method. Any 15183// pending HTTP request will be aborted if the provided context is 15184// canceled. 15185func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { 15186 c.ctx_ = ctx 15187 return c 15188} 15189 15190// Header returns an http.Header that can be modified by the caller to 15191// add HTTP headers to the request. 15192func (c *OrdersAcknowledgeCall) Header() http.Header { 15193 if c.header_ == nil { 15194 c.header_ = make(http.Header) 15195 } 15196 return c.header_ 15197} 15198 15199func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { 15200 reqHeaders := make(http.Header) 15201 for k, v := range c.header_ { 15202 reqHeaders[k] = v 15203 } 15204 reqHeaders.Set("User-Agent", c.s.userAgent()) 15205 var body io.Reader = nil 15206 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) 15207 if err != nil { 15208 return nil, err 15209 } 15210 reqHeaders.Set("Content-Type", "application/json") 15211 c.urlParams_.Set("alt", alt) 15212 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") 15213 urls += "?" + c.urlParams_.Encode() 15214 req, _ := http.NewRequest("POST", urls, body) 15215 req.Header = reqHeaders 15216 googleapi.Expand(req.URL, map[string]string{ 15217 "merchantId": strconv.FormatUint(c.merchantId, 10), 15218 "orderId": c.orderId, 15219 }) 15220 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15221} 15222 15223// Do executes the "content.orders.acknowledge" call. 15224// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil. 15225// Any non-2xx status code is an error. Response headers are in either 15226// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response 15227// was returned at all) in error.(*googleapi.Error).Header. Use 15228// googleapi.IsNotModified to check whether the returned error was 15229// because http.StatusNotModified was returned. 15230func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { 15231 gensupport.SetOptions(c.urlParams_, opts...) 15232 res, err := c.doRequest("json") 15233 if res != nil && res.StatusCode == http.StatusNotModified { 15234 if res.Body != nil { 15235 res.Body.Close() 15236 } 15237 return nil, &googleapi.Error{ 15238 Code: res.StatusCode, 15239 Header: res.Header, 15240 } 15241 } 15242 if err != nil { 15243 return nil, err 15244 } 15245 defer googleapi.CloseBody(res) 15246 if err := googleapi.CheckResponse(res); err != nil { 15247 return nil, err 15248 } 15249 ret := &OrdersAcknowledgeResponse{ 15250 ServerResponse: googleapi.ServerResponse{ 15251 Header: res.Header, 15252 HTTPStatusCode: res.StatusCode, 15253 }, 15254 } 15255 target := &ret 15256 if err := gensupport.DecodeResponse(target, res); err != nil { 15257 return nil, err 15258 } 15259 return ret, nil 15260 // { 15261 // "description": "Marks an order as acknowledged.", 15262 // "httpMethod": "POST", 15263 // "id": "content.orders.acknowledge", 15264 // "parameterOrder": [ 15265 // "merchantId", 15266 // "orderId" 15267 // ], 15268 // "parameters": { 15269 // "merchantId": { 15270 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 15271 // "format": "uint64", 15272 // "location": "path", 15273 // "required": true, 15274 // "type": "string" 15275 // }, 15276 // "orderId": { 15277 // "description": "The ID of the order.", 15278 // "location": "path", 15279 // "required": true, 15280 // "type": "string" 15281 // } 15282 // }, 15283 // "path": "{merchantId}/orders/{orderId}/acknowledge", 15284 // "request": { 15285 // "$ref": "OrdersAcknowledgeRequest" 15286 // }, 15287 // "response": { 15288 // "$ref": "OrdersAcknowledgeResponse" 15289 // }, 15290 // "scopes": [ 15291 // "https://www.googleapis.com/auth/content" 15292 // ] 15293 // } 15294 15295} 15296 15297// method id "content.orders.advancetestorder": 15298 15299type OrdersAdvancetestorderCall struct { 15300 s *APIService 15301 merchantId uint64 15302 orderId string 15303 urlParams_ gensupport.URLParams 15304 ctx_ context.Context 15305 header_ http.Header 15306} 15307 15308// Advancetestorder: Sandbox only. Moves a test order from state 15309// "inProgress" to state "pendingShipment". 15310func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { 15311 c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15312 c.merchantId = merchantId 15313 c.orderId = orderId 15314 return c 15315} 15316 15317// Fields allows partial responses to be retrieved. See 15318// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15319// for more information. 15320func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { 15321 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15322 return c 15323} 15324 15325// Context sets the context to be used in this call's Do method. Any 15326// pending HTTP request will be aborted if the provided context is 15327// canceled. 15328func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { 15329 c.ctx_ = ctx 15330 return c 15331} 15332 15333// Header returns an http.Header that can be modified by the caller to 15334// add HTTP headers to the request. 15335func (c *OrdersAdvancetestorderCall) Header() http.Header { 15336 if c.header_ == nil { 15337 c.header_ = make(http.Header) 15338 } 15339 return c.header_ 15340} 15341 15342func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { 15343 reqHeaders := make(http.Header) 15344 for k, v := range c.header_ { 15345 reqHeaders[k] = v 15346 } 15347 reqHeaders.Set("User-Agent", c.s.userAgent()) 15348 var body io.Reader = nil 15349 c.urlParams_.Set("alt", alt) 15350 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") 15351 urls += "?" + c.urlParams_.Encode() 15352 req, _ := http.NewRequest("POST", urls, body) 15353 req.Header = reqHeaders 15354 googleapi.Expand(req.URL, map[string]string{ 15355 "merchantId": strconv.FormatUint(c.merchantId, 10), 15356 "orderId": c.orderId, 15357 }) 15358 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15359} 15360 15361// Do executes the "content.orders.advancetestorder" call. 15362// Exactly one of *OrdersAdvanceTestOrderResponse or error will be 15363// non-nil. Any non-2xx status code is an error. Response headers are in 15364// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a 15365// response was returned at all) in error.(*googleapi.Error).Header. Use 15366// googleapi.IsNotModified to check whether the returned error was 15367// because http.StatusNotModified was returned. 15368func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { 15369 gensupport.SetOptions(c.urlParams_, opts...) 15370 res, err := c.doRequest("json") 15371 if res != nil && res.StatusCode == http.StatusNotModified { 15372 if res.Body != nil { 15373 res.Body.Close() 15374 } 15375 return nil, &googleapi.Error{ 15376 Code: res.StatusCode, 15377 Header: res.Header, 15378 } 15379 } 15380 if err != nil { 15381 return nil, err 15382 } 15383 defer googleapi.CloseBody(res) 15384 if err := googleapi.CheckResponse(res); err != nil { 15385 return nil, err 15386 } 15387 ret := &OrdersAdvanceTestOrderResponse{ 15388 ServerResponse: googleapi.ServerResponse{ 15389 Header: res.Header, 15390 HTTPStatusCode: res.StatusCode, 15391 }, 15392 } 15393 target := &ret 15394 if err := gensupport.DecodeResponse(target, res); err != nil { 15395 return nil, err 15396 } 15397 return ret, nil 15398 // { 15399 // "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".", 15400 // "httpMethod": "POST", 15401 // "id": "content.orders.advancetestorder", 15402 // "parameterOrder": [ 15403 // "merchantId", 15404 // "orderId" 15405 // ], 15406 // "parameters": { 15407 // "merchantId": { 15408 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 15409 // "format": "uint64", 15410 // "location": "path", 15411 // "required": true, 15412 // "type": "string" 15413 // }, 15414 // "orderId": { 15415 // "description": "The ID of the test order to modify.", 15416 // "location": "path", 15417 // "required": true, 15418 // "type": "string" 15419 // } 15420 // }, 15421 // "path": "{merchantId}/testorders/{orderId}/advance", 15422 // "response": { 15423 // "$ref": "OrdersAdvanceTestOrderResponse" 15424 // }, 15425 // "scopes": [ 15426 // "https://www.googleapis.com/auth/content" 15427 // ] 15428 // } 15429 15430} 15431 15432// method id "content.orders.cancel": 15433 15434type OrdersCancelCall struct { 15435 s *APIService 15436 merchantId uint64 15437 orderId string 15438 orderscancelrequest *OrdersCancelRequest 15439 urlParams_ gensupport.URLParams 15440 ctx_ context.Context 15441 header_ http.Header 15442} 15443 15444// Cancel: Cancels all line items in an order, making a full refund. 15445func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { 15446 c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15447 c.merchantId = merchantId 15448 c.orderId = orderId 15449 c.orderscancelrequest = orderscancelrequest 15450 return c 15451} 15452 15453// Fields allows partial responses to be retrieved. See 15454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15455// for more information. 15456func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { 15457 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15458 return c 15459} 15460 15461// Context sets the context to be used in this call's Do method. Any 15462// pending HTTP request will be aborted if the provided context is 15463// canceled. 15464func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { 15465 c.ctx_ = ctx 15466 return c 15467} 15468 15469// Header returns an http.Header that can be modified by the caller to 15470// add HTTP headers to the request. 15471func (c *OrdersCancelCall) Header() http.Header { 15472 if c.header_ == nil { 15473 c.header_ = make(http.Header) 15474 } 15475 return c.header_ 15476} 15477 15478func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { 15479 reqHeaders := make(http.Header) 15480 for k, v := range c.header_ { 15481 reqHeaders[k] = v 15482 } 15483 reqHeaders.Set("User-Agent", c.s.userAgent()) 15484 var body io.Reader = nil 15485 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) 15486 if err != nil { 15487 return nil, err 15488 } 15489 reqHeaders.Set("Content-Type", "application/json") 15490 c.urlParams_.Set("alt", alt) 15491 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") 15492 urls += "?" + c.urlParams_.Encode() 15493 req, _ := http.NewRequest("POST", urls, body) 15494 req.Header = reqHeaders 15495 googleapi.Expand(req.URL, map[string]string{ 15496 "merchantId": strconv.FormatUint(c.merchantId, 10), 15497 "orderId": c.orderId, 15498 }) 15499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15500} 15501 15502// Do executes the "content.orders.cancel" call. 15503// Exactly one of *OrdersCancelResponse or error will be non-nil. Any 15504// non-2xx status code is an error. Response headers are in either 15505// *OrdersCancelResponse.ServerResponse.Header or (if a response was 15506// returned at all) in error.(*googleapi.Error).Header. Use 15507// googleapi.IsNotModified to check whether the returned error was 15508// because http.StatusNotModified was returned. 15509func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { 15510 gensupport.SetOptions(c.urlParams_, opts...) 15511 res, err := c.doRequest("json") 15512 if res != nil && res.StatusCode == http.StatusNotModified { 15513 if res.Body != nil { 15514 res.Body.Close() 15515 } 15516 return nil, &googleapi.Error{ 15517 Code: res.StatusCode, 15518 Header: res.Header, 15519 } 15520 } 15521 if err != nil { 15522 return nil, err 15523 } 15524 defer googleapi.CloseBody(res) 15525 if err := googleapi.CheckResponse(res); err != nil { 15526 return nil, err 15527 } 15528 ret := &OrdersCancelResponse{ 15529 ServerResponse: googleapi.ServerResponse{ 15530 Header: res.Header, 15531 HTTPStatusCode: res.StatusCode, 15532 }, 15533 } 15534 target := &ret 15535 if err := gensupport.DecodeResponse(target, res); err != nil { 15536 return nil, err 15537 } 15538 return ret, nil 15539 // { 15540 // "description": "Cancels all line items in an order, making a full refund.", 15541 // "httpMethod": "POST", 15542 // "id": "content.orders.cancel", 15543 // "parameterOrder": [ 15544 // "merchantId", 15545 // "orderId" 15546 // ], 15547 // "parameters": { 15548 // "merchantId": { 15549 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 15550 // "format": "uint64", 15551 // "location": "path", 15552 // "required": true, 15553 // "type": "string" 15554 // }, 15555 // "orderId": { 15556 // "description": "The ID of the order to cancel.", 15557 // "location": "path", 15558 // "required": true, 15559 // "type": "string" 15560 // } 15561 // }, 15562 // "path": "{merchantId}/orders/{orderId}/cancel", 15563 // "request": { 15564 // "$ref": "OrdersCancelRequest" 15565 // }, 15566 // "response": { 15567 // "$ref": "OrdersCancelResponse" 15568 // }, 15569 // "scopes": [ 15570 // "https://www.googleapis.com/auth/content" 15571 // ] 15572 // } 15573 15574} 15575 15576// method id "content.orders.cancellineitem": 15577 15578type OrdersCancellineitemCall struct { 15579 s *APIService 15580 merchantId uint64 15581 orderId string 15582 orderscancellineitemrequest *OrdersCancelLineItemRequest 15583 urlParams_ gensupport.URLParams 15584 ctx_ context.Context 15585 header_ http.Header 15586} 15587 15588// Cancellineitem: Cancels a line item, making a full refund. 15589func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { 15590 c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15591 c.merchantId = merchantId 15592 c.orderId = orderId 15593 c.orderscancellineitemrequest = orderscancellineitemrequest 15594 return c 15595} 15596 15597// Fields allows partial responses to be retrieved. See 15598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15599// for more information. 15600func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { 15601 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15602 return c 15603} 15604 15605// Context sets the context to be used in this call's Do method. Any 15606// pending HTTP request will be aborted if the provided context is 15607// canceled. 15608func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { 15609 c.ctx_ = ctx 15610 return c 15611} 15612 15613// Header returns an http.Header that can be modified by the caller to 15614// add HTTP headers to the request. 15615func (c *OrdersCancellineitemCall) Header() http.Header { 15616 if c.header_ == nil { 15617 c.header_ = make(http.Header) 15618 } 15619 return c.header_ 15620} 15621 15622func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { 15623 reqHeaders := make(http.Header) 15624 for k, v := range c.header_ { 15625 reqHeaders[k] = v 15626 } 15627 reqHeaders.Set("User-Agent", c.s.userAgent()) 15628 var body io.Reader = nil 15629 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) 15630 if err != nil { 15631 return nil, err 15632 } 15633 reqHeaders.Set("Content-Type", "application/json") 15634 c.urlParams_.Set("alt", alt) 15635 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") 15636 urls += "?" + c.urlParams_.Encode() 15637 req, _ := http.NewRequest("POST", urls, body) 15638 req.Header = reqHeaders 15639 googleapi.Expand(req.URL, map[string]string{ 15640 "merchantId": strconv.FormatUint(c.merchantId, 10), 15641 "orderId": c.orderId, 15642 }) 15643 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15644} 15645 15646// Do executes the "content.orders.cancellineitem" call. 15647// Exactly one of *OrdersCancelLineItemResponse or error will be 15648// non-nil. Any non-2xx status code is an error. Response headers are in 15649// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a 15650// response was returned at all) in error.(*googleapi.Error).Header. Use 15651// googleapi.IsNotModified to check whether the returned error was 15652// because http.StatusNotModified was returned. 15653func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { 15654 gensupport.SetOptions(c.urlParams_, opts...) 15655 res, err := c.doRequest("json") 15656 if res != nil && res.StatusCode == http.StatusNotModified { 15657 if res.Body != nil { 15658 res.Body.Close() 15659 } 15660 return nil, &googleapi.Error{ 15661 Code: res.StatusCode, 15662 Header: res.Header, 15663 } 15664 } 15665 if err != nil { 15666 return nil, err 15667 } 15668 defer googleapi.CloseBody(res) 15669 if err := googleapi.CheckResponse(res); err != nil { 15670 return nil, err 15671 } 15672 ret := &OrdersCancelLineItemResponse{ 15673 ServerResponse: googleapi.ServerResponse{ 15674 Header: res.Header, 15675 HTTPStatusCode: res.StatusCode, 15676 }, 15677 } 15678 target := &ret 15679 if err := gensupport.DecodeResponse(target, res); err != nil { 15680 return nil, err 15681 } 15682 return ret, nil 15683 // { 15684 // "description": "Cancels a line item, making a full refund.", 15685 // "httpMethod": "POST", 15686 // "id": "content.orders.cancellineitem", 15687 // "parameterOrder": [ 15688 // "merchantId", 15689 // "orderId" 15690 // ], 15691 // "parameters": { 15692 // "merchantId": { 15693 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 15694 // "format": "uint64", 15695 // "location": "path", 15696 // "required": true, 15697 // "type": "string" 15698 // }, 15699 // "orderId": { 15700 // "description": "The ID of the order.", 15701 // "location": "path", 15702 // "required": true, 15703 // "type": "string" 15704 // } 15705 // }, 15706 // "path": "{merchantId}/orders/{orderId}/cancelLineItem", 15707 // "request": { 15708 // "$ref": "OrdersCancelLineItemRequest" 15709 // }, 15710 // "response": { 15711 // "$ref": "OrdersCancelLineItemResponse" 15712 // }, 15713 // "scopes": [ 15714 // "https://www.googleapis.com/auth/content" 15715 // ] 15716 // } 15717 15718} 15719 15720// method id "content.orders.createtestorder": 15721 15722type OrdersCreatetestorderCall struct { 15723 s *APIService 15724 merchantId uint64 15725 orderscreatetestorderrequest *OrdersCreateTestOrderRequest 15726 urlParams_ gensupport.URLParams 15727 ctx_ context.Context 15728 header_ http.Header 15729} 15730 15731// Createtestorder: Sandbox only. Creates a test order. 15732func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { 15733 c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15734 c.merchantId = merchantId 15735 c.orderscreatetestorderrequest = orderscreatetestorderrequest 15736 return c 15737} 15738 15739// Fields allows partial responses to be retrieved. See 15740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15741// for more information. 15742func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { 15743 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15744 return c 15745} 15746 15747// Context sets the context to be used in this call's Do method. Any 15748// pending HTTP request will be aborted if the provided context is 15749// canceled. 15750func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { 15751 c.ctx_ = ctx 15752 return c 15753} 15754 15755// Header returns an http.Header that can be modified by the caller to 15756// add HTTP headers to the request. 15757func (c *OrdersCreatetestorderCall) Header() http.Header { 15758 if c.header_ == nil { 15759 c.header_ = make(http.Header) 15760 } 15761 return c.header_ 15762} 15763 15764func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { 15765 reqHeaders := make(http.Header) 15766 for k, v := range c.header_ { 15767 reqHeaders[k] = v 15768 } 15769 reqHeaders.Set("User-Agent", c.s.userAgent()) 15770 var body io.Reader = nil 15771 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) 15772 if err != nil { 15773 return nil, err 15774 } 15775 reqHeaders.Set("Content-Type", "application/json") 15776 c.urlParams_.Set("alt", alt) 15777 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") 15778 urls += "?" + c.urlParams_.Encode() 15779 req, _ := http.NewRequest("POST", urls, body) 15780 req.Header = reqHeaders 15781 googleapi.Expand(req.URL, map[string]string{ 15782 "merchantId": strconv.FormatUint(c.merchantId, 10), 15783 }) 15784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15785} 15786 15787// Do executes the "content.orders.createtestorder" call. 15788// Exactly one of *OrdersCreateTestOrderResponse or error will be 15789// non-nil. Any non-2xx status code is an error. Response headers are in 15790// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a 15791// response was returned at all) in error.(*googleapi.Error).Header. Use 15792// googleapi.IsNotModified to check whether the returned error was 15793// because http.StatusNotModified was returned. 15794func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { 15795 gensupport.SetOptions(c.urlParams_, opts...) 15796 res, err := c.doRequest("json") 15797 if res != nil && res.StatusCode == http.StatusNotModified { 15798 if res.Body != nil { 15799 res.Body.Close() 15800 } 15801 return nil, &googleapi.Error{ 15802 Code: res.StatusCode, 15803 Header: res.Header, 15804 } 15805 } 15806 if err != nil { 15807 return nil, err 15808 } 15809 defer googleapi.CloseBody(res) 15810 if err := googleapi.CheckResponse(res); err != nil { 15811 return nil, err 15812 } 15813 ret := &OrdersCreateTestOrderResponse{ 15814 ServerResponse: googleapi.ServerResponse{ 15815 Header: res.Header, 15816 HTTPStatusCode: res.StatusCode, 15817 }, 15818 } 15819 target := &ret 15820 if err := gensupport.DecodeResponse(target, res); err != nil { 15821 return nil, err 15822 } 15823 return ret, nil 15824 // { 15825 // "description": "Sandbox only. Creates a test order.", 15826 // "httpMethod": "POST", 15827 // "id": "content.orders.createtestorder", 15828 // "parameterOrder": [ 15829 // "merchantId" 15830 // ], 15831 // "parameters": { 15832 // "merchantId": { 15833 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 15834 // "format": "uint64", 15835 // "location": "path", 15836 // "required": true, 15837 // "type": "string" 15838 // } 15839 // }, 15840 // "path": "{merchantId}/testorders", 15841 // "request": { 15842 // "$ref": "OrdersCreateTestOrderRequest" 15843 // }, 15844 // "response": { 15845 // "$ref": "OrdersCreateTestOrderResponse" 15846 // }, 15847 // "scopes": [ 15848 // "https://www.googleapis.com/auth/content" 15849 // ] 15850 // } 15851 15852} 15853 15854// method id "content.orders.custombatch": 15855 15856type OrdersCustombatchCall struct { 15857 s *APIService 15858 orderscustombatchrequest *OrdersCustomBatchRequest 15859 urlParams_ gensupport.URLParams 15860 ctx_ context.Context 15861 header_ http.Header 15862} 15863 15864// Custombatch: Retrieves or modifies multiple orders in a single 15865// request. 15866func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall { 15867 c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15868 c.orderscustombatchrequest = orderscustombatchrequest 15869 return c 15870} 15871 15872// Fields allows partial responses to be retrieved. See 15873// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15874// for more information. 15875func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall { 15876 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15877 return c 15878} 15879 15880// Context sets the context to be used in this call's Do method. Any 15881// pending HTTP request will be aborted if the provided context is 15882// canceled. 15883func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall { 15884 c.ctx_ = ctx 15885 return c 15886} 15887 15888// Header returns an http.Header that can be modified by the caller to 15889// add HTTP headers to the request. 15890func (c *OrdersCustombatchCall) Header() http.Header { 15891 if c.header_ == nil { 15892 c.header_ = make(http.Header) 15893 } 15894 return c.header_ 15895} 15896 15897func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) { 15898 reqHeaders := make(http.Header) 15899 for k, v := range c.header_ { 15900 reqHeaders[k] = v 15901 } 15902 reqHeaders.Set("User-Agent", c.s.userAgent()) 15903 var body io.Reader = nil 15904 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest) 15905 if err != nil { 15906 return nil, err 15907 } 15908 reqHeaders.Set("Content-Type", "application/json") 15909 c.urlParams_.Set("alt", alt) 15910 urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch") 15911 urls += "?" + c.urlParams_.Encode() 15912 req, _ := http.NewRequest("POST", urls, body) 15913 req.Header = reqHeaders 15914 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15915} 15916 15917// Do executes the "content.orders.custombatch" call. 15918// Exactly one of *OrdersCustomBatchResponse or error will be non-nil. 15919// Any non-2xx status code is an error. Response headers are in either 15920// *OrdersCustomBatchResponse.ServerResponse.Header or (if a response 15921// was returned at all) in error.(*googleapi.Error).Header. Use 15922// googleapi.IsNotModified to check whether the returned error was 15923// because http.StatusNotModified was returned. 15924func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) { 15925 gensupport.SetOptions(c.urlParams_, opts...) 15926 res, err := c.doRequest("json") 15927 if res != nil && res.StatusCode == http.StatusNotModified { 15928 if res.Body != nil { 15929 res.Body.Close() 15930 } 15931 return nil, &googleapi.Error{ 15932 Code: res.StatusCode, 15933 Header: res.Header, 15934 } 15935 } 15936 if err != nil { 15937 return nil, err 15938 } 15939 defer googleapi.CloseBody(res) 15940 if err := googleapi.CheckResponse(res); err != nil { 15941 return nil, err 15942 } 15943 ret := &OrdersCustomBatchResponse{ 15944 ServerResponse: googleapi.ServerResponse{ 15945 Header: res.Header, 15946 HTTPStatusCode: res.StatusCode, 15947 }, 15948 } 15949 target := &ret 15950 if err := gensupport.DecodeResponse(target, res); err != nil { 15951 return nil, err 15952 } 15953 return ret, nil 15954 // { 15955 // "description": "Retrieves or modifies multiple orders in a single request.", 15956 // "httpMethod": "POST", 15957 // "id": "content.orders.custombatch", 15958 // "path": "orders/batch", 15959 // "request": { 15960 // "$ref": "OrdersCustomBatchRequest" 15961 // }, 15962 // "response": { 15963 // "$ref": "OrdersCustomBatchResponse" 15964 // }, 15965 // "scopes": [ 15966 // "https://www.googleapis.com/auth/content" 15967 // ] 15968 // } 15969 15970} 15971 15972// method id "content.orders.get": 15973 15974type OrdersGetCall struct { 15975 s *APIService 15976 merchantId uint64 15977 orderId string 15978 urlParams_ gensupport.URLParams 15979 ifNoneMatch_ string 15980 ctx_ context.Context 15981 header_ http.Header 15982} 15983 15984// Get: Retrieves an order from your Merchant Center account. 15985func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { 15986 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15987 c.merchantId = merchantId 15988 c.orderId = orderId 15989 return c 15990} 15991 15992// Fields allows partial responses to be retrieved. See 15993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15994// for more information. 15995func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { 15996 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15997 return c 15998} 15999 16000// IfNoneMatch sets the optional parameter which makes the operation 16001// fail if the object's ETag matches the given value. This is useful for 16002// getting updates only after the object has changed since the last 16003// request. Use googleapi.IsNotModified to check whether the response 16004// error from Do is the result of In-None-Match. 16005func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { 16006 c.ifNoneMatch_ = entityTag 16007 return c 16008} 16009 16010// Context sets the context to be used in this call's Do method. Any 16011// pending HTTP request will be aborted if the provided context is 16012// canceled. 16013func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { 16014 c.ctx_ = ctx 16015 return c 16016} 16017 16018// Header returns an http.Header that can be modified by the caller to 16019// add HTTP headers to the request. 16020func (c *OrdersGetCall) Header() http.Header { 16021 if c.header_ == nil { 16022 c.header_ = make(http.Header) 16023 } 16024 return c.header_ 16025} 16026 16027func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { 16028 reqHeaders := make(http.Header) 16029 for k, v := range c.header_ { 16030 reqHeaders[k] = v 16031 } 16032 reqHeaders.Set("User-Agent", c.s.userAgent()) 16033 if c.ifNoneMatch_ != "" { 16034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16035 } 16036 var body io.Reader = nil 16037 c.urlParams_.Set("alt", alt) 16038 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") 16039 urls += "?" + c.urlParams_.Encode() 16040 req, _ := http.NewRequest("GET", urls, body) 16041 req.Header = reqHeaders 16042 googleapi.Expand(req.URL, map[string]string{ 16043 "merchantId": strconv.FormatUint(c.merchantId, 10), 16044 "orderId": c.orderId, 16045 }) 16046 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16047} 16048 16049// Do executes the "content.orders.get" call. 16050// Exactly one of *Order or error will be non-nil. Any non-2xx status 16051// code is an error. Response headers are in either 16052// *Order.ServerResponse.Header or (if a response was returned at all) 16053// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16054// check whether the returned error was because http.StatusNotModified 16055// was returned. 16056func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { 16057 gensupport.SetOptions(c.urlParams_, opts...) 16058 res, err := c.doRequest("json") 16059 if res != nil && res.StatusCode == http.StatusNotModified { 16060 if res.Body != nil { 16061 res.Body.Close() 16062 } 16063 return nil, &googleapi.Error{ 16064 Code: res.StatusCode, 16065 Header: res.Header, 16066 } 16067 } 16068 if err != nil { 16069 return nil, err 16070 } 16071 defer googleapi.CloseBody(res) 16072 if err := googleapi.CheckResponse(res); err != nil { 16073 return nil, err 16074 } 16075 ret := &Order{ 16076 ServerResponse: googleapi.ServerResponse{ 16077 Header: res.Header, 16078 HTTPStatusCode: res.StatusCode, 16079 }, 16080 } 16081 target := &ret 16082 if err := gensupport.DecodeResponse(target, res); err != nil { 16083 return nil, err 16084 } 16085 return ret, nil 16086 // { 16087 // "description": "Retrieves an order from your Merchant Center account.", 16088 // "httpMethod": "GET", 16089 // "id": "content.orders.get", 16090 // "parameterOrder": [ 16091 // "merchantId", 16092 // "orderId" 16093 // ], 16094 // "parameters": { 16095 // "merchantId": { 16096 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 16097 // "format": "uint64", 16098 // "location": "path", 16099 // "required": true, 16100 // "type": "string" 16101 // }, 16102 // "orderId": { 16103 // "description": "The ID of the order.", 16104 // "location": "path", 16105 // "required": true, 16106 // "type": "string" 16107 // } 16108 // }, 16109 // "path": "{merchantId}/orders/{orderId}", 16110 // "response": { 16111 // "$ref": "Order" 16112 // }, 16113 // "scopes": [ 16114 // "https://www.googleapis.com/auth/content" 16115 // ] 16116 // } 16117 16118} 16119 16120// method id "content.orders.getbymerchantorderid": 16121 16122type OrdersGetbymerchantorderidCall struct { 16123 s *APIService 16124 merchantId uint64 16125 merchantOrderId string 16126 urlParams_ gensupport.URLParams 16127 ifNoneMatch_ string 16128 ctx_ context.Context 16129 header_ http.Header 16130} 16131 16132// Getbymerchantorderid: Retrieves an order using merchant order id. 16133func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { 16134 c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16135 c.merchantId = merchantId 16136 c.merchantOrderId = merchantOrderId 16137 return c 16138} 16139 16140// Fields allows partial responses to be retrieved. See 16141// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16142// for more information. 16143func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { 16144 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16145 return c 16146} 16147 16148// IfNoneMatch sets the optional parameter which makes the operation 16149// fail if the object's ETag matches the given value. This is useful for 16150// getting updates only after the object has changed since the last 16151// request. Use googleapi.IsNotModified to check whether the response 16152// error from Do is the result of In-None-Match. 16153func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { 16154 c.ifNoneMatch_ = entityTag 16155 return c 16156} 16157 16158// Context sets the context to be used in this call's Do method. Any 16159// pending HTTP request will be aborted if the provided context is 16160// canceled. 16161func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { 16162 c.ctx_ = ctx 16163 return c 16164} 16165 16166// Header returns an http.Header that can be modified by the caller to 16167// add HTTP headers to the request. 16168func (c *OrdersGetbymerchantorderidCall) Header() http.Header { 16169 if c.header_ == nil { 16170 c.header_ = make(http.Header) 16171 } 16172 return c.header_ 16173} 16174 16175func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { 16176 reqHeaders := make(http.Header) 16177 for k, v := range c.header_ { 16178 reqHeaders[k] = v 16179 } 16180 reqHeaders.Set("User-Agent", c.s.userAgent()) 16181 if c.ifNoneMatch_ != "" { 16182 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16183 } 16184 var body io.Reader = nil 16185 c.urlParams_.Set("alt", alt) 16186 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") 16187 urls += "?" + c.urlParams_.Encode() 16188 req, _ := http.NewRequest("GET", urls, body) 16189 req.Header = reqHeaders 16190 googleapi.Expand(req.URL, map[string]string{ 16191 "merchantId": strconv.FormatUint(c.merchantId, 10), 16192 "merchantOrderId": c.merchantOrderId, 16193 }) 16194 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16195} 16196 16197// Do executes the "content.orders.getbymerchantorderid" call. 16198// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be 16199// non-nil. Any non-2xx status code is an error. Response headers are in 16200// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or 16201// (if a response was returned at all) in 16202// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16203// whether the returned error was because http.StatusNotModified was 16204// returned. 16205func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { 16206 gensupport.SetOptions(c.urlParams_, opts...) 16207 res, err := c.doRequest("json") 16208 if res != nil && res.StatusCode == http.StatusNotModified { 16209 if res.Body != nil { 16210 res.Body.Close() 16211 } 16212 return nil, &googleapi.Error{ 16213 Code: res.StatusCode, 16214 Header: res.Header, 16215 } 16216 } 16217 if err != nil { 16218 return nil, err 16219 } 16220 defer googleapi.CloseBody(res) 16221 if err := googleapi.CheckResponse(res); err != nil { 16222 return nil, err 16223 } 16224 ret := &OrdersGetByMerchantOrderIdResponse{ 16225 ServerResponse: googleapi.ServerResponse{ 16226 Header: res.Header, 16227 HTTPStatusCode: res.StatusCode, 16228 }, 16229 } 16230 target := &ret 16231 if err := gensupport.DecodeResponse(target, res); err != nil { 16232 return nil, err 16233 } 16234 return ret, nil 16235 // { 16236 // "description": "Retrieves an order using merchant order id.", 16237 // "httpMethod": "GET", 16238 // "id": "content.orders.getbymerchantorderid", 16239 // "parameterOrder": [ 16240 // "merchantId", 16241 // "merchantOrderId" 16242 // ], 16243 // "parameters": { 16244 // "merchantId": { 16245 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 16246 // "format": "uint64", 16247 // "location": "path", 16248 // "required": true, 16249 // "type": "string" 16250 // }, 16251 // "merchantOrderId": { 16252 // "description": "The merchant order id to be looked for.", 16253 // "location": "path", 16254 // "required": true, 16255 // "type": "string" 16256 // } 16257 // }, 16258 // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 16259 // "response": { 16260 // "$ref": "OrdersGetByMerchantOrderIdResponse" 16261 // }, 16262 // "scopes": [ 16263 // "https://www.googleapis.com/auth/content" 16264 // ] 16265 // } 16266 16267} 16268 16269// method id "content.orders.gettestordertemplate": 16270 16271type OrdersGettestordertemplateCall struct { 16272 s *APIService 16273 merchantId uint64 16274 templateName string 16275 urlParams_ gensupport.URLParams 16276 ifNoneMatch_ string 16277 ctx_ context.Context 16278 header_ http.Header 16279} 16280 16281// Gettestordertemplate: Sandbox only. Retrieves an order template that 16282// can be used to quickly create a new order in sandbox. 16283func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { 16284 c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16285 c.merchantId = merchantId 16286 c.templateName = templateName 16287 return c 16288} 16289 16290// Fields allows partial responses to be retrieved. See 16291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16292// for more information. 16293func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { 16294 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16295 return c 16296} 16297 16298// IfNoneMatch sets the optional parameter which makes the operation 16299// fail if the object's ETag matches the given value. This is useful for 16300// getting updates only after the object has changed since the last 16301// request. Use googleapi.IsNotModified to check whether the response 16302// error from Do is the result of In-None-Match. 16303func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { 16304 c.ifNoneMatch_ = entityTag 16305 return c 16306} 16307 16308// Context sets the context to be used in this call's Do method. Any 16309// pending HTTP request will be aborted if the provided context is 16310// canceled. 16311func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { 16312 c.ctx_ = ctx 16313 return c 16314} 16315 16316// Header returns an http.Header that can be modified by the caller to 16317// add HTTP headers to the request. 16318func (c *OrdersGettestordertemplateCall) Header() http.Header { 16319 if c.header_ == nil { 16320 c.header_ = make(http.Header) 16321 } 16322 return c.header_ 16323} 16324 16325func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { 16326 reqHeaders := make(http.Header) 16327 for k, v := range c.header_ { 16328 reqHeaders[k] = v 16329 } 16330 reqHeaders.Set("User-Agent", c.s.userAgent()) 16331 if c.ifNoneMatch_ != "" { 16332 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16333 } 16334 var body io.Reader = nil 16335 c.urlParams_.Set("alt", alt) 16336 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") 16337 urls += "?" + c.urlParams_.Encode() 16338 req, _ := http.NewRequest("GET", urls, body) 16339 req.Header = reqHeaders 16340 googleapi.Expand(req.URL, map[string]string{ 16341 "merchantId": strconv.FormatUint(c.merchantId, 10), 16342 "templateName": c.templateName, 16343 }) 16344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16345} 16346 16347// Do executes the "content.orders.gettestordertemplate" call. 16348// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be 16349// non-nil. Any non-2xx status code is an error. Response headers are in 16350// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or 16351// (if a response was returned at all) in 16352// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16353// whether the returned error was because http.StatusNotModified was 16354// returned. 16355func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { 16356 gensupport.SetOptions(c.urlParams_, opts...) 16357 res, err := c.doRequest("json") 16358 if res != nil && res.StatusCode == http.StatusNotModified { 16359 if res.Body != nil { 16360 res.Body.Close() 16361 } 16362 return nil, &googleapi.Error{ 16363 Code: res.StatusCode, 16364 Header: res.Header, 16365 } 16366 } 16367 if err != nil { 16368 return nil, err 16369 } 16370 defer googleapi.CloseBody(res) 16371 if err := googleapi.CheckResponse(res); err != nil { 16372 return nil, err 16373 } 16374 ret := &OrdersGetTestOrderTemplateResponse{ 16375 ServerResponse: googleapi.ServerResponse{ 16376 Header: res.Header, 16377 HTTPStatusCode: res.StatusCode, 16378 }, 16379 } 16380 target := &ret 16381 if err := gensupport.DecodeResponse(target, res); err != nil { 16382 return nil, err 16383 } 16384 return ret, nil 16385 // { 16386 // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", 16387 // "httpMethod": "GET", 16388 // "id": "content.orders.gettestordertemplate", 16389 // "parameterOrder": [ 16390 // "merchantId", 16391 // "templateName" 16392 // ], 16393 // "parameters": { 16394 // "merchantId": { 16395 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 16396 // "format": "uint64", 16397 // "location": "path", 16398 // "required": true, 16399 // "type": "string" 16400 // }, 16401 // "templateName": { 16402 // "description": "The name of the template to retrieve.", 16403 // "enum": [ 16404 // "template1", 16405 // "template1a", 16406 // "template1b", 16407 // "template2" 16408 // ], 16409 // "enumDescriptions": [ 16410 // "", 16411 // "", 16412 // "", 16413 // "" 16414 // ], 16415 // "location": "path", 16416 // "required": true, 16417 // "type": "string" 16418 // } 16419 // }, 16420 // "path": "{merchantId}/testordertemplates/{templateName}", 16421 // "response": { 16422 // "$ref": "OrdersGetTestOrderTemplateResponse" 16423 // }, 16424 // "scopes": [ 16425 // "https://www.googleapis.com/auth/content" 16426 // ] 16427 // } 16428 16429} 16430 16431// method id "content.orders.instorerefundlineitem": 16432 16433type OrdersInstorerefundlineitemCall struct { 16434 s *APIService 16435 merchantId uint64 16436 orderId string 16437 ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest 16438 urlParams_ gensupport.URLParams 16439 ctx_ context.Context 16440 header_ http.Header 16441} 16442 16443// Instorerefundlineitem: Notifies that item return and refund was 16444// handled directly in store. 16445func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { 16446 c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16447 c.merchantId = merchantId 16448 c.orderId = orderId 16449 c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest 16450 return c 16451} 16452 16453// Fields allows partial responses to be retrieved. See 16454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16455// for more information. 16456func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { 16457 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16458 return c 16459} 16460 16461// Context sets the context to be used in this call's Do method. Any 16462// pending HTTP request will be aborted if the provided context is 16463// canceled. 16464func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { 16465 c.ctx_ = ctx 16466 return c 16467} 16468 16469// Header returns an http.Header that can be modified by the caller to 16470// add HTTP headers to the request. 16471func (c *OrdersInstorerefundlineitemCall) Header() http.Header { 16472 if c.header_ == nil { 16473 c.header_ = make(http.Header) 16474 } 16475 return c.header_ 16476} 16477 16478func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { 16479 reqHeaders := make(http.Header) 16480 for k, v := range c.header_ { 16481 reqHeaders[k] = v 16482 } 16483 reqHeaders.Set("User-Agent", c.s.userAgent()) 16484 var body io.Reader = nil 16485 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) 16486 if err != nil { 16487 return nil, err 16488 } 16489 reqHeaders.Set("Content-Type", "application/json") 16490 c.urlParams_.Set("alt", alt) 16491 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") 16492 urls += "?" + c.urlParams_.Encode() 16493 req, _ := http.NewRequest("POST", urls, body) 16494 req.Header = reqHeaders 16495 googleapi.Expand(req.URL, map[string]string{ 16496 "merchantId": strconv.FormatUint(c.merchantId, 10), 16497 "orderId": c.orderId, 16498 }) 16499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16500} 16501 16502// Do executes the "content.orders.instorerefundlineitem" call. 16503// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be 16504// non-nil. Any non-2xx status code is an error. Response headers are in 16505// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or 16506// (if a response was returned at all) in 16507// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16508// whether the returned error was because http.StatusNotModified was 16509// returned. 16510func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { 16511 gensupport.SetOptions(c.urlParams_, opts...) 16512 res, err := c.doRequest("json") 16513 if res != nil && res.StatusCode == http.StatusNotModified { 16514 if res.Body != nil { 16515 res.Body.Close() 16516 } 16517 return nil, &googleapi.Error{ 16518 Code: res.StatusCode, 16519 Header: res.Header, 16520 } 16521 } 16522 if err != nil { 16523 return nil, err 16524 } 16525 defer googleapi.CloseBody(res) 16526 if err := googleapi.CheckResponse(res); err != nil { 16527 return nil, err 16528 } 16529 ret := &OrdersInStoreRefundLineItemResponse{ 16530 ServerResponse: googleapi.ServerResponse{ 16531 Header: res.Header, 16532 HTTPStatusCode: res.StatusCode, 16533 }, 16534 } 16535 target := &ret 16536 if err := gensupport.DecodeResponse(target, res); err != nil { 16537 return nil, err 16538 } 16539 return ret, nil 16540 // { 16541 // "description": "Notifies that item return and refund was handled directly in store.", 16542 // "httpMethod": "POST", 16543 // "id": "content.orders.instorerefundlineitem", 16544 // "parameterOrder": [ 16545 // "merchantId", 16546 // "orderId" 16547 // ], 16548 // "parameters": { 16549 // "merchantId": { 16550 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 16551 // "format": "uint64", 16552 // "location": "path", 16553 // "required": true, 16554 // "type": "string" 16555 // }, 16556 // "orderId": { 16557 // "description": "The ID of the order.", 16558 // "location": "path", 16559 // "required": true, 16560 // "type": "string" 16561 // } 16562 // }, 16563 // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 16564 // "request": { 16565 // "$ref": "OrdersInStoreRefundLineItemRequest" 16566 // }, 16567 // "response": { 16568 // "$ref": "OrdersInStoreRefundLineItemResponse" 16569 // }, 16570 // "scopes": [ 16571 // "https://www.googleapis.com/auth/content" 16572 // ] 16573 // } 16574 16575} 16576 16577// method id "content.orders.list": 16578 16579type OrdersListCall struct { 16580 s *APIService 16581 merchantId uint64 16582 urlParams_ gensupport.URLParams 16583 ifNoneMatch_ string 16584 ctx_ context.Context 16585 header_ http.Header 16586} 16587 16588// List: Lists the orders in your Merchant Center account. 16589func (r *OrdersService) List(merchantId uint64) *OrdersListCall { 16590 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16591 c.merchantId = merchantId 16592 return c 16593} 16594 16595// Acknowledged sets the optional parameter "acknowledged": Obtains 16596// orders that match the acknowledgement status. When set to true, 16597// obtains orders that have been acknowledged. When false, obtains 16598// orders that have not been acknowledged. 16599// We recommend using this filter set to false, in conjunction with the 16600// acknowledge call, such that only un-acknowledged orders are returned. 16601func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { 16602 c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) 16603 return c 16604} 16605 16606// MaxResults sets the optional parameter "maxResults": The maximum 16607// number of orders to return in the response, used for paging. The 16608// default value is 25 orders per page, and the maximum allowed value is 16609// 250 orders per page. 16610// Known issue: All List calls will return all Orders without limit 16611// regardless of the value of this field. 16612func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { 16613 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 16614 return c 16615} 16616 16617// OrderBy sets the optional parameter "orderBy": The ordering of the 16618// returned list. The only supported value are placedDate desc and 16619// placedDate asc for now, which returns orders sorted by placement 16620// date. "placedDate desc" stands for listing orders by placement date, 16621// from oldest to most recent. "placedDate asc" stands for listing 16622// orders by placement date, from most recent to oldest. In future 16623// releases we'll support other sorting criteria. 16624// 16625// Possible values: 16626// "placedDate asc" 16627// "placedDate desc" 16628func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { 16629 c.urlParams_.Set("orderBy", orderBy) 16630 return c 16631} 16632 16633// PageToken sets the optional parameter "pageToken": The token returned 16634// by the previous request. 16635func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { 16636 c.urlParams_.Set("pageToken", pageToken) 16637 return c 16638} 16639 16640// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains 16641// orders placed before this date (exclusively), in ISO 8601 format. 16642func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { 16643 c.urlParams_.Set("placedDateEnd", placedDateEnd) 16644 return c 16645} 16646 16647// PlacedDateStart sets the optional parameter "placedDateStart": 16648// Obtains orders placed after this date (inclusively), in ISO 8601 16649// format. 16650func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { 16651 c.urlParams_.Set("placedDateStart", placedDateStart) 16652 return c 16653} 16654 16655// Statuses sets the optional parameter "statuses": Obtains orders that 16656// match any of the specified statuses. Multiple values can be specified 16657// with comma separation. Additionally, please note that active is a 16658// shortcut for pendingShipment and partiallyShipped, and completed is a 16659// shortcut for shipped , partiallyDelivered, delivered, 16660// partiallyReturned, returned, and canceled. 16661// 16662// Possible values: 16663// "active" 16664// "canceled" 16665// "completed" 16666// "delivered" 16667// "inProgress" 16668// "partiallyDelivered" 16669// "partiallyReturned" 16670// "partiallyShipped" 16671// "pendingShipment" 16672// "returned" 16673// "shipped" 16674func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { 16675 c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) 16676 return c 16677} 16678 16679// Fields allows partial responses to be retrieved. See 16680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16681// for more information. 16682func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { 16683 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16684 return c 16685} 16686 16687// IfNoneMatch sets the optional parameter which makes the operation 16688// fail if the object's ETag matches the given value. This is useful for 16689// getting updates only after the object has changed since the last 16690// request. Use googleapi.IsNotModified to check whether the response 16691// error from Do is the result of In-None-Match. 16692func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { 16693 c.ifNoneMatch_ = entityTag 16694 return c 16695} 16696 16697// Context sets the context to be used in this call's Do method. Any 16698// pending HTTP request will be aborted if the provided context is 16699// canceled. 16700func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { 16701 c.ctx_ = ctx 16702 return c 16703} 16704 16705// Header returns an http.Header that can be modified by the caller to 16706// add HTTP headers to the request. 16707func (c *OrdersListCall) Header() http.Header { 16708 if c.header_ == nil { 16709 c.header_ = make(http.Header) 16710 } 16711 return c.header_ 16712} 16713 16714func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { 16715 reqHeaders := make(http.Header) 16716 for k, v := range c.header_ { 16717 reqHeaders[k] = v 16718 } 16719 reqHeaders.Set("User-Agent", c.s.userAgent()) 16720 if c.ifNoneMatch_ != "" { 16721 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16722 } 16723 var body io.Reader = nil 16724 c.urlParams_.Set("alt", alt) 16725 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") 16726 urls += "?" + c.urlParams_.Encode() 16727 req, _ := http.NewRequest("GET", urls, body) 16728 req.Header = reqHeaders 16729 googleapi.Expand(req.URL, map[string]string{ 16730 "merchantId": strconv.FormatUint(c.merchantId, 10), 16731 }) 16732 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16733} 16734 16735// Do executes the "content.orders.list" call. 16736// Exactly one of *OrdersListResponse or error will be non-nil. Any 16737// non-2xx status code is an error. Response headers are in either 16738// *OrdersListResponse.ServerResponse.Header or (if a response was 16739// returned at all) in error.(*googleapi.Error).Header. Use 16740// googleapi.IsNotModified to check whether the returned error was 16741// because http.StatusNotModified was returned. 16742func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { 16743 gensupport.SetOptions(c.urlParams_, opts...) 16744 res, err := c.doRequest("json") 16745 if res != nil && res.StatusCode == http.StatusNotModified { 16746 if res.Body != nil { 16747 res.Body.Close() 16748 } 16749 return nil, &googleapi.Error{ 16750 Code: res.StatusCode, 16751 Header: res.Header, 16752 } 16753 } 16754 if err != nil { 16755 return nil, err 16756 } 16757 defer googleapi.CloseBody(res) 16758 if err := googleapi.CheckResponse(res); err != nil { 16759 return nil, err 16760 } 16761 ret := &OrdersListResponse{ 16762 ServerResponse: googleapi.ServerResponse{ 16763 Header: res.Header, 16764 HTTPStatusCode: res.StatusCode, 16765 }, 16766 } 16767 target := &ret 16768 if err := gensupport.DecodeResponse(target, res); err != nil { 16769 return nil, err 16770 } 16771 return ret, nil 16772 // { 16773 // "description": "Lists the orders in your Merchant Center account.", 16774 // "httpMethod": "GET", 16775 // "id": "content.orders.list", 16776 // "parameterOrder": [ 16777 // "merchantId" 16778 // ], 16779 // "parameters": { 16780 // "acknowledged": { 16781 // "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.\nWe recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned.", 16782 // "location": "query", 16783 // "type": "boolean" 16784 // }, 16785 // "maxResults": { 16786 // "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.\nKnown issue: All List calls will return all Orders without limit regardless of the value of this field.", 16787 // "format": "uint32", 16788 // "location": "query", 16789 // "type": "integer" 16790 // }, 16791 // "merchantId": { 16792 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 16793 // "format": "uint64", 16794 // "location": "path", 16795 // "required": true, 16796 // "type": "string" 16797 // }, 16798 // "orderBy": { 16799 // "description": "The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. \"placedDate desc\" stands for listing orders by placement date, from oldest to most recent. \"placedDate asc\" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria.", 16800 // "enum": [ 16801 // "placedDate asc", 16802 // "placedDate desc" 16803 // ], 16804 // "enumDescriptions": [ 16805 // "", 16806 // "" 16807 // ], 16808 // "location": "query", 16809 // "type": "string" 16810 // }, 16811 // "pageToken": { 16812 // "description": "The token returned by the previous request.", 16813 // "location": "query", 16814 // "type": "string" 16815 // }, 16816 // "placedDateEnd": { 16817 // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", 16818 // "location": "query", 16819 // "type": "string" 16820 // }, 16821 // "placedDateStart": { 16822 // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", 16823 // "location": "query", 16824 // "type": "string" 16825 // }, 16826 // "statuses": { 16827 // "description": "Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled.", 16828 // "enum": [ 16829 // "active", 16830 // "canceled", 16831 // "completed", 16832 // "delivered", 16833 // "inProgress", 16834 // "partiallyDelivered", 16835 // "partiallyReturned", 16836 // "partiallyShipped", 16837 // "pendingShipment", 16838 // "returned", 16839 // "shipped" 16840 // ], 16841 // "enumDescriptions": [ 16842 // "", 16843 // "", 16844 // "", 16845 // "", 16846 // "", 16847 // "", 16848 // "", 16849 // "", 16850 // "", 16851 // "", 16852 // "" 16853 // ], 16854 // "location": "query", 16855 // "repeated": true, 16856 // "type": "string" 16857 // } 16858 // }, 16859 // "path": "{merchantId}/orders", 16860 // "response": { 16861 // "$ref": "OrdersListResponse" 16862 // }, 16863 // "scopes": [ 16864 // "https://www.googleapis.com/auth/content" 16865 // ] 16866 // } 16867 16868} 16869 16870// Pages invokes f for each page of results. 16871// A non-nil error returned from f will halt the iteration. 16872// The provided context supersedes any context provided to the Context method. 16873func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { 16874 c.ctx_ = ctx 16875 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16876 for { 16877 x, err := c.Do() 16878 if err != nil { 16879 return err 16880 } 16881 if err := f(x); err != nil { 16882 return err 16883 } 16884 if x.NextPageToken == "" { 16885 return nil 16886 } 16887 c.PageToken(x.NextPageToken) 16888 } 16889} 16890 16891// method id "content.orders.refund": 16892 16893type OrdersRefundCall struct { 16894 s *APIService 16895 merchantId uint64 16896 orderId string 16897 ordersrefundrequest *OrdersRefundRequest 16898 urlParams_ gensupport.URLParams 16899 ctx_ context.Context 16900 header_ http.Header 16901} 16902 16903// Refund: Refund a portion of the order, up to the full amount paid. 16904func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall { 16905 c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16906 c.merchantId = merchantId 16907 c.orderId = orderId 16908 c.ordersrefundrequest = ordersrefundrequest 16909 return c 16910} 16911 16912// Fields allows partial responses to be retrieved. See 16913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16914// for more information. 16915func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall { 16916 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16917 return c 16918} 16919 16920// Context sets the context to be used in this call's Do method. Any 16921// pending HTTP request will be aborted if the provided context is 16922// canceled. 16923func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall { 16924 c.ctx_ = ctx 16925 return c 16926} 16927 16928// Header returns an http.Header that can be modified by the caller to 16929// add HTTP headers to the request. 16930func (c *OrdersRefundCall) Header() http.Header { 16931 if c.header_ == nil { 16932 c.header_ = make(http.Header) 16933 } 16934 return c.header_ 16935} 16936 16937func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) { 16938 reqHeaders := make(http.Header) 16939 for k, v := range c.header_ { 16940 reqHeaders[k] = v 16941 } 16942 reqHeaders.Set("User-Agent", c.s.userAgent()) 16943 var body io.Reader = nil 16944 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest) 16945 if err != nil { 16946 return nil, err 16947 } 16948 reqHeaders.Set("Content-Type", "application/json") 16949 c.urlParams_.Set("alt", alt) 16950 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund") 16951 urls += "?" + c.urlParams_.Encode() 16952 req, _ := http.NewRequest("POST", urls, body) 16953 req.Header = reqHeaders 16954 googleapi.Expand(req.URL, map[string]string{ 16955 "merchantId": strconv.FormatUint(c.merchantId, 10), 16956 "orderId": c.orderId, 16957 }) 16958 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16959} 16960 16961// Do executes the "content.orders.refund" call. 16962// Exactly one of *OrdersRefundResponse or error will be non-nil. Any 16963// non-2xx status code is an error. Response headers are in either 16964// *OrdersRefundResponse.ServerResponse.Header or (if a response was 16965// returned at all) in error.(*googleapi.Error).Header. Use 16966// googleapi.IsNotModified to check whether the returned error was 16967// because http.StatusNotModified was returned. 16968func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) { 16969 gensupport.SetOptions(c.urlParams_, opts...) 16970 res, err := c.doRequest("json") 16971 if res != nil && res.StatusCode == http.StatusNotModified { 16972 if res.Body != nil { 16973 res.Body.Close() 16974 } 16975 return nil, &googleapi.Error{ 16976 Code: res.StatusCode, 16977 Header: res.Header, 16978 } 16979 } 16980 if err != nil { 16981 return nil, err 16982 } 16983 defer googleapi.CloseBody(res) 16984 if err := googleapi.CheckResponse(res); err != nil { 16985 return nil, err 16986 } 16987 ret := &OrdersRefundResponse{ 16988 ServerResponse: googleapi.ServerResponse{ 16989 Header: res.Header, 16990 HTTPStatusCode: res.StatusCode, 16991 }, 16992 } 16993 target := &ret 16994 if err := gensupport.DecodeResponse(target, res); err != nil { 16995 return nil, err 16996 } 16997 return ret, nil 16998 // { 16999 // "description": "Refund a portion of the order, up to the full amount paid.", 17000 // "httpMethod": "POST", 17001 // "id": "content.orders.refund", 17002 // "parameterOrder": [ 17003 // "merchantId", 17004 // "orderId" 17005 // ], 17006 // "parameters": { 17007 // "merchantId": { 17008 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17009 // "format": "uint64", 17010 // "location": "path", 17011 // "required": true, 17012 // "type": "string" 17013 // }, 17014 // "orderId": { 17015 // "description": "The ID of the order to refund.", 17016 // "location": "path", 17017 // "required": true, 17018 // "type": "string" 17019 // } 17020 // }, 17021 // "path": "{merchantId}/orders/{orderId}/refund", 17022 // "request": { 17023 // "$ref": "OrdersRefundRequest" 17024 // }, 17025 // "response": { 17026 // "$ref": "OrdersRefundResponse" 17027 // }, 17028 // "scopes": [ 17029 // "https://www.googleapis.com/auth/content" 17030 // ] 17031 // } 17032 17033} 17034 17035// method id "content.orders.rejectreturnlineitem": 17036 17037type OrdersRejectreturnlineitemCall struct { 17038 s *APIService 17039 merchantId uint64 17040 orderId string 17041 ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest 17042 urlParams_ gensupport.URLParams 17043 ctx_ context.Context 17044 header_ http.Header 17045} 17046 17047// Rejectreturnlineitem: Rejects return on an line item. 17048func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { 17049 c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17050 c.merchantId = merchantId 17051 c.orderId = orderId 17052 c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest 17053 return c 17054} 17055 17056// Fields allows partial responses to be retrieved. See 17057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17058// for more information. 17059func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { 17060 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17061 return c 17062} 17063 17064// Context sets the context to be used in this call's Do method. Any 17065// pending HTTP request will be aborted if the provided context is 17066// canceled. 17067func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { 17068 c.ctx_ = ctx 17069 return c 17070} 17071 17072// Header returns an http.Header that can be modified by the caller to 17073// add HTTP headers to the request. 17074func (c *OrdersRejectreturnlineitemCall) Header() http.Header { 17075 if c.header_ == nil { 17076 c.header_ = make(http.Header) 17077 } 17078 return c.header_ 17079} 17080 17081func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { 17082 reqHeaders := make(http.Header) 17083 for k, v := range c.header_ { 17084 reqHeaders[k] = v 17085 } 17086 reqHeaders.Set("User-Agent", c.s.userAgent()) 17087 var body io.Reader = nil 17088 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) 17089 if err != nil { 17090 return nil, err 17091 } 17092 reqHeaders.Set("Content-Type", "application/json") 17093 c.urlParams_.Set("alt", alt) 17094 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") 17095 urls += "?" + c.urlParams_.Encode() 17096 req, _ := http.NewRequest("POST", urls, body) 17097 req.Header = reqHeaders 17098 googleapi.Expand(req.URL, map[string]string{ 17099 "merchantId": strconv.FormatUint(c.merchantId, 10), 17100 "orderId": c.orderId, 17101 }) 17102 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17103} 17104 17105// Do executes the "content.orders.rejectreturnlineitem" call. 17106// Exactly one of *OrdersRejectReturnLineItemResponse or error will be 17107// non-nil. Any non-2xx status code is an error. Response headers are in 17108// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or 17109// (if a response was returned at all) in 17110// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17111// whether the returned error was because http.StatusNotModified was 17112// returned. 17113func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { 17114 gensupport.SetOptions(c.urlParams_, opts...) 17115 res, err := c.doRequest("json") 17116 if res != nil && res.StatusCode == http.StatusNotModified { 17117 if res.Body != nil { 17118 res.Body.Close() 17119 } 17120 return nil, &googleapi.Error{ 17121 Code: res.StatusCode, 17122 Header: res.Header, 17123 } 17124 } 17125 if err != nil { 17126 return nil, err 17127 } 17128 defer googleapi.CloseBody(res) 17129 if err := googleapi.CheckResponse(res); err != nil { 17130 return nil, err 17131 } 17132 ret := &OrdersRejectReturnLineItemResponse{ 17133 ServerResponse: googleapi.ServerResponse{ 17134 Header: res.Header, 17135 HTTPStatusCode: res.StatusCode, 17136 }, 17137 } 17138 target := &ret 17139 if err := gensupport.DecodeResponse(target, res); err != nil { 17140 return nil, err 17141 } 17142 return ret, nil 17143 // { 17144 // "description": "Rejects return on an line item.", 17145 // "httpMethod": "POST", 17146 // "id": "content.orders.rejectreturnlineitem", 17147 // "parameterOrder": [ 17148 // "merchantId", 17149 // "orderId" 17150 // ], 17151 // "parameters": { 17152 // "merchantId": { 17153 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17154 // "format": "uint64", 17155 // "location": "path", 17156 // "required": true, 17157 // "type": "string" 17158 // }, 17159 // "orderId": { 17160 // "description": "The ID of the order.", 17161 // "location": "path", 17162 // "required": true, 17163 // "type": "string" 17164 // } 17165 // }, 17166 // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 17167 // "request": { 17168 // "$ref": "OrdersRejectReturnLineItemRequest" 17169 // }, 17170 // "response": { 17171 // "$ref": "OrdersRejectReturnLineItemResponse" 17172 // }, 17173 // "scopes": [ 17174 // "https://www.googleapis.com/auth/content" 17175 // ] 17176 // } 17177 17178} 17179 17180// method id "content.orders.returnlineitem": 17181 17182type OrdersReturnlineitemCall struct { 17183 s *APIService 17184 merchantId uint64 17185 orderId string 17186 ordersreturnlineitemrequest *OrdersReturnLineItemRequest 17187 urlParams_ gensupport.URLParams 17188 ctx_ context.Context 17189 header_ http.Header 17190} 17191 17192// Returnlineitem: Returns a line item. 17193func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall { 17194 c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17195 c.merchantId = merchantId 17196 c.orderId = orderId 17197 c.ordersreturnlineitemrequest = ordersreturnlineitemrequest 17198 return c 17199} 17200 17201// Fields allows partial responses to be retrieved. See 17202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17203// for more information. 17204func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall { 17205 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17206 return c 17207} 17208 17209// Context sets the context to be used in this call's Do method. Any 17210// pending HTTP request will be aborted if the provided context is 17211// canceled. 17212func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall { 17213 c.ctx_ = ctx 17214 return c 17215} 17216 17217// Header returns an http.Header that can be modified by the caller to 17218// add HTTP headers to the request. 17219func (c *OrdersReturnlineitemCall) Header() http.Header { 17220 if c.header_ == nil { 17221 c.header_ = make(http.Header) 17222 } 17223 return c.header_ 17224} 17225 17226func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) { 17227 reqHeaders := make(http.Header) 17228 for k, v := range c.header_ { 17229 reqHeaders[k] = v 17230 } 17231 reqHeaders.Set("User-Agent", c.s.userAgent()) 17232 var body io.Reader = nil 17233 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest) 17234 if err != nil { 17235 return nil, err 17236 } 17237 reqHeaders.Set("Content-Type", "application/json") 17238 c.urlParams_.Set("alt", alt) 17239 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem") 17240 urls += "?" + c.urlParams_.Encode() 17241 req, _ := http.NewRequest("POST", urls, body) 17242 req.Header = reqHeaders 17243 googleapi.Expand(req.URL, map[string]string{ 17244 "merchantId": strconv.FormatUint(c.merchantId, 10), 17245 "orderId": c.orderId, 17246 }) 17247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17248} 17249 17250// Do executes the "content.orders.returnlineitem" call. 17251// Exactly one of *OrdersReturnLineItemResponse or error will be 17252// non-nil. Any non-2xx status code is an error. Response headers are in 17253// either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a 17254// response was returned at all) in error.(*googleapi.Error).Header. Use 17255// googleapi.IsNotModified to check whether the returned error was 17256// because http.StatusNotModified was returned. 17257func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) { 17258 gensupport.SetOptions(c.urlParams_, opts...) 17259 res, err := c.doRequest("json") 17260 if res != nil && res.StatusCode == http.StatusNotModified { 17261 if res.Body != nil { 17262 res.Body.Close() 17263 } 17264 return nil, &googleapi.Error{ 17265 Code: res.StatusCode, 17266 Header: res.Header, 17267 } 17268 } 17269 if err != nil { 17270 return nil, err 17271 } 17272 defer googleapi.CloseBody(res) 17273 if err := googleapi.CheckResponse(res); err != nil { 17274 return nil, err 17275 } 17276 ret := &OrdersReturnLineItemResponse{ 17277 ServerResponse: googleapi.ServerResponse{ 17278 Header: res.Header, 17279 HTTPStatusCode: res.StatusCode, 17280 }, 17281 } 17282 target := &ret 17283 if err := gensupport.DecodeResponse(target, res); err != nil { 17284 return nil, err 17285 } 17286 return ret, nil 17287 // { 17288 // "description": "Returns a line item.", 17289 // "httpMethod": "POST", 17290 // "id": "content.orders.returnlineitem", 17291 // "parameterOrder": [ 17292 // "merchantId", 17293 // "orderId" 17294 // ], 17295 // "parameters": { 17296 // "merchantId": { 17297 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17298 // "format": "uint64", 17299 // "location": "path", 17300 // "required": true, 17301 // "type": "string" 17302 // }, 17303 // "orderId": { 17304 // "description": "The ID of the order.", 17305 // "location": "path", 17306 // "required": true, 17307 // "type": "string" 17308 // } 17309 // }, 17310 // "path": "{merchantId}/orders/{orderId}/returnLineItem", 17311 // "request": { 17312 // "$ref": "OrdersReturnLineItemRequest" 17313 // }, 17314 // "response": { 17315 // "$ref": "OrdersReturnLineItemResponse" 17316 // }, 17317 // "scopes": [ 17318 // "https://www.googleapis.com/auth/content" 17319 // ] 17320 // } 17321 17322} 17323 17324// method id "content.orders.returnrefundlineitem": 17325 17326type OrdersReturnrefundlineitemCall struct { 17327 s *APIService 17328 merchantId uint64 17329 orderId string 17330 ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest 17331 urlParams_ gensupport.URLParams 17332 ctx_ context.Context 17333 header_ http.Header 17334} 17335 17336// Returnrefundlineitem: Returns and refunds a line item. Note that this 17337// method can only be called on fully shipped orders. 17338func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { 17339 c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17340 c.merchantId = merchantId 17341 c.orderId = orderId 17342 c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest 17343 return c 17344} 17345 17346// Fields allows partial responses to be retrieved. See 17347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17348// for more information. 17349func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { 17350 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17351 return c 17352} 17353 17354// Context sets the context to be used in this call's Do method. Any 17355// pending HTTP request will be aborted if the provided context is 17356// canceled. 17357func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { 17358 c.ctx_ = ctx 17359 return c 17360} 17361 17362// Header returns an http.Header that can be modified by the caller to 17363// add HTTP headers to the request. 17364func (c *OrdersReturnrefundlineitemCall) Header() http.Header { 17365 if c.header_ == nil { 17366 c.header_ = make(http.Header) 17367 } 17368 return c.header_ 17369} 17370 17371func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { 17372 reqHeaders := make(http.Header) 17373 for k, v := range c.header_ { 17374 reqHeaders[k] = v 17375 } 17376 reqHeaders.Set("User-Agent", c.s.userAgent()) 17377 var body io.Reader = nil 17378 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) 17379 if err != nil { 17380 return nil, err 17381 } 17382 reqHeaders.Set("Content-Type", "application/json") 17383 c.urlParams_.Set("alt", alt) 17384 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") 17385 urls += "?" + c.urlParams_.Encode() 17386 req, _ := http.NewRequest("POST", urls, body) 17387 req.Header = reqHeaders 17388 googleapi.Expand(req.URL, map[string]string{ 17389 "merchantId": strconv.FormatUint(c.merchantId, 10), 17390 "orderId": c.orderId, 17391 }) 17392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17393} 17394 17395// Do executes the "content.orders.returnrefundlineitem" call. 17396// Exactly one of *OrdersReturnRefundLineItemResponse or error will be 17397// non-nil. Any non-2xx status code is an error. Response headers are in 17398// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or 17399// (if a response was returned at all) in 17400// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17401// whether the returned error was because http.StatusNotModified was 17402// returned. 17403func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { 17404 gensupport.SetOptions(c.urlParams_, opts...) 17405 res, err := c.doRequest("json") 17406 if res != nil && res.StatusCode == http.StatusNotModified { 17407 if res.Body != nil { 17408 res.Body.Close() 17409 } 17410 return nil, &googleapi.Error{ 17411 Code: res.StatusCode, 17412 Header: res.Header, 17413 } 17414 } 17415 if err != nil { 17416 return nil, err 17417 } 17418 defer googleapi.CloseBody(res) 17419 if err := googleapi.CheckResponse(res); err != nil { 17420 return nil, err 17421 } 17422 ret := &OrdersReturnRefundLineItemResponse{ 17423 ServerResponse: googleapi.ServerResponse{ 17424 Header: res.Header, 17425 HTTPStatusCode: res.StatusCode, 17426 }, 17427 } 17428 target := &ret 17429 if err := gensupport.DecodeResponse(target, res); err != nil { 17430 return nil, err 17431 } 17432 return ret, nil 17433 // { 17434 // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.", 17435 // "httpMethod": "POST", 17436 // "id": "content.orders.returnrefundlineitem", 17437 // "parameterOrder": [ 17438 // "merchantId", 17439 // "orderId" 17440 // ], 17441 // "parameters": { 17442 // "merchantId": { 17443 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17444 // "format": "uint64", 17445 // "location": "path", 17446 // "required": true, 17447 // "type": "string" 17448 // }, 17449 // "orderId": { 17450 // "description": "The ID of the order.", 17451 // "location": "path", 17452 // "required": true, 17453 // "type": "string" 17454 // } 17455 // }, 17456 // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", 17457 // "request": { 17458 // "$ref": "OrdersReturnRefundLineItemRequest" 17459 // }, 17460 // "response": { 17461 // "$ref": "OrdersReturnRefundLineItemResponse" 17462 // }, 17463 // "scopes": [ 17464 // "https://www.googleapis.com/auth/content" 17465 // ] 17466 // } 17467 17468} 17469 17470// method id "content.orders.setlineitemmetadata": 17471 17472type OrdersSetlineitemmetadataCall struct { 17473 s *APIService 17474 merchantId uint64 17475 orderId string 17476 orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest 17477 urlParams_ gensupport.URLParams 17478 ctx_ context.Context 17479 header_ http.Header 17480} 17481 17482// Setlineitemmetadata: Sets (overrides) merchant provided annotations 17483// on the line item. 17484func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { 17485 c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17486 c.merchantId = merchantId 17487 c.orderId = orderId 17488 c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest 17489 return c 17490} 17491 17492// Fields allows partial responses to be retrieved. See 17493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17494// for more information. 17495func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { 17496 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17497 return c 17498} 17499 17500// Context sets the context to be used in this call's Do method. Any 17501// pending HTTP request will be aborted if the provided context is 17502// canceled. 17503func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { 17504 c.ctx_ = ctx 17505 return c 17506} 17507 17508// Header returns an http.Header that can be modified by the caller to 17509// add HTTP headers to the request. 17510func (c *OrdersSetlineitemmetadataCall) Header() http.Header { 17511 if c.header_ == nil { 17512 c.header_ = make(http.Header) 17513 } 17514 return c.header_ 17515} 17516 17517func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { 17518 reqHeaders := make(http.Header) 17519 for k, v := range c.header_ { 17520 reqHeaders[k] = v 17521 } 17522 reqHeaders.Set("User-Agent", c.s.userAgent()) 17523 var body io.Reader = nil 17524 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) 17525 if err != nil { 17526 return nil, err 17527 } 17528 reqHeaders.Set("Content-Type", "application/json") 17529 c.urlParams_.Set("alt", alt) 17530 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") 17531 urls += "?" + c.urlParams_.Encode() 17532 req, _ := http.NewRequest("POST", urls, body) 17533 req.Header = reqHeaders 17534 googleapi.Expand(req.URL, map[string]string{ 17535 "merchantId": strconv.FormatUint(c.merchantId, 10), 17536 "orderId": c.orderId, 17537 }) 17538 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17539} 17540 17541// Do executes the "content.orders.setlineitemmetadata" call. 17542// Exactly one of *OrdersSetLineItemMetadataResponse or error will be 17543// non-nil. Any non-2xx status code is an error. Response headers are in 17544// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or 17545// (if a response was returned at all) in 17546// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17547// whether the returned error was because http.StatusNotModified was 17548// returned. 17549func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { 17550 gensupport.SetOptions(c.urlParams_, opts...) 17551 res, err := c.doRequest("json") 17552 if res != nil && res.StatusCode == http.StatusNotModified { 17553 if res.Body != nil { 17554 res.Body.Close() 17555 } 17556 return nil, &googleapi.Error{ 17557 Code: res.StatusCode, 17558 Header: res.Header, 17559 } 17560 } 17561 if err != nil { 17562 return nil, err 17563 } 17564 defer googleapi.CloseBody(res) 17565 if err := googleapi.CheckResponse(res); err != nil { 17566 return nil, err 17567 } 17568 ret := &OrdersSetLineItemMetadataResponse{ 17569 ServerResponse: googleapi.ServerResponse{ 17570 Header: res.Header, 17571 HTTPStatusCode: res.StatusCode, 17572 }, 17573 } 17574 target := &ret 17575 if err := gensupport.DecodeResponse(target, res); err != nil { 17576 return nil, err 17577 } 17578 return ret, nil 17579 // { 17580 // "description": "Sets (overrides) merchant provided annotations on the line item.", 17581 // "httpMethod": "POST", 17582 // "id": "content.orders.setlineitemmetadata", 17583 // "parameterOrder": [ 17584 // "merchantId", 17585 // "orderId" 17586 // ], 17587 // "parameters": { 17588 // "merchantId": { 17589 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17590 // "format": "uint64", 17591 // "location": "path", 17592 // "required": true, 17593 // "type": "string" 17594 // }, 17595 // "orderId": { 17596 // "description": "The ID of the order.", 17597 // "location": "path", 17598 // "required": true, 17599 // "type": "string" 17600 // } 17601 // }, 17602 // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", 17603 // "request": { 17604 // "$ref": "OrdersSetLineItemMetadataRequest" 17605 // }, 17606 // "response": { 17607 // "$ref": "OrdersSetLineItemMetadataResponse" 17608 // }, 17609 // "scopes": [ 17610 // "https://www.googleapis.com/auth/content" 17611 // ] 17612 // } 17613 17614} 17615 17616// method id "content.orders.shiplineitems": 17617 17618type OrdersShiplineitemsCall struct { 17619 s *APIService 17620 merchantId uint64 17621 orderId string 17622 ordersshiplineitemsrequest *OrdersShipLineItemsRequest 17623 urlParams_ gensupport.URLParams 17624 ctx_ context.Context 17625 header_ http.Header 17626} 17627 17628// Shiplineitems: Marks line item(s) as shipped. 17629func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { 17630 c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17631 c.merchantId = merchantId 17632 c.orderId = orderId 17633 c.ordersshiplineitemsrequest = ordersshiplineitemsrequest 17634 return c 17635} 17636 17637// Fields allows partial responses to be retrieved. See 17638// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17639// for more information. 17640func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { 17641 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17642 return c 17643} 17644 17645// Context sets the context to be used in this call's Do method. Any 17646// pending HTTP request will be aborted if the provided context is 17647// canceled. 17648func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { 17649 c.ctx_ = ctx 17650 return c 17651} 17652 17653// Header returns an http.Header that can be modified by the caller to 17654// add HTTP headers to the request. 17655func (c *OrdersShiplineitemsCall) Header() http.Header { 17656 if c.header_ == nil { 17657 c.header_ = make(http.Header) 17658 } 17659 return c.header_ 17660} 17661 17662func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { 17663 reqHeaders := make(http.Header) 17664 for k, v := range c.header_ { 17665 reqHeaders[k] = v 17666 } 17667 reqHeaders.Set("User-Agent", c.s.userAgent()) 17668 var body io.Reader = nil 17669 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) 17670 if err != nil { 17671 return nil, err 17672 } 17673 reqHeaders.Set("Content-Type", "application/json") 17674 c.urlParams_.Set("alt", alt) 17675 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") 17676 urls += "?" + c.urlParams_.Encode() 17677 req, _ := http.NewRequest("POST", urls, body) 17678 req.Header = reqHeaders 17679 googleapi.Expand(req.URL, map[string]string{ 17680 "merchantId": strconv.FormatUint(c.merchantId, 10), 17681 "orderId": c.orderId, 17682 }) 17683 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17684} 17685 17686// Do executes the "content.orders.shiplineitems" call. 17687// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil. 17688// Any non-2xx status code is an error. Response headers are in either 17689// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response 17690// was returned at all) in error.(*googleapi.Error).Header. Use 17691// googleapi.IsNotModified to check whether the returned error was 17692// because http.StatusNotModified was returned. 17693func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { 17694 gensupport.SetOptions(c.urlParams_, opts...) 17695 res, err := c.doRequest("json") 17696 if res != nil && res.StatusCode == http.StatusNotModified { 17697 if res.Body != nil { 17698 res.Body.Close() 17699 } 17700 return nil, &googleapi.Error{ 17701 Code: res.StatusCode, 17702 Header: res.Header, 17703 } 17704 } 17705 if err != nil { 17706 return nil, err 17707 } 17708 defer googleapi.CloseBody(res) 17709 if err := googleapi.CheckResponse(res); err != nil { 17710 return nil, err 17711 } 17712 ret := &OrdersShipLineItemsResponse{ 17713 ServerResponse: googleapi.ServerResponse{ 17714 Header: res.Header, 17715 HTTPStatusCode: res.StatusCode, 17716 }, 17717 } 17718 target := &ret 17719 if err := gensupport.DecodeResponse(target, res); err != nil { 17720 return nil, err 17721 } 17722 return ret, nil 17723 // { 17724 // "description": "Marks line item(s) as shipped.", 17725 // "httpMethod": "POST", 17726 // "id": "content.orders.shiplineitems", 17727 // "parameterOrder": [ 17728 // "merchantId", 17729 // "orderId" 17730 // ], 17731 // "parameters": { 17732 // "merchantId": { 17733 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17734 // "format": "uint64", 17735 // "location": "path", 17736 // "required": true, 17737 // "type": "string" 17738 // }, 17739 // "orderId": { 17740 // "description": "The ID of the order.", 17741 // "location": "path", 17742 // "required": true, 17743 // "type": "string" 17744 // } 17745 // }, 17746 // "path": "{merchantId}/orders/{orderId}/shipLineItems", 17747 // "request": { 17748 // "$ref": "OrdersShipLineItemsRequest" 17749 // }, 17750 // "response": { 17751 // "$ref": "OrdersShipLineItemsResponse" 17752 // }, 17753 // "scopes": [ 17754 // "https://www.googleapis.com/auth/content" 17755 // ] 17756 // } 17757 17758} 17759 17760// method id "content.orders.updatelineitemshippingdetails": 17761 17762type OrdersUpdatelineitemshippingdetailsCall struct { 17763 s *APIService 17764 merchantId uint64 17765 orderId string 17766 ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest 17767 urlParams_ gensupport.URLParams 17768 ctx_ context.Context 17769 header_ http.Header 17770} 17771 17772// Updatelineitemshippingdetails: Updates ship by and delivery by dates 17773// for a line item. 17774func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { 17775 c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17776 c.merchantId = merchantId 17777 c.orderId = orderId 17778 c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest 17779 return c 17780} 17781 17782// Fields allows partial responses to be retrieved. See 17783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17784// for more information. 17785func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { 17786 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17787 return c 17788} 17789 17790// Context sets the context to be used in this call's Do method. Any 17791// pending HTTP request will be aborted if the provided context is 17792// canceled. 17793func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { 17794 c.ctx_ = ctx 17795 return c 17796} 17797 17798// Header returns an http.Header that can be modified by the caller to 17799// add HTTP headers to the request. 17800func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { 17801 if c.header_ == nil { 17802 c.header_ = make(http.Header) 17803 } 17804 return c.header_ 17805} 17806 17807func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { 17808 reqHeaders := make(http.Header) 17809 for k, v := range c.header_ { 17810 reqHeaders[k] = v 17811 } 17812 reqHeaders.Set("User-Agent", c.s.userAgent()) 17813 var body io.Reader = nil 17814 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) 17815 if err != nil { 17816 return nil, err 17817 } 17818 reqHeaders.Set("Content-Type", "application/json") 17819 c.urlParams_.Set("alt", alt) 17820 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") 17821 urls += "?" + c.urlParams_.Encode() 17822 req, _ := http.NewRequest("POST", urls, body) 17823 req.Header = reqHeaders 17824 googleapi.Expand(req.URL, map[string]string{ 17825 "merchantId": strconv.FormatUint(c.merchantId, 10), 17826 "orderId": c.orderId, 17827 }) 17828 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17829} 17830 17831// Do executes the "content.orders.updatelineitemshippingdetails" call. 17832// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error 17833// will be non-nil. Any non-2xx status code is an error. Response 17834// headers are in either 17835// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or 17836// (if a response was returned at all) in 17837// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17838// whether the returned error was because http.StatusNotModified was 17839// returned. 17840func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { 17841 gensupport.SetOptions(c.urlParams_, opts...) 17842 res, err := c.doRequest("json") 17843 if res != nil && res.StatusCode == http.StatusNotModified { 17844 if res.Body != nil { 17845 res.Body.Close() 17846 } 17847 return nil, &googleapi.Error{ 17848 Code: res.StatusCode, 17849 Header: res.Header, 17850 } 17851 } 17852 if err != nil { 17853 return nil, err 17854 } 17855 defer googleapi.CloseBody(res) 17856 if err := googleapi.CheckResponse(res); err != nil { 17857 return nil, err 17858 } 17859 ret := &OrdersUpdateLineItemShippingDetailsResponse{ 17860 ServerResponse: googleapi.ServerResponse{ 17861 Header: res.Header, 17862 HTTPStatusCode: res.StatusCode, 17863 }, 17864 } 17865 target := &ret 17866 if err := gensupport.DecodeResponse(target, res); err != nil { 17867 return nil, err 17868 } 17869 return ret, nil 17870 // { 17871 // "description": "Updates ship by and delivery by dates for a line item.", 17872 // "httpMethod": "POST", 17873 // "id": "content.orders.updatelineitemshippingdetails", 17874 // "parameterOrder": [ 17875 // "merchantId", 17876 // "orderId" 17877 // ], 17878 // "parameters": { 17879 // "merchantId": { 17880 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17881 // "format": "uint64", 17882 // "location": "path", 17883 // "required": true, 17884 // "type": "string" 17885 // }, 17886 // "orderId": { 17887 // "description": "The ID of the order.", 17888 // "location": "path", 17889 // "required": true, 17890 // "type": "string" 17891 // } 17892 // }, 17893 // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 17894 // "request": { 17895 // "$ref": "OrdersUpdateLineItemShippingDetailsRequest" 17896 // }, 17897 // "response": { 17898 // "$ref": "OrdersUpdateLineItemShippingDetailsResponse" 17899 // }, 17900 // "scopes": [ 17901 // "https://www.googleapis.com/auth/content" 17902 // ] 17903 // } 17904 17905} 17906 17907// method id "content.orders.updatemerchantorderid": 17908 17909type OrdersUpdatemerchantorderidCall struct { 17910 s *APIService 17911 merchantId uint64 17912 orderId string 17913 ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest 17914 urlParams_ gensupport.URLParams 17915 ctx_ context.Context 17916 header_ http.Header 17917} 17918 17919// Updatemerchantorderid: Updates the merchant order ID for a given 17920// order. 17921func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { 17922 c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17923 c.merchantId = merchantId 17924 c.orderId = orderId 17925 c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest 17926 return c 17927} 17928 17929// Fields allows partial responses to be retrieved. See 17930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17931// for more information. 17932func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { 17933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17934 return c 17935} 17936 17937// Context sets the context to be used in this call's Do method. Any 17938// pending HTTP request will be aborted if the provided context is 17939// canceled. 17940func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { 17941 c.ctx_ = ctx 17942 return c 17943} 17944 17945// Header returns an http.Header that can be modified by the caller to 17946// add HTTP headers to the request. 17947func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { 17948 if c.header_ == nil { 17949 c.header_ = make(http.Header) 17950 } 17951 return c.header_ 17952} 17953 17954func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { 17955 reqHeaders := make(http.Header) 17956 for k, v := range c.header_ { 17957 reqHeaders[k] = v 17958 } 17959 reqHeaders.Set("User-Agent", c.s.userAgent()) 17960 var body io.Reader = nil 17961 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) 17962 if err != nil { 17963 return nil, err 17964 } 17965 reqHeaders.Set("Content-Type", "application/json") 17966 c.urlParams_.Set("alt", alt) 17967 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") 17968 urls += "?" + c.urlParams_.Encode() 17969 req, _ := http.NewRequest("POST", urls, body) 17970 req.Header = reqHeaders 17971 googleapi.Expand(req.URL, map[string]string{ 17972 "merchantId": strconv.FormatUint(c.merchantId, 10), 17973 "orderId": c.orderId, 17974 }) 17975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17976} 17977 17978// Do executes the "content.orders.updatemerchantorderid" call. 17979// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be 17980// non-nil. Any non-2xx status code is an error. Response headers are in 17981// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or 17982// (if a response was returned at all) in 17983// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17984// whether the returned error was because http.StatusNotModified was 17985// returned. 17986func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { 17987 gensupport.SetOptions(c.urlParams_, opts...) 17988 res, err := c.doRequest("json") 17989 if res != nil && res.StatusCode == http.StatusNotModified { 17990 if res.Body != nil { 17991 res.Body.Close() 17992 } 17993 return nil, &googleapi.Error{ 17994 Code: res.StatusCode, 17995 Header: res.Header, 17996 } 17997 } 17998 if err != nil { 17999 return nil, err 18000 } 18001 defer googleapi.CloseBody(res) 18002 if err := googleapi.CheckResponse(res); err != nil { 18003 return nil, err 18004 } 18005 ret := &OrdersUpdateMerchantOrderIdResponse{ 18006 ServerResponse: googleapi.ServerResponse{ 18007 Header: res.Header, 18008 HTTPStatusCode: res.StatusCode, 18009 }, 18010 } 18011 target := &ret 18012 if err := gensupport.DecodeResponse(target, res); err != nil { 18013 return nil, err 18014 } 18015 return ret, nil 18016 // { 18017 // "description": "Updates the merchant order ID for a given order.", 18018 // "httpMethod": "POST", 18019 // "id": "content.orders.updatemerchantorderid", 18020 // "parameterOrder": [ 18021 // "merchantId", 18022 // "orderId" 18023 // ], 18024 // "parameters": { 18025 // "merchantId": { 18026 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18027 // "format": "uint64", 18028 // "location": "path", 18029 // "required": true, 18030 // "type": "string" 18031 // }, 18032 // "orderId": { 18033 // "description": "The ID of the order.", 18034 // "location": "path", 18035 // "required": true, 18036 // "type": "string" 18037 // } 18038 // }, 18039 // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 18040 // "request": { 18041 // "$ref": "OrdersUpdateMerchantOrderIdRequest" 18042 // }, 18043 // "response": { 18044 // "$ref": "OrdersUpdateMerchantOrderIdResponse" 18045 // }, 18046 // "scopes": [ 18047 // "https://www.googleapis.com/auth/content" 18048 // ] 18049 // } 18050 18051} 18052 18053// method id "content.orders.updateshipment": 18054 18055type OrdersUpdateshipmentCall struct { 18056 s *APIService 18057 merchantId uint64 18058 orderId string 18059 ordersupdateshipmentrequest *OrdersUpdateShipmentRequest 18060 urlParams_ gensupport.URLParams 18061 ctx_ context.Context 18062 header_ http.Header 18063} 18064 18065// Updateshipment: Updates a shipment's status, carrier, and/or tracking 18066// ID. 18067func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { 18068 c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18069 c.merchantId = merchantId 18070 c.orderId = orderId 18071 c.ordersupdateshipmentrequest = ordersupdateshipmentrequest 18072 return c 18073} 18074 18075// Fields allows partial responses to be retrieved. See 18076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18077// for more information. 18078func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { 18079 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18080 return c 18081} 18082 18083// Context sets the context to be used in this call's Do method. Any 18084// pending HTTP request will be aborted if the provided context is 18085// canceled. 18086func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { 18087 c.ctx_ = ctx 18088 return c 18089} 18090 18091// Header returns an http.Header that can be modified by the caller to 18092// add HTTP headers to the request. 18093func (c *OrdersUpdateshipmentCall) Header() http.Header { 18094 if c.header_ == nil { 18095 c.header_ = make(http.Header) 18096 } 18097 return c.header_ 18098} 18099 18100func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { 18101 reqHeaders := make(http.Header) 18102 for k, v := range c.header_ { 18103 reqHeaders[k] = v 18104 } 18105 reqHeaders.Set("User-Agent", c.s.userAgent()) 18106 var body io.Reader = nil 18107 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) 18108 if err != nil { 18109 return nil, err 18110 } 18111 reqHeaders.Set("Content-Type", "application/json") 18112 c.urlParams_.Set("alt", alt) 18113 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") 18114 urls += "?" + c.urlParams_.Encode() 18115 req, _ := http.NewRequest("POST", urls, body) 18116 req.Header = reqHeaders 18117 googleapi.Expand(req.URL, map[string]string{ 18118 "merchantId": strconv.FormatUint(c.merchantId, 10), 18119 "orderId": c.orderId, 18120 }) 18121 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18122} 18123 18124// Do executes the "content.orders.updateshipment" call. 18125// Exactly one of *OrdersUpdateShipmentResponse or error will be 18126// non-nil. Any non-2xx status code is an error. Response headers are in 18127// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a 18128// response was returned at all) in error.(*googleapi.Error).Header. Use 18129// googleapi.IsNotModified to check whether the returned error was 18130// because http.StatusNotModified was returned. 18131func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { 18132 gensupport.SetOptions(c.urlParams_, opts...) 18133 res, err := c.doRequest("json") 18134 if res != nil && res.StatusCode == http.StatusNotModified { 18135 if res.Body != nil { 18136 res.Body.Close() 18137 } 18138 return nil, &googleapi.Error{ 18139 Code: res.StatusCode, 18140 Header: res.Header, 18141 } 18142 } 18143 if err != nil { 18144 return nil, err 18145 } 18146 defer googleapi.CloseBody(res) 18147 if err := googleapi.CheckResponse(res); err != nil { 18148 return nil, err 18149 } 18150 ret := &OrdersUpdateShipmentResponse{ 18151 ServerResponse: googleapi.ServerResponse{ 18152 Header: res.Header, 18153 HTTPStatusCode: res.StatusCode, 18154 }, 18155 } 18156 target := &ret 18157 if err := gensupport.DecodeResponse(target, res); err != nil { 18158 return nil, err 18159 } 18160 return ret, nil 18161 // { 18162 // "description": "Updates a shipment's status, carrier, and/or tracking ID.", 18163 // "httpMethod": "POST", 18164 // "id": "content.orders.updateshipment", 18165 // "parameterOrder": [ 18166 // "merchantId", 18167 // "orderId" 18168 // ], 18169 // "parameters": { 18170 // "merchantId": { 18171 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18172 // "format": "uint64", 18173 // "location": "path", 18174 // "required": true, 18175 // "type": "string" 18176 // }, 18177 // "orderId": { 18178 // "description": "The ID of the order.", 18179 // "location": "path", 18180 // "required": true, 18181 // "type": "string" 18182 // } 18183 // }, 18184 // "path": "{merchantId}/orders/{orderId}/updateShipment", 18185 // "request": { 18186 // "$ref": "OrdersUpdateShipmentRequest" 18187 // }, 18188 // "response": { 18189 // "$ref": "OrdersUpdateShipmentResponse" 18190 // }, 18191 // "scopes": [ 18192 // "https://www.googleapis.com/auth/content" 18193 // ] 18194 // } 18195 18196} 18197 18198// method id "content.pos.custombatch": 18199 18200type PosCustombatchCall struct { 18201 s *APIService 18202 poscustombatchrequest *PosCustomBatchRequest 18203 urlParams_ gensupport.URLParams 18204 ctx_ context.Context 18205 header_ http.Header 18206} 18207 18208// Custombatch: Batches multiple POS-related calls in a single request. 18209func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { 18210 c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18211 c.poscustombatchrequest = poscustombatchrequest 18212 return c 18213} 18214 18215// DryRun sets the optional parameter "dryRun": Flag to run the request 18216// in dry-run mode. 18217func (c *PosCustombatchCall) DryRun(dryRun bool) *PosCustombatchCall { 18218 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18219 return c 18220} 18221 18222// Fields allows partial responses to be retrieved. See 18223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18224// for more information. 18225func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { 18226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18227 return c 18228} 18229 18230// Context sets the context to be used in this call's Do method. Any 18231// pending HTTP request will be aborted if the provided context is 18232// canceled. 18233func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { 18234 c.ctx_ = ctx 18235 return c 18236} 18237 18238// Header returns an http.Header that can be modified by the caller to 18239// add HTTP headers to the request. 18240func (c *PosCustombatchCall) Header() http.Header { 18241 if c.header_ == nil { 18242 c.header_ = make(http.Header) 18243 } 18244 return c.header_ 18245} 18246 18247func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { 18248 reqHeaders := make(http.Header) 18249 for k, v := range c.header_ { 18250 reqHeaders[k] = v 18251 } 18252 reqHeaders.Set("User-Agent", c.s.userAgent()) 18253 var body io.Reader = nil 18254 body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest) 18255 if err != nil { 18256 return nil, err 18257 } 18258 reqHeaders.Set("Content-Type", "application/json") 18259 c.urlParams_.Set("alt", alt) 18260 urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") 18261 urls += "?" + c.urlParams_.Encode() 18262 req, _ := http.NewRequest("POST", urls, body) 18263 req.Header = reqHeaders 18264 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18265} 18266 18267// Do executes the "content.pos.custombatch" call. 18268// Exactly one of *PosCustomBatchResponse or error will be non-nil. Any 18269// non-2xx status code is an error. Response headers are in either 18270// *PosCustomBatchResponse.ServerResponse.Header or (if a response was 18271// returned at all) in error.(*googleapi.Error).Header. Use 18272// googleapi.IsNotModified to check whether the returned error was 18273// because http.StatusNotModified was returned. 18274func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { 18275 gensupport.SetOptions(c.urlParams_, opts...) 18276 res, err := c.doRequest("json") 18277 if res != nil && res.StatusCode == http.StatusNotModified { 18278 if res.Body != nil { 18279 res.Body.Close() 18280 } 18281 return nil, &googleapi.Error{ 18282 Code: res.StatusCode, 18283 Header: res.Header, 18284 } 18285 } 18286 if err != nil { 18287 return nil, err 18288 } 18289 defer googleapi.CloseBody(res) 18290 if err := googleapi.CheckResponse(res); err != nil { 18291 return nil, err 18292 } 18293 ret := &PosCustomBatchResponse{ 18294 ServerResponse: googleapi.ServerResponse{ 18295 Header: res.Header, 18296 HTTPStatusCode: res.StatusCode, 18297 }, 18298 } 18299 target := &ret 18300 if err := gensupport.DecodeResponse(target, res); err != nil { 18301 return nil, err 18302 } 18303 return ret, nil 18304 // { 18305 // "description": "Batches multiple POS-related calls in a single request.", 18306 // "httpMethod": "POST", 18307 // "id": "content.pos.custombatch", 18308 // "parameters": { 18309 // "dryRun": { 18310 // "description": "Flag to run the request in dry-run mode.", 18311 // "location": "query", 18312 // "type": "boolean" 18313 // } 18314 // }, 18315 // "path": "pos/batch", 18316 // "request": { 18317 // "$ref": "PosCustomBatchRequest" 18318 // }, 18319 // "response": { 18320 // "$ref": "PosCustomBatchResponse" 18321 // }, 18322 // "scopes": [ 18323 // "https://www.googleapis.com/auth/content" 18324 // ] 18325 // } 18326 18327} 18328 18329// method id "content.pos.delete": 18330 18331type PosDeleteCall struct { 18332 s *APIService 18333 merchantId uint64 18334 targetMerchantId uint64 18335 storeCode string 18336 urlParams_ gensupport.URLParams 18337 ctx_ context.Context 18338 header_ http.Header 18339} 18340 18341// Delete: Deletes a store for the given merchant. 18342func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { 18343 c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18344 c.merchantId = merchantId 18345 c.targetMerchantId = targetMerchantId 18346 c.storeCode = storeCode 18347 return c 18348} 18349 18350// DryRun sets the optional parameter "dryRun": Flag to run the request 18351// in dry-run mode. 18352func (c *PosDeleteCall) DryRun(dryRun bool) *PosDeleteCall { 18353 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18354 return c 18355} 18356 18357// Fields allows partial responses to be retrieved. See 18358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18359// for more information. 18360func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { 18361 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18362 return c 18363} 18364 18365// Context sets the context to be used in this call's Do method. Any 18366// pending HTTP request will be aborted if the provided context is 18367// canceled. 18368func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { 18369 c.ctx_ = ctx 18370 return c 18371} 18372 18373// Header returns an http.Header that can be modified by the caller to 18374// add HTTP headers to the request. 18375func (c *PosDeleteCall) Header() http.Header { 18376 if c.header_ == nil { 18377 c.header_ = make(http.Header) 18378 } 18379 return c.header_ 18380} 18381 18382func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { 18383 reqHeaders := make(http.Header) 18384 for k, v := range c.header_ { 18385 reqHeaders[k] = v 18386 } 18387 reqHeaders.Set("User-Agent", c.s.userAgent()) 18388 var body io.Reader = nil 18389 c.urlParams_.Set("alt", alt) 18390 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 18391 urls += "?" + c.urlParams_.Encode() 18392 req, _ := http.NewRequest("DELETE", urls, body) 18393 req.Header = reqHeaders 18394 googleapi.Expand(req.URL, map[string]string{ 18395 "merchantId": strconv.FormatUint(c.merchantId, 10), 18396 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 18397 "storeCode": c.storeCode, 18398 }) 18399 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18400} 18401 18402// Do executes the "content.pos.delete" call. 18403func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { 18404 gensupport.SetOptions(c.urlParams_, opts...) 18405 res, err := c.doRequest("json") 18406 if err != nil { 18407 return err 18408 } 18409 defer googleapi.CloseBody(res) 18410 if err := googleapi.CheckResponse(res); err != nil { 18411 return err 18412 } 18413 return nil 18414 // { 18415 // "description": "Deletes a store for the given merchant.", 18416 // "httpMethod": "DELETE", 18417 // "id": "content.pos.delete", 18418 // "parameterOrder": [ 18419 // "merchantId", 18420 // "targetMerchantId", 18421 // "storeCode" 18422 // ], 18423 // "parameters": { 18424 // "dryRun": { 18425 // "description": "Flag to run the request in dry-run mode.", 18426 // "location": "query", 18427 // "type": "boolean" 18428 // }, 18429 // "merchantId": { 18430 // "description": "The ID of the POS or inventory data provider.", 18431 // "format": "uint64", 18432 // "location": "path", 18433 // "required": true, 18434 // "type": "string" 18435 // }, 18436 // "storeCode": { 18437 // "description": "A store code that is unique per merchant.", 18438 // "location": "path", 18439 // "required": true, 18440 // "type": "string" 18441 // }, 18442 // "targetMerchantId": { 18443 // "description": "The ID of the target merchant.", 18444 // "format": "uint64", 18445 // "location": "path", 18446 // "required": true, 18447 // "type": "string" 18448 // } 18449 // }, 18450 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 18451 // "scopes": [ 18452 // "https://www.googleapis.com/auth/content" 18453 // ] 18454 // } 18455 18456} 18457 18458// method id "content.pos.get": 18459 18460type PosGetCall struct { 18461 s *APIService 18462 merchantId uint64 18463 targetMerchantId uint64 18464 storeCode string 18465 urlParams_ gensupport.URLParams 18466 ifNoneMatch_ string 18467 ctx_ context.Context 18468 header_ http.Header 18469} 18470 18471// Get: Retrieves information about the given store. 18472func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { 18473 c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18474 c.merchantId = merchantId 18475 c.targetMerchantId = targetMerchantId 18476 c.storeCode = storeCode 18477 return c 18478} 18479 18480// Fields allows partial responses to be retrieved. See 18481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18482// for more information. 18483func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { 18484 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18485 return c 18486} 18487 18488// IfNoneMatch sets the optional parameter which makes the operation 18489// fail if the object's ETag matches the given value. This is useful for 18490// getting updates only after the object has changed since the last 18491// request. Use googleapi.IsNotModified to check whether the response 18492// error from Do is the result of In-None-Match. 18493func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { 18494 c.ifNoneMatch_ = entityTag 18495 return c 18496} 18497 18498// Context sets the context to be used in this call's Do method. Any 18499// pending HTTP request will be aborted if the provided context is 18500// canceled. 18501func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { 18502 c.ctx_ = ctx 18503 return c 18504} 18505 18506// Header returns an http.Header that can be modified by the caller to 18507// add HTTP headers to the request. 18508func (c *PosGetCall) Header() http.Header { 18509 if c.header_ == nil { 18510 c.header_ = make(http.Header) 18511 } 18512 return c.header_ 18513} 18514 18515func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { 18516 reqHeaders := make(http.Header) 18517 for k, v := range c.header_ { 18518 reqHeaders[k] = v 18519 } 18520 reqHeaders.Set("User-Agent", c.s.userAgent()) 18521 if c.ifNoneMatch_ != "" { 18522 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18523 } 18524 var body io.Reader = nil 18525 c.urlParams_.Set("alt", alt) 18526 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 18527 urls += "?" + c.urlParams_.Encode() 18528 req, _ := http.NewRequest("GET", urls, body) 18529 req.Header = reqHeaders 18530 googleapi.Expand(req.URL, map[string]string{ 18531 "merchantId": strconv.FormatUint(c.merchantId, 10), 18532 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 18533 "storeCode": c.storeCode, 18534 }) 18535 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18536} 18537 18538// Do executes the "content.pos.get" call. 18539// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 18540// code is an error. Response headers are in either 18541// *PosStore.ServerResponse.Header or (if a response was returned at 18542// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18543// to check whether the returned error was because 18544// http.StatusNotModified was returned. 18545func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 18546 gensupport.SetOptions(c.urlParams_, opts...) 18547 res, err := c.doRequest("json") 18548 if res != nil && res.StatusCode == http.StatusNotModified { 18549 if res.Body != nil { 18550 res.Body.Close() 18551 } 18552 return nil, &googleapi.Error{ 18553 Code: res.StatusCode, 18554 Header: res.Header, 18555 } 18556 } 18557 if err != nil { 18558 return nil, err 18559 } 18560 defer googleapi.CloseBody(res) 18561 if err := googleapi.CheckResponse(res); err != nil { 18562 return nil, err 18563 } 18564 ret := &PosStore{ 18565 ServerResponse: googleapi.ServerResponse{ 18566 Header: res.Header, 18567 HTTPStatusCode: res.StatusCode, 18568 }, 18569 } 18570 target := &ret 18571 if err := gensupport.DecodeResponse(target, res); err != nil { 18572 return nil, err 18573 } 18574 return ret, nil 18575 // { 18576 // "description": "Retrieves information about the given store.", 18577 // "httpMethod": "GET", 18578 // "id": "content.pos.get", 18579 // "parameterOrder": [ 18580 // "merchantId", 18581 // "targetMerchantId", 18582 // "storeCode" 18583 // ], 18584 // "parameters": { 18585 // "merchantId": { 18586 // "description": "The ID of the POS or inventory data provider.", 18587 // "format": "uint64", 18588 // "location": "path", 18589 // "required": true, 18590 // "type": "string" 18591 // }, 18592 // "storeCode": { 18593 // "description": "A store code that is unique per merchant.", 18594 // "location": "path", 18595 // "required": true, 18596 // "type": "string" 18597 // }, 18598 // "targetMerchantId": { 18599 // "description": "The ID of the target merchant.", 18600 // "format": "uint64", 18601 // "location": "path", 18602 // "required": true, 18603 // "type": "string" 18604 // } 18605 // }, 18606 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 18607 // "response": { 18608 // "$ref": "PosStore" 18609 // }, 18610 // "scopes": [ 18611 // "https://www.googleapis.com/auth/content" 18612 // ] 18613 // } 18614 18615} 18616 18617// method id "content.pos.insert": 18618 18619type PosInsertCall struct { 18620 s *APIService 18621 merchantId uint64 18622 targetMerchantId uint64 18623 posstore *PosStore 18624 urlParams_ gensupport.URLParams 18625 ctx_ context.Context 18626 header_ http.Header 18627} 18628 18629// Insert: Creates a store for the given merchant. 18630func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { 18631 c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18632 c.merchantId = merchantId 18633 c.targetMerchantId = targetMerchantId 18634 c.posstore = posstore 18635 return c 18636} 18637 18638// DryRun sets the optional parameter "dryRun": Flag to run the request 18639// in dry-run mode. 18640func (c *PosInsertCall) DryRun(dryRun bool) *PosInsertCall { 18641 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18642 return c 18643} 18644 18645// Fields allows partial responses to be retrieved. See 18646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18647// for more information. 18648func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { 18649 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18650 return c 18651} 18652 18653// Context sets the context to be used in this call's Do method. Any 18654// pending HTTP request will be aborted if the provided context is 18655// canceled. 18656func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { 18657 c.ctx_ = ctx 18658 return c 18659} 18660 18661// Header returns an http.Header that can be modified by the caller to 18662// add HTTP headers to the request. 18663func (c *PosInsertCall) Header() http.Header { 18664 if c.header_ == nil { 18665 c.header_ = make(http.Header) 18666 } 18667 return c.header_ 18668} 18669 18670func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { 18671 reqHeaders := make(http.Header) 18672 for k, v := range c.header_ { 18673 reqHeaders[k] = v 18674 } 18675 reqHeaders.Set("User-Agent", c.s.userAgent()) 18676 var body io.Reader = nil 18677 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore) 18678 if err != nil { 18679 return nil, err 18680 } 18681 reqHeaders.Set("Content-Type", "application/json") 18682 c.urlParams_.Set("alt", alt) 18683 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 18684 urls += "?" + c.urlParams_.Encode() 18685 req, _ := http.NewRequest("POST", urls, body) 18686 req.Header = reqHeaders 18687 googleapi.Expand(req.URL, map[string]string{ 18688 "merchantId": strconv.FormatUint(c.merchantId, 10), 18689 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 18690 }) 18691 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18692} 18693 18694// Do executes the "content.pos.insert" call. 18695// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 18696// code is an error. Response headers are in either 18697// *PosStore.ServerResponse.Header or (if a response was returned at 18698// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18699// to check whether the returned error was because 18700// http.StatusNotModified was returned. 18701func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 18702 gensupport.SetOptions(c.urlParams_, opts...) 18703 res, err := c.doRequest("json") 18704 if res != nil && res.StatusCode == http.StatusNotModified { 18705 if res.Body != nil { 18706 res.Body.Close() 18707 } 18708 return nil, &googleapi.Error{ 18709 Code: res.StatusCode, 18710 Header: res.Header, 18711 } 18712 } 18713 if err != nil { 18714 return nil, err 18715 } 18716 defer googleapi.CloseBody(res) 18717 if err := googleapi.CheckResponse(res); err != nil { 18718 return nil, err 18719 } 18720 ret := &PosStore{ 18721 ServerResponse: googleapi.ServerResponse{ 18722 Header: res.Header, 18723 HTTPStatusCode: res.StatusCode, 18724 }, 18725 } 18726 target := &ret 18727 if err := gensupport.DecodeResponse(target, res); err != nil { 18728 return nil, err 18729 } 18730 return ret, nil 18731 // { 18732 // "description": "Creates a store for the given merchant.", 18733 // "httpMethod": "POST", 18734 // "id": "content.pos.insert", 18735 // "parameterOrder": [ 18736 // "merchantId", 18737 // "targetMerchantId" 18738 // ], 18739 // "parameters": { 18740 // "dryRun": { 18741 // "description": "Flag to run the request in dry-run mode.", 18742 // "location": "query", 18743 // "type": "boolean" 18744 // }, 18745 // "merchantId": { 18746 // "description": "The ID of the POS or inventory data provider.", 18747 // "format": "uint64", 18748 // "location": "path", 18749 // "required": true, 18750 // "type": "string" 18751 // }, 18752 // "targetMerchantId": { 18753 // "description": "The ID of the target merchant.", 18754 // "format": "uint64", 18755 // "location": "path", 18756 // "required": true, 18757 // "type": "string" 18758 // } 18759 // }, 18760 // "path": "{merchantId}/pos/{targetMerchantId}/store", 18761 // "request": { 18762 // "$ref": "PosStore" 18763 // }, 18764 // "response": { 18765 // "$ref": "PosStore" 18766 // }, 18767 // "scopes": [ 18768 // "https://www.googleapis.com/auth/content" 18769 // ] 18770 // } 18771 18772} 18773 18774// method id "content.pos.inventory": 18775 18776type PosInventoryCall struct { 18777 s *APIService 18778 merchantId uint64 18779 targetMerchantId uint64 18780 posinventoryrequest *PosInventoryRequest 18781 urlParams_ gensupport.URLParams 18782 ctx_ context.Context 18783 header_ http.Header 18784} 18785 18786// Inventory: Submit inventory for the given merchant. 18787func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { 18788 c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18789 c.merchantId = merchantId 18790 c.targetMerchantId = targetMerchantId 18791 c.posinventoryrequest = posinventoryrequest 18792 return c 18793} 18794 18795// DryRun sets the optional parameter "dryRun": Flag to run the request 18796// in dry-run mode. 18797func (c *PosInventoryCall) DryRun(dryRun bool) *PosInventoryCall { 18798 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18799 return c 18800} 18801 18802// Fields allows partial responses to be retrieved. See 18803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18804// for more information. 18805func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { 18806 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18807 return c 18808} 18809 18810// Context sets the context to be used in this call's Do method. Any 18811// pending HTTP request will be aborted if the provided context is 18812// canceled. 18813func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { 18814 c.ctx_ = ctx 18815 return c 18816} 18817 18818// Header returns an http.Header that can be modified by the caller to 18819// add HTTP headers to the request. 18820func (c *PosInventoryCall) Header() http.Header { 18821 if c.header_ == nil { 18822 c.header_ = make(http.Header) 18823 } 18824 return c.header_ 18825} 18826 18827func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { 18828 reqHeaders := make(http.Header) 18829 for k, v := range c.header_ { 18830 reqHeaders[k] = v 18831 } 18832 reqHeaders.Set("User-Agent", c.s.userAgent()) 18833 var body io.Reader = nil 18834 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest) 18835 if err != nil { 18836 return nil, err 18837 } 18838 reqHeaders.Set("Content-Type", "application/json") 18839 c.urlParams_.Set("alt", alt) 18840 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") 18841 urls += "?" + c.urlParams_.Encode() 18842 req, _ := http.NewRequest("POST", urls, body) 18843 req.Header = reqHeaders 18844 googleapi.Expand(req.URL, map[string]string{ 18845 "merchantId": strconv.FormatUint(c.merchantId, 10), 18846 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 18847 }) 18848 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18849} 18850 18851// Do executes the "content.pos.inventory" call. 18852// Exactly one of *PosInventoryResponse or error will be non-nil. Any 18853// non-2xx status code is an error. Response headers are in either 18854// *PosInventoryResponse.ServerResponse.Header or (if a response was 18855// returned at all) in error.(*googleapi.Error).Header. Use 18856// googleapi.IsNotModified to check whether the returned error was 18857// because http.StatusNotModified was returned. 18858func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { 18859 gensupport.SetOptions(c.urlParams_, opts...) 18860 res, err := c.doRequest("json") 18861 if res != nil && res.StatusCode == http.StatusNotModified { 18862 if res.Body != nil { 18863 res.Body.Close() 18864 } 18865 return nil, &googleapi.Error{ 18866 Code: res.StatusCode, 18867 Header: res.Header, 18868 } 18869 } 18870 if err != nil { 18871 return nil, err 18872 } 18873 defer googleapi.CloseBody(res) 18874 if err := googleapi.CheckResponse(res); err != nil { 18875 return nil, err 18876 } 18877 ret := &PosInventoryResponse{ 18878 ServerResponse: googleapi.ServerResponse{ 18879 Header: res.Header, 18880 HTTPStatusCode: res.StatusCode, 18881 }, 18882 } 18883 target := &ret 18884 if err := gensupport.DecodeResponse(target, res); err != nil { 18885 return nil, err 18886 } 18887 return ret, nil 18888 // { 18889 // "description": "Submit inventory for the given merchant.", 18890 // "httpMethod": "POST", 18891 // "id": "content.pos.inventory", 18892 // "parameterOrder": [ 18893 // "merchantId", 18894 // "targetMerchantId" 18895 // ], 18896 // "parameters": { 18897 // "dryRun": { 18898 // "description": "Flag to run the request in dry-run mode.", 18899 // "location": "query", 18900 // "type": "boolean" 18901 // }, 18902 // "merchantId": { 18903 // "description": "The ID of the POS or inventory data provider.", 18904 // "format": "uint64", 18905 // "location": "path", 18906 // "required": true, 18907 // "type": "string" 18908 // }, 18909 // "targetMerchantId": { 18910 // "description": "The ID of the target merchant.", 18911 // "format": "uint64", 18912 // "location": "path", 18913 // "required": true, 18914 // "type": "string" 18915 // } 18916 // }, 18917 // "path": "{merchantId}/pos/{targetMerchantId}/inventory", 18918 // "request": { 18919 // "$ref": "PosInventoryRequest" 18920 // }, 18921 // "response": { 18922 // "$ref": "PosInventoryResponse" 18923 // }, 18924 // "scopes": [ 18925 // "https://www.googleapis.com/auth/content" 18926 // ] 18927 // } 18928 18929} 18930 18931// method id "content.pos.list": 18932 18933type PosListCall struct { 18934 s *APIService 18935 merchantId uint64 18936 targetMerchantId uint64 18937 urlParams_ gensupport.URLParams 18938 ifNoneMatch_ string 18939 ctx_ context.Context 18940 header_ http.Header 18941} 18942 18943// List: Lists the stores of the target merchant. 18944func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { 18945 c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18946 c.merchantId = merchantId 18947 c.targetMerchantId = targetMerchantId 18948 return c 18949} 18950 18951// Fields allows partial responses to be retrieved. See 18952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18953// for more information. 18954func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { 18955 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18956 return c 18957} 18958 18959// IfNoneMatch sets the optional parameter which makes the operation 18960// fail if the object's ETag matches the given value. This is useful for 18961// getting updates only after the object has changed since the last 18962// request. Use googleapi.IsNotModified to check whether the response 18963// error from Do is the result of In-None-Match. 18964func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { 18965 c.ifNoneMatch_ = entityTag 18966 return c 18967} 18968 18969// Context sets the context to be used in this call's Do method. Any 18970// pending HTTP request will be aborted if the provided context is 18971// canceled. 18972func (c *PosListCall) Context(ctx context.Context) *PosListCall { 18973 c.ctx_ = ctx 18974 return c 18975} 18976 18977// Header returns an http.Header that can be modified by the caller to 18978// add HTTP headers to the request. 18979func (c *PosListCall) Header() http.Header { 18980 if c.header_ == nil { 18981 c.header_ = make(http.Header) 18982 } 18983 return c.header_ 18984} 18985 18986func (c *PosListCall) doRequest(alt string) (*http.Response, error) { 18987 reqHeaders := make(http.Header) 18988 for k, v := range c.header_ { 18989 reqHeaders[k] = v 18990 } 18991 reqHeaders.Set("User-Agent", c.s.userAgent()) 18992 if c.ifNoneMatch_ != "" { 18993 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18994 } 18995 var body io.Reader = nil 18996 c.urlParams_.Set("alt", alt) 18997 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 18998 urls += "?" + c.urlParams_.Encode() 18999 req, _ := http.NewRequest("GET", urls, body) 19000 req.Header = reqHeaders 19001 googleapi.Expand(req.URL, map[string]string{ 19002 "merchantId": strconv.FormatUint(c.merchantId, 10), 19003 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 19004 }) 19005 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19006} 19007 19008// Do executes the "content.pos.list" call. 19009// Exactly one of *PosListResponse or error will be non-nil. Any non-2xx 19010// status code is an error. Response headers are in either 19011// *PosListResponse.ServerResponse.Header or (if a response was returned 19012// at all) in error.(*googleapi.Error).Header. Use 19013// googleapi.IsNotModified to check whether the returned error was 19014// because http.StatusNotModified was returned. 19015func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { 19016 gensupport.SetOptions(c.urlParams_, opts...) 19017 res, err := c.doRequest("json") 19018 if res != nil && res.StatusCode == http.StatusNotModified { 19019 if res.Body != nil { 19020 res.Body.Close() 19021 } 19022 return nil, &googleapi.Error{ 19023 Code: res.StatusCode, 19024 Header: res.Header, 19025 } 19026 } 19027 if err != nil { 19028 return nil, err 19029 } 19030 defer googleapi.CloseBody(res) 19031 if err := googleapi.CheckResponse(res); err != nil { 19032 return nil, err 19033 } 19034 ret := &PosListResponse{ 19035 ServerResponse: googleapi.ServerResponse{ 19036 Header: res.Header, 19037 HTTPStatusCode: res.StatusCode, 19038 }, 19039 } 19040 target := &ret 19041 if err := gensupport.DecodeResponse(target, res); err != nil { 19042 return nil, err 19043 } 19044 return ret, nil 19045 // { 19046 // "description": "Lists the stores of the target merchant.", 19047 // "httpMethod": "GET", 19048 // "id": "content.pos.list", 19049 // "parameterOrder": [ 19050 // "merchantId", 19051 // "targetMerchantId" 19052 // ], 19053 // "parameters": { 19054 // "merchantId": { 19055 // "description": "The ID of the POS or inventory data provider.", 19056 // "format": "uint64", 19057 // "location": "path", 19058 // "required": true, 19059 // "type": "string" 19060 // }, 19061 // "targetMerchantId": { 19062 // "description": "The ID of the target merchant.", 19063 // "format": "uint64", 19064 // "location": "path", 19065 // "required": true, 19066 // "type": "string" 19067 // } 19068 // }, 19069 // "path": "{merchantId}/pos/{targetMerchantId}/store", 19070 // "response": { 19071 // "$ref": "PosListResponse" 19072 // }, 19073 // "scopes": [ 19074 // "https://www.googleapis.com/auth/content" 19075 // ] 19076 // } 19077 19078} 19079 19080// method id "content.pos.sale": 19081 19082type PosSaleCall struct { 19083 s *APIService 19084 merchantId uint64 19085 targetMerchantId uint64 19086 possalerequest *PosSaleRequest 19087 urlParams_ gensupport.URLParams 19088 ctx_ context.Context 19089 header_ http.Header 19090} 19091 19092// Sale: Submit a sale event for the given merchant. 19093func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { 19094 c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19095 c.merchantId = merchantId 19096 c.targetMerchantId = targetMerchantId 19097 c.possalerequest = possalerequest 19098 return c 19099} 19100 19101// DryRun sets the optional parameter "dryRun": Flag to run the request 19102// in dry-run mode. 19103func (c *PosSaleCall) DryRun(dryRun bool) *PosSaleCall { 19104 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 19105 return c 19106} 19107 19108// Fields allows partial responses to be retrieved. See 19109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19110// for more information. 19111func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { 19112 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19113 return c 19114} 19115 19116// Context sets the context to be used in this call's Do method. Any 19117// pending HTTP request will be aborted if the provided context is 19118// canceled. 19119func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { 19120 c.ctx_ = ctx 19121 return c 19122} 19123 19124// Header returns an http.Header that can be modified by the caller to 19125// add HTTP headers to the request. 19126func (c *PosSaleCall) Header() http.Header { 19127 if c.header_ == nil { 19128 c.header_ = make(http.Header) 19129 } 19130 return c.header_ 19131} 19132 19133func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { 19134 reqHeaders := make(http.Header) 19135 for k, v := range c.header_ { 19136 reqHeaders[k] = v 19137 } 19138 reqHeaders.Set("User-Agent", c.s.userAgent()) 19139 var body io.Reader = nil 19140 body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest) 19141 if err != nil { 19142 return nil, err 19143 } 19144 reqHeaders.Set("Content-Type", "application/json") 19145 c.urlParams_.Set("alt", alt) 19146 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") 19147 urls += "?" + c.urlParams_.Encode() 19148 req, _ := http.NewRequest("POST", urls, body) 19149 req.Header = reqHeaders 19150 googleapi.Expand(req.URL, map[string]string{ 19151 "merchantId": strconv.FormatUint(c.merchantId, 10), 19152 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 19153 }) 19154 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19155} 19156 19157// Do executes the "content.pos.sale" call. 19158// Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx 19159// status code is an error. Response headers are in either 19160// *PosSaleResponse.ServerResponse.Header or (if a response was returned 19161// at all) in error.(*googleapi.Error).Header. Use 19162// googleapi.IsNotModified to check whether the returned error was 19163// because http.StatusNotModified was returned. 19164func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { 19165 gensupport.SetOptions(c.urlParams_, opts...) 19166 res, err := c.doRequest("json") 19167 if res != nil && res.StatusCode == http.StatusNotModified { 19168 if res.Body != nil { 19169 res.Body.Close() 19170 } 19171 return nil, &googleapi.Error{ 19172 Code: res.StatusCode, 19173 Header: res.Header, 19174 } 19175 } 19176 if err != nil { 19177 return nil, err 19178 } 19179 defer googleapi.CloseBody(res) 19180 if err := googleapi.CheckResponse(res); err != nil { 19181 return nil, err 19182 } 19183 ret := &PosSaleResponse{ 19184 ServerResponse: googleapi.ServerResponse{ 19185 Header: res.Header, 19186 HTTPStatusCode: res.StatusCode, 19187 }, 19188 } 19189 target := &ret 19190 if err := gensupport.DecodeResponse(target, res); err != nil { 19191 return nil, err 19192 } 19193 return ret, nil 19194 // { 19195 // "description": "Submit a sale event for the given merchant.", 19196 // "httpMethod": "POST", 19197 // "id": "content.pos.sale", 19198 // "parameterOrder": [ 19199 // "merchantId", 19200 // "targetMerchantId" 19201 // ], 19202 // "parameters": { 19203 // "dryRun": { 19204 // "description": "Flag to run the request in dry-run mode.", 19205 // "location": "query", 19206 // "type": "boolean" 19207 // }, 19208 // "merchantId": { 19209 // "description": "The ID of the POS or inventory data provider.", 19210 // "format": "uint64", 19211 // "location": "path", 19212 // "required": true, 19213 // "type": "string" 19214 // }, 19215 // "targetMerchantId": { 19216 // "description": "The ID of the target merchant.", 19217 // "format": "uint64", 19218 // "location": "path", 19219 // "required": true, 19220 // "type": "string" 19221 // } 19222 // }, 19223 // "path": "{merchantId}/pos/{targetMerchantId}/sale", 19224 // "request": { 19225 // "$ref": "PosSaleRequest" 19226 // }, 19227 // "response": { 19228 // "$ref": "PosSaleResponse" 19229 // }, 19230 // "scopes": [ 19231 // "https://www.googleapis.com/auth/content" 19232 // ] 19233 // } 19234 19235} 19236 19237// method id "content.products.custombatch": 19238 19239type ProductsCustombatchCall struct { 19240 s *APIService 19241 productscustombatchrequest *ProductsCustomBatchRequest 19242 urlParams_ gensupport.URLParams 19243 ctx_ context.Context 19244 header_ http.Header 19245} 19246 19247// Custombatch: Retrieves, inserts, and deletes multiple products in a 19248// single request. 19249func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { 19250 c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19251 c.productscustombatchrequest = productscustombatchrequest 19252 return c 19253} 19254 19255// DryRun sets the optional parameter "dryRun": Flag to run the request 19256// in dry-run mode. 19257func (c *ProductsCustombatchCall) DryRun(dryRun bool) *ProductsCustombatchCall { 19258 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 19259 return c 19260} 19261 19262// Fields allows partial responses to be retrieved. See 19263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19264// for more information. 19265func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { 19266 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19267 return c 19268} 19269 19270// Context sets the context to be used in this call's Do method. Any 19271// pending HTTP request will be aborted if the provided context is 19272// canceled. 19273func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { 19274 c.ctx_ = ctx 19275 return c 19276} 19277 19278// Header returns an http.Header that can be modified by the caller to 19279// add HTTP headers to the request. 19280func (c *ProductsCustombatchCall) Header() http.Header { 19281 if c.header_ == nil { 19282 c.header_ = make(http.Header) 19283 } 19284 return c.header_ 19285} 19286 19287func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { 19288 reqHeaders := make(http.Header) 19289 for k, v := range c.header_ { 19290 reqHeaders[k] = v 19291 } 19292 reqHeaders.Set("User-Agent", c.s.userAgent()) 19293 var body io.Reader = nil 19294 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest) 19295 if err != nil { 19296 return nil, err 19297 } 19298 reqHeaders.Set("Content-Type", "application/json") 19299 c.urlParams_.Set("alt", alt) 19300 urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") 19301 urls += "?" + c.urlParams_.Encode() 19302 req, _ := http.NewRequest("POST", urls, body) 19303 req.Header = reqHeaders 19304 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19305} 19306 19307// Do executes the "content.products.custombatch" call. 19308// Exactly one of *ProductsCustomBatchResponse or error will be non-nil. 19309// Any non-2xx status code is an error. Response headers are in either 19310// *ProductsCustomBatchResponse.ServerResponse.Header or (if a response 19311// was returned at all) in error.(*googleapi.Error).Header. Use 19312// googleapi.IsNotModified to check whether the returned error was 19313// because http.StatusNotModified was returned. 19314func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { 19315 gensupport.SetOptions(c.urlParams_, opts...) 19316 res, err := c.doRequest("json") 19317 if res != nil && res.StatusCode == http.StatusNotModified { 19318 if res.Body != nil { 19319 res.Body.Close() 19320 } 19321 return nil, &googleapi.Error{ 19322 Code: res.StatusCode, 19323 Header: res.Header, 19324 } 19325 } 19326 if err != nil { 19327 return nil, err 19328 } 19329 defer googleapi.CloseBody(res) 19330 if err := googleapi.CheckResponse(res); err != nil { 19331 return nil, err 19332 } 19333 ret := &ProductsCustomBatchResponse{ 19334 ServerResponse: googleapi.ServerResponse{ 19335 Header: res.Header, 19336 HTTPStatusCode: res.StatusCode, 19337 }, 19338 } 19339 target := &ret 19340 if err := gensupport.DecodeResponse(target, res); err != nil { 19341 return nil, err 19342 } 19343 return ret, nil 19344 // { 19345 // "description": "Retrieves, inserts, and deletes multiple products in a single request.", 19346 // "httpMethod": "POST", 19347 // "id": "content.products.custombatch", 19348 // "parameters": { 19349 // "dryRun": { 19350 // "description": "Flag to run the request in dry-run mode.", 19351 // "location": "query", 19352 // "type": "boolean" 19353 // } 19354 // }, 19355 // "path": "products/batch", 19356 // "request": { 19357 // "$ref": "ProductsCustomBatchRequest" 19358 // }, 19359 // "response": { 19360 // "$ref": "ProductsCustomBatchResponse" 19361 // }, 19362 // "scopes": [ 19363 // "https://www.googleapis.com/auth/content" 19364 // ] 19365 // } 19366 19367} 19368 19369// method id "content.products.delete": 19370 19371type ProductsDeleteCall struct { 19372 s *APIService 19373 merchantId uint64 19374 productId string 19375 urlParams_ gensupport.URLParams 19376 ctx_ context.Context 19377 header_ http.Header 19378} 19379 19380// Delete: Deletes a product from your Merchant Center account. 19381func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { 19382 c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19383 c.merchantId = merchantId 19384 c.productId = productId 19385 return c 19386} 19387 19388// DryRun sets the optional parameter "dryRun": Flag to run the request 19389// in dry-run mode. 19390func (c *ProductsDeleteCall) DryRun(dryRun bool) *ProductsDeleteCall { 19391 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 19392 return c 19393} 19394 19395// Fields allows partial responses to be retrieved. See 19396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19397// for more information. 19398func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { 19399 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19400 return c 19401} 19402 19403// Context sets the context to be used in this call's Do method. Any 19404// pending HTTP request will be aborted if the provided context is 19405// canceled. 19406func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { 19407 c.ctx_ = ctx 19408 return c 19409} 19410 19411// Header returns an http.Header that can be modified by the caller to 19412// add HTTP headers to the request. 19413func (c *ProductsDeleteCall) Header() http.Header { 19414 if c.header_ == nil { 19415 c.header_ = make(http.Header) 19416 } 19417 return c.header_ 19418} 19419 19420func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { 19421 reqHeaders := make(http.Header) 19422 for k, v := range c.header_ { 19423 reqHeaders[k] = v 19424 } 19425 reqHeaders.Set("User-Agent", c.s.userAgent()) 19426 var body io.Reader = nil 19427 c.urlParams_.Set("alt", alt) 19428 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 19429 urls += "?" + c.urlParams_.Encode() 19430 req, _ := http.NewRequest("DELETE", urls, body) 19431 req.Header = reqHeaders 19432 googleapi.Expand(req.URL, map[string]string{ 19433 "merchantId": strconv.FormatUint(c.merchantId, 10), 19434 "productId": c.productId, 19435 }) 19436 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19437} 19438 19439// Do executes the "content.products.delete" call. 19440func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { 19441 gensupport.SetOptions(c.urlParams_, opts...) 19442 res, err := c.doRequest("json") 19443 if err != nil { 19444 return err 19445 } 19446 defer googleapi.CloseBody(res) 19447 if err := googleapi.CheckResponse(res); err != nil { 19448 return err 19449 } 19450 return nil 19451 // { 19452 // "description": "Deletes a product from your Merchant Center account.", 19453 // "httpMethod": "DELETE", 19454 // "id": "content.products.delete", 19455 // "parameterOrder": [ 19456 // "merchantId", 19457 // "productId" 19458 // ], 19459 // "parameters": { 19460 // "dryRun": { 19461 // "description": "Flag to run the request in dry-run mode.", 19462 // "location": "query", 19463 // "type": "boolean" 19464 // }, 19465 // "merchantId": { 19466 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 19467 // "format": "uint64", 19468 // "location": "path", 19469 // "required": true, 19470 // "type": "string" 19471 // }, 19472 // "productId": { 19473 // "description": "The REST id of the product.", 19474 // "location": "path", 19475 // "required": true, 19476 // "type": "string" 19477 // } 19478 // }, 19479 // "path": "{merchantId}/products/{productId}", 19480 // "scopes": [ 19481 // "https://www.googleapis.com/auth/content" 19482 // ] 19483 // } 19484 19485} 19486 19487// method id "content.products.get": 19488 19489type ProductsGetCall struct { 19490 s *APIService 19491 merchantId uint64 19492 productId string 19493 urlParams_ gensupport.URLParams 19494 ifNoneMatch_ string 19495 ctx_ context.Context 19496 header_ http.Header 19497} 19498 19499// Get: Retrieves a product from your Merchant Center account. 19500func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { 19501 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19502 c.merchantId = merchantId 19503 c.productId = productId 19504 return c 19505} 19506 19507// Fields allows partial responses to be retrieved. See 19508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19509// for more information. 19510func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { 19511 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19512 return c 19513} 19514 19515// IfNoneMatch sets the optional parameter which makes the operation 19516// fail if the object's ETag matches the given value. This is useful for 19517// getting updates only after the object has changed since the last 19518// request. Use googleapi.IsNotModified to check whether the response 19519// error from Do is the result of In-None-Match. 19520func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { 19521 c.ifNoneMatch_ = entityTag 19522 return c 19523} 19524 19525// Context sets the context to be used in this call's Do method. Any 19526// pending HTTP request will be aborted if the provided context is 19527// canceled. 19528func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { 19529 c.ctx_ = ctx 19530 return c 19531} 19532 19533// Header returns an http.Header that can be modified by the caller to 19534// add HTTP headers to the request. 19535func (c *ProductsGetCall) Header() http.Header { 19536 if c.header_ == nil { 19537 c.header_ = make(http.Header) 19538 } 19539 return c.header_ 19540} 19541 19542func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { 19543 reqHeaders := make(http.Header) 19544 for k, v := range c.header_ { 19545 reqHeaders[k] = v 19546 } 19547 reqHeaders.Set("User-Agent", c.s.userAgent()) 19548 if c.ifNoneMatch_ != "" { 19549 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19550 } 19551 var body io.Reader = nil 19552 c.urlParams_.Set("alt", alt) 19553 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 19554 urls += "?" + c.urlParams_.Encode() 19555 req, _ := http.NewRequest("GET", urls, body) 19556 req.Header = reqHeaders 19557 googleapi.Expand(req.URL, map[string]string{ 19558 "merchantId": strconv.FormatUint(c.merchantId, 10), 19559 "productId": c.productId, 19560 }) 19561 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19562} 19563 19564// Do executes the "content.products.get" call. 19565// Exactly one of *Product or error will be non-nil. Any non-2xx status 19566// code is an error. Response headers are in either 19567// *Product.ServerResponse.Header or (if a response was returned at all) 19568// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19569// check whether the returned error was because http.StatusNotModified 19570// was returned. 19571func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { 19572 gensupport.SetOptions(c.urlParams_, opts...) 19573 res, err := c.doRequest("json") 19574 if res != nil && res.StatusCode == http.StatusNotModified { 19575 if res.Body != nil { 19576 res.Body.Close() 19577 } 19578 return nil, &googleapi.Error{ 19579 Code: res.StatusCode, 19580 Header: res.Header, 19581 } 19582 } 19583 if err != nil { 19584 return nil, err 19585 } 19586 defer googleapi.CloseBody(res) 19587 if err := googleapi.CheckResponse(res); err != nil { 19588 return nil, err 19589 } 19590 ret := &Product{ 19591 ServerResponse: googleapi.ServerResponse{ 19592 Header: res.Header, 19593 HTTPStatusCode: res.StatusCode, 19594 }, 19595 } 19596 target := &ret 19597 if err := gensupport.DecodeResponse(target, res); err != nil { 19598 return nil, err 19599 } 19600 return ret, nil 19601 // { 19602 // "description": "Retrieves a product from your Merchant Center account.", 19603 // "httpMethod": "GET", 19604 // "id": "content.products.get", 19605 // "parameterOrder": [ 19606 // "merchantId", 19607 // "productId" 19608 // ], 19609 // "parameters": { 19610 // "merchantId": { 19611 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 19612 // "format": "uint64", 19613 // "location": "path", 19614 // "required": true, 19615 // "type": "string" 19616 // }, 19617 // "productId": { 19618 // "description": "The REST id of the product.", 19619 // "location": "path", 19620 // "required": true, 19621 // "type": "string" 19622 // } 19623 // }, 19624 // "path": "{merchantId}/products/{productId}", 19625 // "response": { 19626 // "$ref": "Product" 19627 // }, 19628 // "scopes": [ 19629 // "https://www.googleapis.com/auth/content" 19630 // ] 19631 // } 19632 19633} 19634 19635// method id "content.products.insert": 19636 19637type ProductsInsertCall struct { 19638 s *APIService 19639 merchantId uint64 19640 product *Product 19641 urlParams_ gensupport.URLParams 19642 ctx_ context.Context 19643 header_ http.Header 19644} 19645 19646// Insert: Uploads a product to your Merchant Center account. If an item 19647// with the same channel, contentLanguage, offerId, and targetCountry 19648// already exists, this method updates that entry. 19649func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { 19650 c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19651 c.merchantId = merchantId 19652 c.product = product 19653 return c 19654} 19655 19656// DryRun sets the optional parameter "dryRun": Flag to run the request 19657// in dry-run mode. 19658func (c *ProductsInsertCall) DryRun(dryRun bool) *ProductsInsertCall { 19659 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 19660 return c 19661} 19662 19663// Fields allows partial responses to be retrieved. See 19664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19665// for more information. 19666func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { 19667 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19668 return c 19669} 19670 19671// Context sets the context to be used in this call's Do method. Any 19672// pending HTTP request will be aborted if the provided context is 19673// canceled. 19674func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { 19675 c.ctx_ = ctx 19676 return c 19677} 19678 19679// Header returns an http.Header that can be modified by the caller to 19680// add HTTP headers to the request. 19681func (c *ProductsInsertCall) Header() http.Header { 19682 if c.header_ == nil { 19683 c.header_ = make(http.Header) 19684 } 19685 return c.header_ 19686} 19687 19688func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { 19689 reqHeaders := make(http.Header) 19690 for k, v := range c.header_ { 19691 reqHeaders[k] = v 19692 } 19693 reqHeaders.Set("User-Agent", c.s.userAgent()) 19694 var body io.Reader = nil 19695 body, err := googleapi.WithoutDataWrapper.JSONReader(c.product) 19696 if err != nil { 19697 return nil, err 19698 } 19699 reqHeaders.Set("Content-Type", "application/json") 19700 c.urlParams_.Set("alt", alt) 19701 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 19702 urls += "?" + c.urlParams_.Encode() 19703 req, _ := http.NewRequest("POST", urls, body) 19704 req.Header = reqHeaders 19705 googleapi.Expand(req.URL, map[string]string{ 19706 "merchantId": strconv.FormatUint(c.merchantId, 10), 19707 }) 19708 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19709} 19710 19711// Do executes the "content.products.insert" call. 19712// Exactly one of *Product or error will be non-nil. Any non-2xx status 19713// code is an error. Response headers are in either 19714// *Product.ServerResponse.Header or (if a response was returned at all) 19715// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19716// check whether the returned error was because http.StatusNotModified 19717// was returned. 19718func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { 19719 gensupport.SetOptions(c.urlParams_, opts...) 19720 res, err := c.doRequest("json") 19721 if res != nil && res.StatusCode == http.StatusNotModified { 19722 if res.Body != nil { 19723 res.Body.Close() 19724 } 19725 return nil, &googleapi.Error{ 19726 Code: res.StatusCode, 19727 Header: res.Header, 19728 } 19729 } 19730 if err != nil { 19731 return nil, err 19732 } 19733 defer googleapi.CloseBody(res) 19734 if err := googleapi.CheckResponse(res); err != nil { 19735 return nil, err 19736 } 19737 ret := &Product{ 19738 ServerResponse: googleapi.ServerResponse{ 19739 Header: res.Header, 19740 HTTPStatusCode: res.StatusCode, 19741 }, 19742 } 19743 target := &ret 19744 if err := gensupport.DecodeResponse(target, res); err != nil { 19745 return nil, err 19746 } 19747 return ret, nil 19748 // { 19749 // "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", 19750 // "httpMethod": "POST", 19751 // "id": "content.products.insert", 19752 // "parameterOrder": [ 19753 // "merchantId" 19754 // ], 19755 // "parameters": { 19756 // "dryRun": { 19757 // "description": "Flag to run the request in dry-run mode.", 19758 // "location": "query", 19759 // "type": "boolean" 19760 // }, 19761 // "merchantId": { 19762 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 19763 // "format": "uint64", 19764 // "location": "path", 19765 // "required": true, 19766 // "type": "string" 19767 // } 19768 // }, 19769 // "path": "{merchantId}/products", 19770 // "request": { 19771 // "$ref": "Product" 19772 // }, 19773 // "response": { 19774 // "$ref": "Product" 19775 // }, 19776 // "scopes": [ 19777 // "https://www.googleapis.com/auth/content" 19778 // ] 19779 // } 19780 19781} 19782 19783// method id "content.products.list": 19784 19785type ProductsListCall struct { 19786 s *APIService 19787 merchantId uint64 19788 urlParams_ gensupport.URLParams 19789 ifNoneMatch_ string 19790 ctx_ context.Context 19791 header_ http.Header 19792} 19793 19794// List: Lists the products in your Merchant Center account. 19795func (r *ProductsService) List(merchantId uint64) *ProductsListCall { 19796 c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19797 c.merchantId = merchantId 19798 return c 19799} 19800 19801// IncludeInvalidInsertedItems sets the optional parameter 19802// "includeInvalidInsertedItems": Flag to include the invalid inserted 19803// items in the result of the list request. By default the invalid items 19804// are not shown (the default value is false). 19805func (c *ProductsListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductsListCall { 19806 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 19807 return c 19808} 19809 19810// MaxResults sets the optional parameter "maxResults": The maximum 19811// number of products to return in the response, used for paging. 19812func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { 19813 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19814 return c 19815} 19816 19817// PageToken sets the optional parameter "pageToken": The token returned 19818// by the previous request. 19819func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { 19820 c.urlParams_.Set("pageToken", pageToken) 19821 return c 19822} 19823 19824// Fields allows partial responses to be retrieved. See 19825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19826// for more information. 19827func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { 19828 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19829 return c 19830} 19831 19832// IfNoneMatch sets the optional parameter which makes the operation 19833// fail if the object's ETag matches the given value. This is useful for 19834// getting updates only after the object has changed since the last 19835// request. Use googleapi.IsNotModified to check whether the response 19836// error from Do is the result of In-None-Match. 19837func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { 19838 c.ifNoneMatch_ = entityTag 19839 return c 19840} 19841 19842// Context sets the context to be used in this call's Do method. Any 19843// pending HTTP request will be aborted if the provided context is 19844// canceled. 19845func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { 19846 c.ctx_ = ctx 19847 return c 19848} 19849 19850// Header returns an http.Header that can be modified by the caller to 19851// add HTTP headers to the request. 19852func (c *ProductsListCall) Header() http.Header { 19853 if c.header_ == nil { 19854 c.header_ = make(http.Header) 19855 } 19856 return c.header_ 19857} 19858 19859func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { 19860 reqHeaders := make(http.Header) 19861 for k, v := range c.header_ { 19862 reqHeaders[k] = v 19863 } 19864 reqHeaders.Set("User-Agent", c.s.userAgent()) 19865 if c.ifNoneMatch_ != "" { 19866 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19867 } 19868 var body io.Reader = nil 19869 c.urlParams_.Set("alt", alt) 19870 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 19871 urls += "?" + c.urlParams_.Encode() 19872 req, _ := http.NewRequest("GET", urls, body) 19873 req.Header = reqHeaders 19874 googleapi.Expand(req.URL, map[string]string{ 19875 "merchantId": strconv.FormatUint(c.merchantId, 10), 19876 }) 19877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19878} 19879 19880// Do executes the "content.products.list" call. 19881// Exactly one of *ProductsListResponse or error will be non-nil. Any 19882// non-2xx status code is an error. Response headers are in either 19883// *ProductsListResponse.ServerResponse.Header or (if a response was 19884// returned at all) in error.(*googleapi.Error).Header. Use 19885// googleapi.IsNotModified to check whether the returned error was 19886// because http.StatusNotModified was returned. 19887func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { 19888 gensupport.SetOptions(c.urlParams_, opts...) 19889 res, err := c.doRequest("json") 19890 if res != nil && res.StatusCode == http.StatusNotModified { 19891 if res.Body != nil { 19892 res.Body.Close() 19893 } 19894 return nil, &googleapi.Error{ 19895 Code: res.StatusCode, 19896 Header: res.Header, 19897 } 19898 } 19899 if err != nil { 19900 return nil, err 19901 } 19902 defer googleapi.CloseBody(res) 19903 if err := googleapi.CheckResponse(res); err != nil { 19904 return nil, err 19905 } 19906 ret := &ProductsListResponse{ 19907 ServerResponse: googleapi.ServerResponse{ 19908 Header: res.Header, 19909 HTTPStatusCode: res.StatusCode, 19910 }, 19911 } 19912 target := &ret 19913 if err := gensupport.DecodeResponse(target, res); err != nil { 19914 return nil, err 19915 } 19916 return ret, nil 19917 // { 19918 // "description": "Lists the products in your Merchant Center account.", 19919 // "httpMethod": "GET", 19920 // "id": "content.products.list", 19921 // "parameterOrder": [ 19922 // "merchantId" 19923 // ], 19924 // "parameters": { 19925 // "includeInvalidInsertedItems": { 19926 // "description": "Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).", 19927 // "location": "query", 19928 // "type": "boolean" 19929 // }, 19930 // "maxResults": { 19931 // "description": "The maximum number of products to return in the response, used for paging.", 19932 // "format": "uint32", 19933 // "location": "query", 19934 // "type": "integer" 19935 // }, 19936 // "merchantId": { 19937 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 19938 // "format": "uint64", 19939 // "location": "path", 19940 // "required": true, 19941 // "type": "string" 19942 // }, 19943 // "pageToken": { 19944 // "description": "The token returned by the previous request.", 19945 // "location": "query", 19946 // "type": "string" 19947 // } 19948 // }, 19949 // "path": "{merchantId}/products", 19950 // "response": { 19951 // "$ref": "ProductsListResponse" 19952 // }, 19953 // "scopes": [ 19954 // "https://www.googleapis.com/auth/content" 19955 // ] 19956 // } 19957 19958} 19959 19960// Pages invokes f for each page of results. 19961// A non-nil error returned from f will halt the iteration. 19962// The provided context supersedes any context provided to the Context method. 19963func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { 19964 c.ctx_ = ctx 19965 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19966 for { 19967 x, err := c.Do() 19968 if err != nil { 19969 return err 19970 } 19971 if err := f(x); err != nil { 19972 return err 19973 } 19974 if x.NextPageToken == "" { 19975 return nil 19976 } 19977 c.PageToken(x.NextPageToken) 19978 } 19979} 19980 19981// method id "content.productstatuses.custombatch": 19982 19983type ProductstatusesCustombatchCall struct { 19984 s *APIService 19985 productstatusescustombatchrequest *ProductstatusesCustomBatchRequest 19986 urlParams_ gensupport.URLParams 19987 ctx_ context.Context 19988 header_ http.Header 19989} 19990 19991// Custombatch: Gets the statuses of multiple products in a single 19992// request. 19993func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { 19994 c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19995 c.productstatusescustombatchrequest = productstatusescustombatchrequest 19996 return c 19997} 19998 19999// IncludeAttributes sets the optional parameter "includeAttributes": 20000// Flag to include full product data in the results of this request. The 20001// default value is false. 20002func (c *ProductstatusesCustombatchCall) IncludeAttributes(includeAttributes bool) *ProductstatusesCustombatchCall { 20003 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 20004 return c 20005} 20006 20007// Fields allows partial responses to be retrieved. See 20008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20009// for more information. 20010func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { 20011 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20012 return c 20013} 20014 20015// Context sets the context to be used in this call's Do method. Any 20016// pending HTTP request will be aborted if the provided context is 20017// canceled. 20018func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { 20019 c.ctx_ = ctx 20020 return c 20021} 20022 20023// Header returns an http.Header that can be modified by the caller to 20024// add HTTP headers to the request. 20025func (c *ProductstatusesCustombatchCall) Header() http.Header { 20026 if c.header_ == nil { 20027 c.header_ = make(http.Header) 20028 } 20029 return c.header_ 20030} 20031 20032func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 20033 reqHeaders := make(http.Header) 20034 for k, v := range c.header_ { 20035 reqHeaders[k] = v 20036 } 20037 reqHeaders.Set("User-Agent", c.s.userAgent()) 20038 var body io.Reader = nil 20039 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest) 20040 if err != nil { 20041 return nil, err 20042 } 20043 reqHeaders.Set("Content-Type", "application/json") 20044 c.urlParams_.Set("alt", alt) 20045 urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") 20046 urls += "?" + c.urlParams_.Encode() 20047 req, _ := http.NewRequest("POST", urls, body) 20048 req.Header = reqHeaders 20049 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20050} 20051 20052// Do executes the "content.productstatuses.custombatch" call. 20053// Exactly one of *ProductstatusesCustomBatchResponse or error will be 20054// non-nil. Any non-2xx status code is an error. Response headers are in 20055// either *ProductstatusesCustomBatchResponse.ServerResponse.Header or 20056// (if a response was returned at all) in 20057// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20058// whether the returned error was because http.StatusNotModified was 20059// returned. 20060func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { 20061 gensupport.SetOptions(c.urlParams_, opts...) 20062 res, err := c.doRequest("json") 20063 if res != nil && res.StatusCode == http.StatusNotModified { 20064 if res.Body != nil { 20065 res.Body.Close() 20066 } 20067 return nil, &googleapi.Error{ 20068 Code: res.StatusCode, 20069 Header: res.Header, 20070 } 20071 } 20072 if err != nil { 20073 return nil, err 20074 } 20075 defer googleapi.CloseBody(res) 20076 if err := googleapi.CheckResponse(res); err != nil { 20077 return nil, err 20078 } 20079 ret := &ProductstatusesCustomBatchResponse{ 20080 ServerResponse: googleapi.ServerResponse{ 20081 Header: res.Header, 20082 HTTPStatusCode: res.StatusCode, 20083 }, 20084 } 20085 target := &ret 20086 if err := gensupport.DecodeResponse(target, res); err != nil { 20087 return nil, err 20088 } 20089 return ret, nil 20090 // { 20091 // "description": "Gets the statuses of multiple products in a single request.", 20092 // "httpMethod": "POST", 20093 // "id": "content.productstatuses.custombatch", 20094 // "parameters": { 20095 // "includeAttributes": { 20096 // "description": "Flag to include full product data in the results of this request. The default value is false.", 20097 // "location": "query", 20098 // "type": "boolean" 20099 // } 20100 // }, 20101 // "path": "productstatuses/batch", 20102 // "request": { 20103 // "$ref": "ProductstatusesCustomBatchRequest" 20104 // }, 20105 // "response": { 20106 // "$ref": "ProductstatusesCustomBatchResponse" 20107 // }, 20108 // "scopes": [ 20109 // "https://www.googleapis.com/auth/content" 20110 // ] 20111 // } 20112 20113} 20114 20115// method id "content.productstatuses.get": 20116 20117type ProductstatusesGetCall struct { 20118 s *APIService 20119 merchantId uint64 20120 productId string 20121 urlParams_ gensupport.URLParams 20122 ifNoneMatch_ string 20123 ctx_ context.Context 20124 header_ http.Header 20125} 20126 20127// Get: Gets the status of a product from your Merchant Center account. 20128func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { 20129 c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20130 c.merchantId = merchantId 20131 c.productId = productId 20132 return c 20133} 20134 20135// Destinations sets the optional parameter "destinations": If set, only 20136// issues for the specified destinations are returned, otherwise only 20137// issues for the Shopping destination. 20138func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { 20139 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 20140 return c 20141} 20142 20143// IncludeAttributes sets the optional parameter "includeAttributes": 20144// Flag to include full product data in the result of this get request. 20145// The default value is false. 20146func (c *ProductstatusesGetCall) IncludeAttributes(includeAttributes bool) *ProductstatusesGetCall { 20147 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 20148 return c 20149} 20150 20151// Fields allows partial responses to be retrieved. See 20152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20153// for more information. 20154func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { 20155 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20156 return c 20157} 20158 20159// IfNoneMatch sets the optional parameter which makes the operation 20160// fail if the object's ETag matches the given value. This is useful for 20161// getting updates only after the object has changed since the last 20162// request. Use googleapi.IsNotModified to check whether the response 20163// error from Do is the result of In-None-Match. 20164func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { 20165 c.ifNoneMatch_ = entityTag 20166 return c 20167} 20168 20169// Context sets the context to be used in this call's Do method. Any 20170// pending HTTP request will be aborted if the provided context is 20171// canceled. 20172func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { 20173 c.ctx_ = ctx 20174 return c 20175} 20176 20177// Header returns an http.Header that can be modified by the caller to 20178// add HTTP headers to the request. 20179func (c *ProductstatusesGetCall) Header() http.Header { 20180 if c.header_ == nil { 20181 c.header_ = make(http.Header) 20182 } 20183 return c.header_ 20184} 20185 20186func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { 20187 reqHeaders := make(http.Header) 20188 for k, v := range c.header_ { 20189 reqHeaders[k] = v 20190 } 20191 reqHeaders.Set("User-Agent", c.s.userAgent()) 20192 if c.ifNoneMatch_ != "" { 20193 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20194 } 20195 var body io.Reader = nil 20196 c.urlParams_.Set("alt", alt) 20197 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") 20198 urls += "?" + c.urlParams_.Encode() 20199 req, _ := http.NewRequest("GET", urls, body) 20200 req.Header = reqHeaders 20201 googleapi.Expand(req.URL, map[string]string{ 20202 "merchantId": strconv.FormatUint(c.merchantId, 10), 20203 "productId": c.productId, 20204 }) 20205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20206} 20207 20208// Do executes the "content.productstatuses.get" call. 20209// Exactly one of *ProductStatus or error will be non-nil. Any non-2xx 20210// status code is an error. Response headers are in either 20211// *ProductStatus.ServerResponse.Header or (if a response was returned 20212// at all) in error.(*googleapi.Error).Header. Use 20213// googleapi.IsNotModified to check whether the returned error was 20214// because http.StatusNotModified was returned. 20215func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { 20216 gensupport.SetOptions(c.urlParams_, opts...) 20217 res, err := c.doRequest("json") 20218 if res != nil && res.StatusCode == http.StatusNotModified { 20219 if res.Body != nil { 20220 res.Body.Close() 20221 } 20222 return nil, &googleapi.Error{ 20223 Code: res.StatusCode, 20224 Header: res.Header, 20225 } 20226 } 20227 if err != nil { 20228 return nil, err 20229 } 20230 defer googleapi.CloseBody(res) 20231 if err := googleapi.CheckResponse(res); err != nil { 20232 return nil, err 20233 } 20234 ret := &ProductStatus{ 20235 ServerResponse: googleapi.ServerResponse{ 20236 Header: res.Header, 20237 HTTPStatusCode: res.StatusCode, 20238 }, 20239 } 20240 target := &ret 20241 if err := gensupport.DecodeResponse(target, res); err != nil { 20242 return nil, err 20243 } 20244 return ret, nil 20245 // { 20246 // "description": "Gets the status of a product from your Merchant Center account.", 20247 // "httpMethod": "GET", 20248 // "id": "content.productstatuses.get", 20249 // "parameterOrder": [ 20250 // "merchantId", 20251 // "productId" 20252 // ], 20253 // "parameters": { 20254 // "destinations": { 20255 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 20256 // "location": "query", 20257 // "repeated": true, 20258 // "type": "string" 20259 // }, 20260 // "includeAttributes": { 20261 // "description": "Flag to include full product data in the result of this get request. The default value is false.", 20262 // "location": "query", 20263 // "type": "boolean" 20264 // }, 20265 // "merchantId": { 20266 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 20267 // "format": "uint64", 20268 // "location": "path", 20269 // "required": true, 20270 // "type": "string" 20271 // }, 20272 // "productId": { 20273 // "description": "The REST id of the product.", 20274 // "location": "path", 20275 // "required": true, 20276 // "type": "string" 20277 // } 20278 // }, 20279 // "path": "{merchantId}/productstatuses/{productId}", 20280 // "response": { 20281 // "$ref": "ProductStatus" 20282 // }, 20283 // "scopes": [ 20284 // "https://www.googleapis.com/auth/content" 20285 // ] 20286 // } 20287 20288} 20289 20290// method id "content.productstatuses.list": 20291 20292type ProductstatusesListCall struct { 20293 s *APIService 20294 merchantId uint64 20295 urlParams_ gensupport.URLParams 20296 ifNoneMatch_ string 20297 ctx_ context.Context 20298 header_ http.Header 20299} 20300 20301// List: Lists the statuses of the products in your Merchant Center 20302// account. 20303func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { 20304 c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20305 c.merchantId = merchantId 20306 return c 20307} 20308 20309// Destinations sets the optional parameter "destinations": If set, only 20310// issues for the specified destinations are returned, otherwise only 20311// issues for the Shopping destination. 20312func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { 20313 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 20314 return c 20315} 20316 20317// IncludeAttributes sets the optional parameter "includeAttributes": 20318// Flag to include full product data in the results of the list request. 20319// The default value is false. 20320func (c *ProductstatusesListCall) IncludeAttributes(includeAttributes bool) *ProductstatusesListCall { 20321 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 20322 return c 20323} 20324 20325// IncludeInvalidInsertedItems sets the optional parameter 20326// "includeInvalidInsertedItems": Flag to include the invalid inserted 20327// items in the result of the list request. By default the invalid items 20328// are not shown (the default value is false). 20329func (c *ProductstatusesListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductstatusesListCall { 20330 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 20331 return c 20332} 20333 20334// MaxResults sets the optional parameter "maxResults": The maximum 20335// number of product statuses to return in the response, used for 20336// paging. 20337func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { 20338 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 20339 return c 20340} 20341 20342// PageToken sets the optional parameter "pageToken": The token returned 20343// by the previous request. 20344func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { 20345 c.urlParams_.Set("pageToken", pageToken) 20346 return c 20347} 20348 20349// Fields allows partial responses to be retrieved. See 20350// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20351// for more information. 20352func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { 20353 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20354 return c 20355} 20356 20357// IfNoneMatch sets the optional parameter which makes the operation 20358// fail if the object's ETag matches the given value. This is useful for 20359// getting updates only after the object has changed since the last 20360// request. Use googleapi.IsNotModified to check whether the response 20361// error from Do is the result of In-None-Match. 20362func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { 20363 c.ifNoneMatch_ = entityTag 20364 return c 20365} 20366 20367// Context sets the context to be used in this call's Do method. Any 20368// pending HTTP request will be aborted if the provided context is 20369// canceled. 20370func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { 20371 c.ctx_ = ctx 20372 return c 20373} 20374 20375// Header returns an http.Header that can be modified by the caller to 20376// add HTTP headers to the request. 20377func (c *ProductstatusesListCall) Header() http.Header { 20378 if c.header_ == nil { 20379 c.header_ = make(http.Header) 20380 } 20381 return c.header_ 20382} 20383 20384func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { 20385 reqHeaders := make(http.Header) 20386 for k, v := range c.header_ { 20387 reqHeaders[k] = v 20388 } 20389 reqHeaders.Set("User-Agent", c.s.userAgent()) 20390 if c.ifNoneMatch_ != "" { 20391 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20392 } 20393 var body io.Reader = nil 20394 c.urlParams_.Set("alt", alt) 20395 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") 20396 urls += "?" + c.urlParams_.Encode() 20397 req, _ := http.NewRequest("GET", urls, body) 20398 req.Header = reqHeaders 20399 googleapi.Expand(req.URL, map[string]string{ 20400 "merchantId": strconv.FormatUint(c.merchantId, 10), 20401 }) 20402 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20403} 20404 20405// Do executes the "content.productstatuses.list" call. 20406// Exactly one of *ProductstatusesListResponse or error will be non-nil. 20407// Any non-2xx status code is an error. Response headers are in either 20408// *ProductstatusesListResponse.ServerResponse.Header or (if a response 20409// was returned at all) in error.(*googleapi.Error).Header. Use 20410// googleapi.IsNotModified to check whether the returned error was 20411// because http.StatusNotModified was returned. 20412func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { 20413 gensupport.SetOptions(c.urlParams_, opts...) 20414 res, err := c.doRequest("json") 20415 if res != nil && res.StatusCode == http.StatusNotModified { 20416 if res.Body != nil { 20417 res.Body.Close() 20418 } 20419 return nil, &googleapi.Error{ 20420 Code: res.StatusCode, 20421 Header: res.Header, 20422 } 20423 } 20424 if err != nil { 20425 return nil, err 20426 } 20427 defer googleapi.CloseBody(res) 20428 if err := googleapi.CheckResponse(res); err != nil { 20429 return nil, err 20430 } 20431 ret := &ProductstatusesListResponse{ 20432 ServerResponse: googleapi.ServerResponse{ 20433 Header: res.Header, 20434 HTTPStatusCode: res.StatusCode, 20435 }, 20436 } 20437 target := &ret 20438 if err := gensupport.DecodeResponse(target, res); err != nil { 20439 return nil, err 20440 } 20441 return ret, nil 20442 // { 20443 // "description": "Lists the statuses of the products in your Merchant Center account.", 20444 // "httpMethod": "GET", 20445 // "id": "content.productstatuses.list", 20446 // "parameterOrder": [ 20447 // "merchantId" 20448 // ], 20449 // "parameters": { 20450 // "destinations": { 20451 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 20452 // "location": "query", 20453 // "repeated": true, 20454 // "type": "string" 20455 // }, 20456 // "includeAttributes": { 20457 // "description": "Flag to include full product data in the results of the list request. The default value is false.", 20458 // "location": "query", 20459 // "type": "boolean" 20460 // }, 20461 // "includeInvalidInsertedItems": { 20462 // "description": "Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).", 20463 // "location": "query", 20464 // "type": "boolean" 20465 // }, 20466 // "maxResults": { 20467 // "description": "The maximum number of product statuses to return in the response, used for paging.", 20468 // "format": "uint32", 20469 // "location": "query", 20470 // "type": "integer" 20471 // }, 20472 // "merchantId": { 20473 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 20474 // "format": "uint64", 20475 // "location": "path", 20476 // "required": true, 20477 // "type": "string" 20478 // }, 20479 // "pageToken": { 20480 // "description": "The token returned by the previous request.", 20481 // "location": "query", 20482 // "type": "string" 20483 // } 20484 // }, 20485 // "path": "{merchantId}/productstatuses", 20486 // "response": { 20487 // "$ref": "ProductstatusesListResponse" 20488 // }, 20489 // "scopes": [ 20490 // "https://www.googleapis.com/auth/content" 20491 // ] 20492 // } 20493 20494} 20495 20496// Pages invokes f for each page of results. 20497// A non-nil error returned from f will halt the iteration. 20498// The provided context supersedes any context provided to the Context method. 20499func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { 20500 c.ctx_ = ctx 20501 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20502 for { 20503 x, err := c.Do() 20504 if err != nil { 20505 return err 20506 } 20507 if err := f(x); err != nil { 20508 return err 20509 } 20510 if x.NextPageToken == "" { 20511 return nil 20512 } 20513 c.PageToken(x.NextPageToken) 20514 } 20515} 20516 20517// method id "content.shippingsettings.custombatch": 20518 20519type ShippingsettingsCustombatchCall struct { 20520 s *APIService 20521 shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest 20522 urlParams_ gensupport.URLParams 20523 ctx_ context.Context 20524 header_ http.Header 20525} 20526 20527// Custombatch: Retrieves and updates the shipping settings of multiple 20528// accounts in a single request. 20529func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall { 20530 c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20531 c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest 20532 return c 20533} 20534 20535// DryRun sets the optional parameter "dryRun": Flag to run the request 20536// in dry-run mode. 20537func (c *ShippingsettingsCustombatchCall) DryRun(dryRun bool) *ShippingsettingsCustombatchCall { 20538 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 20539 return c 20540} 20541 20542// Fields allows partial responses to be retrieved. See 20543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20544// for more information. 20545func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall { 20546 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20547 return c 20548} 20549 20550// Context sets the context to be used in this call's Do method. Any 20551// pending HTTP request will be aborted if the provided context is 20552// canceled. 20553func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall { 20554 c.ctx_ = ctx 20555 return c 20556} 20557 20558// Header returns an http.Header that can be modified by the caller to 20559// add HTTP headers to the request. 20560func (c *ShippingsettingsCustombatchCall) Header() http.Header { 20561 if c.header_ == nil { 20562 c.header_ = make(http.Header) 20563 } 20564 return c.header_ 20565} 20566 20567func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 20568 reqHeaders := make(http.Header) 20569 for k, v := range c.header_ { 20570 reqHeaders[k] = v 20571 } 20572 reqHeaders.Set("User-Agent", c.s.userAgent()) 20573 var body io.Reader = nil 20574 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest) 20575 if err != nil { 20576 return nil, err 20577 } 20578 reqHeaders.Set("Content-Type", "application/json") 20579 c.urlParams_.Set("alt", alt) 20580 urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch") 20581 urls += "?" + c.urlParams_.Encode() 20582 req, _ := http.NewRequest("POST", urls, body) 20583 req.Header = reqHeaders 20584 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20585} 20586 20587// Do executes the "content.shippingsettings.custombatch" call. 20588// Exactly one of *ShippingsettingsCustomBatchResponse or error will be 20589// non-nil. Any non-2xx status code is an error. Response headers are in 20590// either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or 20591// (if a response was returned at all) in 20592// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20593// whether the returned error was because http.StatusNotModified was 20594// returned. 20595func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) { 20596 gensupport.SetOptions(c.urlParams_, opts...) 20597 res, err := c.doRequest("json") 20598 if res != nil && res.StatusCode == http.StatusNotModified { 20599 if res.Body != nil { 20600 res.Body.Close() 20601 } 20602 return nil, &googleapi.Error{ 20603 Code: res.StatusCode, 20604 Header: res.Header, 20605 } 20606 } 20607 if err != nil { 20608 return nil, err 20609 } 20610 defer googleapi.CloseBody(res) 20611 if err := googleapi.CheckResponse(res); err != nil { 20612 return nil, err 20613 } 20614 ret := &ShippingsettingsCustomBatchResponse{ 20615 ServerResponse: googleapi.ServerResponse{ 20616 Header: res.Header, 20617 HTTPStatusCode: res.StatusCode, 20618 }, 20619 } 20620 target := &ret 20621 if err := gensupport.DecodeResponse(target, res); err != nil { 20622 return nil, err 20623 } 20624 return ret, nil 20625 // { 20626 // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", 20627 // "httpMethod": "POST", 20628 // "id": "content.shippingsettings.custombatch", 20629 // "parameters": { 20630 // "dryRun": { 20631 // "description": "Flag to run the request in dry-run mode.", 20632 // "location": "query", 20633 // "type": "boolean" 20634 // } 20635 // }, 20636 // "path": "shippingsettings/batch", 20637 // "request": { 20638 // "$ref": "ShippingsettingsCustomBatchRequest" 20639 // }, 20640 // "response": { 20641 // "$ref": "ShippingsettingsCustomBatchResponse" 20642 // }, 20643 // "scopes": [ 20644 // "https://www.googleapis.com/auth/content" 20645 // ] 20646 // } 20647 20648} 20649 20650// method id "content.shippingsettings.get": 20651 20652type ShippingsettingsGetCall struct { 20653 s *APIService 20654 merchantId uint64 20655 accountId uint64 20656 urlParams_ gensupport.URLParams 20657 ifNoneMatch_ string 20658 ctx_ context.Context 20659 header_ http.Header 20660} 20661 20662// Get: Retrieves the shipping settings of the account. 20663func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall { 20664 c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20665 c.merchantId = merchantId 20666 c.accountId = accountId 20667 return c 20668} 20669 20670// Fields allows partial responses to be retrieved. See 20671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20672// for more information. 20673func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall { 20674 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20675 return c 20676} 20677 20678// IfNoneMatch sets the optional parameter which makes the operation 20679// fail if the object's ETag matches the given value. This is useful for 20680// getting updates only after the object has changed since the last 20681// request. Use googleapi.IsNotModified to check whether the response 20682// error from Do is the result of In-None-Match. 20683func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall { 20684 c.ifNoneMatch_ = entityTag 20685 return c 20686} 20687 20688// Context sets the context to be used in this call's Do method. Any 20689// pending HTTP request will be aborted if the provided context is 20690// canceled. 20691func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall { 20692 c.ctx_ = ctx 20693 return c 20694} 20695 20696// Header returns an http.Header that can be modified by the caller to 20697// add HTTP headers to the request. 20698func (c *ShippingsettingsGetCall) Header() http.Header { 20699 if c.header_ == nil { 20700 c.header_ = make(http.Header) 20701 } 20702 return c.header_ 20703} 20704 20705func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) { 20706 reqHeaders := make(http.Header) 20707 for k, v := range c.header_ { 20708 reqHeaders[k] = v 20709 } 20710 reqHeaders.Set("User-Agent", c.s.userAgent()) 20711 if c.ifNoneMatch_ != "" { 20712 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20713 } 20714 var body io.Reader = nil 20715 c.urlParams_.Set("alt", alt) 20716 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 20717 urls += "?" + c.urlParams_.Encode() 20718 req, _ := http.NewRequest("GET", urls, body) 20719 req.Header = reqHeaders 20720 googleapi.Expand(req.URL, map[string]string{ 20721 "merchantId": strconv.FormatUint(c.merchantId, 10), 20722 "accountId": strconv.FormatUint(c.accountId, 10), 20723 }) 20724 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20725} 20726 20727// Do executes the "content.shippingsettings.get" call. 20728// Exactly one of *ShippingSettings or error will be non-nil. Any 20729// non-2xx status code is an error. Response headers are in either 20730// *ShippingSettings.ServerResponse.Header or (if a response was 20731// returned at all) in error.(*googleapi.Error).Header. Use 20732// googleapi.IsNotModified to check whether the returned error was 20733// because http.StatusNotModified was returned. 20734func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 20735 gensupport.SetOptions(c.urlParams_, opts...) 20736 res, err := c.doRequest("json") 20737 if res != nil && res.StatusCode == http.StatusNotModified { 20738 if res.Body != nil { 20739 res.Body.Close() 20740 } 20741 return nil, &googleapi.Error{ 20742 Code: res.StatusCode, 20743 Header: res.Header, 20744 } 20745 } 20746 if err != nil { 20747 return nil, err 20748 } 20749 defer googleapi.CloseBody(res) 20750 if err := googleapi.CheckResponse(res); err != nil { 20751 return nil, err 20752 } 20753 ret := &ShippingSettings{ 20754 ServerResponse: googleapi.ServerResponse{ 20755 Header: res.Header, 20756 HTTPStatusCode: res.StatusCode, 20757 }, 20758 } 20759 target := &ret 20760 if err := gensupport.DecodeResponse(target, res); err != nil { 20761 return nil, err 20762 } 20763 return ret, nil 20764 // { 20765 // "description": "Retrieves the shipping settings of the account.", 20766 // "httpMethod": "GET", 20767 // "id": "content.shippingsettings.get", 20768 // "parameterOrder": [ 20769 // "merchantId", 20770 // "accountId" 20771 // ], 20772 // "parameters": { 20773 // "accountId": { 20774 // "description": "The ID of the account for which to get/update shipping settings.", 20775 // "format": "uint64", 20776 // "location": "path", 20777 // "required": true, 20778 // "type": "string" 20779 // }, 20780 // "merchantId": { 20781 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 20782 // "format": "uint64", 20783 // "location": "path", 20784 // "required": true, 20785 // "type": "string" 20786 // } 20787 // }, 20788 // "path": "{merchantId}/shippingsettings/{accountId}", 20789 // "response": { 20790 // "$ref": "ShippingSettings" 20791 // }, 20792 // "scopes": [ 20793 // "https://www.googleapis.com/auth/content" 20794 // ] 20795 // } 20796 20797} 20798 20799// method id "content.shippingsettings.getsupportedcarriers": 20800 20801type ShippingsettingsGetsupportedcarriersCall struct { 20802 s *APIService 20803 merchantId uint64 20804 urlParams_ gensupport.URLParams 20805 ifNoneMatch_ string 20806 ctx_ context.Context 20807 header_ http.Header 20808} 20809 20810// Getsupportedcarriers: Retrieves supported carriers and carrier 20811// services for an account. 20812func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall { 20813 c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20814 c.merchantId = merchantId 20815 return c 20816} 20817 20818// Fields allows partial responses to be retrieved. See 20819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20820// for more information. 20821func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall { 20822 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20823 return c 20824} 20825 20826// IfNoneMatch sets the optional parameter which makes the operation 20827// fail if the object's ETag matches the given value. This is useful for 20828// getting updates only after the object has changed since the last 20829// request. Use googleapi.IsNotModified to check whether the response 20830// error from Do is the result of In-None-Match. 20831func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall { 20832 c.ifNoneMatch_ = entityTag 20833 return c 20834} 20835 20836// Context sets the context to be used in this call's Do method. Any 20837// pending HTTP request will be aborted if the provided context is 20838// canceled. 20839func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall { 20840 c.ctx_ = ctx 20841 return c 20842} 20843 20844// Header returns an http.Header that can be modified by the caller to 20845// add HTTP headers to the request. 20846func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header { 20847 if c.header_ == nil { 20848 c.header_ = make(http.Header) 20849 } 20850 return c.header_ 20851} 20852 20853func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) { 20854 reqHeaders := make(http.Header) 20855 for k, v := range c.header_ { 20856 reqHeaders[k] = v 20857 } 20858 reqHeaders.Set("User-Agent", c.s.userAgent()) 20859 if c.ifNoneMatch_ != "" { 20860 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20861 } 20862 var body io.Reader = nil 20863 c.urlParams_.Set("alt", alt) 20864 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers") 20865 urls += "?" + c.urlParams_.Encode() 20866 req, _ := http.NewRequest("GET", urls, body) 20867 req.Header = reqHeaders 20868 googleapi.Expand(req.URL, map[string]string{ 20869 "merchantId": strconv.FormatUint(c.merchantId, 10), 20870 }) 20871 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20872} 20873 20874// Do executes the "content.shippingsettings.getsupportedcarriers" call. 20875// Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error 20876// will be non-nil. Any non-2xx status code is an error. Response 20877// headers are in either 20878// *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header 20879// or (if a response was returned at all) in 20880// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20881// whether the returned error was because http.StatusNotModified was 20882// returned. 20883func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) { 20884 gensupport.SetOptions(c.urlParams_, opts...) 20885 res, err := c.doRequest("json") 20886 if res != nil && res.StatusCode == http.StatusNotModified { 20887 if res.Body != nil { 20888 res.Body.Close() 20889 } 20890 return nil, &googleapi.Error{ 20891 Code: res.StatusCode, 20892 Header: res.Header, 20893 } 20894 } 20895 if err != nil { 20896 return nil, err 20897 } 20898 defer googleapi.CloseBody(res) 20899 if err := googleapi.CheckResponse(res); err != nil { 20900 return nil, err 20901 } 20902 ret := &ShippingsettingsGetSupportedCarriersResponse{ 20903 ServerResponse: googleapi.ServerResponse{ 20904 Header: res.Header, 20905 HTTPStatusCode: res.StatusCode, 20906 }, 20907 } 20908 target := &ret 20909 if err := gensupport.DecodeResponse(target, res); err != nil { 20910 return nil, err 20911 } 20912 return ret, nil 20913 // { 20914 // "description": "Retrieves supported carriers and carrier services for an account.", 20915 // "httpMethod": "GET", 20916 // "id": "content.shippingsettings.getsupportedcarriers", 20917 // "parameterOrder": [ 20918 // "merchantId" 20919 // ], 20920 // "parameters": { 20921 // "merchantId": { 20922 // "description": "The ID of the account for which to retrieve the supported carriers.", 20923 // "format": "uint64", 20924 // "location": "path", 20925 // "required": true, 20926 // "type": "string" 20927 // } 20928 // }, 20929 // "path": "{merchantId}/supportedCarriers", 20930 // "response": { 20931 // "$ref": "ShippingsettingsGetSupportedCarriersResponse" 20932 // }, 20933 // "scopes": [ 20934 // "https://www.googleapis.com/auth/content" 20935 // ] 20936 // } 20937 20938} 20939 20940// method id "content.shippingsettings.getsupportedholidays": 20941 20942type ShippingsettingsGetsupportedholidaysCall struct { 20943 s *APIService 20944 merchantId uint64 20945 urlParams_ gensupport.URLParams 20946 ifNoneMatch_ string 20947 ctx_ context.Context 20948 header_ http.Header 20949} 20950 20951// Getsupportedholidays: Retrieves supported holidays for an account. 20952func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall { 20953 c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20954 c.merchantId = merchantId 20955 return c 20956} 20957 20958// Fields allows partial responses to be retrieved. See 20959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20960// for more information. 20961func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall { 20962 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20963 return c 20964} 20965 20966// IfNoneMatch sets the optional parameter which makes the operation 20967// fail if the object's ETag matches the given value. This is useful for 20968// getting updates only after the object has changed since the last 20969// request. Use googleapi.IsNotModified to check whether the response 20970// error from Do is the result of In-None-Match. 20971func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall { 20972 c.ifNoneMatch_ = entityTag 20973 return c 20974} 20975 20976// Context sets the context to be used in this call's Do method. Any 20977// pending HTTP request will be aborted if the provided context is 20978// canceled. 20979func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall { 20980 c.ctx_ = ctx 20981 return c 20982} 20983 20984// Header returns an http.Header that can be modified by the caller to 20985// add HTTP headers to the request. 20986func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header { 20987 if c.header_ == nil { 20988 c.header_ = make(http.Header) 20989 } 20990 return c.header_ 20991} 20992 20993func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) { 20994 reqHeaders := make(http.Header) 20995 for k, v := range c.header_ { 20996 reqHeaders[k] = v 20997 } 20998 reqHeaders.Set("User-Agent", c.s.userAgent()) 20999 if c.ifNoneMatch_ != "" { 21000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21001 } 21002 var body io.Reader = nil 21003 c.urlParams_.Set("alt", alt) 21004 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays") 21005 urls += "?" + c.urlParams_.Encode() 21006 req, _ := http.NewRequest("GET", urls, body) 21007 req.Header = reqHeaders 21008 googleapi.Expand(req.URL, map[string]string{ 21009 "merchantId": strconv.FormatUint(c.merchantId, 10), 21010 }) 21011 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21012} 21013 21014// Do executes the "content.shippingsettings.getsupportedholidays" call. 21015// Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error 21016// will be non-nil. Any non-2xx status code is an error. Response 21017// headers are in either 21018// *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header 21019// or (if a response was returned at all) in 21020// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21021// whether the returned error was because http.StatusNotModified was 21022// returned. 21023func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) { 21024 gensupport.SetOptions(c.urlParams_, opts...) 21025 res, err := c.doRequest("json") 21026 if res != nil && res.StatusCode == http.StatusNotModified { 21027 if res.Body != nil { 21028 res.Body.Close() 21029 } 21030 return nil, &googleapi.Error{ 21031 Code: res.StatusCode, 21032 Header: res.Header, 21033 } 21034 } 21035 if err != nil { 21036 return nil, err 21037 } 21038 defer googleapi.CloseBody(res) 21039 if err := googleapi.CheckResponse(res); err != nil { 21040 return nil, err 21041 } 21042 ret := &ShippingsettingsGetSupportedHolidaysResponse{ 21043 ServerResponse: googleapi.ServerResponse{ 21044 Header: res.Header, 21045 HTTPStatusCode: res.StatusCode, 21046 }, 21047 } 21048 target := &ret 21049 if err := gensupport.DecodeResponse(target, res); err != nil { 21050 return nil, err 21051 } 21052 return ret, nil 21053 // { 21054 // "description": "Retrieves supported holidays for an account.", 21055 // "httpMethod": "GET", 21056 // "id": "content.shippingsettings.getsupportedholidays", 21057 // "parameterOrder": [ 21058 // "merchantId" 21059 // ], 21060 // "parameters": { 21061 // "merchantId": { 21062 // "description": "The ID of the account for which to retrieve the supported holidays.", 21063 // "format": "uint64", 21064 // "location": "path", 21065 // "required": true, 21066 // "type": "string" 21067 // } 21068 // }, 21069 // "path": "{merchantId}/supportedHolidays", 21070 // "response": { 21071 // "$ref": "ShippingsettingsGetSupportedHolidaysResponse" 21072 // }, 21073 // "scopes": [ 21074 // "https://www.googleapis.com/auth/content" 21075 // ] 21076 // } 21077 21078} 21079 21080// method id "content.shippingsettings.list": 21081 21082type ShippingsettingsListCall struct { 21083 s *APIService 21084 merchantId uint64 21085 urlParams_ gensupport.URLParams 21086 ifNoneMatch_ string 21087 ctx_ context.Context 21088 header_ http.Header 21089} 21090 21091// List: Lists the shipping settings of the sub-accounts in your 21092// Merchant Center account. 21093func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall { 21094 c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21095 c.merchantId = merchantId 21096 return c 21097} 21098 21099// MaxResults sets the optional parameter "maxResults": The maximum 21100// number of shipping settings to return in the response, used for 21101// paging. 21102func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall { 21103 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 21104 return c 21105} 21106 21107// PageToken sets the optional parameter "pageToken": The token returned 21108// by the previous request. 21109func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall { 21110 c.urlParams_.Set("pageToken", pageToken) 21111 return c 21112} 21113 21114// Fields allows partial responses to be retrieved. See 21115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21116// for more information. 21117func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall { 21118 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21119 return c 21120} 21121 21122// IfNoneMatch sets the optional parameter which makes the operation 21123// fail if the object's ETag matches the given value. This is useful for 21124// getting updates only after the object has changed since the last 21125// request. Use googleapi.IsNotModified to check whether the response 21126// error from Do is the result of In-None-Match. 21127func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall { 21128 c.ifNoneMatch_ = entityTag 21129 return c 21130} 21131 21132// Context sets the context to be used in this call's Do method. Any 21133// pending HTTP request will be aborted if the provided context is 21134// canceled. 21135func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall { 21136 c.ctx_ = ctx 21137 return c 21138} 21139 21140// Header returns an http.Header that can be modified by the caller to 21141// add HTTP headers to the request. 21142func (c *ShippingsettingsListCall) Header() http.Header { 21143 if c.header_ == nil { 21144 c.header_ = make(http.Header) 21145 } 21146 return c.header_ 21147} 21148 21149func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) { 21150 reqHeaders := make(http.Header) 21151 for k, v := range c.header_ { 21152 reqHeaders[k] = v 21153 } 21154 reqHeaders.Set("User-Agent", c.s.userAgent()) 21155 if c.ifNoneMatch_ != "" { 21156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21157 } 21158 var body io.Reader = nil 21159 c.urlParams_.Set("alt", alt) 21160 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings") 21161 urls += "?" + c.urlParams_.Encode() 21162 req, _ := http.NewRequest("GET", urls, body) 21163 req.Header = reqHeaders 21164 googleapi.Expand(req.URL, map[string]string{ 21165 "merchantId": strconv.FormatUint(c.merchantId, 10), 21166 }) 21167 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21168} 21169 21170// Do executes the "content.shippingsettings.list" call. 21171// Exactly one of *ShippingsettingsListResponse or error will be 21172// non-nil. Any non-2xx status code is an error. Response headers are in 21173// either *ShippingsettingsListResponse.ServerResponse.Header or (if a 21174// response was returned at all) in error.(*googleapi.Error).Header. Use 21175// googleapi.IsNotModified to check whether the returned error was 21176// because http.StatusNotModified was returned. 21177func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) { 21178 gensupport.SetOptions(c.urlParams_, opts...) 21179 res, err := c.doRequest("json") 21180 if res != nil && res.StatusCode == http.StatusNotModified { 21181 if res.Body != nil { 21182 res.Body.Close() 21183 } 21184 return nil, &googleapi.Error{ 21185 Code: res.StatusCode, 21186 Header: res.Header, 21187 } 21188 } 21189 if err != nil { 21190 return nil, err 21191 } 21192 defer googleapi.CloseBody(res) 21193 if err := googleapi.CheckResponse(res); err != nil { 21194 return nil, err 21195 } 21196 ret := &ShippingsettingsListResponse{ 21197 ServerResponse: googleapi.ServerResponse{ 21198 Header: res.Header, 21199 HTTPStatusCode: res.StatusCode, 21200 }, 21201 } 21202 target := &ret 21203 if err := gensupport.DecodeResponse(target, res); err != nil { 21204 return nil, err 21205 } 21206 return ret, nil 21207 // { 21208 // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", 21209 // "httpMethod": "GET", 21210 // "id": "content.shippingsettings.list", 21211 // "parameterOrder": [ 21212 // "merchantId" 21213 // ], 21214 // "parameters": { 21215 // "maxResults": { 21216 // "description": "The maximum number of shipping settings to return in the response, used for paging.", 21217 // "format": "uint32", 21218 // "location": "query", 21219 // "type": "integer" 21220 // }, 21221 // "merchantId": { 21222 // "description": "The ID of the managing account. This must be a multi-client account.", 21223 // "format": "uint64", 21224 // "location": "path", 21225 // "required": true, 21226 // "type": "string" 21227 // }, 21228 // "pageToken": { 21229 // "description": "The token returned by the previous request.", 21230 // "location": "query", 21231 // "type": "string" 21232 // } 21233 // }, 21234 // "path": "{merchantId}/shippingsettings", 21235 // "response": { 21236 // "$ref": "ShippingsettingsListResponse" 21237 // }, 21238 // "scopes": [ 21239 // "https://www.googleapis.com/auth/content" 21240 // ] 21241 // } 21242 21243} 21244 21245// Pages invokes f for each page of results. 21246// A non-nil error returned from f will halt the iteration. 21247// The provided context supersedes any context provided to the Context method. 21248func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error { 21249 c.ctx_ = ctx 21250 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21251 for { 21252 x, err := c.Do() 21253 if err != nil { 21254 return err 21255 } 21256 if err := f(x); err != nil { 21257 return err 21258 } 21259 if x.NextPageToken == "" { 21260 return nil 21261 } 21262 c.PageToken(x.NextPageToken) 21263 } 21264} 21265 21266// method id "content.shippingsettings.patch": 21267 21268type ShippingsettingsPatchCall struct { 21269 s *APIService 21270 merchantId uint64 21271 accountId uint64 21272 shippingsettings *ShippingSettings 21273 urlParams_ gensupport.URLParams 21274 ctx_ context.Context 21275 header_ http.Header 21276} 21277 21278// Patch: Updates the shipping settings of the account. This method 21279// supports patch semantics. 21280func (r *ShippingsettingsService) Patch(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsPatchCall { 21281 c := &ShippingsettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21282 c.merchantId = merchantId 21283 c.accountId = accountId 21284 c.shippingsettings = shippingsettings 21285 return c 21286} 21287 21288// DryRun sets the optional parameter "dryRun": Flag to run the request 21289// in dry-run mode. 21290func (c *ShippingsettingsPatchCall) DryRun(dryRun bool) *ShippingsettingsPatchCall { 21291 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 21292 return c 21293} 21294 21295// Fields allows partial responses to be retrieved. See 21296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21297// for more information. 21298func (c *ShippingsettingsPatchCall) Fields(s ...googleapi.Field) *ShippingsettingsPatchCall { 21299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21300 return c 21301} 21302 21303// Context sets the context to be used in this call's Do method. Any 21304// pending HTTP request will be aborted if the provided context is 21305// canceled. 21306func (c *ShippingsettingsPatchCall) Context(ctx context.Context) *ShippingsettingsPatchCall { 21307 c.ctx_ = ctx 21308 return c 21309} 21310 21311// Header returns an http.Header that can be modified by the caller to 21312// add HTTP headers to the request. 21313func (c *ShippingsettingsPatchCall) Header() http.Header { 21314 if c.header_ == nil { 21315 c.header_ = make(http.Header) 21316 } 21317 return c.header_ 21318} 21319 21320func (c *ShippingsettingsPatchCall) doRequest(alt string) (*http.Response, error) { 21321 reqHeaders := make(http.Header) 21322 for k, v := range c.header_ { 21323 reqHeaders[k] = v 21324 } 21325 reqHeaders.Set("User-Agent", c.s.userAgent()) 21326 var body io.Reader = nil 21327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings) 21328 if err != nil { 21329 return nil, err 21330 } 21331 reqHeaders.Set("Content-Type", "application/json") 21332 c.urlParams_.Set("alt", alt) 21333 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 21334 urls += "?" + c.urlParams_.Encode() 21335 req, _ := http.NewRequest("PATCH", urls, body) 21336 req.Header = reqHeaders 21337 googleapi.Expand(req.URL, map[string]string{ 21338 "merchantId": strconv.FormatUint(c.merchantId, 10), 21339 "accountId": strconv.FormatUint(c.accountId, 10), 21340 }) 21341 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21342} 21343 21344// Do executes the "content.shippingsettings.patch" call. 21345// Exactly one of *ShippingSettings or error will be non-nil. Any 21346// non-2xx status code is an error. Response headers are in either 21347// *ShippingSettings.ServerResponse.Header or (if a response was 21348// returned at all) in error.(*googleapi.Error).Header. Use 21349// googleapi.IsNotModified to check whether the returned error was 21350// because http.StatusNotModified was returned. 21351func (c *ShippingsettingsPatchCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 21352 gensupport.SetOptions(c.urlParams_, opts...) 21353 res, err := c.doRequest("json") 21354 if res != nil && res.StatusCode == http.StatusNotModified { 21355 if res.Body != nil { 21356 res.Body.Close() 21357 } 21358 return nil, &googleapi.Error{ 21359 Code: res.StatusCode, 21360 Header: res.Header, 21361 } 21362 } 21363 if err != nil { 21364 return nil, err 21365 } 21366 defer googleapi.CloseBody(res) 21367 if err := googleapi.CheckResponse(res); err != nil { 21368 return nil, err 21369 } 21370 ret := &ShippingSettings{ 21371 ServerResponse: googleapi.ServerResponse{ 21372 Header: res.Header, 21373 HTTPStatusCode: res.StatusCode, 21374 }, 21375 } 21376 target := &ret 21377 if err := gensupport.DecodeResponse(target, res); err != nil { 21378 return nil, err 21379 } 21380 return ret, nil 21381 // { 21382 // "description": "Updates the shipping settings of the account. This method supports patch semantics.", 21383 // "httpMethod": "PATCH", 21384 // "id": "content.shippingsettings.patch", 21385 // "parameterOrder": [ 21386 // "merchantId", 21387 // "accountId" 21388 // ], 21389 // "parameters": { 21390 // "accountId": { 21391 // "description": "The ID of the account for which to get/update shipping settings.", 21392 // "format": "uint64", 21393 // "location": "path", 21394 // "required": true, 21395 // "type": "string" 21396 // }, 21397 // "dryRun": { 21398 // "description": "Flag to run the request in dry-run mode.", 21399 // "location": "query", 21400 // "type": "boolean" 21401 // }, 21402 // "merchantId": { 21403 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 21404 // "format": "uint64", 21405 // "location": "path", 21406 // "required": true, 21407 // "type": "string" 21408 // } 21409 // }, 21410 // "path": "{merchantId}/shippingsettings/{accountId}", 21411 // "request": { 21412 // "$ref": "ShippingSettings" 21413 // }, 21414 // "response": { 21415 // "$ref": "ShippingSettings" 21416 // }, 21417 // "scopes": [ 21418 // "https://www.googleapis.com/auth/content" 21419 // ] 21420 // } 21421 21422} 21423 21424// method id "content.shippingsettings.update": 21425 21426type ShippingsettingsUpdateCall struct { 21427 s *APIService 21428 merchantId uint64 21429 accountId uint64 21430 shippingsettings *ShippingSettings 21431 urlParams_ gensupport.URLParams 21432 ctx_ context.Context 21433 header_ http.Header 21434} 21435 21436// Update: Updates the shipping settings of the account. 21437func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall { 21438 c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21439 c.merchantId = merchantId 21440 c.accountId = accountId 21441 c.shippingsettings = shippingsettings 21442 return c 21443} 21444 21445// DryRun sets the optional parameter "dryRun": Flag to run the request 21446// in dry-run mode. 21447func (c *ShippingsettingsUpdateCall) DryRun(dryRun bool) *ShippingsettingsUpdateCall { 21448 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 21449 return c 21450} 21451 21452// Fields allows partial responses to be retrieved. See 21453// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21454// for more information. 21455func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall { 21456 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21457 return c 21458} 21459 21460// Context sets the context to be used in this call's Do method. Any 21461// pending HTTP request will be aborted if the provided context is 21462// canceled. 21463func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall { 21464 c.ctx_ = ctx 21465 return c 21466} 21467 21468// Header returns an http.Header that can be modified by the caller to 21469// add HTTP headers to the request. 21470func (c *ShippingsettingsUpdateCall) Header() http.Header { 21471 if c.header_ == nil { 21472 c.header_ = make(http.Header) 21473 } 21474 return c.header_ 21475} 21476 21477func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 21478 reqHeaders := make(http.Header) 21479 for k, v := range c.header_ { 21480 reqHeaders[k] = v 21481 } 21482 reqHeaders.Set("User-Agent", c.s.userAgent()) 21483 var body io.Reader = nil 21484 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings) 21485 if err != nil { 21486 return nil, err 21487 } 21488 reqHeaders.Set("Content-Type", "application/json") 21489 c.urlParams_.Set("alt", alt) 21490 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 21491 urls += "?" + c.urlParams_.Encode() 21492 req, _ := http.NewRequest("PUT", urls, body) 21493 req.Header = reqHeaders 21494 googleapi.Expand(req.URL, map[string]string{ 21495 "merchantId": strconv.FormatUint(c.merchantId, 10), 21496 "accountId": strconv.FormatUint(c.accountId, 10), 21497 }) 21498 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21499} 21500 21501// Do executes the "content.shippingsettings.update" call. 21502// Exactly one of *ShippingSettings or error will be non-nil. Any 21503// non-2xx status code is an error. Response headers are in either 21504// *ShippingSettings.ServerResponse.Header or (if a response was 21505// returned at all) in error.(*googleapi.Error).Header. Use 21506// googleapi.IsNotModified to check whether the returned error was 21507// because http.StatusNotModified was returned. 21508func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 21509 gensupport.SetOptions(c.urlParams_, opts...) 21510 res, err := c.doRequest("json") 21511 if res != nil && res.StatusCode == http.StatusNotModified { 21512 if res.Body != nil { 21513 res.Body.Close() 21514 } 21515 return nil, &googleapi.Error{ 21516 Code: res.StatusCode, 21517 Header: res.Header, 21518 } 21519 } 21520 if err != nil { 21521 return nil, err 21522 } 21523 defer googleapi.CloseBody(res) 21524 if err := googleapi.CheckResponse(res); err != nil { 21525 return nil, err 21526 } 21527 ret := &ShippingSettings{ 21528 ServerResponse: googleapi.ServerResponse{ 21529 Header: res.Header, 21530 HTTPStatusCode: res.StatusCode, 21531 }, 21532 } 21533 target := &ret 21534 if err := gensupport.DecodeResponse(target, res); err != nil { 21535 return nil, err 21536 } 21537 return ret, nil 21538 // { 21539 // "description": "Updates the shipping settings of the account.", 21540 // "httpMethod": "PUT", 21541 // "id": "content.shippingsettings.update", 21542 // "parameterOrder": [ 21543 // "merchantId", 21544 // "accountId" 21545 // ], 21546 // "parameters": { 21547 // "accountId": { 21548 // "description": "The ID of the account for which to get/update shipping settings.", 21549 // "format": "uint64", 21550 // "location": "path", 21551 // "required": true, 21552 // "type": "string" 21553 // }, 21554 // "dryRun": { 21555 // "description": "Flag to run the request in dry-run mode.", 21556 // "location": "query", 21557 // "type": "boolean" 21558 // }, 21559 // "merchantId": { 21560 // "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account.", 21561 // "format": "uint64", 21562 // "location": "path", 21563 // "required": true, 21564 // "type": "string" 21565 // } 21566 // }, 21567 // "path": "{merchantId}/shippingsettings/{accountId}", 21568 // "request": { 21569 // "$ref": "ShippingSettings" 21570 // }, 21571 // "response": { 21572 // "$ref": "ShippingSettings" 21573 // }, 21574 // "scopes": [ 21575 // "https://www.googleapis.com/auth/content" 21576 // ] 21577 // } 21578 21579} 21580