1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package content provides access to the Content API for Shopping. 8// 9// For product documentation, see: https://developers.google.com/shopping-content 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/content/v2" 16// ... 17// ctx := context.Background() 18// contentService, err := content.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// contentService, err := content.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// contentService, err := content.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package content // import "google.golang.org/api/content/v2" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "content:v2" 75const apiName = "content" 76const apiVersion = "v2" 77const basePath = "https://www.googleapis.com/content/v2/" 78 79// OAuth2 scopes used by this API. 80const ( 81 // Manage your product listings and accounts for Google Shopping 82 ContentScope = "https://www.googleapis.com/auth/content" 83) 84 85// NewService creates a new APIService. 86func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 87 scopesOption := option.WithScopes( 88 "https://www.googleapis.com/auth/content", 89 ) 90 // NOTE: prepend, so we don't override user-specified scopes. 91 opts = append([]option.ClientOption{scopesOption}, opts...) 92 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 93 client, endpoint, err := htransport.NewClient(ctx, opts...) 94 if err != nil { 95 return nil, err 96 } 97 s, err := New(client) 98 if err != nil { 99 return nil, err 100 } 101 if endpoint != "" { 102 s.BasePath = endpoint 103 } 104 return s, nil 105} 106 107// New creates a new APIService. It uses the provided http.Client for requests. 108// 109// Deprecated: please use NewService instead. 110// To provide a custom HTTP client, use option.WithHTTPClient. 111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 112func New(client *http.Client) (*APIService, error) { 113 if client == nil { 114 return nil, errors.New("client is nil") 115 } 116 s := &APIService{client: client, BasePath: basePath} 117 s.Accounts = NewAccountsService(s) 118 s.Accountstatuses = NewAccountstatusesService(s) 119 s.Accounttax = NewAccounttaxService(s) 120 s.Datafeeds = NewDatafeedsService(s) 121 s.Datafeedstatuses = NewDatafeedstatusesService(s) 122 s.Inventory = NewInventoryService(s) 123 s.Liasettings = NewLiasettingsService(s) 124 s.Orderinvoices = NewOrderinvoicesService(s) 125 s.Orderreports = NewOrderreportsService(s) 126 s.Orderreturns = NewOrderreturnsService(s) 127 s.Orders = NewOrdersService(s) 128 s.Pos = NewPosService(s) 129 s.Products = NewProductsService(s) 130 s.Productstatuses = NewProductstatusesService(s) 131 s.Shippingsettings = NewShippingsettingsService(s) 132 return s, nil 133} 134 135type APIService struct { 136 client *http.Client 137 BasePath string // API endpoint base URL 138 UserAgent string // optional additional User-Agent fragment 139 140 Accounts *AccountsService 141 142 Accountstatuses *AccountstatusesService 143 144 Accounttax *AccounttaxService 145 146 Datafeeds *DatafeedsService 147 148 Datafeedstatuses *DatafeedstatusesService 149 150 Inventory *InventoryService 151 152 Liasettings *LiasettingsService 153 154 Orderinvoices *OrderinvoicesService 155 156 Orderreports *OrderreportsService 157 158 Orderreturns *OrderreturnsService 159 160 Orders *OrdersService 161 162 Pos *PosService 163 164 Products *ProductsService 165 166 Productstatuses *ProductstatusesService 167 168 Shippingsettings *ShippingsettingsService 169} 170 171func (s *APIService) userAgent() string { 172 if s.UserAgent == "" { 173 return googleapi.UserAgent 174 } 175 return googleapi.UserAgent + " " + s.UserAgent 176} 177 178func NewAccountsService(s *APIService) *AccountsService { 179 rs := &AccountsService{s: s} 180 return rs 181} 182 183type AccountsService struct { 184 s *APIService 185} 186 187func NewAccountstatusesService(s *APIService) *AccountstatusesService { 188 rs := &AccountstatusesService{s: s} 189 return rs 190} 191 192type AccountstatusesService struct { 193 s *APIService 194} 195 196func NewAccounttaxService(s *APIService) *AccounttaxService { 197 rs := &AccounttaxService{s: s} 198 return rs 199} 200 201type AccounttaxService struct { 202 s *APIService 203} 204 205func NewDatafeedsService(s *APIService) *DatafeedsService { 206 rs := &DatafeedsService{s: s} 207 return rs 208} 209 210type DatafeedsService struct { 211 s *APIService 212} 213 214func NewDatafeedstatusesService(s *APIService) *DatafeedstatusesService { 215 rs := &DatafeedstatusesService{s: s} 216 return rs 217} 218 219type DatafeedstatusesService struct { 220 s *APIService 221} 222 223func NewInventoryService(s *APIService) *InventoryService { 224 rs := &InventoryService{s: s} 225 return rs 226} 227 228type InventoryService struct { 229 s *APIService 230} 231 232func NewLiasettingsService(s *APIService) *LiasettingsService { 233 rs := &LiasettingsService{s: s} 234 return rs 235} 236 237type LiasettingsService struct { 238 s *APIService 239} 240 241func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { 242 rs := &OrderinvoicesService{s: s} 243 return rs 244} 245 246type OrderinvoicesService struct { 247 s *APIService 248} 249 250func NewOrderreportsService(s *APIService) *OrderreportsService { 251 rs := &OrderreportsService{s: s} 252 return rs 253} 254 255type OrderreportsService struct { 256 s *APIService 257} 258 259func NewOrderreturnsService(s *APIService) *OrderreturnsService { 260 rs := &OrderreturnsService{s: s} 261 return rs 262} 263 264type OrderreturnsService struct { 265 s *APIService 266} 267 268func NewOrdersService(s *APIService) *OrdersService { 269 rs := &OrdersService{s: s} 270 return rs 271} 272 273type OrdersService struct { 274 s *APIService 275} 276 277func NewPosService(s *APIService) *PosService { 278 rs := &PosService{s: s} 279 return rs 280} 281 282type PosService struct { 283 s *APIService 284} 285 286func NewProductsService(s *APIService) *ProductsService { 287 rs := &ProductsService{s: s} 288 return rs 289} 290 291type ProductsService struct { 292 s *APIService 293} 294 295func NewProductstatusesService(s *APIService) *ProductstatusesService { 296 rs := &ProductstatusesService{s: s} 297 return rs 298} 299 300type ProductstatusesService struct { 301 s *APIService 302} 303 304func NewShippingsettingsService(s *APIService) *ShippingsettingsService { 305 rs := &ShippingsettingsService{s: s} 306 return rs 307} 308 309type ShippingsettingsService struct { 310 s *APIService 311} 312 313// Account: Account data. After the creation of a new account it may 314// take a few minutes before it is fully operational. The methods 315// delete, insert, and update require the admin role. 316type Account struct { 317 // AdultContent: Indicates whether the merchant sells adult content. 318 AdultContent bool `json:"adultContent,omitempty"` 319 320 // AdwordsLinks: List of linked AdWords accounts that are active or 321 // pending approval. To create a new link request, add a new link with 322 // status `active` to the list. It will remain in a `pending` state 323 // until approved or rejected either in the AdWords interface or through 324 // the AdWords API. To delete an active link, or to cancel a link 325 // request, remove it from the list. 326 AdwordsLinks []*AccountAdwordsLink `json:"adwordsLinks,omitempty"` 327 328 // BusinessInformation: The business information of the account. 329 BusinessInformation *AccountBusinessInformation `json:"businessInformation,omitempty"` 330 331 // GoogleMyBusinessLink: The GMB account which is linked or in the 332 // process of being linked with the Merchant Center account. 333 GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"` 334 335 // Id: Required for update. Merchant Center account ID. 336 Id uint64 `json:"id,omitempty,string"` 337 338 // Kind: Identifies what kind of resource this is. Value: the fixed 339 // string "content#account" 340 Kind string `json:"kind,omitempty"` 341 342 // Name: Required. Display name for the account. 343 Name string `json:"name,omitempty"` 344 345 // ReviewsUrl: [DEPRECATED] This field is never returned and will be 346 // ignored if provided. 347 ReviewsUrl string `json:"reviewsUrl,omitempty"` 348 349 // SellerId: Client-specific, locally-unique, internal ID for the child 350 // account. 351 SellerId string `json:"sellerId,omitempty"` 352 353 // Users: Users with access to the account. Every account (except for 354 // subaccounts) must have at least one admin user. 355 Users []*AccountUser `json:"users,omitempty"` 356 357 // WebsiteUrl: The merchant's website. 358 WebsiteUrl string `json:"websiteUrl,omitempty"` 359 360 // YoutubeChannelLinks: List of linked YouTube channels that are active 361 // or pending approval. To create a new link request, add a new link 362 // with status `active` to the list. It will remain in a `pending` state 363 // until approved or rejected in the YT Creator Studio interface. To 364 // delete an active link, or to cancel a link request, remove it from 365 // the list. 366 YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"` 367 368 // ServerResponse contains the HTTP response code and headers from the 369 // server. 370 googleapi.ServerResponse `json:"-"` 371 372 // ForceSendFields is a list of field names (e.g. "AdultContent") to 373 // unconditionally include in API requests. By default, fields with 374 // empty values are omitted from API requests. However, any non-pointer, 375 // non-interface field appearing in ForceSendFields will be sent to the 376 // server regardless of whether the field is empty or not. This may be 377 // used to include empty fields in Patch requests. 378 ForceSendFields []string `json:"-"` 379 380 // NullFields is a list of field names (e.g. "AdultContent") to include 381 // in API requests with the JSON null value. By default, fields with 382 // empty values are omitted from API requests. However, any field with 383 // an empty value appearing in NullFields will be sent to the server as 384 // null. It is an error if a field in this list has a non-empty value. 385 // This may be used to include null fields in Patch requests. 386 NullFields []string `json:"-"` 387} 388 389func (s *Account) MarshalJSON() ([]byte, error) { 390 type NoMethod Account 391 raw := NoMethod(*s) 392 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 393} 394 395type AccountAddress struct { 396 // Country: CLDR country code (e.g. "US"). 397 Country string `json:"country,omitempty"` 398 399 // Locality: City, town or commune. May also include dependent 400 // localities or sublocalities (e.g. neighborhoods or suburbs). 401 Locality string `json:"locality,omitempty"` 402 403 // PostalCode: Postal code or ZIP (e.g. "94043"). 404 PostalCode string `json:"postalCode,omitempty"` 405 406 // Region: Top-level administrative subdivision of the country. For 407 // example, a state like California ("CA") or a province like Quebec 408 // ("QC"). 409 Region string `json:"region,omitempty"` 410 411 // StreetAddress: Street-level part of the address. 412 StreetAddress string `json:"streetAddress,omitempty"` 413 414 // ForceSendFields is a list of field names (e.g. "Country") to 415 // unconditionally include in API requests. By default, fields with 416 // empty values are omitted from API requests. However, any non-pointer, 417 // non-interface field appearing in ForceSendFields will be sent to the 418 // server regardless of whether the field is empty or not. This may be 419 // used to include empty fields in Patch requests. 420 ForceSendFields []string `json:"-"` 421 422 // NullFields is a list of field names (e.g. "Country") to include in 423 // API requests with the JSON null value. By default, fields with empty 424 // values are omitted from API requests. However, any field with an 425 // empty value appearing in NullFields will be sent to the server as 426 // null. It is an error if a field in this list has a non-empty value. 427 // This may be used to include null fields in Patch requests. 428 NullFields []string `json:"-"` 429} 430 431func (s *AccountAddress) MarshalJSON() ([]byte, error) { 432 type NoMethod AccountAddress 433 raw := NoMethod(*s) 434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 435} 436 437type AccountAdwordsLink struct { 438 // AdwordsId: Customer ID of the AdWords account. 439 AdwordsId uint64 `json:"adwordsId,omitempty,string"` 440 441 // Status: Status of the link between this Merchant Center account and 442 // the AdWords account. Upon retrieval, it represents the actual status 443 // of the link and can be either `active` if it was approved in Google 444 // AdWords or `pending` if it's pending approval. Upon insertion, it 445 // represents the intended status of the link. Re-uploading a link with 446 // status `active` when it's still pending or with status `pending` when 447 // it's already active will have no effect: the status will remain 448 // unchanged. Re-uploading a link with deprecated status `inactive` is 449 // equivalent to not submitting the link at all and will delete the link 450 // if it was active or cancel the link request if it was 451 // pending. 452 // 453 // Acceptable values are: 454 // - "active" 455 // - "pending" 456 Status string `json:"status,omitempty"` 457 458 // ForceSendFields is a list of field names (e.g. "AdwordsId") to 459 // unconditionally include in API requests. By default, fields with 460 // empty values are omitted from API requests. However, any non-pointer, 461 // non-interface field appearing in ForceSendFields will be sent to the 462 // server regardless of whether the field is empty or not. This may be 463 // used to include empty fields in Patch requests. 464 ForceSendFields []string `json:"-"` 465 466 // NullFields is a list of field names (e.g. "AdwordsId") to include in 467 // API requests with the JSON null value. By default, fields with empty 468 // values are omitted from API requests. However, any field with an 469 // empty value appearing in NullFields will be sent to the server as 470 // null. It is an error if a field in this list has a non-empty value. 471 // This may be used to include null fields in Patch requests. 472 NullFields []string `json:"-"` 473} 474 475func (s *AccountAdwordsLink) MarshalJSON() ([]byte, error) { 476 type NoMethod AccountAdwordsLink 477 raw := NoMethod(*s) 478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 479} 480 481type AccountBusinessInformation struct { 482 // Address: The address of the business. 483 Address *AccountAddress `json:"address,omitempty"` 484 485 // CustomerService: The customer service information of the business. 486 CustomerService *AccountCustomerService `json:"customerService,omitempty"` 487 488 // PhoneNumber: The phone number of the business. 489 PhoneNumber string `json:"phoneNumber,omitempty"` 490 491 // ForceSendFields is a list of field names (e.g. "Address") to 492 // unconditionally include in API requests. By default, fields with 493 // empty values are omitted from API requests. However, any non-pointer, 494 // non-interface field appearing in ForceSendFields will be sent to the 495 // server regardless of whether the field is empty or not. This may be 496 // used to include empty fields in Patch requests. 497 ForceSendFields []string `json:"-"` 498 499 // NullFields is a list of field names (e.g. "Address") to include in 500 // API requests with the JSON null value. By default, fields with empty 501 // values are omitted from API requests. However, any field with an 502 // empty value appearing in NullFields will be sent to the server as 503 // null. It is an error if a field in this list has a non-empty value. 504 // This may be used to include null fields in Patch requests. 505 NullFields []string `json:"-"` 506} 507 508func (s *AccountBusinessInformation) MarshalJSON() ([]byte, error) { 509 type NoMethod AccountBusinessInformation 510 raw := NoMethod(*s) 511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 512} 513 514type AccountCustomerService struct { 515 // Email: Customer service email. 516 Email string `json:"email,omitempty"` 517 518 // PhoneNumber: Customer service phone number. 519 PhoneNumber string `json:"phoneNumber,omitempty"` 520 521 // Url: Customer service URL. 522 Url string `json:"url,omitempty"` 523 524 // ForceSendFields is a list of field names (e.g. "Email") to 525 // unconditionally include in API requests. By default, fields with 526 // empty values are omitted from API requests. However, any non-pointer, 527 // non-interface field appearing in ForceSendFields will be sent to the 528 // server regardless of whether the field is empty or not. This may be 529 // used to include empty fields in Patch requests. 530 ForceSendFields []string `json:"-"` 531 532 // NullFields is a list of field names (e.g. "Email") to include in API 533 // requests with the JSON null value. By default, fields with empty 534 // values are omitted from API requests. However, any field with an 535 // empty value appearing in NullFields will be sent to the server as 536 // null. It is an error if a field in this list has a non-empty value. 537 // This may be used to include null fields in Patch requests. 538 NullFields []string `json:"-"` 539} 540 541func (s *AccountCustomerService) MarshalJSON() ([]byte, error) { 542 type NoMethod AccountCustomerService 543 raw := NoMethod(*s) 544 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 545} 546 547type AccountGoogleMyBusinessLink struct { 548 // GmbEmail: The GMB email address of which a specific account within a 549 // GMB account. A sample account within a GMB account could be a 550 // business account with set of locations, managed under the GMB 551 // account. 552 GmbEmail string `json:"gmbEmail,omitempty"` 553 554 // Status: Status of the link between this Merchant Center account and 555 // the GMB account. 556 // 557 // Acceptable values are: 558 // - "active" 559 // - "pending" 560 Status string `json:"status,omitempty"` 561 562 // ForceSendFields is a list of field names (e.g. "GmbEmail") to 563 // unconditionally include in API requests. By default, fields with 564 // empty values are omitted from API requests. However, any non-pointer, 565 // non-interface field appearing in ForceSendFields will be sent to the 566 // server regardless of whether the field is empty or not. This may be 567 // used to include empty fields in Patch requests. 568 ForceSendFields []string `json:"-"` 569 570 // NullFields is a list of field names (e.g. "GmbEmail") to include in 571 // API requests with the JSON null value. By default, fields with empty 572 // values are omitted from API requests. However, any field with an 573 // empty value appearing in NullFields will be sent to the server as 574 // null. It is an error if a field in this list has a non-empty value. 575 // This may be used to include null fields in Patch requests. 576 NullFields []string `json:"-"` 577} 578 579func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) { 580 type NoMethod AccountGoogleMyBusinessLink 581 raw := NoMethod(*s) 582 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 583} 584 585type AccountIdentifier struct { 586 // AggregatorId: The aggregator ID, set for aggregators and subaccounts 587 // (in that case, it represents the aggregator of the subaccount). 588 AggregatorId uint64 `json:"aggregatorId,omitempty,string"` 589 590 // MerchantId: The merchant account ID, set for individual accounts and 591 // subaccounts. 592 MerchantId uint64 `json:"merchantId,omitempty,string"` 593 594 // ForceSendFields is a list of field names (e.g. "AggregatorId") to 595 // unconditionally include in API requests. By default, fields with 596 // empty values are omitted from API requests. However, any non-pointer, 597 // non-interface field appearing in ForceSendFields will be sent to the 598 // server regardless of whether the field is empty or not. This may be 599 // used to include empty fields in Patch requests. 600 ForceSendFields []string `json:"-"` 601 602 // NullFields is a list of field names (e.g. "AggregatorId") to include 603 // in API requests with the JSON null value. By default, fields with 604 // empty values are omitted from API requests. However, any field with 605 // an empty value appearing in NullFields will be sent to the server as 606 // null. It is an error if a field in this list has a non-empty value. 607 // This may be used to include null fields in Patch requests. 608 NullFields []string `json:"-"` 609} 610 611func (s *AccountIdentifier) MarshalJSON() ([]byte, error) { 612 type NoMethod AccountIdentifier 613 raw := NoMethod(*s) 614 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 615} 616 617// AccountStatus: The status of an account, i.e., information about its 618// products, which is computed offline and not returned immediately at 619// insertion time. 620type AccountStatus struct { 621 // AccountId: The ID of the account for which the status is reported. 622 AccountId string `json:"accountId,omitempty"` 623 624 // AccountLevelIssues: A list of account level issues. 625 AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"` 626 627 // DataQualityIssues: DEPRECATED - never populated. 628 DataQualityIssues []*AccountStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 629 630 // Kind: Identifies what kind of resource this is. Value: the fixed 631 // string "content#accountStatus" 632 Kind string `json:"kind,omitempty"` 633 634 // Products: List of product-related data by channel, destination, and 635 // country. Data in this field may be delayed by up to 30 minutes. 636 Products []*AccountStatusProducts `json:"products,omitempty"` 637 638 // WebsiteClaimed: Whether the account's website is claimed or not. 639 WebsiteClaimed bool `json:"websiteClaimed,omitempty"` 640 641 // ServerResponse contains the HTTP response code and headers from the 642 // server. 643 googleapi.ServerResponse `json:"-"` 644 645 // ForceSendFields is a list of field names (e.g. "AccountId") to 646 // unconditionally include in API requests. By default, fields with 647 // empty values are omitted from API requests. However, any non-pointer, 648 // non-interface field appearing in ForceSendFields will be sent to the 649 // server regardless of whether the field is empty or not. This may be 650 // used to include empty fields in Patch requests. 651 ForceSendFields []string `json:"-"` 652 653 // NullFields is a list of field names (e.g. "AccountId") to include in 654 // API requests with the JSON null value. By default, fields with empty 655 // values are omitted from API requests. However, any field with an 656 // empty value appearing in NullFields will be sent to the server as 657 // null. It is an error if a field in this list has a non-empty value. 658 // This may be used to include null fields in Patch requests. 659 NullFields []string `json:"-"` 660} 661 662func (s *AccountStatus) MarshalJSON() ([]byte, error) { 663 type NoMethod AccountStatus 664 raw := NoMethod(*s) 665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 666} 667 668type AccountStatusAccountLevelIssue struct { 669 // Country: Country for which this issue is reported. 670 Country string `json:"country,omitempty"` 671 672 // Destination: The destination the issue applies to. 673 Destination string `json:"destination,omitempty"` 674 675 // Detail: Additional details about the issue. 676 Detail string `json:"detail,omitempty"` 677 678 // Documentation: The URL of a web page to help resolving this issue. 679 Documentation string `json:"documentation,omitempty"` 680 681 // Id: Issue identifier. 682 Id string `json:"id,omitempty"` 683 684 // Severity: Severity of the issue. 685 // 686 // Acceptable values are: 687 // - "critical" 688 // - "error" 689 // - "suggestion" 690 Severity string `json:"severity,omitempty"` 691 692 // Title: Short description of the issue. 693 Title string `json:"title,omitempty"` 694 695 // ForceSendFields is a list of field names (e.g. "Country") to 696 // unconditionally include in API requests. By default, fields with 697 // empty values are omitted from API requests. However, any non-pointer, 698 // non-interface field appearing in ForceSendFields will be sent to the 699 // server regardless of whether the field is empty or not. This may be 700 // used to include empty fields in Patch requests. 701 ForceSendFields []string `json:"-"` 702 703 // NullFields is a list of field names (e.g. "Country") to include in 704 // API requests with the JSON null value. By default, fields with empty 705 // values are omitted from API requests. However, any field with an 706 // empty value appearing in NullFields will be sent to the server as 707 // null. It is an error if a field in this list has a non-empty value. 708 // This may be used to include null fields in Patch requests. 709 NullFields []string `json:"-"` 710} 711 712func (s *AccountStatusAccountLevelIssue) MarshalJSON() ([]byte, error) { 713 type NoMethod AccountStatusAccountLevelIssue 714 raw := NoMethod(*s) 715 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 716} 717 718type AccountStatusDataQualityIssue struct { 719 Country string `json:"country,omitempty"` 720 721 Destination string `json:"destination,omitempty"` 722 723 Detail string `json:"detail,omitempty"` 724 725 DisplayedValue string `json:"displayedValue,omitempty"` 726 727 ExampleItems []*AccountStatusExampleItem `json:"exampleItems,omitempty"` 728 729 Id string `json:"id,omitempty"` 730 731 LastChecked string `json:"lastChecked,omitempty"` 732 733 Location string `json:"location,omitempty"` 734 735 NumItems int64 `json:"numItems,omitempty"` 736 737 // Severity: Acceptable values are: 738 // - "critical" 739 // - "error" 740 // - "suggestion" 741 Severity string `json:"severity,omitempty"` 742 743 SubmittedValue string `json:"submittedValue,omitempty"` 744 745 // ForceSendFields is a list of field names (e.g. "Country") to 746 // unconditionally include in API requests. By default, fields with 747 // empty values are omitted from API requests. However, any non-pointer, 748 // non-interface field appearing in ForceSendFields will be sent to the 749 // server regardless of whether the field is empty or not. This may be 750 // used to include empty fields in Patch requests. 751 ForceSendFields []string `json:"-"` 752 753 // NullFields is a list of field names (e.g. "Country") to include in 754 // API requests with the JSON null value. By default, fields with empty 755 // values are omitted from API requests. However, any field with an 756 // empty value appearing in NullFields will be sent to the server as 757 // null. It is an error if a field in this list has a non-empty value. 758 // This may be used to include null fields in Patch requests. 759 NullFields []string `json:"-"` 760} 761 762func (s *AccountStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 763 type NoMethod AccountStatusDataQualityIssue 764 raw := NoMethod(*s) 765 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 766} 767 768type AccountStatusExampleItem struct { 769 ItemId string `json:"itemId,omitempty"` 770 771 Link string `json:"link,omitempty"` 772 773 SubmittedValue string `json:"submittedValue,omitempty"` 774 775 Title string `json:"title,omitempty"` 776 777 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 778 779 // ForceSendFields is a list of field names (e.g. "ItemId") to 780 // unconditionally include in API requests. By default, fields with 781 // empty values are omitted from API requests. However, any non-pointer, 782 // non-interface field appearing in ForceSendFields will be sent to the 783 // server regardless of whether the field is empty or not. This may be 784 // used to include empty fields in Patch requests. 785 ForceSendFields []string `json:"-"` 786 787 // NullFields is a list of field names (e.g. "ItemId") to include in API 788 // requests with the JSON null value. By default, fields with empty 789 // values are omitted from API requests. However, any field with an 790 // empty value appearing in NullFields will be sent to the server as 791 // null. It is an error if a field in this list has a non-empty value. 792 // This may be used to include null fields in Patch requests. 793 NullFields []string `json:"-"` 794} 795 796func (s *AccountStatusExampleItem) MarshalJSON() ([]byte, error) { 797 type NoMethod AccountStatusExampleItem 798 raw := NoMethod(*s) 799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 800} 801 802type AccountStatusItemLevelIssue struct { 803 // AttributeName: The attribute's name, if the issue is caused by a 804 // single attribute. 805 AttributeName string `json:"attributeName,omitempty"` 806 807 // Code: The error code of the issue. 808 Code string `json:"code,omitempty"` 809 810 // Description: A short issue description in English. 811 Description string `json:"description,omitempty"` 812 813 // Detail: A detailed issue description in English. 814 Detail string `json:"detail,omitempty"` 815 816 // Documentation: The URL of a web page to help with resolving this 817 // issue. 818 Documentation string `json:"documentation,omitempty"` 819 820 // NumItems: Number of items with this issue. 821 NumItems int64 `json:"numItems,omitempty,string"` 822 823 // Resolution: Whether the issue can be resolved by the merchant. 824 Resolution string `json:"resolution,omitempty"` 825 826 // Servability: How this issue affects serving of the offer. 827 Servability string `json:"servability,omitempty"` 828 829 // ForceSendFields is a list of field names (e.g. "AttributeName") to 830 // unconditionally include in API requests. By default, fields with 831 // empty values are omitted from API requests. However, any non-pointer, 832 // non-interface field appearing in ForceSendFields will be sent to the 833 // server regardless of whether the field is empty or not. This may be 834 // used to include empty fields in Patch requests. 835 ForceSendFields []string `json:"-"` 836 837 // NullFields is a list of field names (e.g. "AttributeName") to include 838 // in API requests with the JSON null value. By default, fields with 839 // empty values are omitted from API requests. However, any field with 840 // an empty value appearing in NullFields will be sent to the server as 841 // null. It is an error if a field in this list has a non-empty value. 842 // This may be used to include null fields in Patch requests. 843 NullFields []string `json:"-"` 844} 845 846func (s *AccountStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 847 type NoMethod AccountStatusItemLevelIssue 848 raw := NoMethod(*s) 849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 850} 851 852type AccountStatusProducts struct { 853 // Channel: The channel the data applies to. 854 // 855 // Acceptable values are: 856 // - "local" 857 // - "online" 858 Channel string `json:"channel,omitempty"` 859 860 // Country: The country the data applies to. 861 Country string `json:"country,omitempty"` 862 863 // Destination: The destination the data applies to. 864 Destination string `json:"destination,omitempty"` 865 866 // ItemLevelIssues: List of item-level issues. 867 ItemLevelIssues []*AccountStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 868 869 // Statistics: Aggregated product statistics. 870 Statistics *AccountStatusStatistics `json:"statistics,omitempty"` 871 872 // ForceSendFields is a list of field names (e.g. "Channel") to 873 // unconditionally include in API requests. By default, fields with 874 // empty values are omitted from API requests. However, any non-pointer, 875 // non-interface field appearing in ForceSendFields will be sent to the 876 // server regardless of whether the field is empty or not. This may be 877 // used to include empty fields in Patch requests. 878 ForceSendFields []string `json:"-"` 879 880 // NullFields is a list of field names (e.g. "Channel") to include in 881 // API requests with the JSON null value. By default, fields with empty 882 // values are omitted from API requests. However, any field with an 883 // empty value appearing in NullFields will be sent to the server as 884 // null. It is an error if a field in this list has a non-empty value. 885 // This may be used to include null fields in Patch requests. 886 NullFields []string `json:"-"` 887} 888 889func (s *AccountStatusProducts) MarshalJSON() ([]byte, error) { 890 type NoMethod AccountStatusProducts 891 raw := NoMethod(*s) 892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 893} 894 895type AccountStatusStatistics struct { 896 // Active: Number of active offers. 897 Active int64 `json:"active,omitempty,string"` 898 899 // Disapproved: Number of disapproved offers. 900 Disapproved int64 `json:"disapproved,omitempty,string"` 901 902 // Expiring: Number of expiring offers. 903 Expiring int64 `json:"expiring,omitempty,string"` 904 905 // Pending: Number of pending offers. 906 Pending int64 `json:"pending,omitempty,string"` 907 908 // ForceSendFields is a list of field names (e.g. "Active") 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. "Active") to include in API 917 // 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 *AccountStatusStatistics) MarshalJSON() ([]byte, error) { 926 type NoMethod AccountStatusStatistics 927 raw := NoMethod(*s) 928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 929} 930 931// AccountTax: The tax settings of a merchant account. All methods 932// require the admin role. 933type AccountTax struct { 934 // AccountId: Required. The ID of the account to which these account tax 935 // settings belong. 936 AccountId uint64 `json:"accountId,omitempty,string"` 937 938 // Kind: Identifies what kind of resource this is. Value: the fixed 939 // string "content#accountTax". 940 Kind string `json:"kind,omitempty"` 941 942 // Rules: Tax rules. Updating the tax rules will enable US taxes (not 943 // reversible). Defining no rules is equivalent to not charging tax at 944 // all. 945 Rules []*AccountTaxTaxRule `json:"rules,omitempty"` 946 947 // ServerResponse contains the HTTP response code and headers from the 948 // server. 949 googleapi.ServerResponse `json:"-"` 950 951 // ForceSendFields is a list of field names (e.g. "AccountId") to 952 // unconditionally include in API requests. By default, fields with 953 // empty values are omitted from API requests. However, any non-pointer, 954 // non-interface field appearing in ForceSendFields will be sent to the 955 // server regardless of whether the field is empty or not. This may be 956 // used to include empty fields in Patch requests. 957 ForceSendFields []string `json:"-"` 958 959 // NullFields is a list of field names (e.g. "AccountId") to include in 960 // API requests with the JSON null value. By default, fields with empty 961 // values are omitted from API requests. However, any field with an 962 // empty value appearing in NullFields will be sent to the server as 963 // null. It is an error if a field in this list has a non-empty value. 964 // This may be used to include null fields in Patch requests. 965 NullFields []string `json:"-"` 966} 967 968func (s *AccountTax) MarshalJSON() ([]byte, error) { 969 type NoMethod AccountTax 970 raw := NoMethod(*s) 971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 972} 973 974// AccountTaxTaxRule: Tax calculation rule to apply in a state or 975// province (USA only). 976type AccountTaxTaxRule struct { 977 // Country: Country code in which tax is applicable. 978 Country string `json:"country,omitempty"` 979 980 // LocationId: Required. State (or province) is which the tax is 981 // applicable, described by its location ID (also called criteria ID). 982 LocationId uint64 `json:"locationId,omitempty,string"` 983 984 // RatePercent: Explicit tax rate in percent, represented as a floating 985 // point number without the percentage character. Must not be negative. 986 RatePercent string `json:"ratePercent,omitempty"` 987 988 // ShippingTaxed: If true, shipping charges are also taxed. 989 ShippingTaxed bool `json:"shippingTaxed,omitempty"` 990 991 // UseGlobalRate: Whether the tax rate is taken from a global tax table 992 // or specified explicitly. 993 UseGlobalRate bool `json:"useGlobalRate,omitempty"` 994 995 // ForceSendFields is a list of field names (e.g. "Country") to 996 // unconditionally include in API requests. By default, fields with 997 // empty values are omitted from API requests. However, any non-pointer, 998 // non-interface field appearing in ForceSendFields will be sent to the 999 // server regardless of whether the field is empty or not. This may be 1000 // used to include empty fields in Patch requests. 1001 ForceSendFields []string `json:"-"` 1002 1003 // NullFields is a list of field names (e.g. "Country") to include in 1004 // API requests with the JSON null value. By default, fields with empty 1005 // values are omitted from API requests. However, any field with an 1006 // empty value appearing in NullFields will be sent to the server as 1007 // null. It is an error if a field in this list has a non-empty value. 1008 // This may be used to include null fields in Patch requests. 1009 NullFields []string `json:"-"` 1010} 1011 1012func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) { 1013 type NoMethod AccountTaxTaxRule 1014 raw := NoMethod(*s) 1015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1016} 1017 1018type AccountUser struct { 1019 // Admin: Whether user is an admin. 1020 Admin *bool `json:"admin,omitempty"` 1021 1022 // EmailAddress: User's email address. 1023 EmailAddress string `json:"emailAddress,omitempty"` 1024 1025 // OrderManager: Whether user is an order manager. 1026 OrderManager bool `json:"orderManager,omitempty"` 1027 1028 // PaymentsAnalyst: Whether user can access payment statements. 1029 PaymentsAnalyst bool `json:"paymentsAnalyst,omitempty"` 1030 1031 // PaymentsManager: Whether user can manage payment settings. 1032 PaymentsManager bool `json:"paymentsManager,omitempty"` 1033 1034 // ForceSendFields is a list of field names (e.g. "Admin") to 1035 // unconditionally include in API requests. By default, fields with 1036 // empty values are omitted from API requests. However, any non-pointer, 1037 // non-interface field appearing in ForceSendFields will be sent to the 1038 // server regardless of whether the field is empty or not. This may be 1039 // used to include empty fields in Patch requests. 1040 ForceSendFields []string `json:"-"` 1041 1042 // NullFields is a list of field names (e.g. "Admin") to include in API 1043 // requests with the JSON null value. By default, fields with empty 1044 // values are omitted from API requests. However, any field with an 1045 // empty value appearing in NullFields will be sent to the server as 1046 // null. It is an error if a field in this list has a non-empty value. 1047 // This may be used to include null fields in Patch requests. 1048 NullFields []string `json:"-"` 1049} 1050 1051func (s *AccountUser) MarshalJSON() ([]byte, error) { 1052 type NoMethod AccountUser 1053 raw := NoMethod(*s) 1054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1055} 1056 1057type AccountYouTubeChannelLink struct { 1058 // ChannelId: Channel ID. 1059 ChannelId string `json:"channelId,omitempty"` 1060 1061 // Status: Status of the link between this Merchant Center account and 1062 // the YouTube channel. Upon retrieval, it represents the actual status 1063 // of the link and can be either `active` if it was approved in YT 1064 // Creator Studio or `pending` if it's pending approval. Upon insertion, 1065 // it represents the intended status of the link. Re-uploading a link 1066 // with status `active` when it's still pending or with status `pending` 1067 // when it's already active will have no effect: the status will remain 1068 // unchanged. Re-uploading a link with deprecated status `inactive` is 1069 // equivalent to not submitting the link at all and will delete the link 1070 // if it was active or cancel the link request if it was pending. 1071 Status string `json:"status,omitempty"` 1072 1073 // ForceSendFields is a list of field names (e.g. "ChannelId") to 1074 // unconditionally include in API requests. By default, fields with 1075 // empty values are omitted from API requests. However, any non-pointer, 1076 // non-interface field appearing in ForceSendFields will be sent to the 1077 // server regardless of whether the field is empty or not. This may be 1078 // used to include empty fields in Patch requests. 1079 ForceSendFields []string `json:"-"` 1080 1081 // NullFields is a list of field names (e.g. "ChannelId") to include in 1082 // API requests with the JSON null value. By default, fields with empty 1083 // values are omitted from API requests. However, any field with an 1084 // empty value appearing in NullFields will be sent to the server as 1085 // null. It is an error if a field in this list has a non-empty value. 1086 // This may be used to include null fields in Patch requests. 1087 NullFields []string `json:"-"` 1088} 1089 1090func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) { 1091 type NoMethod AccountYouTubeChannelLink 1092 raw := NoMethod(*s) 1093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1094} 1095 1096type AccountsAuthInfoResponse struct { 1097 // AccountIdentifiers: The account identifiers corresponding to the 1098 // authenticated user. 1099 // - For an individual account: only the merchant ID is defined 1100 // - For an aggregator: only the aggregator ID is defined 1101 // - For a subaccount of an MCA: both the merchant ID and the aggregator 1102 // ID are defined. 1103 AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"` 1104 1105 // Kind: Identifies what kind of resource this is. Value: the fixed 1106 // string "content#accountsAuthInfoResponse". 1107 Kind string `json:"kind,omitempty"` 1108 1109 // ServerResponse contains the HTTP response code and headers from the 1110 // server. 1111 googleapi.ServerResponse `json:"-"` 1112 1113 // ForceSendFields is a list of field names (e.g. "AccountIdentifiers") 1114 // to unconditionally include in API requests. By default, fields with 1115 // empty values are omitted from API requests. However, any non-pointer, 1116 // non-interface field appearing in ForceSendFields will be sent to the 1117 // server regardless of whether the field is empty or not. This may be 1118 // used to include empty fields in Patch requests. 1119 ForceSendFields []string `json:"-"` 1120 1121 // NullFields is a list of field names (e.g. "AccountIdentifiers") to 1122 // include in API requests with the JSON null value. By default, fields 1123 // with empty values are omitted from API requests. However, any field 1124 // with an empty value appearing in NullFields will be sent to the 1125 // server as null. It is an error if a field in this list has a 1126 // non-empty value. This may be used to include null fields in Patch 1127 // requests. 1128 NullFields []string `json:"-"` 1129} 1130 1131func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) { 1132 type NoMethod AccountsAuthInfoResponse 1133 raw := NoMethod(*s) 1134 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1135} 1136 1137type AccountsClaimWebsiteResponse struct { 1138 // Kind: Identifies what kind of resource this is. Value: the fixed 1139 // string "content#accountsClaimWebsiteResponse". 1140 Kind string `json:"kind,omitempty"` 1141 1142 // ServerResponse contains the HTTP response code and headers from the 1143 // server. 1144 googleapi.ServerResponse `json:"-"` 1145 1146 // ForceSendFields is a list of field names (e.g. "Kind") to 1147 // unconditionally include in API requests. By default, fields with 1148 // empty values are omitted from API requests. However, any non-pointer, 1149 // non-interface field appearing in ForceSendFields will be sent to the 1150 // server regardless of whether the field is empty or not. This may be 1151 // used to include empty fields in Patch requests. 1152 ForceSendFields []string `json:"-"` 1153 1154 // NullFields is a list of field names (e.g. "Kind") to include in API 1155 // requests with the JSON null value. By default, fields with empty 1156 // values are omitted from API requests. However, any field with an 1157 // empty value appearing in NullFields will be sent to the server as 1158 // null. It is an error if a field in this list has a non-empty value. 1159 // This may be used to include null fields in Patch requests. 1160 NullFields []string `json:"-"` 1161} 1162 1163func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) { 1164 type NoMethod AccountsClaimWebsiteResponse 1165 raw := NoMethod(*s) 1166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1167} 1168 1169type AccountsCustomBatchRequest struct { 1170 // Entries: The request entries to be processed in the batch. 1171 Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"` 1172 1173 // ForceSendFields is a list of field names (e.g. "Entries") to 1174 // unconditionally include in API requests. By default, fields with 1175 // empty values are omitted from API requests. However, any non-pointer, 1176 // non-interface field appearing in ForceSendFields will be sent to the 1177 // server regardless of whether the field is empty or not. This may be 1178 // used to include empty fields in Patch requests. 1179 ForceSendFields []string `json:"-"` 1180 1181 // NullFields is a list of field names (e.g. "Entries") to include in 1182 // API requests with the JSON null value. By default, fields with empty 1183 // values are omitted from API requests. However, any field with an 1184 // empty value appearing in NullFields will be sent to the server as 1185 // null. It is an error if a field in this list has a non-empty value. 1186 // This may be used to include null fields in Patch requests. 1187 NullFields []string `json:"-"` 1188} 1189 1190func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) { 1191 type NoMethod AccountsCustomBatchRequest 1192 raw := NoMethod(*s) 1193 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1194} 1195 1196// AccountsCustomBatchRequestEntry: A batch entry encoding a single 1197// non-batch accounts request. 1198type AccountsCustomBatchRequestEntry struct { 1199 // Account: The account to create or update. Only defined if the method 1200 // is `insert` or `update`. 1201 Account *Account `json:"account,omitempty"` 1202 1203 // AccountId: The ID of the targeted account. Only defined if the method 1204 // is not `insert`. 1205 AccountId uint64 `json:"accountId,omitempty,string"` 1206 1207 // BatchId: An entry ID, unique within the batch request. 1208 BatchId int64 `json:"batchId,omitempty"` 1209 1210 // Force: Whether the account should be deleted if the account has 1211 // offers. Only applicable if the method is `delete`. 1212 Force bool `json:"force,omitempty"` 1213 1214 // LinkRequest: Details about the `link` request. 1215 LinkRequest *AccountsCustomBatchRequestEntryLinkRequest `json:"linkRequest,omitempty"` 1216 1217 // MerchantId: The ID of the managing account. 1218 MerchantId uint64 `json:"merchantId,omitempty,string"` 1219 1220 // Method: The method of the batch entry. 1221 // 1222 // Acceptable values are: 1223 // - "claimWebsite" 1224 // - "delete" 1225 // - "get" 1226 // - "insert" 1227 // - "link" 1228 // - "update" 1229 Method string `json:"method,omitempty"` 1230 1231 // Overwrite: Only applicable if the method is `claimwebsite`. Indicates 1232 // whether or not to take the claim from another account in case there 1233 // is a conflict. 1234 Overwrite bool `json:"overwrite,omitempty"` 1235 1236 // ForceSendFields is a list of field names (e.g. "Account") to 1237 // unconditionally include in API requests. By default, fields with 1238 // empty values are omitted from API requests. However, any non-pointer, 1239 // non-interface field appearing in ForceSendFields will be sent to the 1240 // server regardless of whether the field is empty or not. This may be 1241 // used to include empty fields in Patch requests. 1242 ForceSendFields []string `json:"-"` 1243 1244 // NullFields is a list of field names (e.g. "Account") to include in 1245 // API requests with the JSON null value. By default, fields with empty 1246 // values are omitted from API requests. However, any field with an 1247 // empty value appearing in NullFields will be sent to the server as 1248 // null. It is an error if a field in this list has a non-empty value. 1249 // This may be used to include null fields in Patch requests. 1250 NullFields []string `json:"-"` 1251} 1252 1253func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1254 type NoMethod AccountsCustomBatchRequestEntry 1255 raw := NoMethod(*s) 1256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1257} 1258 1259type AccountsCustomBatchRequestEntryLinkRequest struct { 1260 // Action: Action to perform for this link. The "request" action is 1261 // only available to select merchants. 1262 // 1263 // Acceptable values are: 1264 // - "approve" 1265 // - "remove" 1266 // - "request" 1267 Action string `json:"action,omitempty"` 1268 1269 // LinkType: Type of the link between the two accounts. 1270 // 1271 // Acceptable values are: 1272 // - "channelPartner" 1273 // - "eCommercePlatform" 1274 LinkType string `json:"linkType,omitempty"` 1275 1276 // LinkedAccountId: The ID of the linked account. 1277 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1278 1279 // ForceSendFields is a list of field names (e.g. "Action") to 1280 // unconditionally include in API requests. By default, fields with 1281 // empty values are omitted from API requests. However, any non-pointer, 1282 // non-interface field appearing in ForceSendFields will be sent to the 1283 // server regardless of whether the field is empty or not. This may be 1284 // used to include empty fields in Patch requests. 1285 ForceSendFields []string `json:"-"` 1286 1287 // NullFields is a list of field names (e.g. "Action") to include in API 1288 // requests with the JSON null value. By default, fields with empty 1289 // values are omitted from API requests. However, any field with an 1290 // empty value appearing in NullFields will be sent to the server as 1291 // null. It is an error if a field in this list has a non-empty value. 1292 // This may be used to include null fields in Patch requests. 1293 NullFields []string `json:"-"` 1294} 1295 1296func (s *AccountsCustomBatchRequestEntryLinkRequest) MarshalJSON() ([]byte, error) { 1297 type NoMethod AccountsCustomBatchRequestEntryLinkRequest 1298 raw := NoMethod(*s) 1299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1300} 1301 1302type AccountsCustomBatchResponse struct { 1303 // Entries: The result of the execution of the batch requests. 1304 Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"` 1305 1306 // Kind: Identifies what kind of resource this is. Value: the fixed 1307 // string "content#accountsCustomBatchResponse". 1308 Kind string `json:"kind,omitempty"` 1309 1310 // ServerResponse contains the HTTP response code and headers from the 1311 // server. 1312 googleapi.ServerResponse `json:"-"` 1313 1314 // ForceSendFields is a list of field names (e.g. "Entries") to 1315 // unconditionally include in API requests. By default, fields with 1316 // empty values are omitted from API requests. However, any non-pointer, 1317 // non-interface field appearing in ForceSendFields will be sent to the 1318 // server regardless of whether the field is empty or not. This may be 1319 // used to include empty fields in Patch requests. 1320 ForceSendFields []string `json:"-"` 1321 1322 // NullFields is a list of field names (e.g. "Entries") to include in 1323 // API requests with the JSON null value. By default, fields with empty 1324 // values are omitted from API requests. However, any field with an 1325 // empty value appearing in NullFields will be sent to the server as 1326 // null. It is an error if a field in this list has a non-empty value. 1327 // This may be used to include null fields in Patch requests. 1328 NullFields []string `json:"-"` 1329} 1330 1331func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) { 1332 type NoMethod AccountsCustomBatchResponse 1333 raw := NoMethod(*s) 1334 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1335} 1336 1337// AccountsCustomBatchResponseEntry: A batch entry encoding a single 1338// non-batch accounts response. 1339type AccountsCustomBatchResponseEntry struct { 1340 // Account: The retrieved, created, or updated account. Not defined if 1341 // the method was `delete`, `claimwebsite` or `link`. 1342 Account *Account `json:"account,omitempty"` 1343 1344 // BatchId: The ID of the request entry this entry responds to. 1345 BatchId int64 `json:"batchId,omitempty"` 1346 1347 // Errors: A list of errors defined if and only if the request failed. 1348 Errors *Errors `json:"errors,omitempty"` 1349 1350 // Kind: Identifies what kind of resource this is. Value: the fixed 1351 // string "content#accountsCustomBatchResponseEntry" 1352 Kind string `json:"kind,omitempty"` 1353 1354 // LinkStatus: Deprecated. This field is never set. 1355 // 1356 // Acceptable values are: 1357 // - "active" 1358 // - "inactive" 1359 // - "pending" 1360 LinkStatus string `json:"linkStatus,omitempty"` 1361 1362 // ForceSendFields is a list of field names (e.g. "Account") to 1363 // unconditionally include in API requests. By default, fields with 1364 // empty values are omitted from API requests. However, any non-pointer, 1365 // non-interface field appearing in ForceSendFields will be sent to the 1366 // server regardless of whether the field is empty or not. This may be 1367 // used to include empty fields in Patch requests. 1368 ForceSendFields []string `json:"-"` 1369 1370 // NullFields is a list of field names (e.g. "Account") to include in 1371 // API requests with the JSON null value. By default, fields with empty 1372 // values are omitted from API requests. However, any field with an 1373 // empty value appearing in NullFields will be sent to the server as 1374 // null. It is an error if a field in this list has a non-empty value. 1375 // This may be used to include null fields in Patch requests. 1376 NullFields []string `json:"-"` 1377} 1378 1379func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1380 type NoMethod AccountsCustomBatchResponseEntry 1381 raw := NoMethod(*s) 1382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1383} 1384 1385type AccountsLinkRequest struct { 1386 // Action: Action to perform for this link. The "request" action is 1387 // only available to select merchants. 1388 // 1389 // Acceptable values are: 1390 // - "approve" 1391 // - "remove" 1392 // - "request" 1393 Action string `json:"action,omitempty"` 1394 1395 // LinkType: Type of the link between the two accounts. 1396 // 1397 // Acceptable values are: 1398 // - "channelPartner" 1399 // - "eCommercePlatform" 1400 LinkType string `json:"linkType,omitempty"` 1401 1402 // LinkedAccountId: The ID of the linked account. 1403 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1404 1405 // ForceSendFields is a list of field names (e.g. "Action") to 1406 // unconditionally include in API requests. By default, fields with 1407 // empty values are omitted from API requests. However, any non-pointer, 1408 // non-interface field appearing in ForceSendFields will be sent to the 1409 // server regardless of whether the field is empty or not. This may be 1410 // used to include empty fields in Patch requests. 1411 ForceSendFields []string `json:"-"` 1412 1413 // NullFields is a list of field names (e.g. "Action") to include in API 1414 // requests with the JSON null value. By default, fields with empty 1415 // values are omitted from API requests. However, any field with an 1416 // empty value appearing in NullFields will be sent to the server as 1417 // null. It is an error if a field in this list has a non-empty value. 1418 // This may be used to include null fields in Patch requests. 1419 NullFields []string `json:"-"` 1420} 1421 1422func (s *AccountsLinkRequest) MarshalJSON() ([]byte, error) { 1423 type NoMethod AccountsLinkRequest 1424 raw := NoMethod(*s) 1425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1426} 1427 1428type AccountsLinkResponse struct { 1429 // Kind: Identifies what kind of resource this is. Value: the fixed 1430 // string "content#accountsLinkResponse". 1431 Kind string `json:"kind,omitempty"` 1432 1433 // ServerResponse contains the HTTP response code and headers from the 1434 // server. 1435 googleapi.ServerResponse `json:"-"` 1436 1437 // ForceSendFields is a list of field names (e.g. "Kind") to 1438 // unconditionally include in API requests. By default, fields with 1439 // empty values are omitted from API requests. However, any non-pointer, 1440 // non-interface field appearing in ForceSendFields will be sent to the 1441 // server regardless of whether the field is empty or not. This may be 1442 // used to include empty fields in Patch requests. 1443 ForceSendFields []string `json:"-"` 1444 1445 // NullFields is a list of field names (e.g. "Kind") to include in API 1446 // requests with the JSON null value. By default, fields with empty 1447 // values are omitted from API requests. However, any field with an 1448 // empty value appearing in NullFields will be sent to the server as 1449 // null. It is an error if a field in this list has a non-empty value. 1450 // This may be used to include null fields in Patch requests. 1451 NullFields []string `json:"-"` 1452} 1453 1454func (s *AccountsLinkResponse) MarshalJSON() ([]byte, error) { 1455 type NoMethod AccountsLinkResponse 1456 raw := NoMethod(*s) 1457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1458} 1459 1460type AccountsListResponse struct { 1461 // Kind: Identifies what kind of resource this is. Value: the fixed 1462 // string "content#accountsListResponse". 1463 Kind string `json:"kind,omitempty"` 1464 1465 // NextPageToken: The token for the retrieval of the next page of 1466 // accounts. 1467 NextPageToken string `json:"nextPageToken,omitempty"` 1468 1469 Resources []*Account `json:"resources,omitempty"` 1470 1471 // ServerResponse contains the HTTP response code and headers from the 1472 // server. 1473 googleapi.ServerResponse `json:"-"` 1474 1475 // ForceSendFields is a list of field names (e.g. "Kind") to 1476 // unconditionally include in API requests. By default, fields with 1477 // empty values are omitted from API requests. However, any non-pointer, 1478 // non-interface field appearing in ForceSendFields will be sent to the 1479 // server regardless of whether the field is empty or not. This may be 1480 // used to include empty fields in Patch requests. 1481 ForceSendFields []string `json:"-"` 1482 1483 // NullFields is a list of field names (e.g. "Kind") to include in API 1484 // requests with the JSON null value. By default, fields with empty 1485 // values are omitted from API requests. However, any field with an 1486 // empty value appearing in NullFields will be sent to the server as 1487 // null. It is an error if a field in this list has a non-empty value. 1488 // This may be used to include null fields in Patch requests. 1489 NullFields []string `json:"-"` 1490} 1491 1492func (s *AccountsListResponse) MarshalJSON() ([]byte, error) { 1493 type NoMethod AccountsListResponse 1494 raw := NoMethod(*s) 1495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1496} 1497 1498type AccountstatusesCustomBatchRequest struct { 1499 // Entries: The request entries to be processed in the batch. 1500 Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 1501 1502 // ForceSendFields is a list of field names (e.g. "Entries") to 1503 // unconditionally include in API requests. By default, fields with 1504 // empty values are omitted from API requests. However, any non-pointer, 1505 // non-interface field appearing in ForceSendFields will be sent to the 1506 // server regardless of whether the field is empty or not. This may be 1507 // used to include empty fields in Patch requests. 1508 ForceSendFields []string `json:"-"` 1509 1510 // NullFields is a list of field names (e.g. "Entries") to include in 1511 // API requests with the JSON null value. By default, fields with empty 1512 // values are omitted from API requests. However, any field with an 1513 // empty value appearing in NullFields will be sent to the server as 1514 // null. It is an error if a field in this list has a non-empty value. 1515 // This may be used to include null fields in Patch requests. 1516 NullFields []string `json:"-"` 1517} 1518 1519func (s *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 1520 type NoMethod AccountstatusesCustomBatchRequest 1521 raw := NoMethod(*s) 1522 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1523} 1524 1525// AccountstatusesCustomBatchRequestEntry: A batch entry encoding a 1526// single non-batch accountstatuses request. 1527type AccountstatusesCustomBatchRequestEntry struct { 1528 // AccountId: The ID of the (sub-)account whose status to get. 1529 AccountId uint64 `json:"accountId,omitempty,string"` 1530 1531 // BatchId: An entry ID, unique within the batch request. 1532 BatchId int64 `json:"batchId,omitempty"` 1533 1534 // Destinations: If set, only issues for the specified destinations are 1535 // returned, otherwise only issues for the Shopping destination. 1536 Destinations []string `json:"destinations,omitempty"` 1537 1538 // MerchantId: The ID of the managing account. 1539 MerchantId uint64 `json:"merchantId,omitempty,string"` 1540 1541 // Method: The method of the batch entry. 1542 // 1543 // Acceptable values are: 1544 // - "get" 1545 Method string `json:"method,omitempty"` 1546 1547 // ForceSendFields is a list of field names (e.g. "AccountId") to 1548 // unconditionally include in API requests. By default, fields with 1549 // empty values are omitted from API requests. However, any non-pointer, 1550 // non-interface field appearing in ForceSendFields will be sent to the 1551 // server regardless of whether the field is empty or not. This may be 1552 // used to include empty fields in Patch requests. 1553 ForceSendFields []string `json:"-"` 1554 1555 // NullFields is a list of field names (e.g. "AccountId") to include in 1556 // API requests with the JSON null value. By default, fields with empty 1557 // values are omitted from API requests. However, any field with an 1558 // empty value appearing in NullFields will be sent to the server as 1559 // null. It is an error if a field in this list has a non-empty value. 1560 // This may be used to include null fields in Patch requests. 1561 NullFields []string `json:"-"` 1562} 1563 1564func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1565 type NoMethod AccountstatusesCustomBatchRequestEntry 1566 raw := NoMethod(*s) 1567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1568} 1569 1570type AccountstatusesCustomBatchResponse struct { 1571 // Entries: The result of the execution of the batch requests. 1572 Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 1573 1574 // Kind: Identifies what kind of resource this is. Value: the fixed 1575 // string "content#accountstatusesCustomBatchResponse". 1576 Kind string `json:"kind,omitempty"` 1577 1578 // ServerResponse contains the HTTP response code and headers from the 1579 // server. 1580 googleapi.ServerResponse `json:"-"` 1581 1582 // ForceSendFields is a list of field names (e.g. "Entries") to 1583 // unconditionally include in API requests. By default, fields with 1584 // empty values are omitted from API requests. However, any non-pointer, 1585 // non-interface field appearing in ForceSendFields will be sent to the 1586 // server regardless of whether the field is empty or not. This may be 1587 // used to include empty fields in Patch requests. 1588 ForceSendFields []string `json:"-"` 1589 1590 // NullFields is a list of field names (e.g. "Entries") to include in 1591 // API requests with the JSON null value. By default, fields with empty 1592 // values are omitted from API requests. However, any field with an 1593 // empty value appearing in NullFields will be sent to the server as 1594 // null. It is an error if a field in this list has a non-empty value. 1595 // This may be used to include null fields in Patch requests. 1596 NullFields []string `json:"-"` 1597} 1598 1599func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 1600 type NoMethod AccountstatusesCustomBatchResponse 1601 raw := NoMethod(*s) 1602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1603} 1604 1605// AccountstatusesCustomBatchResponseEntry: A batch entry encoding a 1606// single non-batch accountstatuses response. 1607type AccountstatusesCustomBatchResponseEntry struct { 1608 // AccountStatus: The requested account status. Defined if and only if 1609 // the request was successful. 1610 AccountStatus *AccountStatus `json:"accountStatus,omitempty"` 1611 1612 // BatchId: The ID of the request entry this entry responds to. 1613 BatchId int64 `json:"batchId,omitempty"` 1614 1615 // Errors: A list of errors defined if and only if the request failed. 1616 Errors *Errors `json:"errors,omitempty"` 1617 1618 // ForceSendFields is a list of field names (e.g. "AccountStatus") to 1619 // unconditionally include in API requests. By default, fields with 1620 // empty values are omitted from API requests. However, any non-pointer, 1621 // non-interface field appearing in ForceSendFields will be sent to the 1622 // server regardless of whether the field is empty or not. This may be 1623 // used to include empty fields in Patch requests. 1624 ForceSendFields []string `json:"-"` 1625 1626 // NullFields is a list of field names (e.g. "AccountStatus") to include 1627 // in API requests with the JSON null value. By default, fields with 1628 // empty values are omitted from API requests. However, any field with 1629 // an empty value appearing in NullFields will be sent to the server as 1630 // null. It is an error if a field in this list has a non-empty value. 1631 // This may be used to include null fields in Patch requests. 1632 NullFields []string `json:"-"` 1633} 1634 1635func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1636 type NoMethod AccountstatusesCustomBatchResponseEntry 1637 raw := NoMethod(*s) 1638 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1639} 1640 1641type AccountstatusesListResponse struct { 1642 // Kind: Identifies what kind of resource this is. Value: the fixed 1643 // string "content#accountstatusesListResponse". 1644 Kind string `json:"kind,omitempty"` 1645 1646 // NextPageToken: The token for the retrieval of the next page of 1647 // account statuses. 1648 NextPageToken string `json:"nextPageToken,omitempty"` 1649 1650 Resources []*AccountStatus `json:"resources,omitempty"` 1651 1652 // ServerResponse contains the HTTP response code and headers from the 1653 // server. 1654 googleapi.ServerResponse `json:"-"` 1655 1656 // ForceSendFields is a list of field names (e.g. "Kind") to 1657 // unconditionally include in API requests. By default, fields with 1658 // empty values are omitted from API requests. However, any non-pointer, 1659 // non-interface field appearing in ForceSendFields will be sent to the 1660 // server regardless of whether the field is empty or not. This may be 1661 // used to include empty fields in Patch requests. 1662 ForceSendFields []string `json:"-"` 1663 1664 // NullFields is a list of field names (e.g. "Kind") to include in API 1665 // requests with the JSON null value. By default, fields with empty 1666 // values are omitted from API requests. However, any field with an 1667 // empty value appearing in NullFields will be sent to the server as 1668 // null. It is an error if a field in this list has a non-empty value. 1669 // This may be used to include null fields in Patch requests. 1670 NullFields []string `json:"-"` 1671} 1672 1673func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) { 1674 type NoMethod AccountstatusesListResponse 1675 raw := NoMethod(*s) 1676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1677} 1678 1679type AccounttaxCustomBatchRequest struct { 1680 // Entries: The request entries to be processed in the batch. 1681 Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"` 1682 1683 // ForceSendFields is a list of field names (e.g. "Entries") to 1684 // unconditionally include in API requests. By default, fields with 1685 // empty values are omitted from API requests. However, any non-pointer, 1686 // non-interface field appearing in ForceSendFields will be sent to the 1687 // server regardless of whether the field is empty or not. This may be 1688 // used to include empty fields in Patch requests. 1689 ForceSendFields []string `json:"-"` 1690 1691 // NullFields is a list of field names (e.g. "Entries") to include in 1692 // API requests with the JSON null value. By default, fields with empty 1693 // values are omitted from API requests. However, any field with an 1694 // empty value appearing in NullFields will be sent to the server as 1695 // null. It is an error if a field in this list has a non-empty value. 1696 // This may be used to include null fields in Patch requests. 1697 NullFields []string `json:"-"` 1698} 1699 1700func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) { 1701 type NoMethod AccounttaxCustomBatchRequest 1702 raw := NoMethod(*s) 1703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1704} 1705 1706// AccounttaxCustomBatchRequestEntry: A batch entry encoding a single 1707// non-batch accounttax request. 1708type AccounttaxCustomBatchRequestEntry struct { 1709 // AccountId: The ID of the account for which to get/update account tax 1710 // settings. 1711 AccountId uint64 `json:"accountId,omitempty,string"` 1712 1713 // AccountTax: The account tax settings to update. Only defined if the 1714 // method is `update`. 1715 AccountTax *AccountTax `json:"accountTax,omitempty"` 1716 1717 // BatchId: An entry ID, unique within the batch request. 1718 BatchId int64 `json:"batchId,omitempty"` 1719 1720 // MerchantId: The ID of the managing account. 1721 MerchantId uint64 `json:"merchantId,omitempty,string"` 1722 1723 // Method: The method of the batch entry. 1724 // 1725 // Acceptable values are: 1726 // - "get" 1727 // - "update" 1728 Method string `json:"method,omitempty"` 1729 1730 // ForceSendFields is a list of field names (e.g. "AccountId") to 1731 // unconditionally include in API requests. By default, fields with 1732 // empty values are omitted from API requests. However, any non-pointer, 1733 // non-interface field appearing in ForceSendFields will be sent to the 1734 // server regardless of whether the field is empty or not. This may be 1735 // used to include empty fields in Patch requests. 1736 ForceSendFields []string `json:"-"` 1737 1738 // NullFields is a list of field names (e.g. "AccountId") to include in 1739 // API requests with the JSON null value. By default, fields with empty 1740 // values are omitted from API requests. However, any field with an 1741 // empty value appearing in NullFields will be sent to the server as 1742 // null. It is an error if a field in this list has a non-empty value. 1743 // This may be used to include null fields in Patch requests. 1744 NullFields []string `json:"-"` 1745} 1746 1747func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1748 type NoMethod AccounttaxCustomBatchRequestEntry 1749 raw := NoMethod(*s) 1750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1751} 1752 1753type AccounttaxCustomBatchResponse struct { 1754 // Entries: The result of the execution of the batch requests. 1755 Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"` 1756 1757 // Kind: Identifies what kind of resource this is. Value: the fixed 1758 // string "content#accounttaxCustomBatchResponse". 1759 Kind string `json:"kind,omitempty"` 1760 1761 // ServerResponse contains the HTTP response code and headers from the 1762 // server. 1763 googleapi.ServerResponse `json:"-"` 1764 1765 // ForceSendFields is a list of field names (e.g. "Entries") to 1766 // unconditionally include in API requests. By default, fields with 1767 // empty values are omitted from API requests. However, any non-pointer, 1768 // non-interface field appearing in ForceSendFields will be sent to the 1769 // server regardless of whether the field is empty or not. This may be 1770 // used to include empty fields in Patch requests. 1771 ForceSendFields []string `json:"-"` 1772 1773 // NullFields is a list of field names (e.g. "Entries") to include in 1774 // API requests with the JSON null value. By default, fields with empty 1775 // values are omitted from API requests. However, any field with an 1776 // empty value appearing in NullFields will be sent to the server as 1777 // null. It is an error if a field in this list has a non-empty value. 1778 // This may be used to include null fields in Patch requests. 1779 NullFields []string `json:"-"` 1780} 1781 1782func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) { 1783 type NoMethod AccounttaxCustomBatchResponse 1784 raw := NoMethod(*s) 1785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1786} 1787 1788// AccounttaxCustomBatchResponseEntry: A batch entry encoding a single 1789// non-batch accounttax response. 1790type AccounttaxCustomBatchResponseEntry struct { 1791 // AccountTax: The retrieved or updated account tax settings. 1792 AccountTax *AccountTax `json:"accountTax,omitempty"` 1793 1794 // BatchId: The ID of the request entry this entry responds to. 1795 BatchId int64 `json:"batchId,omitempty"` 1796 1797 // Errors: A list of errors defined if and only if the request failed. 1798 Errors *Errors `json:"errors,omitempty"` 1799 1800 // Kind: Identifies what kind of resource this is. Value: the fixed 1801 // string "content#accounttaxCustomBatchResponseEntry" 1802 Kind string `json:"kind,omitempty"` 1803 1804 // ForceSendFields is a list of field names (e.g. "AccountTax") to 1805 // unconditionally include in API requests. By default, fields with 1806 // empty values are omitted from API requests. However, any non-pointer, 1807 // non-interface field appearing in ForceSendFields will be sent to the 1808 // server regardless of whether the field is empty or not. This may be 1809 // used to include empty fields in Patch requests. 1810 ForceSendFields []string `json:"-"` 1811 1812 // NullFields is a list of field names (e.g. "AccountTax") to include in 1813 // API requests with the JSON null value. By default, fields with empty 1814 // values are omitted from API requests. However, any field with an 1815 // empty value appearing in NullFields will be sent to the server as 1816 // null. It is an error if a field in this list has a non-empty value. 1817 // This may be used to include null fields in Patch requests. 1818 NullFields []string `json:"-"` 1819} 1820 1821func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1822 type NoMethod AccounttaxCustomBatchResponseEntry 1823 raw := NoMethod(*s) 1824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1825} 1826 1827type AccounttaxListResponse struct { 1828 // Kind: Identifies what kind of resource this is. Value: the fixed 1829 // string "content#accounttaxListResponse". 1830 Kind string `json:"kind,omitempty"` 1831 1832 // NextPageToken: The token for the retrieval of the next page of 1833 // account tax settings. 1834 NextPageToken string `json:"nextPageToken,omitempty"` 1835 1836 Resources []*AccountTax `json:"resources,omitempty"` 1837 1838 // ServerResponse contains the HTTP response code and headers from the 1839 // server. 1840 googleapi.ServerResponse `json:"-"` 1841 1842 // ForceSendFields is a list of field names (e.g. "Kind") to 1843 // unconditionally include in API requests. By default, fields with 1844 // empty values are omitted from API requests. However, any non-pointer, 1845 // non-interface field appearing in ForceSendFields will be sent to the 1846 // server regardless of whether the field is empty or not. This may be 1847 // used to include empty fields in Patch requests. 1848 ForceSendFields []string `json:"-"` 1849 1850 // NullFields is a list of field names (e.g. "Kind") to include in API 1851 // requests with the JSON null value. By default, fields with empty 1852 // values are omitted from API requests. However, any field with an 1853 // empty value appearing in NullFields will be sent to the server as 1854 // null. It is an error if a field in this list has a non-empty value. 1855 // This may be used to include null fields in Patch requests. 1856 NullFields []string `json:"-"` 1857} 1858 1859func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) { 1860 type NoMethod AccounttaxListResponse 1861 raw := NoMethod(*s) 1862 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1863} 1864 1865type Amount struct { 1866 // Pretax: [required] Value before taxes. 1867 Pretax *Price `json:"pretax,omitempty"` 1868 1869 // Tax: [required] Tax value. 1870 Tax *Price `json:"tax,omitempty"` 1871 1872 // ForceSendFields is a list of field names (e.g. "Pretax") to 1873 // unconditionally include in API requests. By default, fields with 1874 // empty values are omitted from API requests. However, any non-pointer, 1875 // non-interface field appearing in ForceSendFields will be sent to the 1876 // server regardless of whether the field is empty or not. This may be 1877 // used to include empty fields in Patch requests. 1878 ForceSendFields []string `json:"-"` 1879 1880 // NullFields is a list of field names (e.g. "Pretax") to include in API 1881 // requests with the JSON null value. By default, fields with empty 1882 // values are omitted from API requests. However, any field with an 1883 // empty value appearing in NullFields will be sent to the server as 1884 // null. It is an error if a field in this list has a non-empty value. 1885 // This may be used to include null fields in Patch requests. 1886 NullFields []string `json:"-"` 1887} 1888 1889func (s *Amount) MarshalJSON() ([]byte, error) { 1890 type NoMethod Amount 1891 raw := NoMethod(*s) 1892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1893} 1894 1895type BusinessDayConfig struct { 1896 // BusinessDays: Regular business days. May not be empty. 1897 BusinessDays []string `json:"businessDays,omitempty"` 1898 1899 // ForceSendFields is a list of field names (e.g. "BusinessDays") to 1900 // unconditionally include in API requests. By default, fields with 1901 // empty values are omitted from API requests. However, any non-pointer, 1902 // non-interface field appearing in ForceSendFields will be sent to the 1903 // server regardless of whether the field is empty or not. This may be 1904 // used to include empty fields in Patch requests. 1905 ForceSendFields []string `json:"-"` 1906 1907 // NullFields is a list of field names (e.g. "BusinessDays") to include 1908 // in API requests with the JSON null value. By default, fields with 1909 // empty values are omitted from API requests. However, any field with 1910 // an empty value appearing in NullFields will be sent to the server as 1911 // null. It is an error if a field in this list has a non-empty value. 1912 // This may be used to include null fields in Patch requests. 1913 NullFields []string `json:"-"` 1914} 1915 1916func (s *BusinessDayConfig) MarshalJSON() ([]byte, error) { 1917 type NoMethod BusinessDayConfig 1918 raw := NoMethod(*s) 1919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1920} 1921 1922type CarrierRate struct { 1923 // CarrierName: Carrier service, such as "UPS" or "Fedex". The list 1924 // of supported carriers can be retrieved via the `getSupportedCarriers` 1925 // method. Required. 1926 CarrierName string `json:"carrierName,omitempty"` 1927 1928 // CarrierService: Carrier service, such as "ground" or "2 days". 1929 // The list of supported services for a carrier can be retrieved via the 1930 // `getSupportedCarriers` method. Required. 1931 CarrierService string `json:"carrierService,omitempty"` 1932 1933 // FlatAdjustment: Additive shipping rate modifier. Can be negative. For 1934 // example `{ "value": "1", "currency" : "USD" }` adds $1 to the rate, 1935 // `{ "value": "-3", "currency" : "USD" }` removes $3 from the rate. 1936 // Optional. 1937 FlatAdjustment *Price `json:"flatAdjustment,omitempty"` 1938 1939 // Name: Name of the carrier rate. Must be unique per rate group. 1940 // Required. 1941 Name string `json:"name,omitempty"` 1942 1943 // OriginPostalCode: Shipping origin for this carrier rate. Required. 1944 OriginPostalCode string `json:"originPostalCode,omitempty"` 1945 1946 // PercentageAdjustment: Multiplicative shipping rate modifier as a 1947 // number in decimal notation. Can be negative. For example "5.4" 1948 // increases the rate by 5.4%, "-3" decreases the rate by 3%. 1949 // Optional. 1950 PercentageAdjustment string `json:"percentageAdjustment,omitempty"` 1951 1952 // ForceSendFields is a list of field names (e.g. "CarrierName") to 1953 // unconditionally include in API requests. By default, fields with 1954 // empty values are omitted from API requests. However, any non-pointer, 1955 // non-interface field appearing in ForceSendFields will be sent to the 1956 // server regardless of whether the field is empty or not. This may be 1957 // used to include empty fields in Patch requests. 1958 ForceSendFields []string `json:"-"` 1959 1960 // NullFields is a list of field names (e.g. "CarrierName") to include 1961 // in API requests with the JSON null value. By default, fields with 1962 // empty values are omitted from API requests. However, any field with 1963 // an empty value appearing in NullFields will be sent to the server as 1964 // null. It is an error if a field in this list has a non-empty value. 1965 // This may be used to include null fields in Patch requests. 1966 NullFields []string `json:"-"` 1967} 1968 1969func (s *CarrierRate) MarshalJSON() ([]byte, error) { 1970 type NoMethod CarrierRate 1971 raw := NoMethod(*s) 1972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1973} 1974 1975type CarriersCarrier struct { 1976 // Country: The CLDR country code of the carrier (e.g., "US"). Always 1977 // present. 1978 Country string `json:"country,omitempty"` 1979 1980 // Name: The name of the carrier (e.g., "UPS"). Always present. 1981 Name string `json:"name,omitempty"` 1982 1983 // Services: A list of supported services (e.g., "ground") for that 1984 // carrier. Contains at least one service. 1985 Services []string `json:"services,omitempty"` 1986 1987 // ForceSendFields is a list of field names (e.g. "Country") to 1988 // unconditionally include in API requests. By default, fields with 1989 // empty values are omitted from API requests. However, any non-pointer, 1990 // non-interface field appearing in ForceSendFields will be sent to the 1991 // server regardless of whether the field is empty or not. This may be 1992 // used to include empty fields in Patch requests. 1993 ForceSendFields []string `json:"-"` 1994 1995 // NullFields is a list of field names (e.g. "Country") to include in 1996 // API requests with the JSON null value. By default, fields with empty 1997 // values are omitted from API requests. However, any field with an 1998 // empty value appearing in NullFields will be sent to the server as 1999 // null. It is an error if a field in this list has a non-empty value. 2000 // This may be used to include null fields in Patch requests. 2001 NullFields []string `json:"-"` 2002} 2003 2004func (s *CarriersCarrier) MarshalJSON() ([]byte, error) { 2005 type NoMethod CarriersCarrier 2006 raw := NoMethod(*s) 2007 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2008} 2009 2010type CustomAttribute struct { 2011 // Name: The name of the attribute. Underscores will be replaced by 2012 // spaces upon insertion. 2013 Name string `json:"name,omitempty"` 2014 2015 // Type: The type of the attribute. 2016 // 2017 // Acceptable values are: 2018 // - "boolean" 2019 // - "datetimerange" 2020 // - "float" 2021 // - "group" 2022 // - "int" 2023 // - "price" 2024 // - "text" 2025 // - "time" 2026 // - "url" 2027 Type string `json:"type,omitempty"` 2028 2029 // Unit: Free-form unit of the attribute. Unit can only be used for 2030 // values of type int, float, or price. 2031 Unit string `json:"unit,omitempty"` 2032 2033 // Value: The value of the attribute. 2034 Value string `json:"value,omitempty"` 2035 2036 // ForceSendFields is a list of field names (e.g. "Name") to 2037 // unconditionally include in API requests. By default, fields with 2038 // empty values are omitted from API requests. However, any non-pointer, 2039 // non-interface field appearing in ForceSendFields will be sent to the 2040 // server regardless of whether the field is empty or not. This may be 2041 // used to include empty fields in Patch requests. 2042 ForceSendFields []string `json:"-"` 2043 2044 // NullFields is a list of field names (e.g. "Name") to include in API 2045 // requests with the JSON null value. By default, fields with empty 2046 // values are omitted from API requests. However, any field with an 2047 // empty value appearing in NullFields will be sent to the server as 2048 // null. It is an error if a field in this list has a non-empty value. 2049 // This may be used to include null fields in Patch requests. 2050 NullFields []string `json:"-"` 2051} 2052 2053func (s *CustomAttribute) MarshalJSON() ([]byte, error) { 2054 type NoMethod CustomAttribute 2055 raw := NoMethod(*s) 2056 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2057} 2058 2059type CustomGroup struct { 2060 // Attributes: The sub-attributes. 2061 Attributes []*CustomAttribute `json:"attributes,omitempty"` 2062 2063 // Name: The name of the group. Underscores will be replaced by spaces 2064 // upon insertion. 2065 Name string `json:"name,omitempty"` 2066 2067 // ForceSendFields is a list of field names (e.g. "Attributes") to 2068 // unconditionally include in API requests. By default, fields with 2069 // empty values are omitted from API requests. However, any non-pointer, 2070 // non-interface field appearing in ForceSendFields will be sent to the 2071 // server regardless of whether the field is empty or not. This may be 2072 // used to include empty fields in Patch requests. 2073 ForceSendFields []string `json:"-"` 2074 2075 // NullFields is a list of field names (e.g. "Attributes") to include in 2076 // API requests with the JSON null value. By default, fields with empty 2077 // values are omitted from API requests. However, any field with an 2078 // empty value appearing in NullFields will be sent to the server as 2079 // null. It is an error if a field in this list has a non-empty value. 2080 // This may be used to include null fields in Patch requests. 2081 NullFields []string `json:"-"` 2082} 2083 2084func (s *CustomGroup) MarshalJSON() ([]byte, error) { 2085 type NoMethod CustomGroup 2086 raw := NoMethod(*s) 2087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2088} 2089 2090type CustomerReturnReason struct { 2091 // Description: Description of the reason. 2092 Description string `json:"description,omitempty"` 2093 2094 // ReasonCode: Code of the return reason. 2095 // 2096 // Acceptable values are: 2097 // - "betterPriceFound" 2098 // - "changedMind" 2099 // - "damagedOrDefectiveItem" 2100 // - "didNotMatchDescription" 2101 // - "doesNotFit" 2102 // - "expiredItem" 2103 // - "incorrectItemReceived" 2104 // - "noLongerNeeded" 2105 // - "notSpecified" 2106 // - "orderedWrongItem" 2107 // - "other" 2108 // - "qualityNotExpected" 2109 // - "receivedTooLate" 2110 // - "undeliverable" 2111 ReasonCode string `json:"reasonCode,omitempty"` 2112 2113 // ForceSendFields is a list of field names (e.g. "Description") to 2114 // unconditionally include in API requests. By default, fields with 2115 // empty values are omitted from API requests. However, any non-pointer, 2116 // non-interface field appearing in ForceSendFields will be sent to the 2117 // server regardless of whether the field is empty or not. This may be 2118 // used to include empty fields in Patch requests. 2119 ForceSendFields []string `json:"-"` 2120 2121 // NullFields is a list of field names (e.g. "Description") to include 2122 // in API requests with the JSON null value. By default, fields with 2123 // empty values are omitted from API requests. However, any field with 2124 // an empty value appearing in NullFields will be sent to the server as 2125 // null. It is an error if a field in this list has a non-empty value. 2126 // This may be used to include null fields in Patch requests. 2127 NullFields []string `json:"-"` 2128} 2129 2130func (s *CustomerReturnReason) MarshalJSON() ([]byte, error) { 2131 type NoMethod CustomerReturnReason 2132 raw := NoMethod(*s) 2133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2134} 2135 2136type CutoffTime struct { 2137 // Hour: Hour of the cutoff time until which an order has to be placed 2138 // to be processed in the same day. Required. 2139 Hour int64 `json:"hour,omitempty"` 2140 2141 // Minute: Minute of the cutoff time until which an order has to be 2142 // placed to be processed in the same day. Required. 2143 Minute int64 `json:"minute,omitempty"` 2144 2145 // Timezone: Timezone identifier for the cutoff time. A list of 2146 // identifiers can be found in the AdWords API documentation. E.g. 2147 // "Europe/Zurich". Required. 2148 Timezone string `json:"timezone,omitempty"` 2149 2150 // ForceSendFields is a list of field names (e.g. "Hour") to 2151 // unconditionally include in API requests. By default, fields with 2152 // empty values are omitted from API requests. However, any non-pointer, 2153 // non-interface field appearing in ForceSendFields will be sent to the 2154 // server regardless of whether the field is empty or not. This may be 2155 // used to include empty fields in Patch requests. 2156 ForceSendFields []string `json:"-"` 2157 2158 // NullFields is a list of field names (e.g. "Hour") to include in API 2159 // requests with the JSON null value. By default, fields with empty 2160 // values are omitted from API requests. However, any field with an 2161 // empty value appearing in NullFields will be sent to the server as 2162 // null. It is an error if a field in this list has a non-empty value. 2163 // This may be used to include null fields in Patch requests. 2164 NullFields []string `json:"-"` 2165} 2166 2167func (s *CutoffTime) MarshalJSON() ([]byte, error) { 2168 type NoMethod CutoffTime 2169 raw := NoMethod(*s) 2170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2171} 2172 2173// Datafeed: Datafeed configuration data. 2174type Datafeed struct { 2175 // AttributeLanguage: The two-letter ISO 639-1 language in which the 2176 // attributes are defined in the data feed. 2177 AttributeLanguage string `json:"attributeLanguage,omitempty"` 2178 2179 // ContentLanguage: [DEPRECATED] Please use targets[].language instead. 2180 // The two-letter ISO 639-1 language of the items in the feed. Must be a 2181 // valid language for `targetCountry`. 2182 ContentLanguage string `json:"contentLanguage,omitempty"` 2183 2184 // ContentType: Required. The type of data feed. For product inventory 2185 // feeds, only feeds for local stores, not online stores, are 2186 // supported. 2187 // 2188 // Acceptable values are: 2189 // - "local products" 2190 // - "product inventory" 2191 // - "products" 2192 ContentType string `json:"contentType,omitempty"` 2193 2194 // FetchSchedule: Fetch schedule for the feed file. 2195 FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"` 2196 2197 // FileName: Required. The filename of the feed. All feeds must have a 2198 // unique file name. 2199 FileName string `json:"fileName,omitempty"` 2200 2201 // Format: Format of the feed file. 2202 Format *DatafeedFormat `json:"format,omitempty"` 2203 2204 // Id: Required for update. The ID of the data feed. 2205 Id int64 `json:"id,omitempty,string"` 2206 2207 // IntendedDestinations: [DEPRECATED] Please use 2208 // targets[].includedDestinations instead. The list of intended 2209 // destinations (corresponds to checked check boxes in Merchant Center). 2210 IntendedDestinations []string `json:"intendedDestinations,omitempty"` 2211 2212 // Kind: Identifies what kind of resource this is. Value: the fixed 2213 // string "content#datafeed" 2214 Kind string `json:"kind,omitempty"` 2215 2216 // Name: Required for insert. A descriptive name of the data feed. 2217 Name string `json:"name,omitempty"` 2218 2219 // TargetCountry: [DEPRECATED] Please use targets[].country instead. The 2220 // country where the items in the feed will be included in the search 2221 // index, represented as a CLDR territory code. 2222 TargetCountry string `json:"targetCountry,omitempty"` 2223 2224 // Targets: The targets this feed should apply to (country, language, 2225 // destinations). 2226 Targets []*DatafeedTarget `json:"targets,omitempty"` 2227 2228 // ServerResponse contains the HTTP response code and headers from the 2229 // server. 2230 googleapi.ServerResponse `json:"-"` 2231 2232 // ForceSendFields is a list of field names (e.g. "AttributeLanguage") 2233 // to unconditionally include in API requests. By default, fields with 2234 // empty values are omitted from API requests. However, any non-pointer, 2235 // non-interface field appearing in ForceSendFields will be sent to the 2236 // server regardless of whether the field is empty or not. This may be 2237 // used to include empty fields in Patch requests. 2238 ForceSendFields []string `json:"-"` 2239 2240 // NullFields is a list of field names (e.g. "AttributeLanguage") to 2241 // include in API requests with the JSON null value. By default, fields 2242 // with empty values are omitted from API requests. However, any field 2243 // with an empty value appearing in NullFields will be sent to the 2244 // server as null. It is an error if a field in this list has a 2245 // non-empty value. This may be used to include null fields in Patch 2246 // requests. 2247 NullFields []string `json:"-"` 2248} 2249 2250func (s *Datafeed) MarshalJSON() ([]byte, error) { 2251 type NoMethod Datafeed 2252 raw := NoMethod(*s) 2253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2254} 2255 2256// DatafeedFetchSchedule: The required fields vary based on the 2257// frequency of fetching. For a monthly fetch schedule, day_of_month and 2258// hour are required. For a weekly fetch schedule, weekday and hour are 2259// required. For a daily fetch schedule, only hour is required. 2260type DatafeedFetchSchedule struct { 2261 // DayOfMonth: The day of the month the feed file should be fetched 2262 // (1-31). 2263 DayOfMonth int64 `json:"dayOfMonth,omitempty"` 2264 2265 // FetchUrl: The URL where the feed file can be fetched. Google Merchant 2266 // Center will support automatic scheduled uploads using the HTTP, 2267 // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid 2268 // link using one of those four protocols. 2269 FetchUrl string `json:"fetchUrl,omitempty"` 2270 2271 // Hour: The hour of the day the feed file should be fetched (0-23). 2272 Hour int64 `json:"hour,omitempty"` 2273 2274 // MinuteOfHour: The minute of the hour the feed file should be fetched 2275 // (0-59). Read-only. 2276 MinuteOfHour int64 `json:"minuteOfHour,omitempty"` 2277 2278 // Password: An optional password for fetch_url. 2279 Password string `json:"password,omitempty"` 2280 2281 // Paused: Whether the scheduled fetch is paused or not. 2282 Paused bool `json:"paused,omitempty"` 2283 2284 // TimeZone: Time zone used for schedule. UTC by default. E.g., 2285 // "America/Los_Angeles". 2286 TimeZone string `json:"timeZone,omitempty"` 2287 2288 // Username: An optional user name for fetch_url. 2289 Username string `json:"username,omitempty"` 2290 2291 // Weekday: The day of the week the feed file should be 2292 // fetched. 2293 // 2294 // Acceptable values are: 2295 // - "monday" 2296 // - "tuesday" 2297 // - "wednesday" 2298 // - "thursday" 2299 // - "friday" 2300 // - "saturday" 2301 // - "sunday" 2302 Weekday string `json:"weekday,omitempty"` 2303 2304 // ForceSendFields is a list of field names (e.g. "DayOfMonth") to 2305 // unconditionally include in API requests. By default, fields with 2306 // empty values are omitted from API requests. However, any non-pointer, 2307 // non-interface field appearing in ForceSendFields will be sent to the 2308 // server regardless of whether the field is empty or not. This may be 2309 // used to include empty fields in Patch requests. 2310 ForceSendFields []string `json:"-"` 2311 2312 // NullFields is a list of field names (e.g. "DayOfMonth") to include in 2313 // API requests with the JSON null value. By default, fields with empty 2314 // values are omitted from API requests. However, any field with an 2315 // empty value appearing in NullFields will be sent to the server as 2316 // null. It is an error if a field in this list has a non-empty value. 2317 // This may be used to include null fields in Patch requests. 2318 NullFields []string `json:"-"` 2319} 2320 2321func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) { 2322 type NoMethod DatafeedFetchSchedule 2323 raw := NoMethod(*s) 2324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2325} 2326 2327type DatafeedFormat struct { 2328 // ColumnDelimiter: Delimiter for the separation of values in a 2329 // delimiter-separated values feed. If not specified, the delimiter will 2330 // be auto-detected. Ignored for non-DSV data feeds. 2331 // 2332 // Acceptable values are: 2333 // - "pipe" 2334 // - "tab" 2335 // - "tilde" 2336 ColumnDelimiter string `json:"columnDelimiter,omitempty"` 2337 2338 // FileEncoding: Character encoding scheme of the data feed. If not 2339 // specified, the encoding will be auto-detected. 2340 // 2341 // Acceptable values are: 2342 // - "latin-1" 2343 // - "utf-16be" 2344 // - "utf-16le" 2345 // - "utf-8" 2346 // - "windows-1252" 2347 FileEncoding string `json:"fileEncoding,omitempty"` 2348 2349 // QuotingMode: Specifies how double quotes are interpreted. If not 2350 // specified, the mode will be auto-detected. Ignored for non-DSV data 2351 // feeds. 2352 // 2353 // Acceptable values are: 2354 // - "normal character" 2355 // - "value quoting" 2356 QuotingMode string `json:"quotingMode,omitempty"` 2357 2358 // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to 2359 // unconditionally include in API requests. By default, fields with 2360 // empty values are omitted from API requests. However, any non-pointer, 2361 // non-interface field appearing in ForceSendFields will be sent to the 2362 // server regardless of whether the field is empty or not. This may be 2363 // used to include empty fields in Patch requests. 2364 ForceSendFields []string `json:"-"` 2365 2366 // NullFields is a list of field names (e.g. "ColumnDelimiter") to 2367 // include in API requests with the JSON null value. By default, fields 2368 // with empty values are omitted from API requests. However, any field 2369 // with an empty value appearing in NullFields will be sent to the 2370 // server as null. It is an error if a field in this list has a 2371 // non-empty value. This may be used to include null fields in Patch 2372 // requests. 2373 NullFields []string `json:"-"` 2374} 2375 2376func (s *DatafeedFormat) MarshalJSON() ([]byte, error) { 2377 type NoMethod DatafeedFormat 2378 raw := NoMethod(*s) 2379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2380} 2381 2382// DatafeedStatus: The status of a datafeed, i.e., the result of the 2383// last retrieval of the datafeed computed asynchronously when the feed 2384// processing is finished. 2385type DatafeedStatus struct { 2386 // Country: The country for which the status is reported, represented as 2387 // a CLDR territory code. 2388 Country string `json:"country,omitempty"` 2389 2390 // DatafeedId: The ID of the feed for which the status is reported. 2391 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2392 2393 // Errors: The list of errors occurring in the feed. 2394 Errors []*DatafeedStatusError `json:"errors,omitempty"` 2395 2396 // ItemsTotal: The number of items in the feed that were processed. 2397 ItemsTotal uint64 `json:"itemsTotal,omitempty,string"` 2398 2399 // ItemsValid: The number of items in the feed that were valid. 2400 ItemsValid uint64 `json:"itemsValid,omitempty,string"` 2401 2402 // Kind: Identifies what kind of resource this is. Value: the fixed 2403 // string "content#datafeedStatus" 2404 Kind string `json:"kind,omitempty"` 2405 2406 // Language: The two-letter ISO 639-1 language for which the status is 2407 // reported. 2408 Language string `json:"language,omitempty"` 2409 2410 // LastUploadDate: The last date at which the feed was uploaded. 2411 LastUploadDate string `json:"lastUploadDate,omitempty"` 2412 2413 // ProcessingStatus: The processing status of the feed. 2414 // 2415 // Acceptable values are: 2416 // - ""failure": The feed could not be processed or all items had 2417 // errors." 2418 // - "in progress": The feed is being processed. 2419 // - "none": The feed has not yet been processed. For example, a feed 2420 // that has never been uploaded will have this processing status. 2421 // - "success": The feed was processed successfully, though some items 2422 // might have had errors. 2423 ProcessingStatus string `json:"processingStatus,omitempty"` 2424 2425 // Warnings: The list of errors occurring in the feed. 2426 Warnings []*DatafeedStatusError `json:"warnings,omitempty"` 2427 2428 // ServerResponse contains the HTTP response code and headers from the 2429 // server. 2430 googleapi.ServerResponse `json:"-"` 2431 2432 // ForceSendFields is a list of field names (e.g. "Country") to 2433 // unconditionally include in API requests. By default, fields with 2434 // empty values are omitted from API requests. However, any non-pointer, 2435 // non-interface field appearing in ForceSendFields will be sent to the 2436 // server regardless of whether the field is empty or not. This may be 2437 // used to include empty fields in Patch requests. 2438 ForceSendFields []string `json:"-"` 2439 2440 // NullFields is a list of field names (e.g. "Country") to include in 2441 // API requests with the JSON null value. By default, fields with empty 2442 // values are omitted from API requests. However, any field with an 2443 // empty value appearing in NullFields will be sent to the server as 2444 // null. It is an error if a field in this list has a non-empty value. 2445 // This may be used to include null fields in Patch requests. 2446 NullFields []string `json:"-"` 2447} 2448 2449func (s *DatafeedStatus) MarshalJSON() ([]byte, error) { 2450 type NoMethod DatafeedStatus 2451 raw := NoMethod(*s) 2452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2453} 2454 2455// DatafeedStatusError: An error occurring in the feed, like "invalid 2456// price". 2457type DatafeedStatusError struct { 2458 // Code: The code of the error, e.g., "validation/invalid_value". 2459 Code string `json:"code,omitempty"` 2460 2461 // Count: The number of occurrences of the error in the feed. 2462 Count uint64 `json:"count,omitempty,string"` 2463 2464 // Examples: A list of example occurrences of the error, grouped by 2465 // product. 2466 Examples []*DatafeedStatusExample `json:"examples,omitempty"` 2467 2468 // Message: The error message, e.g., "Invalid price". 2469 Message string `json:"message,omitempty"` 2470 2471 // ForceSendFields is a list of field names (e.g. "Code") to 2472 // unconditionally include in API requests. By default, fields with 2473 // empty values are omitted from API requests. However, any non-pointer, 2474 // non-interface field appearing in ForceSendFields will be sent to the 2475 // server regardless of whether the field is empty or not. This may be 2476 // used to include empty fields in Patch requests. 2477 ForceSendFields []string `json:"-"` 2478 2479 // NullFields is a list of field names (e.g. "Code") to include in API 2480 // requests with the JSON null value. By default, fields with empty 2481 // values are omitted from API requests. However, any field with an 2482 // empty value appearing in NullFields will be sent to the server as 2483 // null. It is an error if a field in this list has a non-empty value. 2484 // This may be used to include null fields in Patch requests. 2485 NullFields []string `json:"-"` 2486} 2487 2488func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) { 2489 type NoMethod DatafeedStatusError 2490 raw := NoMethod(*s) 2491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2492} 2493 2494// DatafeedStatusExample: An example occurrence for a particular error. 2495type DatafeedStatusExample struct { 2496 // ItemId: The ID of the example item. 2497 ItemId string `json:"itemId,omitempty"` 2498 2499 // LineNumber: Line number in the data feed where the example is found. 2500 LineNumber uint64 `json:"lineNumber,omitempty,string"` 2501 2502 // Value: The problematic value. 2503 Value string `json:"value,omitempty"` 2504 2505 // ForceSendFields is a list of field names (e.g. "ItemId") to 2506 // unconditionally include in API requests. By default, fields with 2507 // empty values are omitted from API requests. However, any non-pointer, 2508 // non-interface field appearing in ForceSendFields will be sent to the 2509 // server regardless of whether the field is empty or not. This may be 2510 // used to include empty fields in Patch requests. 2511 ForceSendFields []string `json:"-"` 2512 2513 // NullFields is a list of field names (e.g. "ItemId") to include in API 2514 // requests with the JSON null value. By default, fields with empty 2515 // values are omitted from API requests. However, any field with an 2516 // empty value appearing in NullFields will be sent to the server as 2517 // null. It is an error if a field in this list has a non-empty value. 2518 // This may be used to include null fields in Patch requests. 2519 NullFields []string `json:"-"` 2520} 2521 2522func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) { 2523 type NoMethod DatafeedStatusExample 2524 raw := NoMethod(*s) 2525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2526} 2527 2528type DatafeedTarget struct { 2529 // Country: The country where the items in the feed will be included in 2530 // the search index, represented as a CLDR territory code. 2531 Country string `json:"country,omitempty"` 2532 2533 // ExcludedDestinations: The list of destinations to exclude for this 2534 // target (corresponds to unchecked check boxes in Merchant Center). 2535 ExcludedDestinations []string `json:"excludedDestinations,omitempty"` 2536 2537 // IncludedDestinations: The list of destinations to include for this 2538 // target (corresponds to checked check boxes in Merchant Center). 2539 // Default destinations are always included unless provided in 2540 // `excludedDestinations`. 2541 // 2542 // List of supported destinations (if available to the account): 2543 // - DisplayAds 2544 // - Shopping 2545 // - ShoppingActions 2546 // - SurfacesAcrossGoogle 2547 IncludedDestinations []string `json:"includedDestinations,omitempty"` 2548 2549 // Language: The two-letter ISO 639-1 language of the items in the feed. 2550 // Must be a valid language for `targets[].country`. 2551 Language string `json:"language,omitempty"` 2552 2553 // ForceSendFields is a list of field names (e.g. "Country") to 2554 // unconditionally include in API requests. By default, fields with 2555 // empty values are omitted from API requests. However, any non-pointer, 2556 // non-interface field appearing in ForceSendFields will be sent to the 2557 // server regardless of whether the field is empty or not. This may be 2558 // used to include empty fields in Patch requests. 2559 ForceSendFields []string `json:"-"` 2560 2561 // NullFields is a list of field names (e.g. "Country") to include in 2562 // API requests with the JSON null value. By default, fields with empty 2563 // values are omitted from API requests. However, any field with an 2564 // empty value appearing in NullFields will be sent to the server as 2565 // null. It is an error if a field in this list has a non-empty value. 2566 // This may be used to include null fields in Patch requests. 2567 NullFields []string `json:"-"` 2568} 2569 2570func (s *DatafeedTarget) MarshalJSON() ([]byte, error) { 2571 type NoMethod DatafeedTarget 2572 raw := NoMethod(*s) 2573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2574} 2575 2576type DatafeedsCustomBatchRequest struct { 2577 // Entries: The request entries to be processed in the batch. 2578 Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"` 2579 2580 // ForceSendFields is a list of field names (e.g. "Entries") to 2581 // unconditionally include in API requests. By default, fields with 2582 // empty values are omitted from API requests. However, any non-pointer, 2583 // non-interface field appearing in ForceSendFields will be sent to the 2584 // server regardless of whether the field is empty or not. This may be 2585 // used to include empty fields in Patch requests. 2586 ForceSendFields []string `json:"-"` 2587 2588 // NullFields is a list of field names (e.g. "Entries") to include in 2589 // API requests with the JSON null value. By default, fields with empty 2590 // values are omitted from API requests. However, any field with an 2591 // empty value appearing in NullFields will be sent to the server as 2592 // null. It is an error if a field in this list has a non-empty value. 2593 // This may be used to include null fields in Patch requests. 2594 NullFields []string `json:"-"` 2595} 2596 2597func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) { 2598 type NoMethod DatafeedsCustomBatchRequest 2599 raw := NoMethod(*s) 2600 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2601} 2602 2603// DatafeedsCustomBatchRequestEntry: A batch entry encoding a single 2604// non-batch datafeeds request. 2605type DatafeedsCustomBatchRequestEntry struct { 2606 // BatchId: An entry ID, unique within the batch request. 2607 BatchId int64 `json:"batchId,omitempty"` 2608 2609 // Datafeed: The data feed to insert. 2610 Datafeed *Datafeed `json:"datafeed,omitempty"` 2611 2612 // DatafeedId: The ID of the data feed to get, delete or fetch. 2613 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2614 2615 // MerchantId: The ID of the managing account. 2616 MerchantId uint64 `json:"merchantId,omitempty,string"` 2617 2618 // Method: The method of the batch entry. 2619 // 2620 // Acceptable values are: 2621 // - "delete" 2622 // - "fetchNow" 2623 // - "get" 2624 // - "insert" 2625 // - "update" 2626 Method string `json:"method,omitempty"` 2627 2628 // ForceSendFields is a list of field names (e.g. "BatchId") to 2629 // unconditionally include in API requests. By default, fields with 2630 // empty values are omitted from API requests. However, any non-pointer, 2631 // non-interface field appearing in ForceSendFields will be sent to the 2632 // server regardless of whether the field is empty or not. This may be 2633 // used to include empty fields in Patch requests. 2634 ForceSendFields []string `json:"-"` 2635 2636 // NullFields is a list of field names (e.g. "BatchId") to include in 2637 // API requests with the JSON null value. By default, fields with empty 2638 // values are omitted from API requests. However, any field with an 2639 // empty value appearing in NullFields will be sent to the server as 2640 // null. It is an error if a field in this list has a non-empty value. 2641 // This may be used to include null fields in Patch requests. 2642 NullFields []string `json:"-"` 2643} 2644 2645func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2646 type NoMethod DatafeedsCustomBatchRequestEntry 2647 raw := NoMethod(*s) 2648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2649} 2650 2651type DatafeedsCustomBatchResponse struct { 2652 // Entries: The result of the execution of the batch requests. 2653 Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"` 2654 2655 // Kind: Identifies what kind of resource this is. Value: the fixed 2656 // string "content#datafeedsCustomBatchResponse". 2657 Kind string `json:"kind,omitempty"` 2658 2659 // ServerResponse contains the HTTP response code and headers from the 2660 // server. 2661 googleapi.ServerResponse `json:"-"` 2662 2663 // ForceSendFields is a list of field names (e.g. "Entries") to 2664 // unconditionally include in API requests. By default, fields with 2665 // empty values are omitted from API requests. However, any non-pointer, 2666 // non-interface field appearing in ForceSendFields will be sent to the 2667 // server regardless of whether the field is empty or not. This may be 2668 // used to include empty fields in Patch requests. 2669 ForceSendFields []string `json:"-"` 2670 2671 // NullFields is a list of field names (e.g. "Entries") to include in 2672 // API requests with the JSON null value. By default, fields with empty 2673 // values are omitted from API requests. However, any field with an 2674 // empty value appearing in NullFields will be sent to the server as 2675 // null. It is an error if a field in this list has a non-empty value. 2676 // This may be used to include null fields in Patch requests. 2677 NullFields []string `json:"-"` 2678} 2679 2680func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) { 2681 type NoMethod DatafeedsCustomBatchResponse 2682 raw := NoMethod(*s) 2683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2684} 2685 2686// DatafeedsCustomBatchResponseEntry: A batch entry encoding a single 2687// non-batch datafeeds response. 2688type DatafeedsCustomBatchResponseEntry struct { 2689 // BatchId: The ID of the request entry this entry responds to. 2690 BatchId int64 `json:"batchId,omitempty"` 2691 2692 // Datafeed: The requested data feed. Defined if and only if the request 2693 // was successful. 2694 Datafeed *Datafeed `json:"datafeed,omitempty"` 2695 2696 // Errors: A list of errors defined if and only if the request failed. 2697 Errors *Errors `json:"errors,omitempty"` 2698 2699 // ForceSendFields is a list of field names (e.g. "BatchId") to 2700 // unconditionally include in API requests. By default, fields with 2701 // empty values are omitted from API requests. However, any non-pointer, 2702 // non-interface field appearing in ForceSendFields will be sent to the 2703 // server regardless of whether the field is empty or not. This may be 2704 // used to include empty fields in Patch requests. 2705 ForceSendFields []string `json:"-"` 2706 2707 // NullFields is a list of field names (e.g. "BatchId") to include in 2708 // API requests with the JSON null value. By default, fields with empty 2709 // values are omitted from API requests. However, any field with an 2710 // empty value appearing in NullFields will be sent to the server as 2711 // null. It is an error if a field in this list has a non-empty value. 2712 // This may be used to include null fields in Patch requests. 2713 NullFields []string `json:"-"` 2714} 2715 2716func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2717 type NoMethod DatafeedsCustomBatchResponseEntry 2718 raw := NoMethod(*s) 2719 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2720} 2721 2722type DatafeedsFetchNowResponse struct { 2723 // Kind: Identifies what kind of resource this is. Value: the fixed 2724 // string "content#datafeedsFetchNowResponse". 2725 Kind string `json:"kind,omitempty"` 2726 2727 // ServerResponse contains the HTTP response code and headers from the 2728 // server. 2729 googleapi.ServerResponse `json:"-"` 2730 2731 // ForceSendFields is a list of field names (e.g. "Kind") to 2732 // unconditionally include in API requests. By default, fields with 2733 // empty values are omitted from API requests. However, any non-pointer, 2734 // non-interface field appearing in ForceSendFields will be sent to the 2735 // server regardless of whether the field is empty or not. This may be 2736 // used to include empty fields in Patch requests. 2737 ForceSendFields []string `json:"-"` 2738 2739 // NullFields is a list of field names (e.g. "Kind") to include in API 2740 // requests with the JSON null value. By default, fields with empty 2741 // values are omitted from API requests. However, any field with an 2742 // empty value appearing in NullFields will be sent to the server as 2743 // null. It is an error if a field in this list has a non-empty value. 2744 // This may be used to include null fields in Patch requests. 2745 NullFields []string `json:"-"` 2746} 2747 2748func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) { 2749 type NoMethod DatafeedsFetchNowResponse 2750 raw := NoMethod(*s) 2751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2752} 2753 2754type DatafeedsListResponse struct { 2755 // Kind: Identifies what kind of resource this is. Value: the fixed 2756 // string "content#datafeedsListResponse". 2757 Kind string `json:"kind,omitempty"` 2758 2759 // NextPageToken: The token for the retrieval of the next page of 2760 // datafeeds. 2761 NextPageToken string `json:"nextPageToken,omitempty"` 2762 2763 Resources []*Datafeed `json:"resources,omitempty"` 2764 2765 // ServerResponse contains the HTTP response code and headers from the 2766 // server. 2767 googleapi.ServerResponse `json:"-"` 2768 2769 // ForceSendFields is a list of field names (e.g. "Kind") to 2770 // unconditionally include in API requests. By default, fields with 2771 // empty values are omitted from API requests. However, any non-pointer, 2772 // non-interface field appearing in ForceSendFields will be sent to the 2773 // server regardless of whether the field is empty or not. This may be 2774 // used to include empty fields in Patch requests. 2775 ForceSendFields []string `json:"-"` 2776 2777 // NullFields is a list of field names (e.g. "Kind") to include in API 2778 // requests with the JSON null value. By default, fields with empty 2779 // values are omitted from API requests. However, any field with an 2780 // empty value appearing in NullFields will be sent to the server as 2781 // null. It is an error if a field in this list has a non-empty value. 2782 // This may be used to include null fields in Patch requests. 2783 NullFields []string `json:"-"` 2784} 2785 2786func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) { 2787 type NoMethod DatafeedsListResponse 2788 raw := NoMethod(*s) 2789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2790} 2791 2792type DatafeedstatusesCustomBatchRequest struct { 2793 // Entries: The request entries to be processed in the batch. 2794 Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 2795 2796 // ForceSendFields is a list of field names (e.g. "Entries") to 2797 // unconditionally include in API requests. By default, fields with 2798 // empty values are omitted from API requests. However, any non-pointer, 2799 // non-interface field appearing in ForceSendFields will be sent to the 2800 // server regardless of whether the field is empty or not. This may be 2801 // used to include empty fields in Patch requests. 2802 ForceSendFields []string `json:"-"` 2803 2804 // NullFields is a list of field names (e.g. "Entries") to include in 2805 // API requests with the JSON null value. By default, fields with empty 2806 // values are omitted from API requests. However, any field with an 2807 // empty value appearing in NullFields will be sent to the server as 2808 // null. It is an error if a field in this list has a non-empty value. 2809 // This may be used to include null fields in Patch requests. 2810 NullFields []string `json:"-"` 2811} 2812 2813func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 2814 type NoMethod DatafeedstatusesCustomBatchRequest 2815 raw := NoMethod(*s) 2816 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2817} 2818 2819// DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a 2820// single non-batch datafeedstatuses request. 2821type DatafeedstatusesCustomBatchRequestEntry struct { 2822 // BatchId: An entry ID, unique within the batch request. 2823 BatchId int64 `json:"batchId,omitempty"` 2824 2825 // Country: The country for which to get the datafeed status. If this 2826 // parameter is provided then language must also be provided. Note that 2827 // for multi-target datafeeds this parameter is required. 2828 Country string `json:"country,omitempty"` 2829 2830 // DatafeedId: The ID of the data feed to get. 2831 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2832 2833 // Language: The language for which to get the datafeed status. If this 2834 // parameter is provided then country must also be provided. Note that 2835 // for multi-target datafeeds this parameter is required. 2836 Language string `json:"language,omitempty"` 2837 2838 // MerchantId: The ID of the managing account. 2839 MerchantId uint64 `json:"merchantId,omitempty,string"` 2840 2841 // Method: The method of the batch entry. 2842 // 2843 // Acceptable values are: 2844 // - "get" 2845 Method string `json:"method,omitempty"` 2846 2847 // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") to include in 2856 // API requests with the JSON null value. By default, fields with empty 2857 // values are omitted from API requests. However, any field with an 2858 // 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 *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2865 type NoMethod DatafeedstatusesCustomBatchRequestEntry 2866 raw := NoMethod(*s) 2867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2868} 2869 2870type DatafeedstatusesCustomBatchResponse struct { 2871 // Entries: The result of the execution of the batch requests. 2872 Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 2873 2874 // Kind: Identifies what kind of resource this is. Value: the fixed 2875 // string "content#datafeedstatusesCustomBatchResponse". 2876 Kind string `json:"kind,omitempty"` 2877 2878 // ServerResponse contains the HTTP response code and headers from the 2879 // server. 2880 googleapi.ServerResponse `json:"-"` 2881 2882 // ForceSendFields is a list of field names (e.g. "Entries") to 2883 // unconditionally include in API requests. By default, fields with 2884 // empty values are omitted from API requests. However, any non-pointer, 2885 // non-interface field appearing in ForceSendFields will be sent to the 2886 // server regardless of whether the field is empty or not. This may be 2887 // used to include empty fields in Patch requests. 2888 ForceSendFields []string `json:"-"` 2889 2890 // NullFields is a list of field names (e.g. "Entries") to include in 2891 // API requests with the JSON null value. By default, fields with empty 2892 // values are omitted from API requests. However, any field with an 2893 // empty value appearing in NullFields will be sent to the server as 2894 // null. It is an error if a field in this list has a non-empty value. 2895 // This may be used to include null fields in Patch requests. 2896 NullFields []string `json:"-"` 2897} 2898 2899func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 2900 type NoMethod DatafeedstatusesCustomBatchResponse 2901 raw := NoMethod(*s) 2902 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2903} 2904 2905// DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a 2906// single non-batch datafeedstatuses response. 2907type DatafeedstatusesCustomBatchResponseEntry struct { 2908 // BatchId: The ID of the request entry this entry responds to. 2909 BatchId int64 `json:"batchId,omitempty"` 2910 2911 // DatafeedStatus: The requested data feed status. Defined if and only 2912 // if the request was successful. 2913 DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"` 2914 2915 // Errors: A list of errors defined if and only if the request failed. 2916 Errors *Errors `json:"errors,omitempty"` 2917 2918 // ForceSendFields is a list of field names (e.g. "BatchId") to 2919 // unconditionally include in API requests. By default, fields with 2920 // empty values are omitted from API requests. However, any non-pointer, 2921 // non-interface field appearing in ForceSendFields will be sent to the 2922 // server regardless of whether the field is empty or not. This may be 2923 // used to include empty fields in Patch requests. 2924 ForceSendFields []string `json:"-"` 2925 2926 // NullFields is a list of field names (e.g. "BatchId") to include in 2927 // API requests with the JSON null value. By default, fields with empty 2928 // values are omitted from API requests. However, any field with an 2929 // empty value appearing in NullFields will be sent to the server as 2930 // null. It is an error if a field in this list has a non-empty value. 2931 // This may be used to include null fields in Patch requests. 2932 NullFields []string `json:"-"` 2933} 2934 2935func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2936 type NoMethod DatafeedstatusesCustomBatchResponseEntry 2937 raw := NoMethod(*s) 2938 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2939} 2940 2941type DatafeedstatusesListResponse struct { 2942 // Kind: Identifies what kind of resource this is. Value: the fixed 2943 // string "content#datafeedstatusesListResponse". 2944 Kind string `json:"kind,omitempty"` 2945 2946 // NextPageToken: The token for the retrieval of the next page of 2947 // datafeed statuses. 2948 NextPageToken string `json:"nextPageToken,omitempty"` 2949 2950 Resources []*DatafeedStatus `json:"resources,omitempty"` 2951 2952 // ServerResponse contains the HTTP response code and headers from the 2953 // server. 2954 googleapi.ServerResponse `json:"-"` 2955 2956 // ForceSendFields is a list of field names (e.g. "Kind") to 2957 // unconditionally include in API requests. By default, fields with 2958 // empty values are omitted from API requests. However, any non-pointer, 2959 // non-interface field appearing in ForceSendFields will be sent to the 2960 // server regardless of whether the field is empty or not. This may be 2961 // used to include empty fields in Patch requests. 2962 ForceSendFields []string `json:"-"` 2963 2964 // NullFields is a list of field names (e.g. "Kind") to include in API 2965 // requests with the JSON null value. By default, fields with empty 2966 // values are omitted from API requests. However, any field with an 2967 // empty value appearing in NullFields will be sent to the server as 2968 // null. It is an error if a field in this list has a non-empty value. 2969 // This may be used to include null fields in Patch requests. 2970 NullFields []string `json:"-"` 2971} 2972 2973func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) { 2974 type NoMethod DatafeedstatusesListResponse 2975 raw := NoMethod(*s) 2976 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2977} 2978 2979type DeliveryTime struct { 2980 // CutoffTime: Business days cutoff time definition. If not configured 2981 // the cutoff time will be defaulted to 8AM PST. 2982 CutoffTime *CutoffTime `json:"cutoffTime,omitempty"` 2983 2984 // HandlingBusinessDayConfig: The business days during which orders can 2985 // be handled. If not provided, Monday to Friday business days will be 2986 // assumed. 2987 HandlingBusinessDayConfig *BusinessDayConfig `json:"handlingBusinessDayConfig,omitempty"` 2988 2989 // HolidayCutoffs: Holiday cutoff definitions. If configured, they 2990 // specify order cutoff times for holiday-specific shipping. 2991 HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"` 2992 2993 // MaxHandlingTimeInDays: Maximum number of business days spent before 2994 // an order is shipped. 0 means same day shipped, 1 means next day 2995 // shipped. Must be greater than or equal to `minHandlingTimeInDays`. 2996 MaxHandlingTimeInDays int64 `json:"maxHandlingTimeInDays,omitempty"` 2997 2998 // MaxTransitTimeInDays: Maximum number of business days that is spent 2999 // in transit. 0 means same day delivery, 1 means next day delivery. 3000 // Must be greater than or equal to `minTransitTimeInDays`. 3001 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 3002 3003 // MinHandlingTimeInDays: Minimum number of business days spent before 3004 // an order is shipped. 0 means same day shipped, 1 means next day 3005 // shipped. 3006 MinHandlingTimeInDays int64 `json:"minHandlingTimeInDays,omitempty"` 3007 3008 // MinTransitTimeInDays: Minimum number of business days that is spent 3009 // in transit. 0 means same day delivery, 1 means next day delivery. 3010 // Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be 3011 // set, but not both. 3012 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 3013 3014 // TransitBusinessDayConfig: The business days during which orders can 3015 // be in-transit. If not provided, Monday to Friday business days will 3016 // be assumed. 3017 TransitBusinessDayConfig *BusinessDayConfig `json:"transitBusinessDayConfig,omitempty"` 3018 3019 // TransitTimeTable: Transit time table, number of business days spent 3020 // in transit based on row and column dimensions. Either 3021 // `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but 3022 // not both. 3023 TransitTimeTable *TransitTable `json:"transitTimeTable,omitempty"` 3024 3025 // ForceSendFields is a list of field names (e.g. "CutoffTime") to 3026 // unconditionally include in API requests. By default, fields with 3027 // empty values are omitted from API requests. However, any non-pointer, 3028 // non-interface field appearing in ForceSendFields will be sent to the 3029 // server regardless of whether the field is empty or not. This may be 3030 // used to include empty fields in Patch requests. 3031 ForceSendFields []string `json:"-"` 3032 3033 // NullFields is a list of field names (e.g. "CutoffTime") to include in 3034 // API requests with the JSON null value. By default, fields with empty 3035 // values are omitted from API requests. However, any field with an 3036 // empty value appearing in NullFields will be sent to the server as 3037 // null. It is an error if a field in this list has a non-empty value. 3038 // This may be used to include null fields in Patch requests. 3039 NullFields []string `json:"-"` 3040} 3041 3042func (s *DeliveryTime) MarshalJSON() ([]byte, error) { 3043 type NoMethod DeliveryTime 3044 raw := NoMethod(*s) 3045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3046} 3047 3048// Error: An error returned by the API. 3049type Error struct { 3050 // Domain: The domain of the error. 3051 Domain string `json:"domain,omitempty"` 3052 3053 // Message: A description of the error. 3054 Message string `json:"message,omitempty"` 3055 3056 // Reason: The error code. 3057 Reason string `json:"reason,omitempty"` 3058 3059 // ForceSendFields is a list of field names (e.g. "Domain") to 3060 // unconditionally include in API requests. By default, fields with 3061 // empty values are omitted from API requests. However, any non-pointer, 3062 // non-interface field appearing in ForceSendFields will be sent to the 3063 // server regardless of whether the field is empty or not. This may be 3064 // used to include empty fields in Patch requests. 3065 ForceSendFields []string `json:"-"` 3066 3067 // NullFields is a list of field names (e.g. "Domain") to include in API 3068 // requests with the JSON null value. By default, fields with empty 3069 // values are omitted from API requests. However, any field with an 3070 // empty value appearing in NullFields will be sent to the server as 3071 // null. It is an error if a field in this list has a non-empty value. 3072 // This may be used to include null fields in Patch requests. 3073 NullFields []string `json:"-"` 3074} 3075 3076func (s *Error) MarshalJSON() ([]byte, error) { 3077 type NoMethod Error 3078 raw := NoMethod(*s) 3079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3080} 3081 3082// Errors: A list of errors returned by a failed batch entry. 3083type Errors struct { 3084 // Code: The HTTP status of the first error in `errors`. 3085 Code int64 `json:"code,omitempty"` 3086 3087 // Errors: A list of errors. 3088 Errors []*Error `json:"errors,omitempty"` 3089 3090 // Message: The message of the first error in `errors`. 3091 Message string `json:"message,omitempty"` 3092 3093 // ForceSendFields is a list of field names (e.g. "Code") to 3094 // unconditionally include in API requests. By default, fields with 3095 // empty values are omitted from API requests. However, any non-pointer, 3096 // non-interface field appearing in ForceSendFields will be sent to the 3097 // server regardless of whether the field is empty or not. This may be 3098 // used to include empty fields in Patch requests. 3099 ForceSendFields []string `json:"-"` 3100 3101 // NullFields is a list of field names (e.g. "Code") to include in API 3102 // requests with the JSON null value. By default, fields with empty 3103 // values are omitted from API requests. However, any field with an 3104 // empty value appearing in NullFields will be sent to the server as 3105 // null. It is an error if a field in this list has a non-empty value. 3106 // This may be used to include null fields in Patch requests. 3107 NullFields []string `json:"-"` 3108} 3109 3110func (s *Errors) MarshalJSON() ([]byte, error) { 3111 type NoMethod Errors 3112 raw := NoMethod(*s) 3113 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3114} 3115 3116type GmbAccounts struct { 3117 // AccountId: The ID of the Merchant Center account. 3118 AccountId uint64 `json:"accountId,omitempty,string"` 3119 3120 // GmbAccounts: A list of GMB accounts which are available to the 3121 // merchant. 3122 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 3123 3124 // ForceSendFields is a list of field names (e.g. "AccountId") to 3125 // unconditionally include in API requests. By default, fields with 3126 // empty values are omitted from API requests. However, any non-pointer, 3127 // non-interface field appearing in ForceSendFields will be sent to the 3128 // server regardless of whether the field is empty or not. This may be 3129 // used to include empty fields in Patch requests. 3130 ForceSendFields []string `json:"-"` 3131 3132 // NullFields is a list of field names (e.g. "AccountId") to include in 3133 // API requests with the JSON null value. By default, fields with empty 3134 // values are omitted from API requests. However, any field with an 3135 // empty value appearing in NullFields will be sent to the server as 3136 // null. It is an error if a field in this list has a non-empty value. 3137 // This may be used to include null fields in Patch requests. 3138 NullFields []string `json:"-"` 3139} 3140 3141func (s *GmbAccounts) MarshalJSON() ([]byte, error) { 3142 type NoMethod GmbAccounts 3143 raw := NoMethod(*s) 3144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3145} 3146 3147type GmbAccountsGmbAccount struct { 3148 // Email: The email which identifies the GMB account. 3149 Email string `json:"email,omitempty"` 3150 3151 // ListingCount: Number of listings under this account. 3152 ListingCount uint64 `json:"listingCount,omitempty,string"` 3153 3154 // Name: The name of the GMB account. 3155 Name string `json:"name,omitempty"` 3156 3157 // Type: The type of the GMB account (User or Business). 3158 Type string `json:"type,omitempty"` 3159 3160 // ForceSendFields is a list of field names (e.g. "Email") to 3161 // unconditionally include in API requests. By default, fields with 3162 // empty values are omitted from API requests. However, any non-pointer, 3163 // non-interface field appearing in ForceSendFields will be sent to the 3164 // server regardless of whether the field is empty or not. This may be 3165 // used to include empty fields in Patch requests. 3166 ForceSendFields []string `json:"-"` 3167 3168 // NullFields is a list of field names (e.g. "Email") to include in API 3169 // requests with the JSON null value. By default, fields with empty 3170 // values are omitted from API requests. However, any field with an 3171 // empty value appearing in NullFields will be sent to the server as 3172 // null. It is an error if a field in this list has a non-empty value. 3173 // This may be used to include null fields in Patch requests. 3174 NullFields []string `json:"-"` 3175} 3176 3177func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) { 3178 type NoMethod GmbAccountsGmbAccount 3179 raw := NoMethod(*s) 3180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3181} 3182 3183// Headers: A non-empty list of row or column headers for a table. 3184// Exactly one of `prices`, `weights`, `numItems`, 3185// `postalCodeGroupNames`, or `location` must be set. 3186type Headers struct { 3187 // Locations: A list of location ID sets. Must be non-empty. Can only be 3188 // set if all other fields are not set. 3189 Locations []*LocationIdSet `json:"locations,omitempty"` 3190 3191 // NumberOfItems: A list of inclusive number of items upper bounds. The 3192 // last value can be "infinity". For example `["10", "50", 3193 // "infinity"]` represents the headers "<= 10 items", " 50 items". Must 3194 // be non-empty. Can only be set if all other fields are not set. 3195 NumberOfItems []string `json:"numberOfItems,omitempty"` 3196 3197 // PostalCodeGroupNames: A list of postal group names. The last value 3198 // can be "all other locations". Example: `["zone 1", "zone 2", "all 3199 // other locations"]`. The referred postal code groups must match the 3200 // delivery country of the service. Must be non-empty. Can only be set 3201 // if all other fields are not set. 3202 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 3203 3204 // Prices: A list of inclusive order price upper bounds. The last 3205 // price's value can be "infinity". For example `[{"value": "10", 3206 // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": 3207 // "infinity", "currency": "USD"}]` represents the headers "<= $10", " 3208 // $500". All prices within a service must have the same currency. Must 3209 // be non-empty. Can only be set if all other fields are not set. 3210 Prices []*Price `json:"prices,omitempty"` 3211 3212 // Weights: A list of inclusive order weight upper bounds. The last 3213 // weight's value can be "infinity". For example `[{"value": "10", 3214 // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", 3215 // "unit": "kg"}]` represents the headers "<= 10kg", " 50kg". All 3216 // weights within a service must have the same unit. Must be non-empty. 3217 // Can only be set if all other fields are not set. 3218 Weights []*Weight `json:"weights,omitempty"` 3219 3220 // ForceSendFields is a list of field names (e.g. "Locations") to 3221 // unconditionally include in API requests. By default, fields with 3222 // empty values are omitted from API requests. However, any non-pointer, 3223 // non-interface field appearing in ForceSendFields will be sent to the 3224 // server regardless of whether the field is empty or not. This may be 3225 // used to include empty fields in Patch requests. 3226 ForceSendFields []string `json:"-"` 3227 3228 // NullFields is a list of field names (e.g. "Locations") to include in 3229 // API requests with the JSON null value. By default, fields with empty 3230 // values are omitted from API requests. However, any field with an 3231 // empty value appearing in NullFields will be sent to the server as 3232 // null. It is an error if a field in this list has a non-empty value. 3233 // This may be used to include null fields in Patch requests. 3234 NullFields []string `json:"-"` 3235} 3236 3237func (s *Headers) MarshalJSON() ([]byte, error) { 3238 type NoMethod Headers 3239 raw := NoMethod(*s) 3240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3241} 3242 3243type HolidayCutoff struct { 3244 // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g. 3245 // "2016-11-29" for 29th November 2016. Required. 3246 DeadlineDate string `json:"deadlineDate,omitempty"` 3247 3248 // DeadlineHour: Hour of the day on the deadline date until which the 3249 // order has to be placed to qualify for the delivery guarantee. 3250 // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. 3251 // Required. 3252 DeadlineHour int64 `json:"deadlineHour,omitempty"` 3253 3254 // DeadlineTimezone: Timezone identifier for the deadline hour. A list 3255 // of identifiers can be found in the AdWords API documentation. E.g. 3256 // "Europe/Zurich". Required. 3257 DeadlineTimezone string `json:"deadlineTimezone,omitempty"` 3258 3259 // HolidayId: Unique identifier for the holiday. Required. 3260 HolidayId string `json:"holidayId,omitempty"` 3261 3262 // VisibleFromDate: Date on which the deadline will become visible to 3263 // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October 3264 // 2016. Required. 3265 VisibleFromDate string `json:"visibleFromDate,omitempty"` 3266 3267 // ForceSendFields is a list of field names (e.g. "DeadlineDate") to 3268 // unconditionally include in API requests. By default, fields with 3269 // empty values are omitted from API requests. However, any non-pointer, 3270 // non-interface field appearing in ForceSendFields will be sent to the 3271 // server regardless of whether the field is empty or not. This may be 3272 // used to include empty fields in Patch requests. 3273 ForceSendFields []string `json:"-"` 3274 3275 // NullFields is a list of field names (e.g. "DeadlineDate") to include 3276 // in API requests with the JSON null value. By default, fields with 3277 // empty values are omitted from API requests. However, any field with 3278 // an empty value appearing in NullFields will be sent to the server as 3279 // null. It is an error if a field in this list has a non-empty value. 3280 // This may be used to include null fields in Patch requests. 3281 NullFields []string `json:"-"` 3282} 3283 3284func (s *HolidayCutoff) MarshalJSON() ([]byte, error) { 3285 type NoMethod HolidayCutoff 3286 raw := NoMethod(*s) 3287 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3288} 3289 3290type HolidaysHoliday struct { 3291 // CountryCode: The CLDR territory code of the country in which the 3292 // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can 3293 // only be configured in a shipping settings service with matching 3294 // delivery country. Always present. 3295 CountryCode string `json:"countryCode,omitempty"` 3296 3297 // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for 3298 // Christmas 2016. Always present. 3299 Date string `json:"date,omitempty"` 3300 3301 // DeliveryGuaranteeDate: Date on which the order has to arrive at the 3302 // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December 3303 // 2016. Always present. 3304 DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"` 3305 3306 // DeliveryGuaranteeHour: Hour of the day in the delivery location's 3307 // timezone on the guaranteed delivery date by which the order has to 3308 // arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 3309 // 12 (noon), 13, ..., 23. Always present. 3310 DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"` 3311 3312 // Id: Unique identifier for the holiday to be used when configuring 3313 // holiday cutoffs. Always present. 3314 Id string `json:"id,omitempty"` 3315 3316 // Type: The holiday type. Always present. 3317 // 3318 // Acceptable values are: 3319 // - "Christmas" 3320 // - "Easter" 3321 // - "Father's Day" 3322 // - "Halloween" 3323 // - "Independence Day (USA)" 3324 // - "Mother's Day" 3325 // - "Thanksgiving" 3326 // - "Valentine's Day" 3327 Type string `json:"type,omitempty"` 3328 3329 // ForceSendFields is a list of field names (e.g. "CountryCode") to 3330 // unconditionally include in API requests. By default, fields with 3331 // empty values are omitted from API requests. However, any non-pointer, 3332 // non-interface field appearing in ForceSendFields will be sent to the 3333 // server regardless of whether the field is empty or not. This may be 3334 // used to include empty fields in Patch requests. 3335 ForceSendFields []string `json:"-"` 3336 3337 // NullFields is a list of field names (e.g. "CountryCode") to include 3338 // in API requests with the JSON null value. By default, fields with 3339 // empty values are omitted from API requests. However, any field with 3340 // an empty value appearing in NullFields will be sent to the server as 3341 // null. It is an error if a field in this list has a non-empty value. 3342 // This may be used to include null fields in Patch requests. 3343 NullFields []string `json:"-"` 3344} 3345 3346func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { 3347 type NoMethod HolidaysHoliday 3348 raw := NoMethod(*s) 3349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3350} 3351 3352type Installment struct { 3353 // Amount: The amount the buyer has to pay per month. 3354 Amount *Price `json:"amount,omitempty"` 3355 3356 // Months: The number of installments the buyer has to pay. 3357 Months int64 `json:"months,omitempty,string"` 3358 3359 // ForceSendFields is a list of field names (e.g. "Amount") to 3360 // unconditionally include in API requests. By default, fields with 3361 // empty values are omitted from API requests. However, any non-pointer, 3362 // non-interface field appearing in ForceSendFields will be sent to the 3363 // server regardless of whether the field is empty or not. This may be 3364 // used to include empty fields in Patch requests. 3365 ForceSendFields []string `json:"-"` 3366 3367 // NullFields is a list of field names (e.g. "Amount") to include in API 3368 // requests with the JSON null value. By default, fields with empty 3369 // values are omitted from API requests. However, any field with an 3370 // empty value appearing in NullFields will be sent to the server as 3371 // null. It is an error if a field in this list has a non-empty value. 3372 // This may be used to include null fields in Patch requests. 3373 NullFields []string `json:"-"` 3374} 3375 3376func (s *Installment) MarshalJSON() ([]byte, error) { 3377 type NoMethod Installment 3378 raw := NoMethod(*s) 3379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3380} 3381 3382// Inventory: (== resource_for v2.inventory ==) 3383type Inventory struct { 3384 // Availability: The availability of the product. 3385 // 3386 // Acceptable values are: 3387 // - "in stock" 3388 // - "out of stock" 3389 // - "preorder" 3390 Availability string `json:"availability,omitempty"` 3391 3392 // CustomLabel0: Custom label 0 for custom grouping of items in a 3393 // Shopping campaign. Only supported for online products. 3394 CustomLabel0 string `json:"customLabel0,omitempty"` 3395 3396 // CustomLabel1: Custom label 1 for custom grouping of items in a 3397 // Shopping campaign. Only supported for online products. 3398 CustomLabel1 string `json:"customLabel1,omitempty"` 3399 3400 // CustomLabel2: Custom label 2 for custom grouping of items in a 3401 // Shopping campaign. Only supported for online products. 3402 CustomLabel2 string `json:"customLabel2,omitempty"` 3403 3404 // CustomLabel3: Custom label 3 for custom grouping of items in a 3405 // Shopping campaign. Only supported for online products. 3406 CustomLabel3 string `json:"customLabel3,omitempty"` 3407 3408 // CustomLabel4: Custom label 3 for custom grouping of items in a 3409 // Shopping campaign. Only supported for online products. 3410 CustomLabel4 string `json:"customLabel4,omitempty"` 3411 3412 // Installment: Number and amount of installments to pay for an item. 3413 // Brazil only. 3414 Installment *Installment `json:"installment,omitempty"` 3415 3416 // InstoreProductLocation: The instore product location. Supported only 3417 // for local products. 3418 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3419 3420 // Kind: Identifies what kind of resource this is. Value: the fixed 3421 // string "content#inventory" 3422 Kind string `json:"kind,omitempty"` 3423 3424 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3425 // item. Japan only. 3426 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3427 3428 // Pickup: Store pickup information. Only supported for local inventory. 3429 // Not setting `pickup` means "don't update" while setting it to the 3430 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3431 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3432 // supported". 3433 Pickup *InventoryPickup `json:"pickup,omitempty"` 3434 3435 // Price: The price of the product. 3436 Price *Price `json:"price,omitempty"` 3437 3438 // Quantity: The quantity of the product. Must be equal to or greater 3439 // than zero. Supported only for local products. 3440 Quantity int64 `json:"quantity,omitempty"` 3441 3442 // SalePrice: The sale price of the product. Mandatory if 3443 // `sale_price_effective_date` is defined. 3444 SalePrice *Price `json:"salePrice,omitempty"` 3445 3446 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3447 // 8601 dates separated by a space, comma, or slash. Both dates might be 3448 // specified as 'null' if undecided. 3449 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3450 3451 // SellOnGoogleQuantity: The quantity of the product that is available 3452 // for selling on Google. Supported only for online products. 3453 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3454 3455 // ForceSendFields is a list of field names (e.g. "Availability") to 3456 // unconditionally include in API requests. By default, fields with 3457 // empty values are omitted from API requests. However, any non-pointer, 3458 // non-interface field appearing in ForceSendFields will be sent to the 3459 // server regardless of whether the field is empty or not. This may be 3460 // used to include empty fields in Patch requests. 3461 ForceSendFields []string `json:"-"` 3462 3463 // NullFields is a list of field names (e.g. "Availability") to include 3464 // in API requests with the JSON null value. By default, fields with 3465 // empty values are omitted from API requests. However, any field with 3466 // an empty value appearing in NullFields will be sent to the server as 3467 // null. It is an error if a field in this list has a non-empty value. 3468 // This may be used to include null fields in Patch requests. 3469 NullFields []string `json:"-"` 3470} 3471 3472func (s *Inventory) MarshalJSON() ([]byte, error) { 3473 type NoMethod Inventory 3474 raw := NoMethod(*s) 3475 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3476} 3477 3478type InventoryCustomBatchRequest struct { 3479 // Entries: The request entries to be processed in the batch. 3480 Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"` 3481 3482 // ForceSendFields is a list of field names (e.g. "Entries") to 3483 // unconditionally include in API requests. By default, fields with 3484 // empty values are omitted from API requests. However, any non-pointer, 3485 // non-interface field appearing in ForceSendFields will be sent to the 3486 // server regardless of whether the field is empty or not. This may be 3487 // used to include empty fields in Patch requests. 3488 ForceSendFields []string `json:"-"` 3489 3490 // NullFields is a list of field names (e.g. "Entries") to include in 3491 // API requests with the JSON null value. By default, fields with empty 3492 // values are omitted from API requests. However, any field with an 3493 // empty value appearing in NullFields will be sent to the server as 3494 // null. It is an error if a field in this list has a non-empty value. 3495 // This may be used to include null fields in Patch requests. 3496 NullFields []string `json:"-"` 3497} 3498 3499func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { 3500 type NoMethod InventoryCustomBatchRequest 3501 raw := NoMethod(*s) 3502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3503} 3504 3505// InventoryCustomBatchRequestEntry: A batch entry encoding a single 3506// non-batch inventory request. 3507type InventoryCustomBatchRequestEntry struct { 3508 // BatchId: An entry ID, unique within the batch request. 3509 BatchId int64 `json:"batchId,omitempty"` 3510 3511 // Inventory: Price and availability of the product. 3512 Inventory *Inventory `json:"inventory,omitempty"` 3513 3514 // MerchantId: The ID of the managing account. 3515 MerchantId uint64 `json:"merchantId,omitempty,string"` 3516 3517 // ProductId: The ID of the product for which to update price and 3518 // availability. 3519 ProductId string `json:"productId,omitempty"` 3520 3521 // StoreCode: The code of the store for which to update price and 3522 // availability. Use `online` to update price and availability of an 3523 // online product. 3524 StoreCode string `json:"storeCode,omitempty"` 3525 3526 // ForceSendFields is a list of field names (e.g. "BatchId") to 3527 // unconditionally include in API requests. By default, fields with 3528 // empty values are omitted from API requests. However, any non-pointer, 3529 // non-interface field appearing in ForceSendFields will be sent to the 3530 // server regardless of whether the field is empty or not. This may be 3531 // used to include empty fields in Patch requests. 3532 ForceSendFields []string `json:"-"` 3533 3534 // NullFields is a list of field names (e.g. "BatchId") to include in 3535 // API requests with the JSON null value. By default, fields with empty 3536 // values are omitted from API requests. However, any field with an 3537 // empty value appearing in NullFields will be sent to the server as 3538 // null. It is an error if a field in this list has a non-empty value. 3539 // This may be used to include null fields in Patch requests. 3540 NullFields []string `json:"-"` 3541} 3542 3543func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 3544 type NoMethod InventoryCustomBatchRequestEntry 3545 raw := NoMethod(*s) 3546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3547} 3548 3549type InventoryCustomBatchResponse struct { 3550 // Entries: The result of the execution of the batch requests. 3551 Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"` 3552 3553 // Kind: Identifies what kind of resource this is. Value: the fixed 3554 // string "content#inventoryCustomBatchResponse". 3555 Kind string `json:"kind,omitempty"` 3556 3557 // ServerResponse contains the HTTP response code and headers from the 3558 // server. 3559 googleapi.ServerResponse `json:"-"` 3560 3561 // ForceSendFields is a list of field names (e.g. "Entries") to 3562 // unconditionally include in API requests. By default, fields with 3563 // empty values are omitted from API requests. However, any non-pointer, 3564 // non-interface field appearing in ForceSendFields will be sent to the 3565 // server regardless of whether the field is empty or not. This may be 3566 // used to include empty fields in Patch requests. 3567 ForceSendFields []string `json:"-"` 3568 3569 // NullFields is a list of field names (e.g. "Entries") to include in 3570 // API requests with the JSON null value. By default, fields with empty 3571 // values are omitted from API requests. However, any field with an 3572 // empty value appearing in NullFields will be sent to the server as 3573 // null. It is an error if a field in this list has a non-empty value. 3574 // This may be used to include null fields in Patch requests. 3575 NullFields []string `json:"-"` 3576} 3577 3578func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { 3579 type NoMethod InventoryCustomBatchResponse 3580 raw := NoMethod(*s) 3581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3582} 3583 3584// InventoryCustomBatchResponseEntry: A batch entry encoding a single 3585// non-batch inventory response. 3586type InventoryCustomBatchResponseEntry struct { 3587 // BatchId: The ID of the request entry this entry responds to. 3588 BatchId int64 `json:"batchId,omitempty"` 3589 3590 // Errors: A list of errors defined if and only if the request failed. 3591 Errors *Errors `json:"errors,omitempty"` 3592 3593 // Kind: Identifies what kind of resource this is. Value: the fixed 3594 // string "content#inventoryCustomBatchResponseEntry" 3595 Kind string `json:"kind,omitempty"` 3596 3597 // ForceSendFields is a list of field names (e.g. "BatchId") to 3598 // unconditionally include in API requests. By default, fields with 3599 // empty values are omitted from API requests. However, any non-pointer, 3600 // non-interface field appearing in ForceSendFields will be sent to the 3601 // server regardless of whether the field is empty or not. This may be 3602 // used to include empty fields in Patch requests. 3603 ForceSendFields []string `json:"-"` 3604 3605 // NullFields is a list of field names (e.g. "BatchId") to include in 3606 // API requests with the JSON null value. By default, fields with empty 3607 // values are omitted from API requests. However, any field with an 3608 // empty value appearing in NullFields will be sent to the server as 3609 // null. It is an error if a field in this list has a non-empty value. 3610 // This may be used to include null fields in Patch requests. 3611 NullFields []string `json:"-"` 3612} 3613 3614func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 3615 type NoMethod InventoryCustomBatchResponseEntry 3616 raw := NoMethod(*s) 3617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3618} 3619 3620type InventoryPickup struct { 3621 // PickupMethod: Whether store pickup is available for this offer and 3622 // whether the pickup option should be shown as buy, reserve, or not 3623 // supported. Only supported for local inventory. Unless the value is 3624 // "not supported", must be submitted together with 3625 // `pickupSla`. 3626 // 3627 // Acceptable values are: 3628 // - "buy" 3629 // - "not supported" 3630 // - "reserve" 3631 // - "ship to store" 3632 PickupMethod string `json:"pickupMethod,omitempty"` 3633 3634 // PickupSla: The expected date that an order will be ready for pickup, 3635 // relative to when the order is placed. Only supported for local 3636 // inventory. Must be submitted together with 3637 // `pickupMethod`. 3638 // 3639 // Acceptable values are: 3640 // - "five day" 3641 // - "four day" 3642 // - "multi day" 3643 // - "multi week" 3644 // - "next day" 3645 // - "same day" 3646 // - "seven day" 3647 // - "six day" 3648 // - "three day" 3649 // - "two day" 3650 PickupSla string `json:"pickupSla,omitempty"` 3651 3652 // ForceSendFields is a list of field names (e.g. "PickupMethod") to 3653 // unconditionally include in API requests. By default, fields with 3654 // empty values are omitted from API requests. However, any non-pointer, 3655 // non-interface field appearing in ForceSendFields will be sent to the 3656 // server regardless of whether the field is empty or not. This may be 3657 // used to include empty fields in Patch requests. 3658 ForceSendFields []string `json:"-"` 3659 3660 // NullFields is a list of field names (e.g. "PickupMethod") to include 3661 // in API requests with the JSON null value. By default, fields with 3662 // empty values are omitted from API requests. However, any field with 3663 // an empty value appearing in NullFields will be sent to the server as 3664 // null. It is an error if a field in this list has a non-empty value. 3665 // This may be used to include null fields in Patch requests. 3666 NullFields []string `json:"-"` 3667} 3668 3669func (s *InventoryPickup) MarshalJSON() ([]byte, error) { 3670 type NoMethod InventoryPickup 3671 raw := NoMethod(*s) 3672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3673} 3674 3675type InventorySetRequest struct { 3676 // Availability: The availability of the product. 3677 // 3678 // Acceptable values are: 3679 // - "in stock" 3680 // - "out of stock" 3681 // - "preorder" 3682 Availability string `json:"availability,omitempty"` 3683 3684 // CustomLabel0: Custom label 0 for custom grouping of items in a 3685 // Shopping campaign. Only supported for online products. 3686 CustomLabel0 string `json:"customLabel0,omitempty"` 3687 3688 // CustomLabel1: Custom label 1 for custom grouping of items in a 3689 // Shopping campaign. Only supported for online products. 3690 CustomLabel1 string `json:"customLabel1,omitempty"` 3691 3692 // CustomLabel2: Custom label 2 for custom grouping of items in a 3693 // Shopping campaign. Only supported for online products. 3694 CustomLabel2 string `json:"customLabel2,omitempty"` 3695 3696 // CustomLabel3: Custom label 3 for custom grouping of items in a 3697 // Shopping campaign. Only supported for online products. 3698 CustomLabel3 string `json:"customLabel3,omitempty"` 3699 3700 // CustomLabel4: Custom label 3 for custom grouping of items in a 3701 // Shopping campaign. Only supported for online products. 3702 CustomLabel4 string `json:"customLabel4,omitempty"` 3703 3704 // Installment: Number and amount of installments to pay for an item. 3705 // Brazil only. 3706 Installment *Installment `json:"installment,omitempty"` 3707 3708 // InstoreProductLocation: The instore product location. Supported only 3709 // for local products. 3710 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3711 3712 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3713 // item. Japan only. 3714 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3715 3716 // Pickup: Store pickup information. Only supported for local inventory. 3717 // Not setting `pickup` means "don't update" while setting it to the 3718 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3719 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3720 // supported". 3721 Pickup *InventoryPickup `json:"pickup,omitempty"` 3722 3723 // Price: The price of the product. 3724 Price *Price `json:"price,omitempty"` 3725 3726 // Quantity: The quantity of the product. Must be equal to or greater 3727 // than zero. Supported only for local products. 3728 Quantity int64 `json:"quantity,omitempty"` 3729 3730 // SalePrice: The sale price of the product. Mandatory if 3731 // `sale_price_effective_date` is defined. 3732 SalePrice *Price `json:"salePrice,omitempty"` 3733 3734 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3735 // 8601 dates separated by a space, comma, or slash. Both dates might be 3736 // specified as 'null' if undecided. 3737 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3738 3739 // SellOnGoogleQuantity: The quantity of the product that is available 3740 // for selling on Google. Supported only for online products. 3741 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3742 3743 // ForceSendFields is a list of field names (e.g. "Availability") to 3744 // unconditionally include in API requests. By default, fields with 3745 // empty values are omitted from API requests. However, any non-pointer, 3746 // non-interface field appearing in ForceSendFields will be sent to the 3747 // server regardless of whether the field is empty or not. This may be 3748 // used to include empty fields in Patch requests. 3749 ForceSendFields []string `json:"-"` 3750 3751 // NullFields is a list of field names (e.g. "Availability") to include 3752 // in API requests with the JSON null value. By default, fields with 3753 // empty values are omitted from API requests. However, any field with 3754 // an empty value appearing in NullFields will be sent to the server as 3755 // null. It is an error if a field in this list has a non-empty value. 3756 // This may be used to include null fields in Patch requests. 3757 NullFields []string `json:"-"` 3758} 3759 3760func (s *InventorySetRequest) MarshalJSON() ([]byte, error) { 3761 type NoMethod InventorySetRequest 3762 raw := NoMethod(*s) 3763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3764} 3765 3766type InventorySetResponse struct { 3767 // Kind: Identifies what kind of resource this is. Value: the fixed 3768 // string "content#inventorySetResponse". 3769 Kind string `json:"kind,omitempty"` 3770 3771 // ServerResponse contains the HTTP response code and headers from the 3772 // server. 3773 googleapi.ServerResponse `json:"-"` 3774 3775 // ForceSendFields is a list of field names (e.g. "Kind") to 3776 // unconditionally include in API requests. By default, fields with 3777 // empty values are omitted from API requests. However, any non-pointer, 3778 // non-interface field appearing in ForceSendFields will be sent to the 3779 // server regardless of whether the field is empty or not. This may be 3780 // used to include empty fields in Patch requests. 3781 ForceSendFields []string `json:"-"` 3782 3783 // NullFields is a list of field names (e.g. "Kind") to include in API 3784 // requests with the JSON null value. By default, fields with empty 3785 // values are omitted from API requests. However, any field with an 3786 // empty value appearing in NullFields will be sent to the server as 3787 // null. It is an error if a field in this list has a non-empty value. 3788 // This may be used to include null fields in Patch requests. 3789 NullFields []string `json:"-"` 3790} 3791 3792func (s *InventorySetResponse) MarshalJSON() ([]byte, error) { 3793 type NoMethod InventorySetResponse 3794 raw := NoMethod(*s) 3795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3796} 3797 3798type InvoiceSummary struct { 3799 // AdditionalChargeSummaries: Summary of the total amounts of the 3800 // additional charges. 3801 AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` 3802 3803 // CustomerBalance: Deprecated. 3804 CustomerBalance *Amount `json:"customerBalance,omitempty"` 3805 3806 // GoogleBalance: Deprecated. 3807 GoogleBalance *Amount `json:"googleBalance,omitempty"` 3808 3809 // MerchantBalance: Deprecated. 3810 MerchantBalance *Amount `json:"merchantBalance,omitempty"` 3811 3812 // ProductTotal: [required] Total price for the product. 3813 ProductTotal *Amount `json:"productTotal,omitempty"` 3814 3815 // PromotionSummaries: Deprecated. 3816 PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` 3817 3818 // ForceSendFields is a list of field names (e.g. 3819 // "AdditionalChargeSummaries") to unconditionally include in API 3820 // requests. By default, fields with empty values are omitted from API 3821 // requests. However, any non-pointer, non-interface field appearing in 3822 // ForceSendFields will be sent to the server regardless of whether the 3823 // field is empty or not. This may be used to include empty fields in 3824 // Patch requests. 3825 ForceSendFields []string `json:"-"` 3826 3827 // NullFields is a list of field names (e.g. 3828 // "AdditionalChargeSummaries") to include in API requests with the JSON 3829 // null value. By default, fields with empty values are omitted from API 3830 // requests. However, any field with an empty value appearing in 3831 // NullFields will be sent to the server as null. It is an error if a 3832 // field in this list has a non-empty value. This may be used to include 3833 // null fields in Patch requests. 3834 NullFields []string `json:"-"` 3835} 3836 3837func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { 3838 type NoMethod InvoiceSummary 3839 raw := NoMethod(*s) 3840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3841} 3842 3843type InvoiceSummaryAdditionalChargeSummary struct { 3844 // TotalAmount: [required] Total additional charge for this type. 3845 TotalAmount *Amount `json:"totalAmount,omitempty"` 3846 3847 // Type: [required] Type of the additional charge. 3848 // 3849 // Acceptable values are: 3850 // - "shipping" 3851 Type string `json:"type,omitempty"` 3852 3853 // ForceSendFields is a list of field names (e.g. "TotalAmount") to 3854 // unconditionally include in API requests. By default, fields with 3855 // empty values are omitted from API requests. However, any non-pointer, 3856 // non-interface field appearing in ForceSendFields will be sent to the 3857 // server regardless of whether the field is empty or not. This may be 3858 // used to include empty fields in Patch requests. 3859 ForceSendFields []string `json:"-"` 3860 3861 // NullFields is a list of field names (e.g. "TotalAmount") to include 3862 // in API requests with the JSON null value. By default, fields with 3863 // empty values are omitted from API requests. However, any field with 3864 // an empty value appearing in NullFields will be sent to the server as 3865 // null. It is an error if a field in this list has a non-empty value. 3866 // This may be used to include null fields in Patch requests. 3867 NullFields []string `json:"-"` 3868} 3869 3870func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { 3871 type NoMethod InvoiceSummaryAdditionalChargeSummary 3872 raw := NoMethod(*s) 3873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3874} 3875 3876type LiaAboutPageSettings struct { 3877 // Status: The status of the verification process for the About 3878 // page. 3879 // 3880 // Acceptable values are: 3881 // - "active" 3882 // - "inactive" 3883 // - "pending" 3884 Status string `json:"status,omitempty"` 3885 3886 // Url: The URL for the About page. 3887 Url string `json:"url,omitempty"` 3888 3889 // ForceSendFields is a list of field names (e.g. "Status") to 3890 // unconditionally include in API requests. By default, fields with 3891 // empty values are omitted from API requests. However, any non-pointer, 3892 // non-interface field appearing in ForceSendFields will be sent to the 3893 // server regardless of whether the field is empty or not. This may be 3894 // used to include empty fields in Patch requests. 3895 ForceSendFields []string `json:"-"` 3896 3897 // NullFields is a list of field names (e.g. "Status") to include in API 3898 // requests with the JSON null value. By default, fields with empty 3899 // values are omitted from API requests. However, any field with an 3900 // empty value appearing in NullFields will be sent to the server as 3901 // null. It is an error if a field in this list has a non-empty value. 3902 // This may be used to include null fields in Patch requests. 3903 NullFields []string `json:"-"` 3904} 3905 3906func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { 3907 type NoMethod LiaAboutPageSettings 3908 raw := NoMethod(*s) 3909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3910} 3911 3912type LiaCountrySettings struct { 3913 // About: The settings for the About page. 3914 About *LiaAboutPageSettings `json:"about,omitempty"` 3915 3916 // Country: Required. CLDR country code (e.g. "US"). 3917 Country string `json:"country,omitempty"` 3918 3919 // HostedLocalStorefrontActive: The status of the "Merchant hosted local 3920 // storefront" feature. 3921 HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` 3922 3923 // Inventory: LIA inventory verification settings. 3924 Inventory *LiaInventorySettings `json:"inventory,omitempty"` 3925 3926 // OnDisplayToOrder: LIA "On Display To Order" settings. 3927 OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` 3928 3929 // PosDataProvider: The POS data provider linked with this country. 3930 PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"` 3931 3932 // StorePickupActive: The status of the "Store pickup" feature. 3933 StorePickupActive bool `json:"storePickupActive,omitempty"` 3934 3935 // ForceSendFields is a list of field names (e.g. "About") to 3936 // unconditionally include in API requests. By default, fields with 3937 // empty values are omitted from API requests. However, any non-pointer, 3938 // non-interface field appearing in ForceSendFields will be sent to the 3939 // server regardless of whether the field is empty or not. This may be 3940 // used to include empty fields in Patch requests. 3941 ForceSendFields []string `json:"-"` 3942 3943 // NullFields is a list of field names (e.g. "About") to include in API 3944 // requests with the JSON null value. By default, fields with empty 3945 // values are omitted from API requests. However, any field with an 3946 // empty value appearing in NullFields will be sent to the server as 3947 // null. It is an error if a field in this list has a non-empty value. 3948 // This may be used to include null fields in Patch requests. 3949 NullFields []string `json:"-"` 3950} 3951 3952func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { 3953 type NoMethod LiaCountrySettings 3954 raw := NoMethod(*s) 3955 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3956} 3957 3958type LiaInventorySettings struct { 3959 // InventoryVerificationContactEmail: The email of the contact for the 3960 // inventory verification process. 3961 InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` 3962 3963 // InventoryVerificationContactName: The name of the contact for the 3964 // inventory verification process. 3965 InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` 3966 3967 // InventoryVerificationContactStatus: The status of the verification 3968 // contact. 3969 // 3970 // Acceptable values are: 3971 // - "active" 3972 // - "inactive" 3973 // - "pending" 3974 InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` 3975 3976 // Status: The status of the inventory verification process. 3977 // 3978 // Acceptable values are: 3979 // - "active" 3980 // - "inactive" 3981 // - "pending" 3982 Status string `json:"status,omitempty"` 3983 3984 // ForceSendFields is a list of field names (e.g. 3985 // "InventoryVerificationContactEmail") to unconditionally include in 3986 // API requests. By default, fields with empty values are omitted from 3987 // API requests. However, any non-pointer, non-interface field appearing 3988 // in ForceSendFields will be sent to the server regardless of whether 3989 // the field is empty or not. This may be used to include empty fields 3990 // in Patch requests. 3991 ForceSendFields []string `json:"-"` 3992 3993 // NullFields is a list of field names (e.g. 3994 // "InventoryVerificationContactEmail") to include in API requests with 3995 // the JSON null value. By default, fields with empty values are omitted 3996 // from API requests. However, any field with an empty value appearing 3997 // in NullFields will be sent to the server as null. It is an error if a 3998 // field in this list has a non-empty value. This may be used to include 3999 // null fields in Patch requests. 4000 NullFields []string `json:"-"` 4001} 4002 4003func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { 4004 type NoMethod LiaInventorySettings 4005 raw := NoMethod(*s) 4006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4007} 4008 4009type LiaOnDisplayToOrderSettings struct { 4010 // ShippingCostPolicyUrl: Shipping cost and policy URL. 4011 ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` 4012 4013 // Status: The status of the ?On display to order? feature. 4014 // 4015 // Acceptable values are: 4016 // - "active" 4017 // - "inactive" 4018 // - "pending" 4019 Status string `json:"status,omitempty"` 4020 4021 // ForceSendFields is a list of field names (e.g. 4022 // "ShippingCostPolicyUrl") to unconditionally include in API requests. 4023 // By default, fields with empty values are omitted from API requests. 4024 // However, any non-pointer, non-interface field appearing in 4025 // ForceSendFields will be sent to the server regardless of whether the 4026 // field is empty or not. This may be used to include empty fields in 4027 // Patch requests. 4028 ForceSendFields []string `json:"-"` 4029 4030 // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to 4031 // include in API requests with the JSON null value. By default, fields 4032 // with empty values are omitted from API requests. However, any field 4033 // with an empty value appearing in NullFields will be sent to the 4034 // server as null. It is an error if a field in this list has a 4035 // non-empty value. This may be used to include null fields in Patch 4036 // requests. 4037 NullFields []string `json:"-"` 4038} 4039 4040func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { 4041 type NoMethod LiaOnDisplayToOrderSettings 4042 raw := NoMethod(*s) 4043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4044} 4045 4046type LiaPosDataProvider struct { 4047 // PosDataProviderId: The ID of the POS data provider. 4048 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 4049 4050 // PosExternalAccountId: The account ID by which this merchant is known 4051 // to the POS data provider. 4052 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 4053 4054 // ForceSendFields is a list of field names (e.g. "PosDataProviderId") 4055 // to unconditionally include in API requests. By default, fields with 4056 // empty values are omitted from API requests. However, any non-pointer, 4057 // non-interface field appearing in ForceSendFields will be sent to the 4058 // server regardless of whether the field is empty or not. This may be 4059 // used to include empty fields in Patch requests. 4060 ForceSendFields []string `json:"-"` 4061 4062 // NullFields is a list of field names (e.g. "PosDataProviderId") to 4063 // include in API requests with the JSON null value. By default, fields 4064 // with empty values are omitted from API requests. However, any field 4065 // with an empty value appearing in NullFields will be sent to the 4066 // server as null. It is an error if a field in this list has a 4067 // non-empty value. This may be used to include null fields in Patch 4068 // requests. 4069 NullFields []string `json:"-"` 4070} 4071 4072func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) { 4073 type NoMethod LiaPosDataProvider 4074 raw := NoMethod(*s) 4075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4076} 4077 4078// LiaSettings: Local Inventory ads (LIA) settings. All methods except 4079// listposdataproviders require the admin role. 4080type LiaSettings struct { 4081 // AccountId: The ID of the account to which these LIA settings belong. 4082 // Ignored upon update, always present in get request responses. 4083 AccountId uint64 `json:"accountId,omitempty,string"` 4084 4085 // CountrySettings: The LIA settings for each country. 4086 CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` 4087 4088 // Kind: Identifies what kind of resource this is. Value: the fixed 4089 // string "content#liaSettings" 4090 Kind string `json:"kind,omitempty"` 4091 4092 // ServerResponse contains the HTTP response code and headers from the 4093 // server. 4094 googleapi.ServerResponse `json:"-"` 4095 4096 // ForceSendFields is a list of field names (e.g. "AccountId") to 4097 // unconditionally include in API requests. By default, fields with 4098 // empty values are omitted from API requests. However, any non-pointer, 4099 // non-interface field appearing in ForceSendFields will be sent to the 4100 // server regardless of whether the field is empty or not. This may be 4101 // used to include empty fields in Patch requests. 4102 ForceSendFields []string `json:"-"` 4103 4104 // NullFields is a list of field names (e.g. "AccountId") to include in 4105 // API requests with the JSON null value. By default, fields with empty 4106 // values are omitted from API requests. However, any field with an 4107 // empty value appearing in NullFields will be sent to the server as 4108 // null. It is an error if a field in this list has a non-empty value. 4109 // This may be used to include null fields in Patch requests. 4110 NullFields []string `json:"-"` 4111} 4112 4113func (s *LiaSettings) MarshalJSON() ([]byte, error) { 4114 type NoMethod LiaSettings 4115 raw := NoMethod(*s) 4116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4117} 4118 4119type LiasettingsCustomBatchRequest struct { 4120 // Entries: The request entries to be processed in the batch. 4121 Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` 4122 4123 // ForceSendFields is a list of field names (e.g. "Entries") to 4124 // unconditionally include in API requests. By default, fields with 4125 // empty values are omitted from API requests. However, any non-pointer, 4126 // non-interface field appearing in ForceSendFields will be sent to the 4127 // server regardless of whether the field is empty or not. This may be 4128 // used to include empty fields in Patch requests. 4129 ForceSendFields []string `json:"-"` 4130 4131 // NullFields is a list of field names (e.g. "Entries") to include in 4132 // API requests with the JSON null value. By default, fields with empty 4133 // values are omitted from API requests. However, any field with an 4134 // empty value appearing in NullFields will be sent to the server as 4135 // null. It is an error if a field in this list has a non-empty value. 4136 // This may be used to include null fields in Patch requests. 4137 NullFields []string `json:"-"` 4138} 4139 4140func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 4141 type NoMethod LiasettingsCustomBatchRequest 4142 raw := NoMethod(*s) 4143 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4144} 4145 4146type LiasettingsCustomBatchRequestEntry struct { 4147 // AccountId: The ID of the account for which to get/update account LIA 4148 // settings. 4149 AccountId uint64 `json:"accountId,omitempty,string"` 4150 4151 // BatchId: An entry ID, unique within the batch request. 4152 BatchId int64 `json:"batchId,omitempty"` 4153 4154 // ContactEmail: Inventory validation contact email. Required only for 4155 // SetInventoryValidationContact. 4156 ContactEmail string `json:"contactEmail,omitempty"` 4157 4158 // ContactName: Inventory validation contact name. Required only for 4159 // SetInventoryValidationContact. 4160 ContactName string `json:"contactName,omitempty"` 4161 4162 // Country: The country code. Required only for 4163 // RequestInventoryVerification. 4164 Country string `json:"country,omitempty"` 4165 4166 // GmbEmail: The GMB account. Required only for RequestGmbAccess. 4167 GmbEmail string `json:"gmbEmail,omitempty"` 4168 4169 // LiaSettings: The account Lia settings to update. Only defined if the 4170 // method is `update`. 4171 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4172 4173 // MerchantId: The ID of the managing account. 4174 MerchantId uint64 `json:"merchantId,omitempty,string"` 4175 4176 // Method: The method of the batch entry. 4177 // 4178 // Acceptable values are: 4179 // - "get" 4180 // - "getAccessibleGmbAccounts" 4181 // - "requestGmbAccess" 4182 // - "requestInventoryVerification" 4183 // - "setInventoryVerificationContact" 4184 // - "update" 4185 Method string `json:"method,omitempty"` 4186 4187 // PosDataProviderId: The ID of POS data provider. Required only for 4188 // SetPosProvider. 4189 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 4190 4191 // PosExternalAccountId: The account ID by which this merchant is known 4192 // to the POS provider. 4193 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 4194 4195 // ForceSendFields is a list of field names (e.g. "AccountId") to 4196 // unconditionally include in API requests. By default, fields with 4197 // empty values are omitted from API requests. However, any non-pointer, 4198 // non-interface field appearing in ForceSendFields will be sent to the 4199 // server regardless of whether the field is empty or not. This may be 4200 // used to include empty fields in Patch requests. 4201 ForceSendFields []string `json:"-"` 4202 4203 // NullFields is a list of field names (e.g. "AccountId") to include in 4204 // API requests with the JSON null value. By default, fields with empty 4205 // values are omitted from API requests. However, any field with an 4206 // empty value appearing in NullFields will be sent to the server as 4207 // null. It is an error if a field in this list has a non-empty value. 4208 // This may be used to include null fields in Patch requests. 4209 NullFields []string `json:"-"` 4210} 4211 4212func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 4213 type NoMethod LiasettingsCustomBatchRequestEntry 4214 raw := NoMethod(*s) 4215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4216} 4217 4218type LiasettingsCustomBatchResponse struct { 4219 // Entries: The result of the execution of the batch requests. 4220 Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` 4221 4222 // Kind: Identifies what kind of resource this is. Value: the fixed 4223 // string "content#liasettingsCustomBatchResponse". 4224 Kind string `json:"kind,omitempty"` 4225 4226 // ServerResponse contains the HTTP response code and headers from the 4227 // server. 4228 googleapi.ServerResponse `json:"-"` 4229 4230 // ForceSendFields is a list of field names (e.g. "Entries") to 4231 // unconditionally include in API requests. By default, fields with 4232 // empty values are omitted from API requests. However, any non-pointer, 4233 // non-interface field appearing in ForceSendFields will be sent to the 4234 // server regardless of whether the field is empty or not. This may be 4235 // used to include empty fields in Patch requests. 4236 ForceSendFields []string `json:"-"` 4237 4238 // NullFields is a list of field names (e.g. "Entries") to include in 4239 // API requests with the JSON null value. By default, fields with empty 4240 // values are omitted from API requests. However, any field with an 4241 // empty value appearing in NullFields will be sent to the server as 4242 // null. It is an error if a field in this list has a non-empty value. 4243 // This may be used to include null fields in Patch requests. 4244 NullFields []string `json:"-"` 4245} 4246 4247func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 4248 type NoMethod LiasettingsCustomBatchResponse 4249 raw := NoMethod(*s) 4250 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4251} 4252 4253type LiasettingsCustomBatchResponseEntry struct { 4254 // BatchId: The ID of the request entry to which this entry responds. 4255 BatchId int64 `json:"batchId,omitempty"` 4256 4257 // Errors: A list of errors defined if, and only if, the request failed. 4258 Errors *Errors `json:"errors,omitempty"` 4259 4260 // GmbAccounts: The the list of accessible GMB accounts. 4261 GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` 4262 4263 // Kind: Identifies what kind of resource this is. Value: the fixed 4264 // string "content#liasettingsCustomBatchResponseEntry" 4265 Kind string `json:"kind,omitempty"` 4266 4267 // LiaSettings: The retrieved or updated Lia settings. 4268 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4269 4270 // PosDataProviders: The list of POS data providers. 4271 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4272 4273 // ForceSendFields is a list of field names (e.g. "BatchId") to 4274 // unconditionally include in API requests. By default, fields with 4275 // empty values are omitted from API requests. However, any non-pointer, 4276 // non-interface field appearing in ForceSendFields will be sent to the 4277 // server regardless of whether the field is empty or not. This may be 4278 // used to include empty fields in Patch requests. 4279 ForceSendFields []string `json:"-"` 4280 4281 // NullFields is a list of field names (e.g. "BatchId") to include in 4282 // API requests with the JSON null value. By default, fields with empty 4283 // values are omitted from API requests. However, any field with an 4284 // empty value appearing in NullFields will be sent to the server as 4285 // null. It is an error if a field in this list has a non-empty value. 4286 // This may be used to include null fields in Patch requests. 4287 NullFields []string `json:"-"` 4288} 4289 4290func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 4291 type NoMethod LiasettingsCustomBatchResponseEntry 4292 raw := NoMethod(*s) 4293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4294} 4295 4296type LiasettingsGetAccessibleGmbAccountsResponse struct { 4297 // AccountId: The ID of the Merchant Center account. 4298 AccountId uint64 `json:"accountId,omitempty,string"` 4299 4300 // GmbAccounts: A list of GMB accounts which are available to the 4301 // merchant. 4302 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 4303 4304 // Kind: Identifies what kind of resource this is. Value: the fixed 4305 // string "content#liasettingsGetAccessibleGmbAccountsResponse". 4306 Kind string `json:"kind,omitempty"` 4307 4308 // ServerResponse contains the HTTP response code and headers from the 4309 // server. 4310 googleapi.ServerResponse `json:"-"` 4311 4312 // ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") to include in 4321 // API 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 *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { 4330 type NoMethod LiasettingsGetAccessibleGmbAccountsResponse 4331 raw := NoMethod(*s) 4332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4333} 4334 4335type LiasettingsListPosDataProvidersResponse struct { 4336 // Kind: Identifies what kind of resource this is. Value: the fixed 4337 // string "content#liasettingsListPosDataProvidersResponse". 4338 Kind string `json:"kind,omitempty"` 4339 4340 // PosDataProviders: The list of POS data providers for each eligible 4341 // country 4342 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4343 4344 // ServerResponse contains the HTTP response code and headers from the 4345 // server. 4346 googleapi.ServerResponse `json:"-"` 4347 4348 // ForceSendFields is a list of field names (e.g. "Kind") to 4349 // unconditionally include in API requests. By default, fields with 4350 // empty values are omitted from API requests. However, any non-pointer, 4351 // non-interface field appearing in ForceSendFields will be sent to the 4352 // server regardless of whether the field is empty or not. This may be 4353 // used to include empty fields in Patch requests. 4354 ForceSendFields []string `json:"-"` 4355 4356 // NullFields is a list of field names (e.g. "Kind") to include in API 4357 // requests with the JSON null value. By default, fields with empty 4358 // values are omitted from API requests. However, any field with an 4359 // empty value appearing in NullFields will be sent to the server as 4360 // null. It is an error if a field in this list has a non-empty value. 4361 // This may be used to include null fields in Patch requests. 4362 NullFields []string `json:"-"` 4363} 4364 4365func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) { 4366 type NoMethod LiasettingsListPosDataProvidersResponse 4367 raw := NoMethod(*s) 4368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4369} 4370 4371type LiasettingsListResponse struct { 4372 // Kind: Identifies what kind of resource this is. Value: the fixed 4373 // string "content#liasettingsListResponse". 4374 Kind string `json:"kind,omitempty"` 4375 4376 // NextPageToken: The token for the retrieval of the next page of LIA 4377 // settings. 4378 NextPageToken string `json:"nextPageToken,omitempty"` 4379 4380 Resources []*LiaSettings `json:"resources,omitempty"` 4381 4382 // ServerResponse contains the HTTP response code and headers from the 4383 // server. 4384 googleapi.ServerResponse `json:"-"` 4385 4386 // ForceSendFields is a list of field names (e.g. "Kind") to 4387 // unconditionally include in API requests. By default, fields with 4388 // empty values are omitted from API requests. However, any non-pointer, 4389 // non-interface field appearing in ForceSendFields will be sent to the 4390 // server regardless of whether the field is empty or not. This may be 4391 // used to include empty fields in Patch requests. 4392 ForceSendFields []string `json:"-"` 4393 4394 // NullFields is a list of field names (e.g. "Kind") to include in API 4395 // requests with the JSON null value. By default, fields with empty 4396 // values are omitted from API requests. However, any field with an 4397 // empty value appearing in NullFields will be sent to the server as 4398 // null. It is an error if a field in this list has a non-empty value. 4399 // This may be used to include null fields in Patch requests. 4400 NullFields []string `json:"-"` 4401} 4402 4403func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) { 4404 type NoMethod LiasettingsListResponse 4405 raw := NoMethod(*s) 4406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4407} 4408 4409type LiasettingsRequestGmbAccessResponse struct { 4410 // Kind: Identifies what kind of resource this is. Value: the fixed 4411 // string "content#liasettingsRequestGmbAccessResponse". 4412 Kind string `json:"kind,omitempty"` 4413 4414 // ServerResponse contains the HTTP response code and headers from the 4415 // server. 4416 googleapi.ServerResponse `json:"-"` 4417 4418 // ForceSendFields is a list of field names (e.g. "Kind") to 4419 // unconditionally include in API requests. By default, fields with 4420 // empty values are omitted from API requests. However, any non-pointer, 4421 // non-interface field appearing in ForceSendFields will be sent to the 4422 // server regardless of whether the field is empty or not. This may be 4423 // used to include empty fields in Patch requests. 4424 ForceSendFields []string `json:"-"` 4425 4426 // NullFields is a list of field names (e.g. "Kind") to include in API 4427 // requests with the JSON null value. By default, fields with empty 4428 // values are omitted from API requests. However, any field with an 4429 // empty value appearing in NullFields will be sent to the server as 4430 // null. It is an error if a field in this list has a non-empty value. 4431 // This may be used to include null fields in Patch requests. 4432 NullFields []string `json:"-"` 4433} 4434 4435func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { 4436 type NoMethod LiasettingsRequestGmbAccessResponse 4437 raw := NoMethod(*s) 4438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4439} 4440 4441type LiasettingsRequestInventoryVerificationResponse struct { 4442 // Kind: Identifies what kind of resource this is. Value: the fixed 4443 // string "content#liasettingsRequestInventoryVerificationResponse". 4444 Kind string `json:"kind,omitempty"` 4445 4446 // ServerResponse contains the HTTP response code and headers from the 4447 // server. 4448 googleapi.ServerResponse `json:"-"` 4449 4450 // ForceSendFields is a list of field names (e.g. "Kind") to 4451 // unconditionally include in API requests. By default, fields with 4452 // empty values are omitted from API requests. However, any non-pointer, 4453 // non-interface field appearing in ForceSendFields will be sent to the 4454 // server regardless of whether the field is empty or not. This may be 4455 // used to include empty fields in Patch requests. 4456 ForceSendFields []string `json:"-"` 4457 4458 // NullFields is a list of field names (e.g. "Kind") to include in API 4459 // requests with the JSON null value. By default, fields with empty 4460 // values are omitted from API requests. However, any field with an 4461 // empty value appearing in NullFields will be sent to the server as 4462 // null. It is an error if a field in this list has a non-empty value. 4463 // This may be used to include null fields in Patch requests. 4464 NullFields []string `json:"-"` 4465} 4466 4467func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { 4468 type NoMethod LiasettingsRequestInventoryVerificationResponse 4469 raw := NoMethod(*s) 4470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4471} 4472 4473type LiasettingsSetInventoryVerificationContactResponse struct { 4474 // Kind: Identifies what kind of resource this is. Value: the fixed 4475 // string "content#liasettingsSetInventoryVerificationContactResponse". 4476 Kind string `json:"kind,omitempty"` 4477 4478 // ServerResponse contains the HTTP response code and headers from the 4479 // server. 4480 googleapi.ServerResponse `json:"-"` 4481 4482 // ForceSendFields is a list of field names (e.g. "Kind") to 4483 // unconditionally include in API requests. By default, fields with 4484 // empty values are omitted from API requests. However, any non-pointer, 4485 // non-interface field appearing in ForceSendFields will be sent to the 4486 // server regardless of whether the field is empty or not. This may be 4487 // used to include empty fields in Patch requests. 4488 ForceSendFields []string `json:"-"` 4489 4490 // NullFields is a list of field names (e.g. "Kind") to include in API 4491 // requests with the JSON null value. By default, fields with empty 4492 // values are omitted from API requests. However, any field with an 4493 // empty value appearing in NullFields will be sent to the server as 4494 // null. It is an error if a field in this list has a non-empty value. 4495 // This may be used to include null fields in Patch requests. 4496 NullFields []string `json:"-"` 4497} 4498 4499func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { 4500 type NoMethod LiasettingsSetInventoryVerificationContactResponse 4501 raw := NoMethod(*s) 4502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4503} 4504 4505type LiasettingsSetPosDataProviderResponse struct { 4506 // Kind: Identifies what kind of resource this is. Value: the fixed 4507 // string "content#liasettingsSetPosDataProviderResponse". 4508 Kind string `json:"kind,omitempty"` 4509 4510 // ServerResponse contains the HTTP response code and headers from the 4511 // server. 4512 googleapi.ServerResponse `json:"-"` 4513 4514 // ForceSendFields is a list of field names (e.g. "Kind") to 4515 // unconditionally include in API requests. By default, fields with 4516 // empty values are omitted from API requests. However, any non-pointer, 4517 // non-interface field appearing in ForceSendFields will be sent to the 4518 // server regardless of whether the field is empty or not. This may be 4519 // used to include empty fields in Patch requests. 4520 ForceSendFields []string `json:"-"` 4521 4522 // NullFields is a list of field names (e.g. "Kind") to include in API 4523 // requests with the JSON null value. By default, fields with empty 4524 // values are omitted from API requests. However, any field with an 4525 // empty value appearing in NullFields will be sent to the server as 4526 // null. It is an error if a field in this list has a non-empty value. 4527 // This may be used to include null fields in Patch requests. 4528 NullFields []string `json:"-"` 4529} 4530 4531func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) { 4532 type NoMethod LiasettingsSetPosDataProviderResponse 4533 raw := NoMethod(*s) 4534 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4535} 4536 4537type LocationIdSet struct { 4538 // LocationIds: A non-empty list of location IDs. They must all be of 4539 // the same location type (e.g., state). 4540 LocationIds []string `json:"locationIds,omitempty"` 4541 4542 // ForceSendFields is a list of field names (e.g. "LocationIds") to 4543 // unconditionally include in API requests. By default, fields with 4544 // empty values are omitted from API requests. However, any non-pointer, 4545 // non-interface field appearing in ForceSendFields will be sent to the 4546 // server regardless of whether the field is empty or not. This may be 4547 // used to include empty fields in Patch requests. 4548 ForceSendFields []string `json:"-"` 4549 4550 // NullFields is a list of field names (e.g. "LocationIds") to include 4551 // in API requests with the JSON null value. By default, fields with 4552 // empty values are omitted from API requests. However, any field with 4553 // an empty value appearing in NullFields will be sent to the server as 4554 // null. It is an error if a field in this list has a non-empty value. 4555 // This may be used to include null fields in Patch requests. 4556 NullFields []string `json:"-"` 4557} 4558 4559func (s *LocationIdSet) MarshalJSON() ([]byte, error) { 4560 type NoMethod LocationIdSet 4561 raw := NoMethod(*s) 4562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4563} 4564 4565type LoyaltyPoints struct { 4566 // Name: Name of loyalty points program. It is recommended to limit the 4567 // name to 12 full-width characters or 24 Roman characters. 4568 Name string `json:"name,omitempty"` 4569 4570 // PointsValue: The retailer's loyalty points in absolute value. 4571 PointsValue int64 `json:"pointsValue,omitempty,string"` 4572 4573 // Ratio: The ratio of a point when converted to currency. Google 4574 // assumes currency based on Merchant Center settings. If ratio is left 4575 // out, it defaults to 1.0. 4576 Ratio float64 `json:"ratio,omitempty"` 4577 4578 // ForceSendFields is a list of field names (e.g. "Name") to 4579 // unconditionally include in API requests. By default, fields with 4580 // empty values are omitted from API requests. However, any non-pointer, 4581 // non-interface field appearing in ForceSendFields will be sent to the 4582 // server regardless of whether the field is empty or not. This may be 4583 // used to include empty fields in Patch requests. 4584 ForceSendFields []string `json:"-"` 4585 4586 // NullFields is a list of field names (e.g. "Name") to include in API 4587 // requests with the JSON null value. By default, fields with empty 4588 // values are omitted from API requests. However, any field with an 4589 // empty value appearing in NullFields will be sent to the server as 4590 // null. It is an error if a field in this list has a non-empty value. 4591 // This may be used to include null fields in Patch requests. 4592 NullFields []string `json:"-"` 4593} 4594 4595func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) { 4596 type NoMethod LoyaltyPoints 4597 raw := NoMethod(*s) 4598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4599} 4600 4601func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { 4602 type NoMethod LoyaltyPoints 4603 var s1 struct { 4604 Ratio gensupport.JSONFloat64 `json:"ratio"` 4605 *NoMethod 4606 } 4607 s1.NoMethod = (*NoMethod)(s) 4608 if err := json.Unmarshal(data, &s1); err != nil { 4609 return err 4610 } 4611 s.Ratio = float64(s1.Ratio) 4612 return nil 4613} 4614 4615// MerchantOrderReturn: Order return. Production access (all methods) 4616// requires the order manager role. Sandbox access does not. 4617type MerchantOrderReturn struct { 4618 // CreationDate: The date of creation of the return, in ISO 8601 format. 4619 CreationDate string `json:"creationDate,omitempty"` 4620 4621 // MerchantOrderId: Merchant defined order ID. 4622 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4623 4624 // OrderId: Google order ID. 4625 OrderId string `json:"orderId,omitempty"` 4626 4627 // OrderReturnId: Order return ID generated by Google. 4628 OrderReturnId string `json:"orderReturnId,omitempty"` 4629 4630 // ReturnItems: Items of the return. 4631 ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` 4632 4633 // ReturnShipments: Shipments of the return. 4634 ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` 4635 4636 // ServerResponse contains the HTTP response code and headers from the 4637 // server. 4638 googleapi.ServerResponse `json:"-"` 4639 4640 // ForceSendFields is a list of field names (e.g. "CreationDate") to 4641 // unconditionally include in API requests. By default, fields with 4642 // empty values are omitted from API requests. However, any non-pointer, 4643 // non-interface field appearing in ForceSendFields will be sent to the 4644 // server regardless of whether the field is empty or not. This may be 4645 // used to include empty fields in Patch requests. 4646 ForceSendFields []string `json:"-"` 4647 4648 // NullFields is a list of field names (e.g. "CreationDate") to include 4649 // in API requests with the JSON null value. By default, fields with 4650 // empty values are omitted from API requests. However, any field with 4651 // an empty value appearing in NullFields will be sent to the server as 4652 // null. It is an error if a field in this list has a non-empty value. 4653 // This may be used to include null fields in Patch requests. 4654 NullFields []string `json:"-"` 4655} 4656 4657func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) { 4658 type NoMethod MerchantOrderReturn 4659 raw := NoMethod(*s) 4660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4661} 4662 4663type MerchantOrderReturnItem struct { 4664 // CustomerReturnReason: The reason that the customer chooses to return 4665 // an item. 4666 CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` 4667 4668 // ItemId: Product level item ID. If the returned items are of the same 4669 // product, they will have the same ID. 4670 ItemId string `json:"itemId,omitempty"` 4671 4672 // MerchantReturnReason: The reason that merchant chooses to accept a 4673 // return item. 4674 MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` 4675 4676 // Product: Product data from the time of the order placement. 4677 Product *OrderLineItemProduct `json:"product,omitempty"` 4678 4679 // ReturnShipmentIds: IDs of the return shipments that this return item 4680 // belongs to. 4681 ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` 4682 4683 // State: State of the item. 4684 // 4685 // Acceptable values are: 4686 // - "canceled" 4687 // - "new" 4688 // - "received" 4689 // - "refunded" 4690 // - "rejected" 4691 State string `json:"state,omitempty"` 4692 4693 // ForceSendFields is a list of field names (e.g. 4694 // "CustomerReturnReason") to unconditionally include in API requests. 4695 // By default, fields with empty values are omitted from API requests. 4696 // However, any non-pointer, non-interface field appearing in 4697 // ForceSendFields will be sent to the server regardless of whether the 4698 // field is empty or not. This may be used to include empty fields in 4699 // Patch requests. 4700 ForceSendFields []string `json:"-"` 4701 4702 // NullFields is a list of field names (e.g. "CustomerReturnReason") to 4703 // include in API requests with the JSON null value. By default, fields 4704 // with empty values are omitted from API requests. However, any field 4705 // with an empty value appearing in NullFields will be sent to the 4706 // server as null. It is an error if a field in this list has a 4707 // non-empty value. This may be used to include null fields in Patch 4708 // requests. 4709 NullFields []string `json:"-"` 4710} 4711 4712func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { 4713 type NoMethod MerchantOrderReturnItem 4714 raw := NoMethod(*s) 4715 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4716} 4717 4718type MinimumOrderValueTable struct { 4719 StoreCodeSetWithMovs []*MinimumOrderValueTableStoreCodeSetWithMov `json:"storeCodeSetWithMovs,omitempty"` 4720 4721 // ForceSendFields is a list of field names (e.g. 4722 // "StoreCodeSetWithMovs") to unconditionally include in API requests. 4723 // By default, fields with empty values are omitted from API requests. 4724 // However, any non-pointer, non-interface field appearing in 4725 // ForceSendFields will be sent to the server regardless of whether the 4726 // field is empty or not. This may be used to include empty fields in 4727 // Patch requests. 4728 ForceSendFields []string `json:"-"` 4729 4730 // NullFields is a list of field names (e.g. "StoreCodeSetWithMovs") to 4731 // include in API requests with the JSON null value. By default, fields 4732 // with empty values are omitted from API requests. However, any field 4733 // with an empty value appearing in NullFields will be sent to the 4734 // server as null. It is an error if a field in this list has a 4735 // non-empty value. This may be used to include null fields in Patch 4736 // requests. 4737 NullFields []string `json:"-"` 4738} 4739 4740func (s *MinimumOrderValueTable) MarshalJSON() ([]byte, error) { 4741 type NoMethod MinimumOrderValueTable 4742 raw := NoMethod(*s) 4743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4744} 4745 4746// MinimumOrderValueTableStoreCodeSetWithMov: A list of store code sets 4747// sharing the same minimum order value. At least two sets are required 4748// and the last one must be empty, which signifies 'MOV for all other 4749// stores'. Each store code can only appear once across all the sets. 4750// All prices within a service must have the same currency. 4751type MinimumOrderValueTableStoreCodeSetWithMov struct { 4752 // StoreCodes: A list of unique store codes or empty for the catch all. 4753 StoreCodes []string `json:"storeCodes,omitempty"` 4754 4755 // Value: The minimum order value for the given stores. 4756 Value *Price `json:"value,omitempty"` 4757 4758 // ForceSendFields is a list of field names (e.g. "StoreCodes") to 4759 // unconditionally include in API requests. By default, fields with 4760 // empty values are omitted from API requests. However, any non-pointer, 4761 // non-interface field appearing in ForceSendFields will be sent to the 4762 // server regardless of whether the field is empty or not. This may be 4763 // used to include empty fields in Patch requests. 4764 ForceSendFields []string `json:"-"` 4765 4766 // NullFields is a list of field names (e.g. "StoreCodes") to include in 4767 // API requests with the JSON null value. By default, fields with empty 4768 // values are omitted from API requests. However, any field with an 4769 // empty value appearing in NullFields will be sent to the server as 4770 // null. It is an error if a field in this list has a non-empty value. 4771 // This may be used to include null fields in Patch requests. 4772 NullFields []string `json:"-"` 4773} 4774 4775func (s *MinimumOrderValueTableStoreCodeSetWithMov) MarshalJSON() ([]byte, error) { 4776 type NoMethod MinimumOrderValueTableStoreCodeSetWithMov 4777 raw := NoMethod(*s) 4778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4779} 4780 4781// Order: Order. Production access (all methods) requires the order 4782// manager role. Sandbox access does not. (== resource_for v2.orders ==) 4783// (== resource_for v2.1.orders ==) 4784type Order struct { 4785 // Acknowledged: Whether the order was acknowledged. 4786 Acknowledged bool `json:"acknowledged,omitempty"` 4787 4788 // ChannelType: Deprecated. 4789 // 4790 // Acceptable values are: 4791 // - "googleExpress" 4792 // - "purchasesOnGoogle" 4793 ChannelType string `json:"channelType,omitempty"` 4794 4795 // Customer: The details of the customer who placed the order. 4796 Customer *OrderCustomer `json:"customer,omitempty"` 4797 4798 // DeliveryDetails: Delivery details for shipments of type `delivery`. 4799 DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` 4800 4801 // Id: The REST ID of the order. Globally unique. 4802 Id string `json:"id,omitempty"` 4803 4804 // Kind: Identifies what kind of resource this is. Value: the fixed 4805 // string "content#order" 4806 Kind string `json:"kind,omitempty"` 4807 4808 // LineItems: Line items that are ordered. 4809 LineItems []*OrderLineItem `json:"lineItems,omitempty"` 4810 4811 MerchantId uint64 `json:"merchantId,omitempty,string"` 4812 4813 // MerchantOrderId: Merchant-provided ID of the order. 4814 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4815 4816 // NetAmount: The net amount for the order. For example, if an order was 4817 // originally for a grand total of $100 and a refund was issued for $20, 4818 // the net amount will be $80. 4819 NetAmount *Price `json:"netAmount,omitempty"` 4820 4821 // PaymentMethod: The details of the payment method. 4822 PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"` 4823 4824 // PaymentStatus: The status of the payment. 4825 // 4826 // Acceptable values are: 4827 // - "paymentCaptured" 4828 // - "paymentRejected" 4829 // - "paymentSecured" 4830 // - "pendingAuthorization" 4831 PaymentStatus string `json:"paymentStatus,omitempty"` 4832 4833 // PickupDetails: Pickup details for shipments of type `pickup`. 4834 PickupDetails *OrderPickupDetails `json:"pickupDetails,omitempty"` 4835 4836 // PlacedDate: The date when the order was placed, in ISO 8601 format. 4837 PlacedDate string `json:"placedDate,omitempty"` 4838 4839 // Promotions: The details of the merchant provided promotions applied 4840 // to the order. 4841 // 4842 // To determine which promotions apply to which products, check the 4843 // `Promotions[].Benefits[].OfferIds` field against the 4844 // `LineItems[].Product.OfferId` field for each promotion. If a 4845 // promotion is applied to more than 1 `offerId`, divide the discount 4846 // value by the number of affected offers to determine how much discount 4847 // to apply to each `offerId`. 4848 // 4849 // Examples: 4850 // - To calculate the line item level discount for a single specific 4851 // item: For each promotion, subtract the 4852 // `Promotions[].Benefits[].Discount.value` amount from the 4853 // `LineItems[].Price.value`. 4854 // - To calculate the line item level discount for multiple quantity of 4855 // a specific item: For each promotion, divide the 4856 // `Promotions[].Benefits[].Discount.value` by the quantity of products 4857 // and substract it from `LineItems[].Product.Price.value` for each 4858 // quantity item. 4859 // 4860 // Only 1 promotion can be applied to an offerId in a given order. To 4861 // refund an item which had a promotion applied to it, make sure to 4862 // refund the amount after first subtracting the promotion discount from 4863 // the item price. 4864 // 4865 // More details about the program are here. 4866 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 4867 4868 // Refunds: Refunds for the order. 4869 Refunds []*OrderRefund `json:"refunds,omitempty"` 4870 4871 // Shipments: Shipments of the order. 4872 Shipments []*OrderShipment `json:"shipments,omitempty"` 4873 4874 // ShippingCost: The total cost of shipping for all items. 4875 ShippingCost *Price `json:"shippingCost,omitempty"` 4876 4877 // ShippingCostTax: The tax for the total shipping cost. 4878 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 4879 4880 // ShippingOption: Deprecated. Shipping details are provided with line 4881 // items instead. 4882 // 4883 // Acceptable values are: 4884 // - "economy" 4885 // - "expedited" 4886 // - "oneDay" 4887 // - "sameDay" 4888 // - "standard" 4889 // - "twoDay" 4890 ShippingOption string `json:"shippingOption,omitempty"` 4891 4892 // Status: The status of the order. 4893 // 4894 // Acceptable values are: 4895 // - "canceled" 4896 // - "delivered" 4897 // - "inProgress" 4898 // - "partiallyDelivered" 4899 // - "partiallyReturned" 4900 // - "partiallyShipped" 4901 // - "pendingShipment" 4902 // - "returned" 4903 // - "shipped" 4904 Status string `json:"status,omitempty"` 4905 4906 // TaxCollector: The party responsible for collecting and remitting 4907 // taxes. 4908 // 4909 // Acceptable values are: 4910 // - "marketplaceFacilitator" 4911 // - "merchant" 4912 TaxCollector string `json:"taxCollector,omitempty"` 4913 4914 // ServerResponse contains the HTTP response code and headers from the 4915 // server. 4916 googleapi.ServerResponse `json:"-"` 4917 4918 // ForceSendFields is a list of field names (e.g. "Acknowledged") to 4919 // unconditionally include in API requests. By default, fields with 4920 // empty values are omitted from API requests. However, any non-pointer, 4921 // non-interface field appearing in ForceSendFields will be sent to the 4922 // server regardless of whether the field is empty or not. This may be 4923 // used to include empty fields in Patch requests. 4924 ForceSendFields []string `json:"-"` 4925 4926 // NullFields is a list of field names (e.g. "Acknowledged") to include 4927 // in API requests with the JSON null value. By default, fields with 4928 // empty values are omitted from API requests. However, any field with 4929 // an empty value appearing in NullFields will be sent to the server as 4930 // null. It is an error if a field in this list has a non-empty value. 4931 // This may be used to include null fields in Patch requests. 4932 NullFields []string `json:"-"` 4933} 4934 4935func (s *Order) MarshalJSON() ([]byte, error) { 4936 type NoMethod Order 4937 raw := NoMethod(*s) 4938 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4939} 4940 4941type OrderAddress struct { 4942 // Country: CLDR country code (e.g. "US"). 4943 Country string `json:"country,omitempty"` 4944 4945 // FullAddress: Strings representing the lines of the printed label for 4946 // mailing the order, for example: 4947 // John Smith 4948 // 1600 Amphitheatre Parkway 4949 // Mountain View, CA, 94043 4950 // United States 4951 FullAddress []string `json:"fullAddress,omitempty"` 4952 4953 // IsPostOfficeBox: Whether the address is a post office box. 4954 IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` 4955 4956 // Locality: City, town or commune. May also include dependent 4957 // localities or sublocalities (e.g. neighborhoods or suburbs). 4958 Locality string `json:"locality,omitempty"` 4959 4960 // PostalCode: Postal Code or ZIP (e.g. "94043"). 4961 PostalCode string `json:"postalCode,omitempty"` 4962 4963 // RecipientName: Name of the recipient. 4964 RecipientName string `json:"recipientName,omitempty"` 4965 4966 // Region: Top-level administrative subdivision of the country. For 4967 // example, a state like California ("CA") or a province like Quebec 4968 // ("QC"). 4969 Region string `json:"region,omitempty"` 4970 4971 // StreetAddress: Street-level part of the address. 4972 StreetAddress []string `json:"streetAddress,omitempty"` 4973 4974 // ForceSendFields is a list of field names (e.g. "Country") to 4975 // unconditionally include in API requests. By default, fields with 4976 // empty values are omitted from API requests. However, any non-pointer, 4977 // non-interface field appearing in ForceSendFields will be sent to the 4978 // server regardless of whether the field is empty or not. This may be 4979 // used to include empty fields in Patch requests. 4980 ForceSendFields []string `json:"-"` 4981 4982 // NullFields is a list of field names (e.g. "Country") to include in 4983 // API requests with the JSON null value. By default, fields with empty 4984 // values are omitted from API requests. However, any field with an 4985 // empty value appearing in NullFields will be sent to the server as 4986 // null. It is an error if a field in this list has a non-empty value. 4987 // This may be used to include null fields in Patch requests. 4988 NullFields []string `json:"-"` 4989} 4990 4991func (s *OrderAddress) MarshalJSON() ([]byte, error) { 4992 type NoMethod OrderAddress 4993 raw := NoMethod(*s) 4994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4995} 4996 4997type OrderCancellation struct { 4998 // Actor: The actor that created the cancellation. 4999 // 5000 // Acceptable values are: 5001 // - "customer" 5002 // - "googleBot" 5003 // - "googleCustomerService" 5004 // - "googlePayments" 5005 // - "googleSabre" 5006 // - "merchant" 5007 Actor string `json:"actor,omitempty"` 5008 5009 // CreationDate: Date on which the cancellation has been created, in ISO 5010 // 8601 format. 5011 CreationDate string `json:"creationDate,omitempty"` 5012 5013 // Quantity: The quantity that was canceled. 5014 Quantity int64 `json:"quantity,omitempty"` 5015 5016 // Reason: The reason for the cancellation. Orders that are canceled 5017 // with a noInventory reason will lead to the removal of the product 5018 // from Shopping Actions until you make an update to that product. This 5019 // will not affect your Shopping ads. 5020 // 5021 // Acceptable values are: 5022 // - "autoPostInternal" 5023 // - "autoPostInvalidBillingAddress" 5024 // - "autoPostNoInventory" 5025 // - "autoPostPriceError" 5026 // - "autoPostUndeliverableShippingAddress" 5027 // - "couponAbuse" 5028 // - "customerCanceled" 5029 // - "customerInitiatedCancel" 5030 // - "customerSupportRequested" 5031 // - "failToPushOrderGoogleError" 5032 // - "failToPushOrderMerchantError" 5033 // - "failToPushOrderMerchantFulfillmentError" 5034 // - "failToPushOrderToMerchant" 5035 // - "failToPushOrderToMerchantOutOfStock" 5036 // - "invalidCoupon" 5037 // - "malformedShippingAddress" 5038 // - "merchantDidNotShipOnTime" 5039 // - "noInventory" 5040 // - "orderTimeout" 5041 // - "other" 5042 // - "paymentAbuse" 5043 // - "paymentDeclined" 5044 // - "priceError" 5045 // - "returnRefundAbuse" 5046 // - "shippingPriceError" 5047 // - "taxError" 5048 // - "undeliverableShippingAddress" 5049 // - "unsupportedPoBoxAddress" 5050 Reason string `json:"reason,omitempty"` 5051 5052 // ReasonText: The explanation of the reason. 5053 ReasonText string `json:"reasonText,omitempty"` 5054 5055 // ForceSendFields is a list of field names (e.g. "Actor") to 5056 // unconditionally include in API requests. By default, fields with 5057 // empty values are omitted from API requests. However, any non-pointer, 5058 // non-interface field appearing in ForceSendFields will be sent to the 5059 // server regardless of whether the field is empty or not. This may be 5060 // used to include empty fields in Patch requests. 5061 ForceSendFields []string `json:"-"` 5062 5063 // NullFields is a list of field names (e.g. "Actor") to include in API 5064 // requests with the JSON null value. By default, fields with empty 5065 // values are omitted from API requests. However, any field with an 5066 // empty value appearing in NullFields will be sent to the server as 5067 // null. It is an error if a field in this list has a non-empty value. 5068 // This may be used to include null fields in Patch requests. 5069 NullFields []string `json:"-"` 5070} 5071 5072func (s *OrderCancellation) MarshalJSON() ([]byte, error) { 5073 type NoMethod OrderCancellation 5074 raw := NoMethod(*s) 5075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5076} 5077 5078type OrderCustomer struct { 5079 // Email: Deprecated. 5080 Email string `json:"email,omitempty"` 5081 5082 // ExplicitMarketingPreference: Deprecated. Please use 5083 // marketingRightsInfo instead. 5084 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 5085 5086 // FullName: Full name of the customer. 5087 FullName string `json:"fullName,omitempty"` 5088 5089 // InvoiceReceivingEmail: Email address for the merchant to send 5090 // value-added tax or invoice documentation of the order. Only the last 5091 // document sent is made available to the customer. For more 5092 // information, see About automated VAT invoicing for Shopping Actions. 5093 InvoiceReceivingEmail string `json:"invoiceReceivingEmail,omitempty"` 5094 5095 // MarketingRightsInfo: Customer's marketing preferences. Contains the 5096 // marketing opt-in information that is current at the time that the 5097 // merchant call. User preference selections can change from one order 5098 // to the next so preferences must be checked with every order. 5099 MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 5100 5101 // ForceSendFields is a list of field names (e.g. "Email") to 5102 // unconditionally include in API requests. By default, fields with 5103 // empty values are omitted from API requests. However, any non-pointer, 5104 // non-interface field appearing in ForceSendFields will be sent to the 5105 // server regardless of whether the field is empty or not. This may be 5106 // used to include empty fields in Patch requests. 5107 ForceSendFields []string `json:"-"` 5108 5109 // NullFields is a list of field names (e.g. "Email") to include in API 5110 // requests with the JSON null value. By default, fields with empty 5111 // values are omitted from API requests. However, any field with an 5112 // empty value appearing in NullFields will be sent to the server as 5113 // null. It is an error if a field in this list has a non-empty value. 5114 // This may be used to include null fields in Patch requests. 5115 NullFields []string `json:"-"` 5116} 5117 5118func (s *OrderCustomer) MarshalJSON() ([]byte, error) { 5119 type NoMethod OrderCustomer 5120 raw := NoMethod(*s) 5121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5122} 5123 5124type OrderCustomerMarketingRightsInfo struct { 5125 // ExplicitMarketingPreference: Last known customer selection regarding 5126 // marketing preferences. In certain cases this selection might not be 5127 // known, so this field would be empty. If a customer selected `granted` 5128 // in their most recent order, they can be subscribed to marketing 5129 // emails. Customers who have chosen `denied` must not be subscribed, or 5130 // must be unsubscribed if already opted-in. 5131 // 5132 // Acceptable values are: 5133 // - "denied" 5134 // - "granted" 5135 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 5136 5137 // LastUpdatedTimestamp: Timestamp when last time marketing preference 5138 // was updated. Could be empty, if user wasn't offered a selection yet. 5139 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 5140 5141 // MarketingEmailAddress: Email address that can be used for marketing 5142 // purposes. The field may be empty even if 5143 // `explicitMarketingPreference` is 'granted'. This happens when 5144 // retrieving an old order from the customer who deleted their account. 5145 MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` 5146 5147 // ForceSendFields is a list of field names (e.g. 5148 // "ExplicitMarketingPreference") to unconditionally include in API 5149 // requests. By default, fields with empty values are omitted from API 5150 // requests. However, any non-pointer, non-interface field appearing in 5151 // ForceSendFields will be sent to the server regardless of whether the 5152 // field is empty or not. This may be used to include empty fields in 5153 // Patch requests. 5154 ForceSendFields []string `json:"-"` 5155 5156 // NullFields is a list of field names (e.g. 5157 // "ExplicitMarketingPreference") to include in API requests with the 5158 // JSON null value. By default, fields with empty values are omitted 5159 // from API requests. However, any field with an empty value appearing 5160 // in NullFields will be sent to the server as null. It is an error if a 5161 // field in this list has a non-empty value. This may be used to include 5162 // null fields in Patch requests. 5163 NullFields []string `json:"-"` 5164} 5165 5166func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 5167 type NoMethod OrderCustomerMarketingRightsInfo 5168 raw := NoMethod(*s) 5169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5170} 5171 5172type OrderDeliveryDetails struct { 5173 // Address: The delivery address 5174 Address *OrderAddress `json:"address,omitempty"` 5175 5176 // PhoneNumber: The phone number of the person receiving the delivery. 5177 PhoneNumber string `json:"phoneNumber,omitempty"` 5178 5179 // ForceSendFields is a list of field names (e.g. "Address") to 5180 // unconditionally include in API requests. By default, fields with 5181 // empty values are omitted from API requests. However, any non-pointer, 5182 // non-interface field appearing in ForceSendFields will be sent to the 5183 // server regardless of whether the field is empty or not. This may be 5184 // used to include empty fields in Patch requests. 5185 ForceSendFields []string `json:"-"` 5186 5187 // NullFields is a list of field names (e.g. "Address") to include in 5188 // API requests with the JSON null value. By default, fields with empty 5189 // values are omitted from API requests. However, any field with an 5190 // empty value appearing in NullFields will be sent to the server as 5191 // null. It is an error if a field in this list has a non-empty value. 5192 // This may be used to include null fields in Patch requests. 5193 NullFields []string `json:"-"` 5194} 5195 5196func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) { 5197 type NoMethod OrderDeliveryDetails 5198 raw := NoMethod(*s) 5199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5200} 5201 5202type OrderLegacyPromotion struct { 5203 Benefits []*OrderLegacyPromotionBenefit `json:"benefits,omitempty"` 5204 5205 // EffectiveDates: The date and time frame when the promotion is active 5206 // and ready for validation review. Note that the promotion live time 5207 // may be delayed for a few hours due to the validation review. 5208 // Start date and end date are separated by a forward slash (/). The 5209 // start date is specified by the format (YYYY-MM-DD), followed by the 5210 // letter ?T?, the time of the day when the sale starts (in Greenwich 5211 // Mean Time, GMT), followed by an expression of the time zone for the 5212 // sale. The end date is in the same format. 5213 EffectiveDates string `json:"effectiveDates,omitempty"` 5214 5215 // GenericRedemptionCode: Optional. The text code that corresponds to 5216 // the promotion when applied on the retailer?s website. 5217 GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` 5218 5219 // Id: The unique ID of the promotion. 5220 Id string `json:"id,omitempty"` 5221 5222 // LongTitle: The full title of the promotion. 5223 LongTitle string `json:"longTitle,omitempty"` 5224 5225 // ProductApplicability: Whether the promotion is applicable to all 5226 // products or only specific products. 5227 // 5228 // Acceptable values are: 5229 // - "allProducts" 5230 // - "specificProducts" 5231 ProductApplicability string `json:"productApplicability,omitempty"` 5232 5233 // RedemptionChannel: Indicates that the promotion is valid 5234 // online. 5235 // 5236 // Acceptable values are: 5237 // - "online" 5238 RedemptionChannel string `json:"redemptionChannel,omitempty"` 5239 5240 // ForceSendFields is a list of field names (e.g. "Benefits") to 5241 // unconditionally include in API requests. By default, fields with 5242 // empty values are omitted from API requests. However, any non-pointer, 5243 // non-interface field appearing in ForceSendFields will be sent to the 5244 // server regardless of whether the field is empty or not. This may be 5245 // used to include empty fields in Patch requests. 5246 ForceSendFields []string `json:"-"` 5247 5248 // NullFields is a list of field names (e.g. "Benefits") to include in 5249 // API requests with the JSON null value. By default, fields with empty 5250 // values are omitted from API requests. However, any field with an 5251 // empty value appearing in NullFields will be sent to the server as 5252 // null. It is an error if a field in this list has a non-empty value. 5253 // This may be used to include null fields in Patch requests. 5254 NullFields []string `json:"-"` 5255} 5256 5257func (s *OrderLegacyPromotion) MarshalJSON() ([]byte, error) { 5258 type NoMethod OrderLegacyPromotion 5259 raw := NoMethod(*s) 5260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5261} 5262 5263type OrderLegacyPromotionBenefit struct { 5264 // Discount: The discount in the order price when the promotion is 5265 // applied. 5266 Discount *Price `json:"discount,omitempty"` 5267 5268 // OfferIds: The OfferId(s) that were purchased in this order and map to 5269 // this specific benefit of the promotion. 5270 OfferIds []string `json:"offerIds,omitempty"` 5271 5272 // SubType: Further describes the benefit of the promotion. Note that we 5273 // will expand on this enumeration as we support new promotion 5274 // sub-types. 5275 // 5276 // Acceptable values are: 5277 // - "buyMGetMoneyOff" 5278 // - "buyMGetNMoneyOff" 5279 // - "buyMGetNPercentOff" 5280 // - "buyMGetPercentOff" 5281 // - "freeGift" 5282 // - "freeGiftWithItemId" 5283 // - "freeGiftWithValue" 5284 // - "freeOvernightShipping" 5285 // - "freeShipping" 5286 // - "freeTwoDayShipping" 5287 // - "moneyOff" 5288 // - "percentageOff" 5289 // - "rewardPoints" 5290 // - "salePrice" 5291 SubType string `json:"subType,omitempty"` 5292 5293 // TaxImpact: The impact on tax when the promotion is applied. 5294 TaxImpact *Price `json:"taxImpact,omitempty"` 5295 5296 // Type: Describes whether the promotion applies to products (e.g. 20% 5297 // off) or to shipping (e.g. Free Shipping). 5298 // 5299 // Acceptable values are: 5300 // - "product" 5301 // - "shipping" 5302 Type string `json:"type,omitempty"` 5303 5304 // ForceSendFields is a list of field names (e.g. "Discount") to 5305 // unconditionally include in API requests. By default, fields with 5306 // empty values are omitted from API requests. However, any non-pointer, 5307 // non-interface field appearing in ForceSendFields will be sent to the 5308 // server regardless of whether the field is empty or not. This may be 5309 // used to include empty fields in Patch requests. 5310 ForceSendFields []string `json:"-"` 5311 5312 // NullFields is a list of field names (e.g. "Discount") to include in 5313 // API requests with the JSON null value. By default, fields with empty 5314 // values are omitted from API requests. However, any field with an 5315 // empty value appearing in NullFields will be sent to the server as 5316 // null. It is an error if a field in this list has a non-empty value. 5317 // This may be used to include null fields in Patch requests. 5318 NullFields []string `json:"-"` 5319} 5320 5321func (s *OrderLegacyPromotionBenefit) MarshalJSON() ([]byte, error) { 5322 type NoMethod OrderLegacyPromotionBenefit 5323 raw := NoMethod(*s) 5324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5325} 5326 5327type OrderLineItem struct { 5328 // Annotations: Annotations that are attached to the line item. 5329 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 5330 5331 // Cancellations: Cancellations of the line item. 5332 Cancellations []*OrderCancellation `json:"cancellations,omitempty"` 5333 5334 // Id: The ID of the line item. 5335 Id string `json:"id,omitempty"` 5336 5337 // Price: Total price for the line item. For example, if two items for 5338 // $10 are purchased, the total price will be $20. 5339 Price *Price `json:"price,omitempty"` 5340 5341 // Product: Product data as seen by customer from the time of the order 5342 // placement. Note that certain attributes values (e.g. title or gtin) 5343 // might be reformatted and no longer match values submitted via product 5344 // feed. 5345 Product *OrderLineItemProduct `json:"product,omitempty"` 5346 5347 // QuantityCanceled: Number of items canceled. 5348 QuantityCanceled int64 `json:"quantityCanceled,omitempty"` 5349 5350 // QuantityDelivered: Number of items delivered. 5351 QuantityDelivered int64 `json:"quantityDelivered,omitempty"` 5352 5353 // QuantityOrdered: Number of items ordered. 5354 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 5355 5356 // QuantityPending: Number of items pending. 5357 QuantityPending int64 `json:"quantityPending,omitempty"` 5358 5359 // QuantityReadyForPickup: Number of items ready for pickup. 5360 QuantityReadyForPickup int64 `json:"quantityReadyForPickup,omitempty"` 5361 5362 // QuantityReturned: Number of items returned. 5363 QuantityReturned int64 `json:"quantityReturned,omitempty"` 5364 5365 // QuantityShipped: Number of items shipped. 5366 QuantityShipped int64 `json:"quantityShipped,omitempty"` 5367 5368 // ReturnInfo: Details of the return policy for the line item. 5369 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 5370 5371 // Returns: Returns of the line item. 5372 Returns []*OrderReturn `json:"returns,omitempty"` 5373 5374 // ShippingDetails: Details of the requested shipping for the line item. 5375 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 5376 5377 // Tax: Total tax amount for the line item. For example, if two items 5378 // are purchased, and each have a cost tax of $2, the total tax amount 5379 // will be $4. 5380 Tax *Price `json:"tax,omitempty"` 5381 5382 // ForceSendFields is a list of field names (e.g. "Annotations") to 5383 // unconditionally include in API requests. By default, fields with 5384 // empty values are omitted from API requests. However, any non-pointer, 5385 // non-interface field appearing in ForceSendFields will be sent to the 5386 // server regardless of whether the field is empty or not. This may be 5387 // used to include empty fields in Patch requests. 5388 ForceSendFields []string `json:"-"` 5389 5390 // NullFields is a list of field names (e.g. "Annotations") to include 5391 // in API requests with the JSON null value. By default, fields with 5392 // empty values are omitted from API requests. However, any field with 5393 // an empty value appearing in NullFields will be sent to the server as 5394 // null. It is an error if a field in this list has a non-empty value. 5395 // This may be used to include null fields in Patch requests. 5396 NullFields []string `json:"-"` 5397} 5398 5399func (s *OrderLineItem) MarshalJSON() ([]byte, error) { 5400 type NoMethod OrderLineItem 5401 raw := NoMethod(*s) 5402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5403} 5404 5405type OrderLineItemProduct struct { 5406 // Brand: Brand of the item. 5407 Brand string `json:"brand,omitempty"` 5408 5409 // Channel: The item's channel (online or local). 5410 // 5411 // Acceptable values are: 5412 // - "local" 5413 // - "online" 5414 Channel string `json:"channel,omitempty"` 5415 5416 // Condition: Condition or state of the item. 5417 // 5418 // Acceptable values are: 5419 // - "new" 5420 // - "refurbished" 5421 // - "used" 5422 Condition string `json:"condition,omitempty"` 5423 5424 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 5425 ContentLanguage string `json:"contentLanguage,omitempty"` 5426 5427 // Fees: Associated fees at order creation time. 5428 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 5429 5430 // Gtin: Global Trade Item Number (GTIN) of the item. 5431 Gtin string `json:"gtin,omitempty"` 5432 5433 // Id: The REST ID of the product. 5434 Id string `json:"id,omitempty"` 5435 5436 // ImageLink: URL of an image of the item. 5437 ImageLink string `json:"imageLink,omitempty"` 5438 5439 // ItemGroupId: Shared identifier for all variants of the same product. 5440 ItemGroupId string `json:"itemGroupId,omitempty"` 5441 5442 // Mpn: Manufacturer Part Number (MPN) of the item. 5443 Mpn string `json:"mpn,omitempty"` 5444 5445 // OfferId: An identifier of the item. 5446 OfferId string `json:"offerId,omitempty"` 5447 5448 // Price: Price of the item. 5449 Price *Price `json:"price,omitempty"` 5450 5451 // ShownImage: URL to the cached image shown to the user when order was 5452 // placed. 5453 ShownImage string `json:"shownImage,omitempty"` 5454 5455 // TargetCountry: The CLDR territory code of the target country of the 5456 // product. 5457 TargetCountry string `json:"targetCountry,omitempty"` 5458 5459 // Title: The title of the product. 5460 Title string `json:"title,omitempty"` 5461 5462 // VariantAttributes: Variant attributes for the item. These are 5463 // dimensions of the product, such as color, gender, material, pattern, 5464 // and size. You can find a comprehensive list of variant attributes 5465 // here. 5466 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 5467 5468 // ForceSendFields is a list of field names (e.g. "Brand") to 5469 // unconditionally include in API requests. By default, fields with 5470 // empty values are omitted from API requests. However, any non-pointer, 5471 // non-interface field appearing in ForceSendFields will be sent to the 5472 // server regardless of whether the field is empty or not. This may be 5473 // used to include empty fields in Patch requests. 5474 ForceSendFields []string `json:"-"` 5475 5476 // NullFields is a list of field names (e.g. "Brand") to include in API 5477 // requests with the JSON null value. By default, fields with empty 5478 // values are omitted from API requests. However, any field with an 5479 // empty value appearing in NullFields will be sent to the server as 5480 // null. It is an error if a field in this list has a non-empty value. 5481 // This may be used to include null fields in Patch requests. 5482 NullFields []string `json:"-"` 5483} 5484 5485func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) { 5486 type NoMethod OrderLineItemProduct 5487 raw := NoMethod(*s) 5488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5489} 5490 5491type OrderLineItemProductFee struct { 5492 // Amount: Amount of the fee. 5493 Amount *Price `json:"amount,omitempty"` 5494 5495 // Name: Name of the fee. 5496 Name string `json:"name,omitempty"` 5497 5498 // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 *OrderLineItemProductFee) MarshalJSON() ([]byte, error) { 5516 type NoMethod OrderLineItemProductFee 5517 raw := NoMethod(*s) 5518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5519} 5520 5521type OrderLineItemProductVariantAttribute struct { 5522 // Dimension: The dimension of the variant. 5523 Dimension string `json:"dimension,omitempty"` 5524 5525 // Value: The value for the dimension. 5526 Value string `json:"value,omitempty"` 5527 5528 // ForceSendFields is a list of field names (e.g. "Dimension") to 5529 // unconditionally include in API requests. By default, fields with 5530 // empty values are omitted from API requests. However, any non-pointer, 5531 // non-interface field appearing in ForceSendFields will be sent to the 5532 // server regardless of whether the field is empty or not. This may be 5533 // used to include empty fields in Patch requests. 5534 ForceSendFields []string `json:"-"` 5535 5536 // NullFields is a list of field names (e.g. "Dimension") to include in 5537 // API requests with the JSON null value. By default, fields with empty 5538 // values are omitted from API requests. However, any field with an 5539 // empty value appearing in NullFields will be sent to the server as 5540 // null. It is an error if a field in this list has a non-empty value. 5541 // This may be used to include null fields in Patch requests. 5542 NullFields []string `json:"-"` 5543} 5544 5545func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { 5546 type NoMethod OrderLineItemProductVariantAttribute 5547 raw := NoMethod(*s) 5548 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5549} 5550 5551type OrderLineItemReturnInfo struct { 5552 // DaysToReturn: Required. How many days later the item can be returned. 5553 DaysToReturn int64 `json:"daysToReturn,omitempty"` 5554 5555 // IsReturnable: Required. Whether the item is returnable. 5556 IsReturnable bool `json:"isReturnable,omitempty"` 5557 5558 // PolicyUrl: Required. URL of the item return policy. 5559 PolicyUrl string `json:"policyUrl,omitempty"` 5560 5561 // ForceSendFields is a list of field names (e.g. "DaysToReturn") to 5562 // unconditionally include in API requests. By default, fields with 5563 // empty values are omitted from API requests. However, any non-pointer, 5564 // non-interface field appearing in ForceSendFields will be sent to the 5565 // server regardless of whether the field is empty or not. This may be 5566 // used to include empty fields in Patch requests. 5567 ForceSendFields []string `json:"-"` 5568 5569 // NullFields is a list of field names (e.g. "DaysToReturn") to include 5570 // in API requests with the JSON null value. By default, fields with 5571 // empty values are omitted from API requests. However, any field with 5572 // an empty value appearing in NullFields will be sent to the server as 5573 // null. It is an error if a field in this list has a non-empty value. 5574 // This may be used to include null fields in Patch requests. 5575 NullFields []string `json:"-"` 5576} 5577 5578func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { 5579 type NoMethod OrderLineItemReturnInfo 5580 raw := NoMethod(*s) 5581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5582} 5583 5584type OrderLineItemShippingDetails struct { 5585 // DeliverByDate: Required. The delivery by date, in ISO 8601 format. 5586 DeliverByDate string `json:"deliverByDate,omitempty"` 5587 5588 // Method: Required. Details of the shipping method. 5589 Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` 5590 5591 // ShipByDate: Required. The ship by date, in ISO 8601 format. 5592 ShipByDate string `json:"shipByDate,omitempty"` 5593 5594 // Type: Type of shipment. Indicates whether `deliveryDetails` or 5595 // `pickupDetails` is applicable for this shipment. 5596 // 5597 // Acceptable values are: 5598 // - "delivery" 5599 // - "pickup" 5600 Type string `json:"type,omitempty"` 5601 5602 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 5603 // unconditionally include in API requests. By default, fields with 5604 // empty values are omitted from API requests. However, any non-pointer, 5605 // non-interface field appearing in ForceSendFields will be sent to the 5606 // server regardless of whether the field is empty or not. This may be 5607 // used to include empty fields in Patch requests. 5608 ForceSendFields []string `json:"-"` 5609 5610 // NullFields is a list of field names (e.g. "DeliverByDate") to include 5611 // in API requests with the JSON null value. By default, fields with 5612 // empty values are omitted from API requests. However, any field with 5613 // an empty value appearing in NullFields will be sent to the server as 5614 // null. It is an error if a field in this list has a non-empty value. 5615 // This may be used to include null fields in Patch requests. 5616 NullFields []string `json:"-"` 5617} 5618 5619func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { 5620 type NoMethod OrderLineItemShippingDetails 5621 raw := NoMethod(*s) 5622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5623} 5624 5625type OrderLineItemShippingDetailsMethod struct { 5626 // Carrier: The carrier for the shipping. Optional. See 5627 // `shipments[].carrier` for a list of acceptable values. 5628 Carrier string `json:"carrier,omitempty"` 5629 5630 // MaxDaysInTransit: Required. Maximum transit time. 5631 MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` 5632 5633 // MethodName: Required. The name of the shipping method. 5634 MethodName string `json:"methodName,omitempty"` 5635 5636 // MinDaysInTransit: Required. Minimum transit time. 5637 MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` 5638 5639 // ForceSendFields is a list of field names (e.g. "Carrier") to 5640 // unconditionally include in API requests. By default, fields with 5641 // empty values are omitted from API requests. However, any non-pointer, 5642 // non-interface field appearing in ForceSendFields will be sent to the 5643 // server regardless of whether the field is empty or not. This may be 5644 // used to include empty fields in Patch requests. 5645 ForceSendFields []string `json:"-"` 5646 5647 // NullFields is a list of field names (e.g. "Carrier") to include in 5648 // API requests with the JSON null value. By default, fields with empty 5649 // values are omitted from API requests. However, any field with an 5650 // empty value appearing in NullFields will be sent to the server as 5651 // null. It is an error if a field in this list has a non-empty value. 5652 // This may be used to include null fields in Patch requests. 5653 NullFields []string `json:"-"` 5654} 5655 5656func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { 5657 type NoMethod OrderLineItemShippingDetailsMethod 5658 raw := NoMethod(*s) 5659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5660} 5661 5662type OrderMerchantProvidedAnnotation struct { 5663 // Key: Key for additional merchant provided (as key-value pairs) 5664 // annotation about the line item. 5665 Key string `json:"key,omitempty"` 5666 5667 // Value: Value for additional merchant provided (as key-value pairs) 5668 // annotation about the line item. 5669 Value string `json:"value,omitempty"` 5670 5671 // ForceSendFields is a list of field names (e.g. "Key") to 5672 // unconditionally include in API requests. By default, fields with 5673 // empty values are omitted from API requests. However, any non-pointer, 5674 // non-interface field appearing in ForceSendFields will be sent to the 5675 // server regardless of whether the field is empty or not. This may be 5676 // used to include empty fields in Patch requests. 5677 ForceSendFields []string `json:"-"` 5678 5679 // NullFields is a list of field names (e.g. "Key") to include in API 5680 // requests with the JSON null value. By default, fields with empty 5681 // values are omitted from API requests. However, any field with an 5682 // empty value appearing in NullFields will be sent to the server as 5683 // null. It is an error if a field in this list has a non-empty value. 5684 // This may be used to include null fields in Patch requests. 5685 NullFields []string `json:"-"` 5686} 5687 5688func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { 5689 type NoMethod OrderMerchantProvidedAnnotation 5690 raw := NoMethod(*s) 5691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5692} 5693 5694type OrderPaymentMethod struct { 5695 // BillingAddress: The billing address. 5696 BillingAddress *OrderAddress `json:"billingAddress,omitempty"` 5697 5698 // ExpirationMonth: The card expiration month (January = 1, February = 2 5699 // etc.). 5700 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 5701 5702 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 5703 ExpirationYear int64 `json:"expirationYear,omitempty"` 5704 5705 // LastFourDigits: The last four digits of the card number. 5706 LastFourDigits string `json:"lastFourDigits,omitempty"` 5707 5708 // PhoneNumber: The billing phone number. 5709 PhoneNumber string `json:"phoneNumber,omitempty"` 5710 5711 // Type: The type of instrument. 5712 // 5713 // Acceptable values are: 5714 // - "AMEX" 5715 // - "DISCOVER" 5716 // - "JCB" 5717 // - "MASTERCARD" 5718 // - "UNIONPAY" 5719 // - "VISA" 5720 // - "" 5721 Type string `json:"type,omitempty"` 5722 5723 // ForceSendFields is a list of field names (e.g. "BillingAddress") to 5724 // unconditionally include in API requests. By default, fields with 5725 // empty values are omitted from API requests. However, any non-pointer, 5726 // non-interface field appearing in ForceSendFields will be sent to the 5727 // server regardless of whether the field is empty or not. This may be 5728 // used to include empty fields in Patch requests. 5729 ForceSendFields []string `json:"-"` 5730 5731 // NullFields is a list of field names (e.g. "BillingAddress") to 5732 // include in API requests with the JSON null value. By default, fields 5733 // with empty values are omitted from API requests. However, any field 5734 // with an empty value appearing in NullFields will be sent to the 5735 // server as null. It is an error if a field in this list has a 5736 // non-empty value. This may be used to include null fields in Patch 5737 // requests. 5738 NullFields []string `json:"-"` 5739} 5740 5741func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) { 5742 type NoMethod OrderPaymentMethod 5743 raw := NoMethod(*s) 5744 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5745} 5746 5747type OrderPickupDetails struct { 5748 // Address: Address of the pickup location where the shipment should be 5749 // sent. Note that `recipientName` in the address is the name of the 5750 // business at the pickup location. 5751 Address *OrderAddress `json:"address,omitempty"` 5752 5753 // Collectors: Collectors authorized to pick up shipment from the pickup 5754 // location. 5755 Collectors []*OrderPickupDetailsCollector `json:"collectors,omitempty"` 5756 5757 // LocationId: ID of the pickup location. 5758 LocationId string `json:"locationId,omitempty"` 5759 5760 // ForceSendFields is a list of field names (e.g. "Address") to 5761 // unconditionally include in API requests. By default, fields with 5762 // empty values are omitted from API requests. However, any non-pointer, 5763 // non-interface field appearing in ForceSendFields will be sent to the 5764 // server regardless of whether the field is empty or not. This may be 5765 // used to include empty fields in Patch requests. 5766 ForceSendFields []string `json:"-"` 5767 5768 // NullFields is a list of field names (e.g. "Address") to include in 5769 // API requests with the JSON null value. By default, fields with empty 5770 // values are omitted from API requests. However, any field with an 5771 // empty value appearing in NullFields will be sent to the server as 5772 // null. It is an error if a field in this list has a non-empty value. 5773 // This may be used to include null fields in Patch requests. 5774 NullFields []string `json:"-"` 5775} 5776 5777func (s *OrderPickupDetails) MarshalJSON() ([]byte, error) { 5778 type NoMethod OrderPickupDetails 5779 raw := NoMethod(*s) 5780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5781} 5782 5783type OrderPickupDetailsCollector struct { 5784 // Name: Name of the person picking up the shipment. 5785 Name string `json:"name,omitempty"` 5786 5787 // PhoneNumber: Phone number of the person picking up the shipment. 5788 PhoneNumber string `json:"phoneNumber,omitempty"` 5789 5790 // ForceSendFields is a list of field names (e.g. "Name") to 5791 // unconditionally include in API requests. By default, fields with 5792 // empty values are omitted from API requests. However, any non-pointer, 5793 // non-interface field appearing in ForceSendFields will be sent to the 5794 // server regardless of whether the field is empty or not. This may be 5795 // used to include empty fields in Patch requests. 5796 ForceSendFields []string `json:"-"` 5797 5798 // NullFields is a list of field names (e.g. "Name") to include in API 5799 // requests with the JSON null value. By default, fields with empty 5800 // values are omitted from API requests. However, any field with an 5801 // empty value appearing in NullFields will be sent to the server as 5802 // null. It is an error if a field in this list has a non-empty value. 5803 // This may be used to include null fields in Patch requests. 5804 NullFields []string `json:"-"` 5805} 5806 5807func (s *OrderPickupDetailsCollector) MarshalJSON() ([]byte, error) { 5808 type NoMethod OrderPickupDetailsCollector 5809 raw := NoMethod(*s) 5810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5811} 5812 5813type OrderRefund struct { 5814 // Actor: The actor that created the refund. 5815 // 5816 // Acceptable values are: 5817 // - "customer" 5818 // - "googleBot" 5819 // - "googleCustomerService" 5820 // - "googlePayments" 5821 // - "googleSabre" 5822 // - "merchant" 5823 Actor string `json:"actor,omitempty"` 5824 5825 // Amount: The amount that is refunded. 5826 Amount *Price `json:"amount,omitempty"` 5827 5828 // CreationDate: Date on which the item has been created, in ISO 8601 5829 // format. 5830 CreationDate string `json:"creationDate,omitempty"` 5831 5832 // Reason: The reason for the refund. 5833 // 5834 // Acceptable values are: 5835 // - "adjustment" 5836 // - "autoPostInternal" 5837 // - "autoPostInvalidBillingAddress" 5838 // - "autoPostNoInventory" 5839 // - "autoPostPriceError" 5840 // - "autoPostUndeliverableShippingAddress" 5841 // - "couponAbuse" 5842 // - "courtesyAdjustment" 5843 // - "customerCanceled" 5844 // - "customerDiscretionaryReturn" 5845 // - "customerInitiatedMerchantCancel" 5846 // - "customerSupportRequested" 5847 // - "deliveredLateByCarrier" 5848 // - "deliveredTooLate" 5849 // - "expiredItem" 5850 // - "failToPushOrderGoogleError" 5851 // - "failToPushOrderMerchantError" 5852 // - "failToPushOrderMerchantFulfillmentError" 5853 // - "failToPushOrderToMerchant" 5854 // - "failToPushOrderToMerchantOutOfStock" 5855 // - "feeAdjustment" 5856 // - "invalidCoupon" 5857 // - "lateShipmentCredit" 5858 // - "malformedShippingAddress" 5859 // - "merchantDidNotShipOnTime" 5860 // - "noInventory" 5861 // - "orderTimeout" 5862 // - "other" 5863 // - "paymentAbuse" 5864 // - "paymentDeclined" 5865 // - "priceAdjustment" 5866 // - "priceError" 5867 // - "productArrivedDamaged" 5868 // - "productNotAsDescribed" 5869 // - "promoReallocation" 5870 // - "qualityNotAsExpected" 5871 // - "returnRefundAbuse" 5872 // - "shippingCostAdjustment" 5873 // - "shippingPriceError" 5874 // - "taxAdjustment" 5875 // - "taxError" 5876 // - "undeliverableShippingAddress" 5877 // - "unsupportedPoBoxAddress" 5878 // - "wrongProductShipped" 5879 Reason string `json:"reason,omitempty"` 5880 5881 // ReasonText: The explanation of the reason. 5882 ReasonText string `json:"reasonText,omitempty"` 5883 5884 // ForceSendFields is a list of field names (e.g. "Actor") to 5885 // unconditionally include in API requests. By default, fields with 5886 // empty values are omitted from API requests. However, any non-pointer, 5887 // non-interface field appearing in ForceSendFields will be sent to the 5888 // server regardless of whether the field is empty or not. This may be 5889 // used to include empty fields in Patch requests. 5890 ForceSendFields []string `json:"-"` 5891 5892 // NullFields is a list of field names (e.g. "Actor") to include in API 5893 // requests with the JSON null value. By default, fields with empty 5894 // values are omitted from API requests. However, any field with an 5895 // empty value appearing in NullFields will be sent to the server as 5896 // null. It is an error if a field in this list has a non-empty value. 5897 // This may be used to include null fields in Patch requests. 5898 NullFields []string `json:"-"` 5899} 5900 5901func (s *OrderRefund) MarshalJSON() ([]byte, error) { 5902 type NoMethod OrderRefund 5903 raw := NoMethod(*s) 5904 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5905} 5906 5907// OrderReportDisbursement: Order disbursement. All methods require the 5908// payment analyst role. (== resource_for v2.orderreports ==) (== 5909// resource_for v2.1.orderreports ==) 5910type OrderReportDisbursement struct { 5911 // DisbursementAmount: The disbursement amount. 5912 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5913 5914 // DisbursementCreationDate: The disbursement date, in ISO 8601 format. 5915 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5916 5917 // DisbursementDate: The date the disbursement was initiated, in ISO 5918 // 8601 format. 5919 DisbursementDate string `json:"disbursementDate,omitempty"` 5920 5921 // DisbursementId: The ID of the disbursement. 5922 DisbursementId string `json:"disbursementId,omitempty"` 5923 5924 // MerchantId: The ID of the managing account. 5925 MerchantId uint64 `json:"merchantId,omitempty,string"` 5926 5927 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5928 // to unconditionally include in API requests. By default, fields with 5929 // empty values are omitted from API requests. However, any non-pointer, 5930 // non-interface field appearing in ForceSendFields will be sent to the 5931 // server regardless of whether the field is empty or not. This may be 5932 // used to include empty fields in Patch requests. 5933 ForceSendFields []string `json:"-"` 5934 5935 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5936 // include in API requests with the JSON null value. By default, fields 5937 // with empty values are omitted from API requests. However, any field 5938 // with an empty value appearing in NullFields will be sent to the 5939 // server as null. It is an error if a field in this list has a 5940 // non-empty value. This may be used to include null fields in Patch 5941 // requests. 5942 NullFields []string `json:"-"` 5943} 5944 5945func (s *OrderReportDisbursement) MarshalJSON() ([]byte, error) { 5946 type NoMethod OrderReportDisbursement 5947 raw := NoMethod(*s) 5948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5949} 5950 5951type OrderReportTransaction struct { 5952 // DisbursementAmount: The disbursement amount. 5953 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5954 5955 // DisbursementCreationDate: The date the disbursement was created, in 5956 // ISO 8601 format. 5957 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5958 5959 // DisbursementDate: The date the disbursement was initiated, in ISO 5960 // 8601 format. 5961 DisbursementDate string `json:"disbursementDate,omitempty"` 5962 5963 // DisbursementId: The ID of the disbursement. 5964 DisbursementId string `json:"disbursementId,omitempty"` 5965 5966 // MerchantId: The ID of the managing account. 5967 MerchantId uint64 `json:"merchantId,omitempty,string"` 5968 5969 // MerchantOrderId: Merchant-provided ID of the order. 5970 MerchantOrderId string `json:"merchantOrderId,omitempty"` 5971 5972 // OrderId: The ID of the order. 5973 OrderId string `json:"orderId,omitempty"` 5974 5975 // ProductAmount: Total amount for the items. 5976 ProductAmount *Amount `json:"productAmount,omitempty"` 5977 5978 // ProductAmountWithRemittedTax: Total amount with remitted tax for the 5979 // items. 5980 ProductAmountWithRemittedTax *ProductAmount `json:"productAmountWithRemittedTax,omitempty"` 5981 5982 // TransactionDate: The date of the transaction, in ISO 8601 format. 5983 TransactionDate string `json:"transactionDate,omitempty"` 5984 5985 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5986 // to unconditionally include in API requests. By default, fields with 5987 // empty values are omitted from API requests. However, any non-pointer, 5988 // non-interface field appearing in ForceSendFields will be sent to the 5989 // server regardless of whether the field is empty or not. This may be 5990 // used to include empty fields in Patch requests. 5991 ForceSendFields []string `json:"-"` 5992 5993 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5994 // include in API requests with the JSON null value. By default, fields 5995 // with empty values are omitted from API requests. However, any field 5996 // with an empty value appearing in NullFields will be sent to the 5997 // server as null. It is an error if a field in this list has a 5998 // non-empty value. This may be used to include null fields in Patch 5999 // requests. 6000 NullFields []string `json:"-"` 6001} 6002 6003func (s *OrderReportTransaction) MarshalJSON() ([]byte, error) { 6004 type NoMethod OrderReportTransaction 6005 raw := NoMethod(*s) 6006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6007} 6008 6009type OrderReturn struct { 6010 // Actor: The actor that created the refund. 6011 // 6012 // Acceptable values are: 6013 // - "customer" 6014 // - "googleBot" 6015 // - "googleCustomerService" 6016 // - "googlePayments" 6017 // - "googleSabre" 6018 // - "merchant" 6019 Actor string `json:"actor,omitempty"` 6020 6021 // CreationDate: Date on which the item has been created, in ISO 8601 6022 // format. 6023 CreationDate string `json:"creationDate,omitempty"` 6024 6025 // Quantity: Quantity that is returned. 6026 Quantity int64 `json:"quantity,omitempty"` 6027 6028 // Reason: The reason for the return. 6029 // 6030 // Acceptable values are: 6031 // - "customerDiscretionaryReturn" 6032 // - "customerInitiatedMerchantCancel" 6033 // - "deliveredTooLate" 6034 // - "expiredItem" 6035 // - "invalidCoupon" 6036 // - "malformedShippingAddress" 6037 // - "other" 6038 // - "productArrivedDamaged" 6039 // - "productNotAsDescribed" 6040 // - "qualityNotAsExpected" 6041 // - "undeliverableShippingAddress" 6042 // - "unsupportedPoBoxAddress" 6043 // - "wrongProductShipped" 6044 Reason string `json:"reason,omitempty"` 6045 6046 // ReasonText: The explanation of the reason. 6047 ReasonText string `json:"reasonText,omitempty"` 6048 6049 // ForceSendFields is a list of field names (e.g. "Actor") to 6050 // unconditionally include in API requests. By default, fields with 6051 // empty values are omitted from API requests. However, any non-pointer, 6052 // non-interface field appearing in ForceSendFields will be sent to the 6053 // server regardless of whether the field is empty or not. This may be 6054 // used to include empty fields in Patch requests. 6055 ForceSendFields []string `json:"-"` 6056 6057 // NullFields is a list of field names (e.g. "Actor") to include in API 6058 // requests with the JSON null value. By default, fields with empty 6059 // values are omitted from API requests. However, any field with an 6060 // empty value appearing in NullFields will be sent to the server as 6061 // null. It is an error if a field in this list has a non-empty value. 6062 // This may be used to include null fields in Patch requests. 6063 NullFields []string `json:"-"` 6064} 6065 6066func (s *OrderReturn) MarshalJSON() ([]byte, error) { 6067 type NoMethod OrderReturn 6068 raw := NoMethod(*s) 6069 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6070} 6071 6072type OrderShipment struct { 6073 // Carrier: The carrier handling the shipment. 6074 // 6075 // For supported carriers, Google includes the carrier name and tracking 6076 // URL in emails to customers. For select supported carriers, Google 6077 // also automatically updates the shipment status based on the provided 6078 // shipment ID. Note: You can also use unsupported carriers, but emails 6079 // to customers will not include the carrier name or tracking URL, and 6080 // there will be no automatic order status updates. 6081 // Supported carriers for US are: 6082 // - "ups" (United Parcel Service) automatic status updates 6083 // - "usps" (United States Postal Service) automatic status updates 6084 // - "fedex" (FedEx) automatic status updates 6085 // - "dhl" (DHL eCommerce) automatic status updates (US only) 6086 // - "ontrac" (OnTrac) automatic status updates 6087 // - "dhl express" (DHL Express) 6088 // - "deliv" (Deliv) 6089 // - "dynamex" (TForce) 6090 // - "lasership" (LaserShip) 6091 // - "mpx" (Military Parcel Xpress) 6092 // - "uds" (United Delivery Service) 6093 // - "efw" (Estes Forwarding Worldwide) 6094 // - "jd logistics" (JD Logistics) 6095 // - "yunexpress" (YunExpress) 6096 // - "china post" (China Post) 6097 // - "china ems" (China Post Express Mail Service) 6098 // - "singapore post" (Singapore Post) 6099 // - "pos malaysia" (Pos Malaysia) 6100 // - "postnl" (PostNL) 6101 // - "ptt" (PTT Turkish Post) 6102 // - "eub" (ePacket) 6103 // - "chukou1" (Chukou1 Logistics) 6104 // Supported carriers for FR are: 6105 // - "la poste" (La Poste) automatic status updates 6106 // - "colissimo" (Colissimo by La Poste) automatic status updates 6107 // - "ups" (United Parcel Service) automatic status updates 6108 // - "chronopost" (Chronopost by La Poste) 6109 // - "gls" (General Logistics Systems France) 6110 // - "dpd" (DPD Group by GeoPost) 6111 // - "bpost" (Belgian Post Group) 6112 // - "colis prive" (Colis Privé) 6113 // - "boxtal" (Boxtal) 6114 // - "geodis" (GEODIS) 6115 // - "tnt" (TNT) 6116 // - "db schenker" (DB Schenker) 6117 // - "aramex" (Aramex) 6118 Carrier string `json:"carrier,omitempty"` 6119 6120 // CreationDate: Date on which the shipment has been created, in ISO 6121 // 8601 format. 6122 CreationDate string `json:"creationDate,omitempty"` 6123 6124 // DeliveryDate: Date on which the shipment has been delivered, in ISO 6125 // 8601 format. Present only if `status` is `delivered` 6126 DeliveryDate string `json:"deliveryDate,omitempty"` 6127 6128 // Id: The ID of the shipment. 6129 Id string `json:"id,omitempty"` 6130 6131 // LineItems: The line items that are shipped. 6132 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 6133 6134 // Status: The status of the shipment. 6135 // 6136 // Acceptable values are: 6137 // - "delivered" 6138 // - "readyForPickup" 6139 // - "shipped" 6140 // - "undeliverable" 6141 Status string `json:"status,omitempty"` 6142 6143 // TrackingId: The tracking ID for the shipment. 6144 TrackingId string `json:"trackingId,omitempty"` 6145 6146 // ForceSendFields is a list of field names (e.g. "Carrier") to 6147 // unconditionally include in API requests. By default, fields with 6148 // empty values are omitted from API requests. However, any non-pointer, 6149 // non-interface field appearing in ForceSendFields will be sent to the 6150 // server regardless of whether the field is empty or not. This may be 6151 // used to include empty fields in Patch requests. 6152 ForceSendFields []string `json:"-"` 6153 6154 // NullFields is a list of field names (e.g. "Carrier") to include in 6155 // API requests with the JSON null value. By default, fields with empty 6156 // values are omitted from API requests. However, any field with an 6157 // empty value appearing in NullFields will be sent to the server as 6158 // null. It is an error if a field in this list has a non-empty value. 6159 // This may be used to include null fields in Patch requests. 6160 NullFields []string `json:"-"` 6161} 6162 6163func (s *OrderShipment) MarshalJSON() ([]byte, error) { 6164 type NoMethod OrderShipment 6165 raw := NoMethod(*s) 6166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6167} 6168 6169type OrderShipmentLineItemShipment struct { 6170 // LineItemId: The ID of the line item that is shipped. This value is 6171 // assigned by Google when an order is created. Either lineItemId or 6172 // productId is required. 6173 LineItemId string `json:"lineItemId,omitempty"` 6174 6175 // ProductId: The ID of the product to ship. This is the REST ID used in 6176 // the products service. Either lineItemId or productId is required. 6177 ProductId string `json:"productId,omitempty"` 6178 6179 // Quantity: The quantity that is shipped. 6180 Quantity int64 `json:"quantity,omitempty"` 6181 6182 // ForceSendFields is a list of field names (e.g. "LineItemId") to 6183 // unconditionally include in API requests. By default, fields with 6184 // empty values are omitted from API requests. However, any non-pointer, 6185 // non-interface field appearing in ForceSendFields will be sent to the 6186 // server regardless of whether the field is empty or not. This may be 6187 // used to include empty fields in Patch requests. 6188 ForceSendFields []string `json:"-"` 6189 6190 // NullFields is a list of field names (e.g. "LineItemId") to include in 6191 // API requests with the JSON null value. By default, fields with empty 6192 // values are omitted from API requests. However, any field with an 6193 // empty value appearing in NullFields will be sent to the server as 6194 // null. It is an error if a field in this list has a non-empty value. 6195 // This may be used to include null fields in Patch requests. 6196 NullFields []string `json:"-"` 6197} 6198 6199func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { 6200 type NoMethod OrderShipmentLineItemShipment 6201 raw := NoMethod(*s) 6202 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6203} 6204 6205type OrderinvoicesCreateChargeInvoiceRequest struct { 6206 // InvoiceId: [required] The ID of the invoice. 6207 InvoiceId string `json:"invoiceId,omitempty"` 6208 6209 // InvoiceSummary: [required] Invoice summary. 6210 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 6211 6212 // LineItemInvoices: [required] Invoice details per line item. 6213 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 6214 6215 // OperationId: [required] The ID of the operation, unique across all 6216 // operations for a given order. 6217 OperationId string `json:"operationId,omitempty"` 6218 6219 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 6220 // by the merchant in the `shipLineItems` method and is used to group 6221 // multiple line items that have the same kind of shipping charges. 6222 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 6223 6224 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 6225 // unconditionally include in API requests. By default, fields with 6226 // empty values are omitted from API requests. However, any non-pointer, 6227 // non-interface field appearing in ForceSendFields will be sent to the 6228 // server regardless of whether the field is empty or not. This may be 6229 // used to include empty fields in Patch requests. 6230 ForceSendFields []string `json:"-"` 6231 6232 // NullFields is a list of field names (e.g. "InvoiceId") to include in 6233 // API requests with the JSON null value. By default, fields with empty 6234 // values are omitted from API requests. However, any field with an 6235 // empty value appearing in NullFields will be sent to the server as 6236 // null. It is an error if a field in this list has a non-empty value. 6237 // This may be used to include null fields in Patch requests. 6238 NullFields []string `json:"-"` 6239} 6240 6241func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { 6242 type NoMethod OrderinvoicesCreateChargeInvoiceRequest 6243 raw := NoMethod(*s) 6244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6245} 6246 6247type OrderinvoicesCreateChargeInvoiceResponse struct { 6248 // ExecutionStatus: The status of the execution. 6249 // 6250 // Acceptable values are: 6251 // - "duplicate" 6252 // - "executed" 6253 ExecutionStatus string `json:"executionStatus,omitempty"` 6254 6255 // Kind: Identifies what kind of resource this is. Value: the fixed 6256 // string "content#orderinvoicesCreateChargeInvoiceResponse". 6257 Kind string `json:"kind,omitempty"` 6258 6259 // ServerResponse contains the HTTP response code and headers from the 6260 // server. 6261 googleapi.ServerResponse `json:"-"` 6262 6263 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6264 // unconditionally include in API requests. By default, fields with 6265 // empty values are omitted from API requests. However, any non-pointer, 6266 // non-interface field appearing in ForceSendFields will be sent to the 6267 // server regardless of whether the field is empty or not. This may be 6268 // used to include empty fields in Patch requests. 6269 ForceSendFields []string `json:"-"` 6270 6271 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6272 // include in API requests with the JSON null value. By default, fields 6273 // with empty values are omitted from API requests. However, any field 6274 // with an empty value appearing in NullFields will be sent to the 6275 // server as null. It is an error if a field in this list has a 6276 // non-empty value. This may be used to include null fields in Patch 6277 // requests. 6278 NullFields []string `json:"-"` 6279} 6280 6281func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { 6282 type NoMethod OrderinvoicesCreateChargeInvoiceResponse 6283 raw := NoMethod(*s) 6284 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6285} 6286 6287type OrderinvoicesCreateRefundInvoiceRequest struct { 6288 // InvoiceId: [required] The ID of the invoice. 6289 InvoiceId string `json:"invoiceId,omitempty"` 6290 6291 // OperationId: [required] The ID of the operation, unique across all 6292 // operations for a given order. 6293 OperationId string `json:"operationId,omitempty"` 6294 6295 // RefundOnlyOption: Option to create a refund-only invoice. Exactly one 6296 // of `refundOnlyOption` or `returnOption` must be provided. 6297 RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` 6298 6299 // ReturnOption: Option to create an invoice for a refund and mark all 6300 // items within the invoice as returned. Exactly one of 6301 // `refundOnlyOption` or `returnOption` must be provided. 6302 ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` 6303 6304 // ShipmentInvoices: Invoice details for different shipment groups. 6305 ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` 6306 6307 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 6308 // unconditionally include in API requests. By default, fields with 6309 // empty values are omitted from API requests. However, any non-pointer, 6310 // non-interface field appearing in ForceSendFields will be sent to the 6311 // server regardless of whether the field is empty or not. This may be 6312 // used to include empty fields in Patch requests. 6313 ForceSendFields []string `json:"-"` 6314 6315 // NullFields is a list of field names (e.g. "InvoiceId") to include in 6316 // API requests with the JSON null value. By default, fields with empty 6317 // values are omitted from API requests. However, any field with an 6318 // empty value appearing in NullFields will be sent to the server as 6319 // null. It is an error if a field in this list has a non-empty value. 6320 // This may be used to include null fields in Patch requests. 6321 NullFields []string `json:"-"` 6322} 6323 6324func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { 6325 type NoMethod OrderinvoicesCreateRefundInvoiceRequest 6326 raw := NoMethod(*s) 6327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6328} 6329 6330type OrderinvoicesCreateRefundInvoiceResponse struct { 6331 // ExecutionStatus: The status of the execution. 6332 // 6333 // Acceptable values are: 6334 // - "duplicate" 6335 // - "executed" 6336 ExecutionStatus string `json:"executionStatus,omitempty"` 6337 6338 // Kind: Identifies what kind of resource this is. Value: the fixed 6339 // string "content#orderinvoicesCreateRefundInvoiceResponse". 6340 Kind string `json:"kind,omitempty"` 6341 6342 // ServerResponse contains the HTTP response code and headers from the 6343 // server. 6344 googleapi.ServerResponse `json:"-"` 6345 6346 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6347 // unconditionally include in API requests. By default, fields with 6348 // empty values are omitted from API requests. However, any non-pointer, 6349 // non-interface field appearing in ForceSendFields will be sent to the 6350 // server regardless of whether the field is empty or not. This may be 6351 // used to include empty fields in Patch requests. 6352 ForceSendFields []string `json:"-"` 6353 6354 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6355 // include in API requests with the JSON null value. By default, fields 6356 // with empty values are omitted from API requests. However, any field 6357 // with an empty value appearing in NullFields will be sent to the 6358 // server as null. It is an error if a field in this list has a 6359 // non-empty value. This may be used to include null fields in Patch 6360 // requests. 6361 NullFields []string `json:"-"` 6362} 6363 6364func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { 6365 type NoMethod OrderinvoicesCreateRefundInvoiceResponse 6366 raw := NoMethod(*s) 6367 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6368} 6369 6370type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { 6371 // Description: Optional description of the refund reason. 6372 Description string `json:"description,omitempty"` 6373 6374 // Reason: [required] Reason for the refund. 6375 // 6376 // Acceptable values are: 6377 // - "adjustment" 6378 // - "autoPostInternal" 6379 // - "autoPostInvalidBillingAddress" 6380 // - "autoPostNoInventory" 6381 // - "autoPostPriceError" 6382 // - "autoPostUndeliverableShippingAddress" 6383 // - "couponAbuse" 6384 // - "courtesyAdjustment" 6385 // - "customerCanceled" 6386 // - "customerDiscretionaryReturn" 6387 // - "customerInitiatedMerchantCancel" 6388 // - "customerSupportRequested" 6389 // - "deliveredLateByCarrier" 6390 // - "deliveredTooLate" 6391 // - "expiredItem" 6392 // - "failToPushOrderGoogleError" 6393 // - "failToPushOrderMerchantError" 6394 // - "failToPushOrderMerchantFulfillmentError" 6395 // - "failToPushOrderToMerchant" 6396 // - "failToPushOrderToMerchantOutOfStock" 6397 // - "feeAdjustment" 6398 // - "invalidCoupon" 6399 // - "lateShipmentCredit" 6400 // - "malformedShippingAddress" 6401 // - "merchantDidNotShipOnTime" 6402 // - "noInventory" 6403 // - "orderTimeout" 6404 // - "other" 6405 // - "paymentAbuse" 6406 // - "paymentDeclined" 6407 // - "priceAdjustment" 6408 // - "priceError" 6409 // - "productArrivedDamaged" 6410 // - "productNotAsDescribed" 6411 // - "promoReallocation" 6412 // - "qualityNotAsExpected" 6413 // - "returnRefundAbuse" 6414 // - "shippingCostAdjustment" 6415 // - "shippingPriceError" 6416 // - "taxAdjustment" 6417 // - "taxError" 6418 // - "undeliverableShippingAddress" 6419 // - "unsupportedPoBoxAddress" 6420 // - "wrongProductShipped" 6421 Reason string `json:"reason,omitempty"` 6422 6423 // ForceSendFields is a list of field names (e.g. "Description") to 6424 // unconditionally include in API requests. By default, fields with 6425 // empty values are omitted from API requests. However, any non-pointer, 6426 // non-interface field appearing in ForceSendFields will be sent to the 6427 // server regardless of whether the field is empty or not. This may be 6428 // used to include empty fields in Patch requests. 6429 ForceSendFields []string `json:"-"` 6430 6431 // NullFields is a list of field names (e.g. "Description") to include 6432 // in API requests with the JSON null value. By default, fields with 6433 // empty values are omitted from API requests. However, any field with 6434 // an empty value appearing in NullFields will be sent to the server as 6435 // null. It is an error if a field in this list has a non-empty value. 6436 // This may be used to include null fields in Patch requests. 6437 NullFields []string `json:"-"` 6438} 6439 6440func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { 6441 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption 6442 raw := NoMethod(*s) 6443 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6444} 6445 6446type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { 6447 // Description: Optional description of the return reason. 6448 Description string `json:"description,omitempty"` 6449 6450 // Reason: [required] Reason for the return. 6451 // 6452 // Acceptable values are: 6453 // - "customerDiscretionaryReturn" 6454 // - "customerInitiatedMerchantCancel" 6455 // - "deliveredTooLate" 6456 // - "expiredItem" 6457 // - "invalidCoupon" 6458 // - "malformedShippingAddress" 6459 // - "other" 6460 // - "productArrivedDamaged" 6461 // - "productNotAsDescribed" 6462 // - "qualityNotAsExpected" 6463 // - "undeliverableShippingAddress" 6464 // - "unsupportedPoBoxAddress" 6465 // - "wrongProductShipped" 6466 Reason string `json:"reason,omitempty"` 6467 6468 // ForceSendFields is a list of field names (e.g. "Description") to 6469 // unconditionally include in API requests. By default, fields with 6470 // empty values are omitted from API requests. However, any non-pointer, 6471 // non-interface field appearing in ForceSendFields will be sent to the 6472 // server regardless of whether the field is empty or not. This may be 6473 // used to include empty fields in Patch requests. 6474 ForceSendFields []string `json:"-"` 6475 6476 // NullFields is a list of field names (e.g. "Description") to include 6477 // in API requests with the JSON null value. By default, fields with 6478 // empty values are omitted from API requests. However, any field with 6479 // an empty value appearing in NullFields will be sent to the server as 6480 // null. It is an error if a field in this list has a non-empty value. 6481 // This may be used to include null fields in Patch requests. 6482 NullFields []string `json:"-"` 6483} 6484 6485func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { 6486 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption 6487 raw := NoMethod(*s) 6488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6489} 6490 6491type OrderreportsListDisbursementsResponse struct { 6492 // Disbursements: The list of disbursements. 6493 Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"` 6494 6495 // Kind: Identifies what kind of resource this is. Value: the fixed 6496 // string "content#orderreportsListDisbursementsResponse". 6497 Kind string `json:"kind,omitempty"` 6498 6499 // NextPageToken: The token for the retrieval of the next page of 6500 // disbursements. 6501 NextPageToken string `json:"nextPageToken,omitempty"` 6502 6503 // ServerResponse contains the HTTP response code and headers from the 6504 // server. 6505 googleapi.ServerResponse `json:"-"` 6506 6507 // ForceSendFields is a list of field names (e.g. "Disbursements") to 6508 // unconditionally include in API requests. By default, fields with 6509 // empty values are omitted from API requests. However, any non-pointer, 6510 // non-interface field appearing in ForceSendFields will be sent to the 6511 // server regardless of whether the field is empty or not. This may be 6512 // used to include empty fields in Patch requests. 6513 ForceSendFields []string `json:"-"` 6514 6515 // NullFields is a list of field names (e.g. "Disbursements") to include 6516 // in API requests with the JSON null value. By default, fields with 6517 // empty values are omitted from API requests. However, any field with 6518 // an empty value appearing in NullFields will be sent to the server as 6519 // null. It is an error if a field in this list has a non-empty value. 6520 // This may be used to include null fields in Patch requests. 6521 NullFields []string `json:"-"` 6522} 6523 6524func (s *OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) { 6525 type NoMethod OrderreportsListDisbursementsResponse 6526 raw := NoMethod(*s) 6527 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6528} 6529 6530type OrderreportsListTransactionsResponse struct { 6531 // Kind: Identifies what kind of resource this is. Value: the fixed 6532 // string "content#orderreportsListTransactionsResponse". 6533 Kind string `json:"kind,omitempty"` 6534 6535 // NextPageToken: The token for the retrieval of the next page of 6536 // transactions. 6537 NextPageToken string `json:"nextPageToken,omitempty"` 6538 6539 // Transactions: The list of transactions. 6540 Transactions []*OrderReportTransaction `json:"transactions,omitempty"` 6541 6542 // ServerResponse contains the HTTP response code and headers from the 6543 // server. 6544 googleapi.ServerResponse `json:"-"` 6545 6546 // ForceSendFields is a list of field names (e.g. "Kind") to 6547 // unconditionally include in API requests. By default, fields with 6548 // empty values are omitted from API requests. However, any non-pointer, 6549 // non-interface field appearing in ForceSendFields will be sent to the 6550 // server regardless of whether the field is empty or not. This may be 6551 // used to include empty fields in Patch requests. 6552 ForceSendFields []string `json:"-"` 6553 6554 // NullFields is a list of field names (e.g. "Kind") to include in API 6555 // requests with the JSON null value. By default, fields with empty 6556 // values are omitted from API requests. However, any field with an 6557 // empty value appearing in NullFields will be sent to the server as 6558 // null. It is an error if a field in this list has a non-empty value. 6559 // This may be used to include null fields in Patch requests. 6560 NullFields []string `json:"-"` 6561} 6562 6563func (s *OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) { 6564 type NoMethod OrderreportsListTransactionsResponse 6565 raw := NoMethod(*s) 6566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6567} 6568 6569type OrderreturnsListResponse struct { 6570 // Kind: Identifies what kind of resource this is. Value: the fixed 6571 // string "content#orderreturnsListResponse". 6572 Kind string `json:"kind,omitempty"` 6573 6574 // NextPageToken: The token for the retrieval of the next page of 6575 // returns. 6576 NextPageToken string `json:"nextPageToken,omitempty"` 6577 6578 Resources []*MerchantOrderReturn `json:"resources,omitempty"` 6579 6580 // ServerResponse contains the HTTP response code and headers from the 6581 // server. 6582 googleapi.ServerResponse `json:"-"` 6583 6584 // ForceSendFields is a list of field names (e.g. "Kind") to 6585 // unconditionally include in API requests. By default, fields with 6586 // empty values are omitted from API requests. However, any non-pointer, 6587 // non-interface field appearing in ForceSendFields will be sent to the 6588 // server regardless of whether the field is empty or not. This may be 6589 // used to include empty fields in Patch requests. 6590 ForceSendFields []string `json:"-"` 6591 6592 // NullFields is a list of field names (e.g. "Kind") to include in API 6593 // requests with the JSON null value. By default, fields with empty 6594 // values are omitted from API requests. However, any field with an 6595 // empty value appearing in NullFields will be sent to the server as 6596 // null. It is an error if a field in this list has a non-empty value. 6597 // This may be used to include null fields in Patch requests. 6598 NullFields []string `json:"-"` 6599} 6600 6601func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) { 6602 type NoMethod OrderreturnsListResponse 6603 raw := NoMethod(*s) 6604 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6605} 6606 6607type OrdersAcknowledgeRequest struct { 6608 // OperationId: The ID of the operation. Unique across all operations 6609 // for a given order. 6610 OperationId string `json:"operationId,omitempty"` 6611 6612 // ForceSendFields is a list of field names (e.g. "OperationId") to 6613 // unconditionally include in API requests. By default, fields with 6614 // empty values are omitted from API requests. However, any non-pointer, 6615 // non-interface field appearing in ForceSendFields will be sent to the 6616 // server regardless of whether the field is empty or not. This may be 6617 // used to include empty fields in Patch requests. 6618 ForceSendFields []string `json:"-"` 6619 6620 // NullFields is a list of field names (e.g. "OperationId") to include 6621 // in API requests with the JSON null value. By default, fields with 6622 // empty values are omitted from API requests. However, any field with 6623 // an empty value appearing in NullFields will be sent to the server as 6624 // null. It is an error if a field in this list has a non-empty value. 6625 // This may be used to include null fields in Patch requests. 6626 NullFields []string `json:"-"` 6627} 6628 6629func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { 6630 type NoMethod OrdersAcknowledgeRequest 6631 raw := NoMethod(*s) 6632 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6633} 6634 6635type OrdersAcknowledgeResponse struct { 6636 // ExecutionStatus: The status of the execution. 6637 // 6638 // Acceptable values are: 6639 // - "duplicate" 6640 // - "executed" 6641 ExecutionStatus string `json:"executionStatus,omitempty"` 6642 6643 // Kind: Identifies what kind of resource this is. Value: the fixed 6644 // string "content#ordersAcknowledgeResponse". 6645 Kind string `json:"kind,omitempty"` 6646 6647 // ServerResponse contains the HTTP response code and headers from the 6648 // server. 6649 googleapi.ServerResponse `json:"-"` 6650 6651 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6652 // unconditionally include in API requests. By default, fields with 6653 // empty values are omitted from API requests. However, any non-pointer, 6654 // non-interface field appearing in ForceSendFields will be sent to the 6655 // server regardless of whether the field is empty or not. This may be 6656 // used to include empty fields in Patch requests. 6657 ForceSendFields []string `json:"-"` 6658 6659 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6660 // include in API requests with the JSON null value. By default, fields 6661 // with empty values are omitted from API requests. However, any field 6662 // with an empty value appearing in NullFields will be sent to the 6663 // server as null. It is an error if a field in this list has a 6664 // non-empty value. This may be used to include null fields in Patch 6665 // requests. 6666 NullFields []string `json:"-"` 6667} 6668 6669func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { 6670 type NoMethod OrdersAcknowledgeResponse 6671 raw := NoMethod(*s) 6672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6673} 6674 6675type OrdersAdvanceTestOrderResponse struct { 6676 // Kind: Identifies what kind of resource this is. Value: the fixed 6677 // string "content#ordersAdvanceTestOrderResponse". 6678 Kind string `json:"kind,omitempty"` 6679 6680 // ServerResponse contains the HTTP response code and headers from the 6681 // server. 6682 googleapi.ServerResponse `json:"-"` 6683 6684 // ForceSendFields is a list of field names (e.g. "Kind") to 6685 // unconditionally include in API requests. By default, fields with 6686 // empty values are omitted from API requests. However, any non-pointer, 6687 // non-interface field appearing in ForceSendFields will be sent to the 6688 // server regardless of whether the field is empty or not. This may be 6689 // used to include empty fields in Patch requests. 6690 ForceSendFields []string `json:"-"` 6691 6692 // NullFields is a list of field names (e.g. "Kind") to include in API 6693 // requests with the JSON null value. By default, fields with empty 6694 // values are omitted from API requests. However, any field with an 6695 // empty value appearing in NullFields will be sent to the server as 6696 // null. It is an error if a field in this list has a non-empty value. 6697 // This may be used to include null fields in Patch requests. 6698 NullFields []string `json:"-"` 6699} 6700 6701func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { 6702 type NoMethod OrdersAdvanceTestOrderResponse 6703 raw := NoMethod(*s) 6704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6705} 6706 6707type OrdersCancelLineItemRequest struct { 6708 // Amount: Deprecated. Please use amountPretax and amountTax instead. 6709 Amount *Price `json:"amount,omitempty"` 6710 6711 // AmountPretax: Amount to refund for the cancelation. Optional. If not 6712 // set, Google will calculate the default based on the price and tax of 6713 // the items involved. The amount must not be larger than the net amount 6714 // left on the order. 6715 AmountPretax *Price `json:"amountPretax,omitempty"` 6716 6717 // AmountTax: Tax amount that corresponds to cancellation amount in 6718 // amountPretax. Optional, but if filled, then amountPretax must be set. 6719 // Calculated automatically if not provided. 6720 AmountTax *Price `json:"amountTax,omitempty"` 6721 6722 // LineItemId: The ID of the line item to cancel. Either lineItemId or 6723 // productId is required. 6724 LineItemId string `json:"lineItemId,omitempty"` 6725 6726 // OperationId: The ID of the operation. Unique across all operations 6727 // for a given order. 6728 OperationId string `json:"operationId,omitempty"` 6729 6730 // ProductId: The ID of the product to cancel. This is the REST ID used 6731 // in the products service. Either lineItemId or productId is required. 6732 ProductId string `json:"productId,omitempty"` 6733 6734 // Quantity: The quantity to cancel. 6735 Quantity int64 `json:"quantity,omitempty"` 6736 6737 // Reason: The reason for the cancellation. 6738 // 6739 // Acceptable values are: 6740 // - "customerInitiatedCancel" 6741 // - "invalidCoupon" 6742 // - "malformedShippingAddress" 6743 // - "noInventory" 6744 // - "other" 6745 // - "priceError" 6746 // - "shippingPriceError" 6747 // - "taxError" 6748 // - "undeliverableShippingAddress" 6749 // - "unsupportedPoBoxAddress" 6750 Reason string `json:"reason,omitempty"` 6751 6752 // ReasonText: The explanation of the reason. 6753 ReasonText string `json:"reasonText,omitempty"` 6754 6755 // ForceSendFields is a list of field names (e.g. "Amount") to 6756 // unconditionally include in API requests. By default, fields with 6757 // empty values are omitted from API requests. However, any non-pointer, 6758 // non-interface field appearing in ForceSendFields will be sent to the 6759 // server regardless of whether the field is empty or not. This may be 6760 // used to include empty fields in Patch requests. 6761 ForceSendFields []string `json:"-"` 6762 6763 // NullFields is a list of field names (e.g. "Amount") to include in API 6764 // requests with the JSON null value. By default, fields with empty 6765 // values are omitted from API requests. However, any field with an 6766 // empty value appearing in NullFields will be sent to the server as 6767 // null. It is an error if a field in this list has a non-empty value. 6768 // This may be used to include null fields in Patch requests. 6769 NullFields []string `json:"-"` 6770} 6771 6772func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { 6773 type NoMethod OrdersCancelLineItemRequest 6774 raw := NoMethod(*s) 6775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6776} 6777 6778type OrdersCancelLineItemResponse struct { 6779 // ExecutionStatus: The status of the execution. 6780 // 6781 // Acceptable values are: 6782 // - "duplicate" 6783 // - "executed" 6784 ExecutionStatus string `json:"executionStatus,omitempty"` 6785 6786 // Kind: Identifies what kind of resource this is. Value: the fixed 6787 // string "content#ordersCancelLineItemResponse". 6788 Kind string `json:"kind,omitempty"` 6789 6790 // ServerResponse contains the HTTP response code and headers from the 6791 // server. 6792 googleapi.ServerResponse `json:"-"` 6793 6794 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6795 // unconditionally include in API requests. By default, fields with 6796 // empty values are omitted from API requests. However, any non-pointer, 6797 // non-interface field appearing in ForceSendFields will be sent to the 6798 // server regardless of whether the field is empty or not. This may be 6799 // used to include empty fields in Patch requests. 6800 ForceSendFields []string `json:"-"` 6801 6802 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6803 // include in API requests with the JSON null value. By default, fields 6804 // with empty values are omitted from API requests. However, any field 6805 // with an empty value appearing in NullFields will be sent to the 6806 // server as null. It is an error if a field in this list has a 6807 // non-empty value. This may be used to include null fields in Patch 6808 // requests. 6809 NullFields []string `json:"-"` 6810} 6811 6812func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { 6813 type NoMethod OrdersCancelLineItemResponse 6814 raw := NoMethod(*s) 6815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6816} 6817 6818type OrdersCancelRequest struct { 6819 // OperationId: The ID of the operation. Unique across all operations 6820 // for a given order. 6821 OperationId string `json:"operationId,omitempty"` 6822 6823 // Reason: The reason for the cancellation. 6824 // 6825 // Acceptable values are: 6826 // - "customerInitiatedCancel" 6827 // - "invalidCoupon" 6828 // - "malformedShippingAddress" 6829 // - "noInventory" 6830 // - "other" 6831 // - "priceError" 6832 // - "shippingPriceError" 6833 // - "taxError" 6834 // - "undeliverableShippingAddress" 6835 // - "unsupportedPoBoxAddress" 6836 Reason string `json:"reason,omitempty"` 6837 6838 // ReasonText: The explanation of the reason. 6839 ReasonText string `json:"reasonText,omitempty"` 6840 6841 // ForceSendFields is a list of field names (e.g. "OperationId") to 6842 // unconditionally include in API requests. By default, fields with 6843 // empty values are omitted from API requests. However, any non-pointer, 6844 // non-interface field appearing in ForceSendFields will be sent to the 6845 // server regardless of whether the field is empty or not. This may be 6846 // used to include empty fields in Patch requests. 6847 ForceSendFields []string `json:"-"` 6848 6849 // NullFields is a list of field names (e.g. "OperationId") to include 6850 // in API requests with the JSON null value. By default, fields with 6851 // empty values are omitted from API requests. However, any field with 6852 // an empty value appearing in NullFields will be sent to the server as 6853 // null. It is an error if a field in this list has a non-empty value. 6854 // This may be used to include null fields in Patch requests. 6855 NullFields []string `json:"-"` 6856} 6857 6858func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) { 6859 type NoMethod OrdersCancelRequest 6860 raw := NoMethod(*s) 6861 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6862} 6863 6864type OrdersCancelResponse struct { 6865 // ExecutionStatus: The status of the execution. 6866 // 6867 // Acceptable values are: 6868 // - "duplicate" 6869 // - "executed" 6870 ExecutionStatus string `json:"executionStatus,omitempty"` 6871 6872 // Kind: Identifies what kind of resource this is. Value: the fixed 6873 // string "content#ordersCancelResponse". 6874 Kind string `json:"kind,omitempty"` 6875 6876 // ServerResponse contains the HTTP response code and headers from the 6877 // server. 6878 googleapi.ServerResponse `json:"-"` 6879 6880 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6881 // unconditionally include in API requests. By default, fields with 6882 // empty values are omitted from API requests. However, any non-pointer, 6883 // non-interface field appearing in ForceSendFields will be sent to the 6884 // server regardless of whether the field is empty or not. This may be 6885 // used to include empty fields in Patch requests. 6886 ForceSendFields []string `json:"-"` 6887 6888 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6889 // include in API requests with the JSON null value. By default, fields 6890 // with empty values are omitted from API requests. However, any field 6891 // with an empty value appearing in NullFields will be sent to the 6892 // server as null. It is an error if a field in this list has a 6893 // non-empty value. This may be used to include null fields in Patch 6894 // requests. 6895 NullFields []string `json:"-"` 6896} 6897 6898func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) { 6899 type NoMethod OrdersCancelResponse 6900 raw := NoMethod(*s) 6901 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6902} 6903 6904type OrdersCancelTestOrderByCustomerRequest struct { 6905 // Reason: The reason for the cancellation. 6906 // 6907 // Acceptable values are: 6908 // - "changedMind" 6909 // - "orderedWrongItem" 6910 // - "other" 6911 Reason string `json:"reason,omitempty"` 6912 6913 // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") 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 *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { 6931 type NoMethod OrdersCancelTestOrderByCustomerRequest 6932 raw := NoMethod(*s) 6933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6934} 6935 6936type OrdersCancelTestOrderByCustomerResponse struct { 6937 // Kind: Identifies what kind of resource this is. Value: the fixed 6938 // string "content#ordersCancelTestOrderByCustomerResponse". 6939 Kind string `json:"kind,omitempty"` 6940 6941 // ServerResponse contains the HTTP response code and headers from the 6942 // server. 6943 googleapi.ServerResponse `json:"-"` 6944 6945 // ForceSendFields is a list of field names (e.g. "Kind") to 6946 // unconditionally include in API requests. By default, fields with 6947 // empty values are omitted from API requests. However, any non-pointer, 6948 // non-interface field appearing in ForceSendFields will be sent to the 6949 // server regardless of whether the field is empty or not. This may be 6950 // used to include empty fields in Patch requests. 6951 ForceSendFields []string `json:"-"` 6952 6953 // NullFields is a list of field names (e.g. "Kind") to include in API 6954 // requests with the JSON null value. By default, fields with empty 6955 // values are omitted from API requests. However, any field with an 6956 // empty value appearing in NullFields will be sent to the server as 6957 // null. It is an error if a field in this list has a non-empty value. 6958 // This may be used to include null fields in Patch requests. 6959 NullFields []string `json:"-"` 6960} 6961 6962func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { 6963 type NoMethod OrdersCancelTestOrderByCustomerResponse 6964 raw := NoMethod(*s) 6965 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6966} 6967 6968type OrdersCreateTestOrderRequest struct { 6969 // Country: The CLDR territory code of the country of the test order to 6970 // create. Affects the currency and addresses of orders created via 6971 // `template_name`, or the addresses of orders created via 6972 // `test_order`. 6973 // 6974 // Acceptable values are: 6975 // - "US" 6976 // - "FR" Defaults to `US`. 6977 Country string `json:"country,omitempty"` 6978 6979 // TemplateName: The test order template to use. Specify as an 6980 // alternative to `testOrder` as a shortcut for retrieving a template 6981 // and then creating an order using that template. 6982 // 6983 // Acceptable values are: 6984 // - "template1" 6985 // - "template1a" 6986 // - "template1b" 6987 // - "template2" 6988 // - "template3" 6989 TemplateName string `json:"templateName,omitempty"` 6990 6991 // TestOrder: The test order to create. 6992 TestOrder *TestOrder `json:"testOrder,omitempty"` 6993 6994 // ForceSendFields is a list of field names (e.g. "Country") to 6995 // unconditionally include in API requests. By default, fields with 6996 // empty values are omitted from API requests. However, any non-pointer, 6997 // non-interface field appearing in ForceSendFields will be sent to the 6998 // server regardless of whether the field is empty or not. This may be 6999 // used to include empty fields in Patch requests. 7000 ForceSendFields []string `json:"-"` 7001 7002 // NullFields is a list of field names (e.g. "Country") to include in 7003 // API requests with the JSON null value. By default, fields with empty 7004 // values are omitted from API requests. However, any field with an 7005 // empty value appearing in NullFields will be sent to the server as 7006 // null. It is an error if a field in this list has a non-empty value. 7007 // This may be used to include null fields in Patch requests. 7008 NullFields []string `json:"-"` 7009} 7010 7011func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { 7012 type NoMethod OrdersCreateTestOrderRequest 7013 raw := NoMethod(*s) 7014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7015} 7016 7017type OrdersCreateTestOrderResponse struct { 7018 // Kind: Identifies what kind of resource this is. Value: the fixed 7019 // string "content#ordersCreateTestOrderResponse". 7020 Kind string `json:"kind,omitempty"` 7021 7022 // OrderId: The ID of the newly created test order. 7023 OrderId string `json:"orderId,omitempty"` 7024 7025 // ServerResponse contains the HTTP response code and headers from the 7026 // server. 7027 googleapi.ServerResponse `json:"-"` 7028 7029 // ForceSendFields is a list of field names (e.g. "Kind") to 7030 // unconditionally include in API requests. By default, fields with 7031 // empty values are omitted from API requests. However, any non-pointer, 7032 // non-interface field appearing in ForceSendFields will be sent to the 7033 // server regardless of whether the field is empty or not. This may be 7034 // used to include empty fields in Patch requests. 7035 ForceSendFields []string `json:"-"` 7036 7037 // NullFields is a list of field names (e.g. "Kind") to include in API 7038 // requests with the JSON null value. By default, fields with empty 7039 // values are omitted from API requests. However, any field with an 7040 // empty value appearing in NullFields will be sent to the server as 7041 // null. It is an error if a field in this list has a non-empty value. 7042 // This may be used to include null fields in Patch requests. 7043 NullFields []string `json:"-"` 7044} 7045 7046func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { 7047 type NoMethod OrdersCreateTestOrderResponse 7048 raw := NoMethod(*s) 7049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7050} 7051 7052type OrdersCreateTestReturnRequest struct { 7053 // Items: Returned items. 7054 Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` 7055 7056 // ForceSendFields is a list of field names (e.g. "Items") to 7057 // unconditionally include in API requests. By default, fields with 7058 // empty values are omitted from API requests. However, any non-pointer, 7059 // non-interface field appearing in ForceSendFields will be sent to the 7060 // server regardless of whether the field is empty or not. This may be 7061 // used to include empty fields in Patch requests. 7062 ForceSendFields []string `json:"-"` 7063 7064 // NullFields is a list of field names (e.g. "Items") to include in API 7065 // requests with the JSON null value. By default, fields with empty 7066 // values are omitted from API requests. However, any field with an 7067 // empty value appearing in NullFields will be sent to the server as 7068 // null. It is an error if a field in this list has a non-empty value. 7069 // This may be used to include null fields in Patch requests. 7070 NullFields []string `json:"-"` 7071} 7072 7073func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { 7074 type NoMethod OrdersCreateTestReturnRequest 7075 raw := NoMethod(*s) 7076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7077} 7078 7079type OrdersCreateTestReturnResponse struct { 7080 // Kind: Identifies what kind of resource this is. Value: the fixed 7081 // string "content#ordersCreateTestReturnResponse". 7082 Kind string `json:"kind,omitempty"` 7083 7084 // ReturnId: The ID of the newly created test order return. 7085 ReturnId string `json:"returnId,omitempty"` 7086 7087 // ServerResponse contains the HTTP response code and headers from the 7088 // server. 7089 googleapi.ServerResponse `json:"-"` 7090 7091 // ForceSendFields is a list of field names (e.g. "Kind") to 7092 // unconditionally include in API requests. By default, fields with 7093 // empty values are omitted from API requests. However, any non-pointer, 7094 // non-interface field appearing in ForceSendFields will be sent to the 7095 // server regardless of whether the field is empty or not. This may be 7096 // used to include empty fields in Patch requests. 7097 ForceSendFields []string `json:"-"` 7098 7099 // NullFields is a list of field names (e.g. "Kind") to include in API 7100 // requests with the JSON null value. By default, fields with empty 7101 // values are omitted from API requests. However, any field with an 7102 // empty value appearing in NullFields will be sent to the server as 7103 // null. It is an error if a field in this list has a non-empty value. 7104 // This may be used to include null fields in Patch requests. 7105 NullFields []string `json:"-"` 7106} 7107 7108func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { 7109 type NoMethod OrdersCreateTestReturnResponse 7110 raw := NoMethod(*s) 7111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7112} 7113 7114type OrdersCustomBatchRequest struct { 7115 // Entries: The request entries to be processed in the batch. 7116 Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"` 7117 7118 // ForceSendFields is a list of field names (e.g. "Entries") to 7119 // unconditionally include in API requests. By default, fields with 7120 // empty values are omitted from API requests. However, any non-pointer, 7121 // non-interface field appearing in ForceSendFields will be sent to the 7122 // server regardless of whether the field is empty or not. This may be 7123 // used to include empty fields in Patch requests. 7124 ForceSendFields []string `json:"-"` 7125 7126 // NullFields is a list of field names (e.g. "Entries") to include in 7127 // API requests with the JSON null value. By default, fields with empty 7128 // values are omitted from API requests. However, any field with an 7129 // empty value appearing in NullFields will be sent to the server as 7130 // null. It is an error if a field in this list has a non-empty value. 7131 // This may be used to include null fields in Patch requests. 7132 NullFields []string `json:"-"` 7133} 7134 7135func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) { 7136 type NoMethod OrdersCustomBatchRequest 7137 raw := NoMethod(*s) 7138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7139} 7140 7141type OrdersCustomBatchRequestEntry struct { 7142 // BatchId: An entry ID, unique within the batch request. 7143 BatchId int64 `json:"batchId,omitempty"` 7144 7145 // Cancel: Required for `cancel` method. 7146 Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"` 7147 7148 // CancelLineItem: Required for `cancelLineItem` method. 7149 CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"` 7150 7151 // InStoreRefundLineItem: Required for `inStoreReturnLineItem` method. 7152 InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"` 7153 7154 // MerchantId: The ID of the managing account. 7155 MerchantId uint64 `json:"merchantId,omitempty,string"` 7156 7157 // MerchantOrderId: The merchant order ID. Required for 7158 // `updateMerchantOrderId` and `getByMerchantOrderId` methods. 7159 MerchantOrderId string `json:"merchantOrderId,omitempty"` 7160 7161 // Method: The method of the batch entry. 7162 // 7163 // Acceptable values are: 7164 // - "acknowledge" 7165 // - "cancel" 7166 // - "cancelLineItem" 7167 // - "get" 7168 // - "getByMerchantOrderId" 7169 // - "inStoreRefundLineItem" 7170 // - "refund" 7171 // - "rejectReturnLineItem" 7172 // - "returnLineItem" 7173 // - "returnRefundLineItem" 7174 // - "setLineItemMetadata" 7175 // - "shipLineItems" 7176 // - "updateLineItemShippingDetails" 7177 // - "updateMerchantOrderId" 7178 // - "updateShipment" 7179 Method string `json:"method,omitempty"` 7180 7181 // OperationId: The ID of the operation. Unique across all operations 7182 // for a given order. Required for all methods beside `get` and 7183 // `getByMerchantOrderId`. 7184 OperationId string `json:"operationId,omitempty"` 7185 7186 // OrderId: The ID of the order. Required for all methods beside 7187 // `getByMerchantOrderId`. 7188 OrderId string `json:"orderId,omitempty"` 7189 7190 // Refund: Required for `refund` method. 7191 Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"` 7192 7193 // RejectReturnLineItem: Required for `rejectReturnLineItem` method. 7194 RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"` 7195 7196 // ReturnLineItem: Required for `returnLineItem` method. 7197 ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"` 7198 7199 // ReturnRefundLineItem: Required for `returnRefundLineItem` method. 7200 ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"` 7201 7202 // SetLineItemMetadata: Required for `setLineItemMetadata` method. 7203 SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"` 7204 7205 // ShipLineItems: Required for `shipLineItems` method. 7206 ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"` 7207 7208 // UpdateLineItemShippingDetails: Required for 7209 // `updateLineItemShippingDate` method. 7210 UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"` 7211 7212 // UpdateShipment: Required for `updateShipment` method. 7213 UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"` 7214 7215 // ForceSendFields is a list of field names (e.g. "BatchId") to 7216 // unconditionally include in API requests. By default, fields with 7217 // empty values are omitted from API requests. However, any non-pointer, 7218 // non-interface field appearing in ForceSendFields will be sent to the 7219 // server regardless of whether the field is empty or not. This may be 7220 // used to include empty fields in Patch requests. 7221 ForceSendFields []string `json:"-"` 7222 7223 // NullFields is a list of field names (e.g. "BatchId") to include in 7224 // API requests with the JSON null value. By default, fields with empty 7225 // values are omitted from API requests. However, any field with an 7226 // empty value appearing in NullFields will be sent to the server as 7227 // null. It is an error if a field in this list has a non-empty value. 7228 // This may be used to include null fields in Patch requests. 7229 NullFields []string `json:"-"` 7230} 7231 7232func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 7233 type NoMethod OrdersCustomBatchRequestEntry 7234 raw := NoMethod(*s) 7235 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7236} 7237 7238type OrdersCustomBatchRequestEntryCancel struct { 7239 // Reason: The reason for the cancellation. 7240 // 7241 // Acceptable values are: 7242 // - "customerInitiatedCancel" 7243 // - "invalidCoupon" 7244 // - "malformedShippingAddress" 7245 // - "noInventory" 7246 // - "other" 7247 // - "priceError" 7248 // - "shippingPriceError" 7249 // - "taxError" 7250 // - "undeliverableShippingAddress" 7251 // - "unsupportedPoBoxAddress" 7252 Reason string `json:"reason,omitempty"` 7253 7254 // ReasonText: The explanation of the reason. 7255 ReasonText string `json:"reasonText,omitempty"` 7256 7257 // ForceSendFields is a list of field names (e.g. "Reason") to 7258 // unconditionally include in API requests. By default, fields with 7259 // empty values are omitted from API requests. However, any non-pointer, 7260 // non-interface field appearing in ForceSendFields will be sent to the 7261 // server regardless of whether the field is empty or not. This may be 7262 // used to include empty fields in Patch requests. 7263 ForceSendFields []string `json:"-"` 7264 7265 // NullFields is a list of field names (e.g. "Reason") to include in API 7266 // requests with the JSON null value. By default, fields with empty 7267 // values are omitted from API requests. However, any field with an 7268 // empty value appearing in NullFields will be sent to the server as 7269 // null. It is an error if a field in this list has a non-empty value. 7270 // This may be used to include null fields in Patch requests. 7271 NullFields []string `json:"-"` 7272} 7273 7274func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) { 7275 type NoMethod OrdersCustomBatchRequestEntryCancel 7276 raw := NoMethod(*s) 7277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7278} 7279 7280type OrdersCustomBatchRequestEntryCancelLineItem struct { 7281 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7282 Amount *Price `json:"amount,omitempty"` 7283 7284 // AmountPretax: Amount to refund for the cancelation. Optional. If not 7285 // set, Google will calculate the default based on the price and tax of 7286 // the items involved. The amount must not be larger than the net amount 7287 // left on the order. 7288 AmountPretax *Price `json:"amountPretax,omitempty"` 7289 7290 // AmountTax: Tax amount that corresponds to cancellation amount in 7291 // amountPretax. Optional, but if filled, then amountPretax must be set. 7292 // Calculated automatically if not provided. 7293 AmountTax *Price `json:"amountTax,omitempty"` 7294 7295 // LineItemId: The ID of the line item to cancel. Either lineItemId or 7296 // productId is required. 7297 LineItemId string `json:"lineItemId,omitempty"` 7298 7299 // ProductId: The ID of the product to cancel. This is the REST ID used 7300 // in the products service. Either lineItemId or productId is required. 7301 ProductId string `json:"productId,omitempty"` 7302 7303 // Quantity: The quantity to cancel. 7304 Quantity int64 `json:"quantity,omitempty"` 7305 7306 // Reason: The reason for the cancellation. 7307 // 7308 // Acceptable values are: 7309 // - "customerInitiatedCancel" 7310 // - "invalidCoupon" 7311 // - "malformedShippingAddress" 7312 // - "noInventory" 7313 // - "other" 7314 // - "priceError" 7315 // - "shippingPriceError" 7316 // - "taxError" 7317 // - "undeliverableShippingAddress" 7318 // - "unsupportedPoBoxAddress" 7319 Reason string `json:"reason,omitempty"` 7320 7321 // ReasonText: The explanation of the reason. 7322 ReasonText string `json:"reasonText,omitempty"` 7323 7324 // ForceSendFields is a list of field names (e.g. "Amount") to 7325 // unconditionally include in API requests. By default, fields with 7326 // empty values are omitted from API requests. However, any non-pointer, 7327 // non-interface field appearing in ForceSendFields will be sent to the 7328 // server regardless of whether the field is empty or not. This may be 7329 // used to include empty fields in Patch requests. 7330 ForceSendFields []string `json:"-"` 7331 7332 // NullFields is a list of field names (e.g. "Amount") to include in API 7333 // requests with the JSON null value. By default, fields with empty 7334 // values are omitted from API requests. However, any field with an 7335 // empty value appearing in NullFields will be sent to the server as 7336 // null. It is an error if a field in this list has a non-empty value. 7337 // This may be used to include null fields in Patch requests. 7338 NullFields []string `json:"-"` 7339} 7340 7341func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) { 7342 type NoMethod OrdersCustomBatchRequestEntryCancelLineItem 7343 raw := NoMethod(*s) 7344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7345} 7346 7347type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { 7348 // LineItemId: The ID of the line item to return. 7349 LineItemId string `json:"lineItemId,omitempty"` 7350 7351 // Quantity: Quantity that is returned. 7352 Quantity int64 `json:"quantity,omitempty"` 7353 7354 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7355 // unconditionally include in API requests. By default, fields with 7356 // empty values are omitted from API requests. However, any non-pointer, 7357 // non-interface field appearing in ForceSendFields will be sent to the 7358 // server regardless of whether the field is empty or not. This may be 7359 // used to include empty fields in Patch requests. 7360 ForceSendFields []string `json:"-"` 7361 7362 // NullFields is a list of field names (e.g. "LineItemId") to include in 7363 // API requests with the JSON null value. By default, fields with empty 7364 // values are omitted from API requests. However, any field with an 7365 // empty value appearing in NullFields will be sent to the server as 7366 // null. It is an error if a field in this list has a non-empty value. 7367 // This may be used to include null fields in Patch requests. 7368 NullFields []string `json:"-"` 7369} 7370 7371func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { 7372 type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem 7373 raw := NoMethod(*s) 7374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7375} 7376 7377type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct { 7378 // AmountPretax: The amount that is refunded. Required. 7379 AmountPretax *Price `json:"amountPretax,omitempty"` 7380 7381 // AmountTax: Tax amount that correspond to refund amount in 7382 // amountPretax. Required. 7383 AmountTax *Price `json:"amountTax,omitempty"` 7384 7385 // LineItemId: The ID of the line item to return. Either lineItemId or 7386 // productId is required. 7387 LineItemId string `json:"lineItemId,omitempty"` 7388 7389 // ProductId: The ID of the product to return. This is the REST ID used 7390 // in the products service. Either lineItemId or productId is required. 7391 ProductId string `json:"productId,omitempty"` 7392 7393 // Quantity: The quantity to return and refund. 7394 Quantity int64 `json:"quantity,omitempty"` 7395 7396 // Reason: The reason for the return. 7397 // 7398 // Acceptable values are: 7399 // - "customerDiscretionaryReturn" 7400 // - "customerInitiatedMerchantCancel" 7401 // - "deliveredTooLate" 7402 // - "expiredItem" 7403 // - "invalidCoupon" 7404 // - "malformedShippingAddress" 7405 // - "other" 7406 // - "productArrivedDamaged" 7407 // - "productNotAsDescribed" 7408 // - "qualityNotAsExpected" 7409 // - "undeliverableShippingAddress" 7410 // - "unsupportedPoBoxAddress" 7411 // - "wrongProductShipped" 7412 Reason string `json:"reason,omitempty"` 7413 7414 // ReasonText: The explanation of the reason. 7415 ReasonText string `json:"reasonText,omitempty"` 7416 7417 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7418 // unconditionally include in API requests. By default, fields with 7419 // empty values are omitted from API requests. However, any non-pointer, 7420 // non-interface field appearing in ForceSendFields will be sent to the 7421 // server regardless of whether the field is empty or not. This may be 7422 // used to include empty fields in Patch requests. 7423 ForceSendFields []string `json:"-"` 7424 7425 // NullFields is a list of field names (e.g. "AmountPretax") to include 7426 // in API requests with the JSON null value. By default, fields with 7427 // empty values are omitted from API requests. However, any field with 7428 // an empty value appearing in NullFields will be sent to the server as 7429 // null. It is an error if a field in this list has a non-empty value. 7430 // This may be used to include null fields in Patch requests. 7431 NullFields []string `json:"-"` 7432} 7433 7434func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) { 7435 type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem 7436 raw := NoMethod(*s) 7437 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7438} 7439 7440type OrdersCustomBatchRequestEntryRefund struct { 7441 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7442 Amount *Price `json:"amount,omitempty"` 7443 7444 // AmountPretax: The amount that is refunded. Either amount or 7445 // amountPretax should be filled. 7446 AmountPretax *Price `json:"amountPretax,omitempty"` 7447 7448 // AmountTax: Tax amount that corresponds to refund amount in 7449 // amountPretax. Optional, but if filled, amountPretax must be set. 7450 // Calculated automatically if not provided. 7451 AmountTax *Price `json:"amountTax,omitempty"` 7452 7453 // Reason: The reason for the refund. 7454 // 7455 // Acceptable values are: 7456 // - "adjustment" 7457 // - "courtesyAdjustment" 7458 // - "customerCanceled" 7459 // - "customerDiscretionaryReturn" 7460 // - "deliveredLateByCarrier" 7461 // - "feeAdjustment" 7462 // - "lateShipmentCredit" 7463 // - "noInventory" 7464 // - "other" 7465 // - "priceError" 7466 // - "productArrivedDamaged" 7467 // - "productNotAsDescribed" 7468 // - "shippingCostAdjustment" 7469 // - "taxAdjustment" 7470 // - "undeliverableShippingAddress" 7471 // - "wrongProductShipped" 7472 Reason string `json:"reason,omitempty"` 7473 7474 // ReasonText: The explanation of the reason. 7475 ReasonText string `json:"reasonText,omitempty"` 7476 7477 // ForceSendFields is a list of field names (e.g. "Amount") to 7478 // unconditionally include in API requests. By default, fields with 7479 // empty values are omitted from API requests. However, any non-pointer, 7480 // non-interface field appearing in ForceSendFields will be sent to the 7481 // server regardless of whether the field is empty or not. This may be 7482 // used to include empty fields in Patch requests. 7483 ForceSendFields []string `json:"-"` 7484 7485 // NullFields is a list of field names (e.g. "Amount") to include in API 7486 // requests with the JSON null value. By default, fields with empty 7487 // values are omitted from API requests. However, any field with an 7488 // empty value appearing in NullFields will be sent to the server as 7489 // null. It is an error if a field in this list has a non-empty value. 7490 // This may be used to include null fields in Patch requests. 7491 NullFields []string `json:"-"` 7492} 7493 7494func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) { 7495 type NoMethod OrdersCustomBatchRequestEntryRefund 7496 raw := NoMethod(*s) 7497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7498} 7499 7500type OrdersCustomBatchRequestEntryRejectReturnLineItem struct { 7501 // LineItemId: The ID of the line item to return. Either lineItemId or 7502 // productId is required. 7503 LineItemId string `json:"lineItemId,omitempty"` 7504 7505 // ProductId: The ID of the product to return. This is the REST ID used 7506 // in the products service. Either lineItemId or productId is required. 7507 ProductId string `json:"productId,omitempty"` 7508 7509 // Quantity: The quantity to return and refund. 7510 Quantity int64 `json:"quantity,omitempty"` 7511 7512 // Reason: The reason for the return. 7513 // 7514 // Acceptable values are: 7515 // - "damagedOrUsed" 7516 // - "missingComponent" 7517 // - "notEligible" 7518 // - "other" 7519 // - "outOfReturnWindow" 7520 Reason string `json:"reason,omitempty"` 7521 7522 // ReasonText: The explanation of the reason. 7523 ReasonText string `json:"reasonText,omitempty"` 7524 7525 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7526 // unconditionally include in API requests. By default, fields with 7527 // empty values are omitted from API requests. However, any non-pointer, 7528 // non-interface field appearing in ForceSendFields will be sent to the 7529 // server regardless of whether the field is empty or not. This may be 7530 // used to include empty fields in Patch requests. 7531 ForceSendFields []string `json:"-"` 7532 7533 // NullFields is a list of field names (e.g. "LineItemId") to include in 7534 // API requests with the JSON null value. By default, fields with empty 7535 // values are omitted from API requests. However, any field with an 7536 // empty value appearing in NullFields will be sent to the server as 7537 // null. It is an error if a field in this list has a non-empty value. 7538 // This may be used to include null fields in Patch requests. 7539 NullFields []string `json:"-"` 7540} 7541 7542func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) { 7543 type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem 7544 raw := NoMethod(*s) 7545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7546} 7547 7548type OrdersCustomBatchRequestEntryReturnLineItem struct { 7549 // LineItemId: The ID of the line item to return. Either lineItemId or 7550 // productId is required. 7551 LineItemId string `json:"lineItemId,omitempty"` 7552 7553 // ProductId: The ID of the product to return. This is the REST ID used 7554 // in the products service. Either lineItemId or productId is required. 7555 ProductId string `json:"productId,omitempty"` 7556 7557 // Quantity: The quantity to return. 7558 Quantity int64 `json:"quantity,omitempty"` 7559 7560 // Reason: The reason for the return. 7561 // 7562 // Acceptable values are: 7563 // - "customerDiscretionaryReturn" 7564 // - "customerInitiatedMerchantCancel" 7565 // - "deliveredTooLate" 7566 // - "expiredItem" 7567 // - "invalidCoupon" 7568 // - "malformedShippingAddress" 7569 // - "other" 7570 // - "productArrivedDamaged" 7571 // - "productNotAsDescribed" 7572 // - "qualityNotAsExpected" 7573 // - "undeliverableShippingAddress" 7574 // - "unsupportedPoBoxAddress" 7575 // - "wrongProductShipped" 7576 Reason string `json:"reason,omitempty"` 7577 7578 // ReasonText: The explanation of the reason. 7579 ReasonText string `json:"reasonText,omitempty"` 7580 7581 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7582 // unconditionally include in API requests. By default, fields with 7583 // empty values are omitted from API requests. However, any non-pointer, 7584 // non-interface field appearing in ForceSendFields will be sent to the 7585 // server regardless of whether the field is empty or not. This may be 7586 // used to include empty fields in Patch requests. 7587 ForceSendFields []string `json:"-"` 7588 7589 // NullFields is a list of field names (e.g. "LineItemId") to include in 7590 // API requests with the JSON null value. By default, fields with empty 7591 // values are omitted from API requests. However, any field with an 7592 // empty value appearing in NullFields will be sent to the server as 7593 // null. It is an error if a field in this list has a non-empty value. 7594 // This may be used to include null fields in Patch requests. 7595 NullFields []string `json:"-"` 7596} 7597 7598func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) { 7599 type NoMethod OrdersCustomBatchRequestEntryReturnLineItem 7600 raw := NoMethod(*s) 7601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7602} 7603 7604type OrdersCustomBatchRequestEntryReturnRefundLineItem struct { 7605 // AmountPretax: The amount that is refunded. If omitted, refundless 7606 // return is assumed (same as calling returnLineItem method). 7607 AmountPretax *Price `json:"amountPretax,omitempty"` 7608 7609 // AmountTax: Tax amount that corresponds to refund amount in 7610 // amountPretax. Optional, but if filled, then amountPretax must be set. 7611 // Calculated automatically if not provided. 7612 AmountTax *Price `json:"amountTax,omitempty"` 7613 7614 // LineItemId: The ID of the line item to return. Either lineItemId or 7615 // productId is required. 7616 LineItemId string `json:"lineItemId,omitempty"` 7617 7618 // ProductId: The ID of the product to return. This is the REST ID used 7619 // in the products service. Either lineItemId or productId is required. 7620 ProductId string `json:"productId,omitempty"` 7621 7622 // Quantity: The quantity to return and refund. 7623 Quantity int64 `json:"quantity,omitempty"` 7624 7625 // Reason: The reason for the return. 7626 // 7627 // Acceptable values are: 7628 // - "customerDiscretionaryReturn" 7629 // - "customerInitiatedMerchantCancel" 7630 // - "deliveredTooLate" 7631 // - "expiredItem" 7632 // - "invalidCoupon" 7633 // - "malformedShippingAddress" 7634 // - "other" 7635 // - "productArrivedDamaged" 7636 // - "productNotAsDescribed" 7637 // - "qualityNotAsExpected" 7638 // - "undeliverableShippingAddress" 7639 // - "unsupportedPoBoxAddress" 7640 // - "wrongProductShipped" 7641 Reason string `json:"reason,omitempty"` 7642 7643 // ReasonText: The explanation of the reason. 7644 ReasonText string `json:"reasonText,omitempty"` 7645 7646 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7647 // unconditionally include in API requests. By default, fields with 7648 // empty values are omitted from API requests. However, any non-pointer, 7649 // non-interface field appearing in ForceSendFields will be sent to the 7650 // server regardless of whether the field is empty or not. This may be 7651 // used to include empty fields in Patch requests. 7652 ForceSendFields []string `json:"-"` 7653 7654 // NullFields is a list of field names (e.g. "AmountPretax") to include 7655 // in API requests with the JSON null value. By default, fields with 7656 // empty values are omitted from API requests. However, any field with 7657 // an empty value appearing in NullFields will be sent to the server as 7658 // null. It is an error if a field in this list has a non-empty value. 7659 // This may be used to include null fields in Patch requests. 7660 NullFields []string `json:"-"` 7661} 7662 7663func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) { 7664 type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem 7665 raw := NoMethod(*s) 7666 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7667} 7668 7669type OrdersCustomBatchRequestEntrySetLineItemMetadata struct { 7670 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 7671 7672 // LineItemId: The ID of the line item to set metadata. Either 7673 // lineItemId or productId is required. 7674 LineItemId string `json:"lineItemId,omitempty"` 7675 7676 // ProductId: The ID of the product to set metadata. This is the REST ID 7677 // used in the products service. Either lineItemId or productId is 7678 // required. 7679 ProductId string `json:"productId,omitempty"` 7680 7681 // ForceSendFields is a list of field names (e.g. "Annotations") 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. "Annotations") 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 *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) { 7699 type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata 7700 raw := NoMethod(*s) 7701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7702} 7703 7704type OrdersCustomBatchRequestEntryShipLineItems struct { 7705 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 7706 // handling the shipment. See `shipments[].carrier` in the Orders 7707 // resource representation for a list of acceptable values. 7708 Carrier string `json:"carrier,omitempty"` 7709 7710 // LineItems: Line items to ship. 7711 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 7712 7713 // ShipmentGroupId: ID of the shipment group. Required for orders that 7714 // use the orderinvoices service. 7715 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 7716 7717 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 7718 // the shipment. 7719 ShipmentId string `json:"shipmentId,omitempty"` 7720 7721 // ShipmentInfos: Shipment information. This field is repeated because a 7722 // single line item can be shipped in several packages (and have several 7723 // tracking IDs). 7724 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 7725 7726 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 7727 // ID for the shipment. 7728 TrackingId string `json:"trackingId,omitempty"` 7729 7730 // ForceSendFields is a list of field names (e.g. "Carrier") to 7731 // unconditionally include in API requests. By default, fields with 7732 // empty values are omitted from API requests. However, any non-pointer, 7733 // non-interface field appearing in ForceSendFields will be sent to the 7734 // server regardless of whether the field is empty or not. This may be 7735 // used to include empty fields in Patch requests. 7736 ForceSendFields []string `json:"-"` 7737 7738 // NullFields is a list of field names (e.g. "Carrier") to include in 7739 // API requests with the JSON null value. By default, fields with empty 7740 // values are omitted from API requests. However, any field with an 7741 // empty value appearing in NullFields will be sent to the server as 7742 // null. It is an error if a field in this list has a non-empty value. 7743 // This may be used to include null fields in Patch requests. 7744 NullFields []string `json:"-"` 7745} 7746 7747func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) { 7748 type NoMethod OrdersCustomBatchRequestEntryShipLineItems 7749 raw := NoMethod(*s) 7750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7751} 7752 7753type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { 7754 // Carrier: The carrier handling the shipment. See `shipments[].carrier` 7755 // in the Orders resource representation for a list of acceptable 7756 // values. 7757 Carrier string `json:"carrier,omitempty"` 7758 7759 // ShipmentId: Required. The ID of the shipment. This is assigned by the 7760 // merchant and is unique to each shipment. 7761 ShipmentId string `json:"shipmentId,omitempty"` 7762 7763 // TrackingId: The tracking ID for the shipment. 7764 TrackingId string `json:"trackingId,omitempty"` 7765 7766 // ForceSendFields is a list of field names (e.g. "Carrier") to 7767 // unconditionally include in API requests. By default, fields with 7768 // empty values are omitted from API requests. However, any non-pointer, 7769 // non-interface field appearing in ForceSendFields will be sent to the 7770 // server regardless of whether the field is empty or not. This may be 7771 // used to include empty fields in Patch requests. 7772 ForceSendFields []string `json:"-"` 7773 7774 // NullFields is a list of field names (e.g. "Carrier") to include in 7775 // API requests with the JSON null value. By default, fields with empty 7776 // values are omitted from API requests. However, any field with an 7777 // empty value appearing in NullFields will be sent to the server as 7778 // null. It is an error if a field in this list has a non-empty value. 7779 // This may be used to include null fields in Patch requests. 7780 NullFields []string `json:"-"` 7781} 7782 7783func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { 7784 type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo 7785 raw := NoMethod(*s) 7786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7787} 7788 7789type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct { 7790 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 7791 // specified only ship by date is updated. 7792 // 7793 // Provided date should be within 1 year timeframe and can not be a date 7794 // in the past. 7795 DeliverByDate string `json:"deliverByDate,omitempty"` 7796 7797 // LineItemId: The ID of the line item to set metadata. Either 7798 // lineItemId or productId is required. 7799 LineItemId string `json:"lineItemId,omitempty"` 7800 7801 // ProductId: The ID of the product to set metadata. This is the REST ID 7802 // used in the products service. Either lineItemId or productId is 7803 // required. 7804 ProductId string `json:"productId,omitempty"` 7805 7806 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 7807 // specified only deliver by date is updated. 7808 // 7809 // Provided date should be within 1 year timeframe and can not be a date 7810 // in the past. 7811 ShipByDate string `json:"shipByDate,omitempty"` 7812 7813 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 7814 // unconditionally include in API requests. By default, fields with 7815 // empty values are omitted from API requests. However, any non-pointer, 7816 // non-interface field appearing in ForceSendFields will be sent to the 7817 // server regardless of whether the field is empty or not. This may be 7818 // used to include empty fields in Patch requests. 7819 ForceSendFields []string `json:"-"` 7820 7821 // NullFields is a list of field names (e.g. "DeliverByDate") to include 7822 // in API requests with the JSON null value. By default, fields with 7823 // empty values are omitted from API requests. However, any field with 7824 // an empty value appearing in NullFields will be sent to the server as 7825 // null. It is an error if a field in this list has a non-empty value. 7826 // This may be used to include null fields in Patch requests. 7827 NullFields []string `json:"-"` 7828} 7829 7830func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) { 7831 type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails 7832 raw := NoMethod(*s) 7833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7834} 7835 7836type OrdersCustomBatchRequestEntryUpdateShipment struct { 7837 // Carrier: The carrier handling the shipment. Not updated if missing. 7838 // See `shipments[].carrier` in the Orders resource representation for 7839 // a list of acceptable values. 7840 Carrier string `json:"carrier,omitempty"` 7841 7842 // DeliveryDate: Date on which the shipment has been delivered, in ISO 7843 // 8601 format. Optional and can be provided only if `status` is 7844 // `delivered`. 7845 DeliveryDate string `json:"deliveryDate,omitempty"` 7846 7847 // ShipmentId: The ID of the shipment. 7848 ShipmentId string `json:"shipmentId,omitempty"` 7849 7850 // Status: New status for the shipment. Not updated if 7851 // missing. 7852 // 7853 // Acceptable values are: 7854 // - "delivered" 7855 // - "undeliverable" 7856 Status string `json:"status,omitempty"` 7857 7858 // TrackingId: The tracking ID for the shipment. Not updated if missing. 7859 TrackingId string `json:"trackingId,omitempty"` 7860 7861 // ForceSendFields is a list of field names (e.g. "Carrier") to 7862 // unconditionally include in API requests. By default, fields with 7863 // empty values are omitted from API requests. However, any non-pointer, 7864 // non-interface field appearing in ForceSendFields will be sent to the 7865 // server regardless of whether the field is empty or not. This may be 7866 // used to include empty fields in Patch requests. 7867 ForceSendFields []string `json:"-"` 7868 7869 // NullFields is a list of field names (e.g. "Carrier") to include in 7870 // API requests with the JSON null value. By default, fields with empty 7871 // values are omitted from API requests. However, any field with an 7872 // empty value appearing in NullFields will be sent to the server as 7873 // null. It is an error if a field in this list has a non-empty value. 7874 // This may be used to include null fields in Patch requests. 7875 NullFields []string `json:"-"` 7876} 7877 7878func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) { 7879 type NoMethod OrdersCustomBatchRequestEntryUpdateShipment 7880 raw := NoMethod(*s) 7881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7882} 7883 7884type OrdersCustomBatchResponse struct { 7885 // Entries: The result of the execution of the batch requests. 7886 Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"` 7887 7888 // Kind: Identifies what kind of resource this is. Value: the fixed 7889 // string "content#ordersCustomBatchResponse". 7890 Kind string `json:"kind,omitempty"` 7891 7892 // ServerResponse contains the HTTP response code and headers from the 7893 // server. 7894 googleapi.ServerResponse `json:"-"` 7895 7896 // ForceSendFields is a list of field names (e.g. "Entries") to 7897 // unconditionally include in API requests. By default, fields with 7898 // empty values are omitted from API requests. However, any non-pointer, 7899 // non-interface field appearing in ForceSendFields will be sent to the 7900 // server regardless of whether the field is empty or not. This may be 7901 // used to include empty fields in Patch requests. 7902 ForceSendFields []string `json:"-"` 7903 7904 // NullFields is a list of field names (e.g. "Entries") to include in 7905 // API requests with the JSON null value. By default, fields with empty 7906 // values are omitted from API requests. However, any field with an 7907 // empty value appearing in NullFields will be sent to the server as 7908 // null. It is an error if a field in this list has a non-empty value. 7909 // This may be used to include null fields in Patch requests. 7910 NullFields []string `json:"-"` 7911} 7912 7913func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) { 7914 type NoMethod OrdersCustomBatchResponse 7915 raw := NoMethod(*s) 7916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7917} 7918 7919type OrdersCustomBatchResponseEntry struct { 7920 // BatchId: The ID of the request entry this entry responds to. 7921 BatchId int64 `json:"batchId,omitempty"` 7922 7923 // Errors: A list of errors defined if and only if the request failed. 7924 Errors *Errors `json:"errors,omitempty"` 7925 7926 // ExecutionStatus: The status of the execution. Only defined if 7927 // - the request was successful; and 7928 // - the method is not `get`, `getByMerchantOrderId`, or one of the test 7929 // methods. 7930 // 7931 // Acceptable values are: 7932 // - "duplicate" 7933 // - "executed" 7934 ExecutionStatus string `json:"executionStatus,omitempty"` 7935 7936 // Kind: Identifies what kind of resource this is. Value: the fixed 7937 // string "content#ordersCustomBatchResponseEntry" 7938 Kind string `json:"kind,omitempty"` 7939 7940 // Order: The retrieved order. Only defined if the method is `get` and 7941 // if the request was successful. 7942 Order *Order `json:"order,omitempty"` 7943 7944 // ForceSendFields is a list of field names (e.g. "BatchId") to 7945 // unconditionally include in API requests. By default, fields with 7946 // empty values are omitted from API requests. However, any non-pointer, 7947 // non-interface field appearing in ForceSendFields will be sent to the 7948 // server regardless of whether the field is empty or not. This may be 7949 // used to include empty fields in Patch requests. 7950 ForceSendFields []string `json:"-"` 7951 7952 // NullFields is a list of field names (e.g. "BatchId") to include in 7953 // API requests with the JSON null value. By default, fields with empty 7954 // values are omitted from API requests. However, any field with an 7955 // empty value appearing in NullFields will be sent to the server as 7956 // null. It is an error if a field in this list has a non-empty value. 7957 // This may be used to include null fields in Patch requests. 7958 NullFields []string `json:"-"` 7959} 7960 7961func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 7962 type NoMethod OrdersCustomBatchResponseEntry 7963 raw := NoMethod(*s) 7964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7965} 7966 7967type OrdersGetByMerchantOrderIdResponse struct { 7968 // Kind: Identifies what kind of resource this is. Value: the fixed 7969 // string "content#ordersGetByMerchantOrderIdResponse". 7970 Kind string `json:"kind,omitempty"` 7971 7972 // Order: The requested order. 7973 Order *Order `json:"order,omitempty"` 7974 7975 // ServerResponse contains the HTTP response code and headers from the 7976 // server. 7977 googleapi.ServerResponse `json:"-"` 7978 7979 // ForceSendFields is a list of field names (e.g. "Kind") to 7980 // unconditionally include in API requests. By default, fields with 7981 // empty values are omitted from API requests. However, any non-pointer, 7982 // non-interface field appearing in ForceSendFields will be sent to the 7983 // server regardless of whether the field is empty or not. This may be 7984 // used to include empty fields in Patch requests. 7985 ForceSendFields []string `json:"-"` 7986 7987 // NullFields is a list of field names (e.g. "Kind") to include in API 7988 // requests with the JSON null value. By default, fields with empty 7989 // values are omitted from API requests. However, any field with an 7990 // empty value appearing in NullFields will be sent to the server as 7991 // null. It is an error if a field in this list has a non-empty value. 7992 // This may be used to include null fields in Patch requests. 7993 NullFields []string `json:"-"` 7994} 7995 7996func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 7997 type NoMethod OrdersGetByMerchantOrderIdResponse 7998 raw := NoMethod(*s) 7999 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8000} 8001 8002type OrdersGetTestOrderTemplateResponse struct { 8003 // Kind: Identifies what kind of resource this is. Value: the fixed 8004 // string "content#ordersGetTestOrderTemplateResponse". 8005 Kind string `json:"kind,omitempty"` 8006 8007 // Template: The requested test order template. 8008 Template *TestOrder `json:"template,omitempty"` 8009 8010 // ServerResponse contains the HTTP response code and headers from the 8011 // server. 8012 googleapi.ServerResponse `json:"-"` 8013 8014 // ForceSendFields is a list of field names (e.g. "Kind") to 8015 // unconditionally include in API requests. By default, fields with 8016 // empty values are omitted from API requests. However, any non-pointer, 8017 // non-interface field appearing in ForceSendFields will be sent to the 8018 // server regardless of whether the field is empty or not. This may be 8019 // used to include empty fields in Patch requests. 8020 ForceSendFields []string `json:"-"` 8021 8022 // NullFields is a list of field names (e.g. "Kind") to include in API 8023 // requests with the JSON null value. By default, fields with empty 8024 // values are omitted from API requests. However, any field with an 8025 // empty value appearing in NullFields will be sent to the server as 8026 // null. It is an error if a field in this list has a non-empty value. 8027 // This may be used to include null fields in Patch requests. 8028 NullFields []string `json:"-"` 8029} 8030 8031func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { 8032 type NoMethod OrdersGetTestOrderTemplateResponse 8033 raw := NoMethod(*s) 8034 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8035} 8036 8037type OrdersInStoreRefundLineItemRequest struct { 8038 // AmountPretax: The amount that is refunded. Required. 8039 AmountPretax *Price `json:"amountPretax,omitempty"` 8040 8041 // AmountTax: Tax amount that correspond to refund amount in 8042 // amountPretax. Required. 8043 AmountTax *Price `json:"amountTax,omitempty"` 8044 8045 // LineItemId: The ID of the line item to return. Either lineItemId or 8046 // productId is required. 8047 LineItemId string `json:"lineItemId,omitempty"` 8048 8049 // OperationId: The ID of the operation. Unique across all operations 8050 // for a given order. 8051 OperationId string `json:"operationId,omitempty"` 8052 8053 // ProductId: The ID of the product to return. This is the REST ID used 8054 // in the products service. Either lineItemId or productId is required. 8055 ProductId string `json:"productId,omitempty"` 8056 8057 // Quantity: The quantity to return and refund. 8058 Quantity int64 `json:"quantity,omitempty"` 8059 8060 // Reason: The reason for the return. 8061 // 8062 // Acceptable values are: 8063 // - "customerDiscretionaryReturn" 8064 // - "customerInitiatedMerchantCancel" 8065 // - "deliveredTooLate" 8066 // - "expiredItem" 8067 // - "invalidCoupon" 8068 // - "malformedShippingAddress" 8069 // - "other" 8070 // - "productArrivedDamaged" 8071 // - "productNotAsDescribed" 8072 // - "qualityNotAsExpected" 8073 // - "undeliverableShippingAddress" 8074 // - "unsupportedPoBoxAddress" 8075 // - "wrongProductShipped" 8076 Reason string `json:"reason,omitempty"` 8077 8078 // ReasonText: The explanation of the reason. 8079 ReasonText string `json:"reasonText,omitempty"` 8080 8081 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 8082 // unconditionally include in API requests. By default, fields with 8083 // empty values are omitted from API requests. However, any non-pointer, 8084 // non-interface field appearing in ForceSendFields will be sent to the 8085 // server regardless of whether the field is empty or not. This may be 8086 // used to include empty fields in Patch requests. 8087 ForceSendFields []string `json:"-"` 8088 8089 // NullFields is a list of field names (e.g. "AmountPretax") to include 8090 // in API requests with the JSON null value. By default, fields with 8091 // empty values are omitted from API requests. However, any field with 8092 // an empty value appearing in NullFields will be sent to the server as 8093 // null. It is an error if a field in this list has a non-empty value. 8094 // This may be used to include null fields in Patch requests. 8095 NullFields []string `json:"-"` 8096} 8097 8098func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { 8099 type NoMethod OrdersInStoreRefundLineItemRequest 8100 raw := NoMethod(*s) 8101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8102} 8103 8104type OrdersInStoreRefundLineItemResponse struct { 8105 // ExecutionStatus: The status of the execution. 8106 // 8107 // Acceptable values are: 8108 // - "duplicate" 8109 // - "executed" 8110 ExecutionStatus string `json:"executionStatus,omitempty"` 8111 8112 // Kind: Identifies what kind of resource this is. Value: the fixed 8113 // string "content#ordersInStoreRefundLineItemResponse". 8114 Kind string `json:"kind,omitempty"` 8115 8116 // ServerResponse contains the HTTP response code and headers from the 8117 // server. 8118 googleapi.ServerResponse `json:"-"` 8119 8120 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8121 // unconditionally include in API requests. By default, fields with 8122 // empty values are omitted from API requests. However, any non-pointer, 8123 // non-interface field appearing in ForceSendFields will be sent to the 8124 // server regardless of whether the field is empty or not. This may be 8125 // used to include empty fields in Patch requests. 8126 ForceSendFields []string `json:"-"` 8127 8128 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8129 // include in API requests with the JSON null value. By default, fields 8130 // with empty values are omitted from API requests. However, any field 8131 // with an empty value appearing in NullFields will be sent to the 8132 // server as null. It is an error if a field in this list has a 8133 // non-empty value. This may be used to include null fields in Patch 8134 // requests. 8135 NullFields []string `json:"-"` 8136} 8137 8138func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { 8139 type NoMethod OrdersInStoreRefundLineItemResponse 8140 raw := NoMethod(*s) 8141 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8142} 8143 8144type OrdersListResponse struct { 8145 // Kind: Identifies what kind of resource this is. Value: the fixed 8146 // string "content#ordersListResponse". 8147 Kind string `json:"kind,omitempty"` 8148 8149 // NextPageToken: The token for the retrieval of the next page of 8150 // orders. 8151 NextPageToken string `json:"nextPageToken,omitempty"` 8152 8153 Resources []*Order `json:"resources,omitempty"` 8154 8155 // ServerResponse contains the HTTP response code and headers from the 8156 // server. 8157 googleapi.ServerResponse `json:"-"` 8158 8159 // ForceSendFields is a list of field names (e.g. "Kind") to 8160 // unconditionally include in API requests. By default, fields with 8161 // empty values are omitted from API requests. However, any non-pointer, 8162 // non-interface field appearing in ForceSendFields will be sent to the 8163 // server regardless of whether the field is empty or not. This may be 8164 // used to include empty fields in Patch requests. 8165 ForceSendFields []string `json:"-"` 8166 8167 // NullFields is a list of field names (e.g. "Kind") to include in API 8168 // requests with the JSON null value. By default, fields with empty 8169 // values are omitted from API requests. However, any field with an 8170 // empty value appearing in NullFields will be sent to the server as 8171 // null. It is an error if a field in this list has a non-empty value. 8172 // This may be used to include null fields in Patch requests. 8173 NullFields []string `json:"-"` 8174} 8175 8176func (s *OrdersListResponse) MarshalJSON() ([]byte, error) { 8177 type NoMethod OrdersListResponse 8178 raw := NoMethod(*s) 8179 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8180} 8181 8182type OrdersRefundRequest struct { 8183 // Amount: Deprecated. Please use amountPretax and amountTax instead. 8184 Amount *Price `json:"amount,omitempty"` 8185 8186 // AmountPretax: The amount that is refunded. Either amount or 8187 // amountPretax should be filled. 8188 AmountPretax *Price `json:"amountPretax,omitempty"` 8189 8190 // AmountTax: Tax amount that corresponds to refund amount in 8191 // amountPretax. Optional, but if filled, amountPretax must be set. 8192 // Calculated automatically if not provided. 8193 AmountTax *Price `json:"amountTax,omitempty"` 8194 8195 // OperationId: The ID of the operation. Unique across all operations 8196 // for a given order. 8197 OperationId string `json:"operationId,omitempty"` 8198 8199 // Reason: The reason for the refund. 8200 // 8201 // Acceptable values are: 8202 // - "adjustment" 8203 // - "courtesyAdjustment" 8204 // - "customerCanceled" 8205 // - "customerDiscretionaryReturn" 8206 // - "deliveredLateByCarrier" 8207 // - "feeAdjustment" 8208 // - "lateShipmentCredit" 8209 // - "noInventory" 8210 // - "other" 8211 // - "priceError" 8212 // - "productArrivedDamaged" 8213 // - "productNotAsDescribed" 8214 // - "shippingCostAdjustment" 8215 // - "taxAdjustment" 8216 // - "undeliverableShippingAddress" 8217 // - "wrongProductShipped" 8218 Reason string `json:"reason,omitempty"` 8219 8220 // ReasonText: The explanation of the reason. 8221 ReasonText string `json:"reasonText,omitempty"` 8222 8223 // ForceSendFields is a list of field names (e.g. "Amount") to 8224 // unconditionally include in API requests. By default, fields with 8225 // empty values are omitted from API requests. However, any non-pointer, 8226 // non-interface field appearing in ForceSendFields will be sent to the 8227 // server regardless of whether the field is empty or not. This may be 8228 // used to include empty fields in Patch requests. 8229 ForceSendFields []string `json:"-"` 8230 8231 // NullFields is a list of field names (e.g. "Amount") to include in API 8232 // requests with the JSON null value. By default, fields with empty 8233 // values are omitted from API requests. However, any field with an 8234 // empty value appearing in NullFields will be sent to the server as 8235 // null. It is an error if a field in this list has a non-empty value. 8236 // This may be used to include null fields in Patch requests. 8237 NullFields []string `json:"-"` 8238} 8239 8240func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) { 8241 type NoMethod OrdersRefundRequest 8242 raw := NoMethod(*s) 8243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8244} 8245 8246type OrdersRefundResponse struct { 8247 // ExecutionStatus: The status of the execution. 8248 // 8249 // Acceptable values are: 8250 // - "duplicate" 8251 // - "executed" 8252 ExecutionStatus string `json:"executionStatus,omitempty"` 8253 8254 // Kind: Identifies what kind of resource this is. Value: the fixed 8255 // string "content#ordersRefundResponse". 8256 Kind string `json:"kind,omitempty"` 8257 8258 // ServerResponse contains the HTTP response code and headers from the 8259 // server. 8260 googleapi.ServerResponse `json:"-"` 8261 8262 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8263 // unconditionally include in API requests. By default, fields with 8264 // empty values are omitted from API requests. However, any non-pointer, 8265 // non-interface field appearing in ForceSendFields will be sent to the 8266 // server regardless of whether the field is empty or not. This may be 8267 // used to include empty fields in Patch requests. 8268 ForceSendFields []string `json:"-"` 8269 8270 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8271 // include in API requests with the JSON null value. By default, fields 8272 // with empty values are omitted from API requests. However, any field 8273 // with an empty value appearing in NullFields will be sent to the 8274 // server as null. It is an error if a field in this list has a 8275 // non-empty value. This may be used to include null fields in Patch 8276 // requests. 8277 NullFields []string `json:"-"` 8278} 8279 8280func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) { 8281 type NoMethod OrdersRefundResponse 8282 raw := NoMethod(*s) 8283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8284} 8285 8286type OrdersRejectReturnLineItemRequest struct { 8287 // LineItemId: The ID of the line item to return. Either lineItemId or 8288 // productId is required. 8289 LineItemId string `json:"lineItemId,omitempty"` 8290 8291 // OperationId: The ID of the operation. Unique across all operations 8292 // for a given order. 8293 OperationId string `json:"operationId,omitempty"` 8294 8295 // ProductId: The ID of the product to return. This is the REST ID used 8296 // in the products service. Either lineItemId or productId is required. 8297 ProductId string `json:"productId,omitempty"` 8298 8299 // Quantity: The quantity to return and refund. 8300 Quantity int64 `json:"quantity,omitempty"` 8301 8302 // Reason: The reason for the return. 8303 // 8304 // Acceptable values are: 8305 // - "damagedOrUsed" 8306 // - "missingComponent" 8307 // - "notEligible" 8308 // - "other" 8309 // - "outOfReturnWindow" 8310 Reason string `json:"reason,omitempty"` 8311 8312 // ReasonText: The explanation of the reason. 8313 ReasonText string `json:"reasonText,omitempty"` 8314 8315 // ForceSendFields is a list of field names (e.g. "LineItemId") to 8316 // unconditionally include in API requests. By default, fields with 8317 // empty values are omitted from API requests. However, any non-pointer, 8318 // non-interface field appearing in ForceSendFields will be sent to the 8319 // server regardless of whether the field is empty or not. This may be 8320 // used to include empty fields in Patch requests. 8321 ForceSendFields []string `json:"-"` 8322 8323 // NullFields is a list of field names (e.g. "LineItemId") to include in 8324 // API requests with the JSON null value. By default, fields with empty 8325 // values are omitted from API requests. However, any field with an 8326 // empty value appearing in NullFields will be sent to the server as 8327 // null. It is an error if a field in this list has a non-empty value. 8328 // This may be used to include null fields in Patch requests. 8329 NullFields []string `json:"-"` 8330} 8331 8332func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { 8333 type NoMethod OrdersRejectReturnLineItemRequest 8334 raw := NoMethod(*s) 8335 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8336} 8337 8338type OrdersRejectReturnLineItemResponse struct { 8339 // ExecutionStatus: The status of the execution. 8340 // 8341 // Acceptable values are: 8342 // - "duplicate" 8343 // - "executed" 8344 ExecutionStatus string `json:"executionStatus,omitempty"` 8345 8346 // Kind: Identifies what kind of resource this is. Value: the fixed 8347 // string "content#ordersRejectReturnLineItemResponse". 8348 Kind string `json:"kind,omitempty"` 8349 8350 // ServerResponse contains the HTTP response code and headers from the 8351 // server. 8352 googleapi.ServerResponse `json:"-"` 8353 8354 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8355 // unconditionally include in API requests. By default, fields with 8356 // empty values are omitted from API requests. However, any non-pointer, 8357 // non-interface field appearing in ForceSendFields will be sent to the 8358 // server regardless of whether the field is empty or not. This may be 8359 // used to include empty fields in Patch requests. 8360 ForceSendFields []string `json:"-"` 8361 8362 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8363 // include in API requests with the JSON null value. By default, fields 8364 // with empty values are omitted from API requests. However, any field 8365 // with an empty value appearing in NullFields will be sent to the 8366 // server as null. It is an error if a field in this list has a 8367 // non-empty value. This may be used to include null fields in Patch 8368 // requests. 8369 NullFields []string `json:"-"` 8370} 8371 8372func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { 8373 type NoMethod OrdersRejectReturnLineItemResponse 8374 raw := NoMethod(*s) 8375 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8376} 8377 8378type OrdersReturnLineItemRequest struct { 8379 // LineItemId: The ID of the line item to return. Either lineItemId or 8380 // productId is required. 8381 LineItemId string `json:"lineItemId,omitempty"` 8382 8383 // OperationId: The ID of the operation. Unique across all operations 8384 // for a given order. 8385 OperationId string `json:"operationId,omitempty"` 8386 8387 // ProductId: The ID of the product to return. This is the REST ID used 8388 // in the products service. Either lineItemId or productId is required. 8389 ProductId string `json:"productId,omitempty"` 8390 8391 // Quantity: The quantity to return. 8392 Quantity int64 `json:"quantity,omitempty"` 8393 8394 // Reason: The reason for the return. 8395 // 8396 // Acceptable values are: 8397 // - "customerDiscretionaryReturn" 8398 // - "customerInitiatedMerchantCancel" 8399 // - "deliveredTooLate" 8400 // - "expiredItem" 8401 // - "invalidCoupon" 8402 // - "malformedShippingAddress" 8403 // - "other" 8404 // - "productArrivedDamaged" 8405 // - "productNotAsDescribed" 8406 // - "qualityNotAsExpected" 8407 // - "undeliverableShippingAddress" 8408 // - "unsupportedPoBoxAddress" 8409 // - "wrongProductShipped" 8410 Reason string `json:"reason,omitempty"` 8411 8412 // ReasonText: The explanation of the reason. 8413 ReasonText string `json:"reasonText,omitempty"` 8414 8415 // ForceSendFields is a list of field names (e.g. "LineItemId") to 8416 // unconditionally include in API requests. By default, fields with 8417 // empty values are omitted from API requests. However, any non-pointer, 8418 // non-interface field appearing in ForceSendFields will be sent to the 8419 // server regardless of whether the field is empty or not. This may be 8420 // used to include empty fields in Patch requests. 8421 ForceSendFields []string `json:"-"` 8422 8423 // NullFields is a list of field names (e.g. "LineItemId") to include in 8424 // API requests with the JSON null value. By default, fields with empty 8425 // values are omitted from API requests. However, any field with an 8426 // empty value appearing in NullFields will be sent to the server as 8427 // null. It is an error if a field in this list has a non-empty value. 8428 // This may be used to include null fields in Patch requests. 8429 NullFields []string `json:"-"` 8430} 8431 8432func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) { 8433 type NoMethod OrdersReturnLineItemRequest 8434 raw := NoMethod(*s) 8435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8436} 8437 8438type OrdersReturnLineItemResponse struct { 8439 // ExecutionStatus: The status of the execution. 8440 // 8441 // Acceptable values are: 8442 // - "duplicate" 8443 // - "executed" 8444 ExecutionStatus string `json:"executionStatus,omitempty"` 8445 8446 // Kind: Identifies what kind of resource this is. Value: the fixed 8447 // string "content#ordersReturnLineItemResponse". 8448 Kind string `json:"kind,omitempty"` 8449 8450 // ServerResponse contains the HTTP response code and headers from the 8451 // server. 8452 googleapi.ServerResponse `json:"-"` 8453 8454 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8455 // unconditionally include in API requests. By default, fields with 8456 // empty values are omitted from API requests. However, any non-pointer, 8457 // non-interface field appearing in ForceSendFields will be sent to the 8458 // server regardless of whether the field is empty or not. This may be 8459 // used to include empty fields in Patch requests. 8460 ForceSendFields []string `json:"-"` 8461 8462 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8463 // include in API requests with the JSON null value. By default, fields 8464 // with empty values are omitted from API requests. However, any field 8465 // with an empty value appearing in NullFields will be sent to the 8466 // server as null. It is an error if a field in this list has a 8467 // non-empty value. This may be used to include null fields in Patch 8468 // requests. 8469 NullFields []string `json:"-"` 8470} 8471 8472func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { 8473 type NoMethod OrdersReturnLineItemResponse 8474 raw := NoMethod(*s) 8475 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8476} 8477 8478type OrdersReturnRefundLineItemRequest struct { 8479 // AmountPretax: The amount that is refunded. If omitted, refundless 8480 // return is assumed (same as calling returnLineItem method). 8481 AmountPretax *Price `json:"amountPretax,omitempty"` 8482 8483 // AmountTax: Tax amount that corresponds to refund amount in 8484 // amountPretax. Optional, but if filled, then amountPretax must be set. 8485 // Calculated automatically if not provided. 8486 AmountTax *Price `json:"amountTax,omitempty"` 8487 8488 // LineItemId: The ID of the line item to return. Either lineItemId or 8489 // productId is required. 8490 LineItemId string `json:"lineItemId,omitempty"` 8491 8492 // OperationId: The ID of the operation. Unique across all operations 8493 // for a given order. 8494 OperationId string `json:"operationId,omitempty"` 8495 8496 // ProductId: The ID of the product to return. This is the REST ID used 8497 // in the products service. Either lineItemId or productId is required. 8498 ProductId string `json:"productId,omitempty"` 8499 8500 // Quantity: The quantity to return and refund. 8501 Quantity int64 `json:"quantity,omitempty"` 8502 8503 // Reason: The reason for the return. 8504 // 8505 // Acceptable values are: 8506 // - "customerDiscretionaryReturn" 8507 // - "customerInitiatedMerchantCancel" 8508 // - "deliveredTooLate" 8509 // - "expiredItem" 8510 // - "invalidCoupon" 8511 // - "malformedShippingAddress" 8512 // - "other" 8513 // - "productArrivedDamaged" 8514 // - "productNotAsDescribed" 8515 // - "qualityNotAsExpected" 8516 // - "undeliverableShippingAddress" 8517 // - "unsupportedPoBoxAddress" 8518 // - "wrongProductShipped" 8519 Reason string `json:"reason,omitempty"` 8520 8521 // ReasonText: The explanation of the reason. 8522 ReasonText string `json:"reasonText,omitempty"` 8523 8524 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 8525 // unconditionally include in API requests. By default, fields with 8526 // empty values are omitted from API requests. However, any non-pointer, 8527 // non-interface field appearing in ForceSendFields will be sent to the 8528 // server regardless of whether the field is empty or not. This may be 8529 // used to include empty fields in Patch requests. 8530 ForceSendFields []string `json:"-"` 8531 8532 // NullFields is a list of field names (e.g. "AmountPretax") to include 8533 // in API requests with the JSON null value. By default, fields with 8534 // empty values are omitted from API requests. However, any field with 8535 // an empty value appearing in NullFields will be sent to the server as 8536 // null. It is an error if a field in this list has a non-empty value. 8537 // This may be used to include null fields in Patch requests. 8538 NullFields []string `json:"-"` 8539} 8540 8541func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { 8542 type NoMethod OrdersReturnRefundLineItemRequest 8543 raw := NoMethod(*s) 8544 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8545} 8546 8547type OrdersReturnRefundLineItemResponse struct { 8548 // ExecutionStatus: The status of the execution. 8549 // 8550 // Acceptable values are: 8551 // - "duplicate" 8552 // - "executed" 8553 ExecutionStatus string `json:"executionStatus,omitempty"` 8554 8555 // Kind: Identifies what kind of resource this is. Value: the fixed 8556 // string "content#ordersReturnRefundLineItemResponse". 8557 Kind string `json:"kind,omitempty"` 8558 8559 // ServerResponse contains the HTTP response code and headers from the 8560 // server. 8561 googleapi.ServerResponse `json:"-"` 8562 8563 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8564 // unconditionally include in API requests. By default, fields with 8565 // empty values are omitted from API requests. However, any non-pointer, 8566 // non-interface field appearing in ForceSendFields will be sent to the 8567 // server regardless of whether the field is empty or not. This may be 8568 // used to include empty fields in Patch requests. 8569 ForceSendFields []string `json:"-"` 8570 8571 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8572 // include in API requests with the JSON null value. By default, fields 8573 // with empty values are omitted from API requests. However, any field 8574 // with an empty value appearing in NullFields will be sent to the 8575 // server as null. It is an error if a field in this list has a 8576 // non-empty value. This may be used to include null fields in Patch 8577 // requests. 8578 NullFields []string `json:"-"` 8579} 8580 8581func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { 8582 type NoMethod OrdersReturnRefundLineItemResponse 8583 raw := NoMethod(*s) 8584 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8585} 8586 8587type OrdersSetLineItemMetadataRequest struct { 8588 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 8589 8590 // LineItemId: The ID of the line item to set metadata. Either 8591 // lineItemId or productId is required. 8592 LineItemId string `json:"lineItemId,omitempty"` 8593 8594 // OperationId: The ID of the operation. Unique across all operations 8595 // for a given order. 8596 OperationId string `json:"operationId,omitempty"` 8597 8598 // ProductId: The ID of the product to set metadata. This is the REST ID 8599 // used in the products service. Either lineItemId or productId is 8600 // required. 8601 ProductId string `json:"productId,omitempty"` 8602 8603 // ForceSendFields is a list of field names (e.g. "Annotations") to 8604 // unconditionally include in API requests. By default, fields with 8605 // empty values are omitted from API requests. However, any non-pointer, 8606 // non-interface field appearing in ForceSendFields will be sent to the 8607 // server regardless of whether the field is empty or not. This may be 8608 // used to include empty fields in Patch requests. 8609 ForceSendFields []string `json:"-"` 8610 8611 // NullFields is a list of field names (e.g. "Annotations") to include 8612 // in API requests with the JSON null value. By default, fields with 8613 // empty values are omitted from API requests. However, any field with 8614 // an empty value appearing in NullFields will be sent to the server as 8615 // null. It is an error if a field in this list has a non-empty value. 8616 // This may be used to include null fields in Patch requests. 8617 NullFields []string `json:"-"` 8618} 8619 8620func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { 8621 type NoMethod OrdersSetLineItemMetadataRequest 8622 raw := NoMethod(*s) 8623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8624} 8625 8626type OrdersSetLineItemMetadataResponse struct { 8627 // ExecutionStatus: The status of the execution. 8628 // 8629 // Acceptable values are: 8630 // - "duplicate" 8631 // - "executed" 8632 ExecutionStatus string `json:"executionStatus,omitempty"` 8633 8634 // Kind: Identifies what kind of resource this is. Value: the fixed 8635 // string "content#ordersSetLineItemMetadataResponse". 8636 Kind string `json:"kind,omitempty"` 8637 8638 // ServerResponse contains the HTTP response code and headers from the 8639 // server. 8640 googleapi.ServerResponse `json:"-"` 8641 8642 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8643 // unconditionally include in API requests. By default, fields with 8644 // empty values are omitted from API requests. However, any non-pointer, 8645 // non-interface field appearing in ForceSendFields will be sent to the 8646 // server regardless of whether the field is empty or not. This may be 8647 // used to include empty fields in Patch requests. 8648 ForceSendFields []string `json:"-"` 8649 8650 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8651 // include in API requests with the JSON null value. By default, fields 8652 // with empty values are omitted from API requests. However, any field 8653 // with an empty value appearing in NullFields will be sent to the 8654 // server as null. It is an error if a field in this list has a 8655 // non-empty value. This may be used to include null fields in Patch 8656 // requests. 8657 NullFields []string `json:"-"` 8658} 8659 8660func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { 8661 type NoMethod OrdersSetLineItemMetadataResponse 8662 raw := NoMethod(*s) 8663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8664} 8665 8666type OrdersShipLineItemsRequest struct { 8667 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 8668 // handling the shipment. See `shipments[].carrier` in the Orders 8669 // resource representation for a list of acceptable values. 8670 Carrier string `json:"carrier,omitempty"` 8671 8672 // LineItems: Line items to ship. 8673 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 8674 8675 // OperationId: The ID of the operation. Unique across all operations 8676 // for a given order. 8677 OperationId string `json:"operationId,omitempty"` 8678 8679 // ShipmentGroupId: ID of the shipment group. Required for orders that 8680 // use the orderinvoices service. 8681 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 8682 8683 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 8684 // the shipment. 8685 ShipmentId string `json:"shipmentId,omitempty"` 8686 8687 // ShipmentInfos: Shipment information. This field is repeated because a 8688 // single line item can be shipped in several packages (and have several 8689 // tracking IDs). 8690 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 8691 8692 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 8693 // ID for the shipment. 8694 TrackingId string `json:"trackingId,omitempty"` 8695 8696 // ForceSendFields is a list of field names (e.g. "Carrier") to 8697 // unconditionally include in API requests. By default, fields with 8698 // empty values are omitted from API requests. However, any non-pointer, 8699 // non-interface field appearing in ForceSendFields will be sent to the 8700 // server regardless of whether the field is empty or not. This may be 8701 // used to include empty fields in Patch requests. 8702 ForceSendFields []string `json:"-"` 8703 8704 // NullFields is a list of field names (e.g. "Carrier") to include in 8705 // API requests with the JSON null value. By default, fields with empty 8706 // values are omitted from API requests. However, any field with an 8707 // empty value appearing in NullFields will be sent to the server as 8708 // null. It is an error if a field in this list has a non-empty value. 8709 // This may be used to include null fields in Patch requests. 8710 NullFields []string `json:"-"` 8711} 8712 8713func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { 8714 type NoMethod OrdersShipLineItemsRequest 8715 raw := NoMethod(*s) 8716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8717} 8718 8719type OrdersShipLineItemsResponse struct { 8720 // ExecutionStatus: The status of the execution. 8721 // 8722 // Acceptable values are: 8723 // - "duplicate" 8724 // - "executed" 8725 ExecutionStatus string `json:"executionStatus,omitempty"` 8726 8727 // Kind: Identifies what kind of resource this is. Value: the fixed 8728 // string "content#ordersShipLineItemsResponse". 8729 Kind string `json:"kind,omitempty"` 8730 8731 // ServerResponse contains the HTTP response code and headers from the 8732 // server. 8733 googleapi.ServerResponse `json:"-"` 8734 8735 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8736 // unconditionally include in API requests. By default, fields with 8737 // empty values are omitted from API requests. However, any non-pointer, 8738 // non-interface field appearing in ForceSendFields will be sent to the 8739 // server regardless of whether the field is empty or not. This may be 8740 // used to include empty fields in Patch requests. 8741 ForceSendFields []string `json:"-"` 8742 8743 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8744 // include in API requests with the JSON null value. By default, fields 8745 // with empty values are omitted from API requests. However, any field 8746 // with an empty value appearing in NullFields will be sent to the 8747 // server as null. It is an error if a field in this list has a 8748 // non-empty value. This may be used to include null fields in Patch 8749 // requests. 8750 NullFields []string `json:"-"` 8751} 8752 8753func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { 8754 type NoMethod OrdersShipLineItemsResponse 8755 raw := NoMethod(*s) 8756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8757} 8758 8759type OrdersUpdateLineItemShippingDetailsRequest struct { 8760 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 8761 // specified only ship by date is updated. 8762 // 8763 // Provided date should be within 1 year timeframe and can not be a date 8764 // in the past. 8765 DeliverByDate string `json:"deliverByDate,omitempty"` 8766 8767 // LineItemId: The ID of the line item to set metadata. Either 8768 // lineItemId or productId is required. 8769 LineItemId string `json:"lineItemId,omitempty"` 8770 8771 // OperationId: The ID of the operation. Unique across all operations 8772 // for a given order. 8773 OperationId string `json:"operationId,omitempty"` 8774 8775 // ProductId: The ID of the product to set metadata. This is the REST ID 8776 // used in the products service. Either lineItemId or productId is 8777 // required. 8778 ProductId string `json:"productId,omitempty"` 8779 8780 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 8781 // specified only deliver by date is updated. 8782 // 8783 // Provided date should be within 1 year timeframe and can not be a date 8784 // in the past. 8785 ShipByDate string `json:"shipByDate,omitempty"` 8786 8787 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 8788 // unconditionally include in API requests. By default, fields with 8789 // empty values are omitted from API requests. However, any non-pointer, 8790 // non-interface field appearing in ForceSendFields will be sent to the 8791 // server regardless of whether the field is empty or not. This may be 8792 // used to include empty fields in Patch requests. 8793 ForceSendFields []string `json:"-"` 8794 8795 // NullFields is a list of field names (e.g. "DeliverByDate") to include 8796 // in API requests with the JSON null value. By default, fields with 8797 // empty values are omitted from API requests. However, any field with 8798 // an empty value appearing in NullFields will be sent to the server as 8799 // null. It is an error if a field in this list has a non-empty value. 8800 // This may be used to include null fields in Patch requests. 8801 NullFields []string `json:"-"` 8802} 8803 8804func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { 8805 type NoMethod OrdersUpdateLineItemShippingDetailsRequest 8806 raw := NoMethod(*s) 8807 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8808} 8809 8810type OrdersUpdateLineItemShippingDetailsResponse struct { 8811 // ExecutionStatus: The status of the execution. 8812 // 8813 // Acceptable values are: 8814 // - "duplicate" 8815 // - "executed" 8816 ExecutionStatus string `json:"executionStatus,omitempty"` 8817 8818 // Kind: Identifies what kind of resource this is. Value: the fixed 8819 // string "content#ordersUpdateLineItemShippingDetailsResponse". 8820 Kind string `json:"kind,omitempty"` 8821 8822 // ServerResponse contains the HTTP response code and headers from the 8823 // server. 8824 googleapi.ServerResponse `json:"-"` 8825 8826 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8827 // unconditionally include in API requests. By default, fields with 8828 // empty values are omitted from API requests. However, any non-pointer, 8829 // non-interface field appearing in ForceSendFields will be sent to the 8830 // server regardless of whether the field is empty or not. This may be 8831 // used to include empty fields in Patch requests. 8832 ForceSendFields []string `json:"-"` 8833 8834 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8835 // include in API requests with the JSON null value. By default, fields 8836 // with empty values are omitted from API requests. However, any field 8837 // with an empty value appearing in NullFields will be sent to the 8838 // server as null. It is an error if a field in this list has a 8839 // non-empty value. This may be used to include null fields in Patch 8840 // requests. 8841 NullFields []string `json:"-"` 8842} 8843 8844func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { 8845 type NoMethod OrdersUpdateLineItemShippingDetailsResponse 8846 raw := NoMethod(*s) 8847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8848} 8849 8850type OrdersUpdateMerchantOrderIdRequest struct { 8851 // MerchantOrderId: The merchant order id to be assigned to the order. 8852 // Must be unique per merchant. 8853 MerchantOrderId string `json:"merchantOrderId,omitempty"` 8854 8855 // OperationId: The ID of the operation. Unique across all operations 8856 // for a given order. 8857 OperationId string `json:"operationId,omitempty"` 8858 8859 // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to 8860 // unconditionally include in API requests. By default, fields with 8861 // empty values are omitted from API requests. However, any non-pointer, 8862 // non-interface field appearing in ForceSendFields will be sent to the 8863 // server regardless of whether the field is empty or not. This may be 8864 // used to include empty fields in Patch requests. 8865 ForceSendFields []string `json:"-"` 8866 8867 // NullFields is a list of field names (e.g. "MerchantOrderId") to 8868 // include in API requests with the JSON null value. By default, fields 8869 // with empty values are omitted from API requests. However, any field 8870 // with an empty value appearing in NullFields will be sent to the 8871 // server as null. It is an error if a field in this list has a 8872 // non-empty value. This may be used to include null fields in Patch 8873 // requests. 8874 NullFields []string `json:"-"` 8875} 8876 8877func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { 8878 type NoMethod OrdersUpdateMerchantOrderIdRequest 8879 raw := NoMethod(*s) 8880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8881} 8882 8883type OrdersUpdateMerchantOrderIdResponse struct { 8884 // ExecutionStatus: The status of the execution. 8885 // 8886 // Acceptable values are: 8887 // - "duplicate" 8888 // - "executed" 8889 ExecutionStatus string `json:"executionStatus,omitempty"` 8890 8891 // Kind: Identifies what kind of resource this is. Value: the fixed 8892 // string "content#ordersUpdateMerchantOrderIdResponse". 8893 Kind string `json:"kind,omitempty"` 8894 8895 // ServerResponse contains the HTTP response code and headers from the 8896 // server. 8897 googleapi.ServerResponse `json:"-"` 8898 8899 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8900 // unconditionally include in API requests. By default, fields with 8901 // empty values are omitted from API requests. However, any non-pointer, 8902 // non-interface field appearing in ForceSendFields will be sent to the 8903 // server regardless of whether the field is empty or not. This may be 8904 // used to include empty fields in Patch requests. 8905 ForceSendFields []string `json:"-"` 8906 8907 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8908 // include in API requests with the JSON null value. By default, fields 8909 // with empty values are omitted from API requests. However, any field 8910 // with an empty value appearing in NullFields will be sent to the 8911 // server as null. It is an error if a field in this list has a 8912 // non-empty value. This may be used to include null fields in Patch 8913 // requests. 8914 NullFields []string `json:"-"` 8915} 8916 8917func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 8918 type NoMethod OrdersUpdateMerchantOrderIdResponse 8919 raw := NoMethod(*s) 8920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8921} 8922 8923type OrdersUpdateShipmentRequest struct { 8924 // Carrier: The carrier handling the shipment. Not updated if missing. 8925 // See `shipments[].carrier` in the Orders resource representation for 8926 // a list of acceptable values. 8927 Carrier string `json:"carrier,omitempty"` 8928 8929 // DeliveryDate: Date on which the shipment has been delivered, in ISO 8930 // 8601 format. Optional and can be provided only if `status` is 8931 // `delivered`. 8932 DeliveryDate string `json:"deliveryDate,omitempty"` 8933 8934 // OperationId: The ID of the operation. Unique across all operations 8935 // for a given order. 8936 OperationId string `json:"operationId,omitempty"` 8937 8938 // ShipmentId: The ID of the shipment. 8939 ShipmentId string `json:"shipmentId,omitempty"` 8940 8941 // Status: New status for the shipment. Not updated if 8942 // missing. 8943 // 8944 // Acceptable values are: 8945 // - "delivered" 8946 // - "undeliverable" 8947 Status string `json:"status,omitempty"` 8948 8949 // TrackingId: The tracking ID for the shipment. Not updated if missing. 8950 TrackingId string `json:"trackingId,omitempty"` 8951 8952 // ForceSendFields is a list of field names (e.g. "Carrier") to 8953 // unconditionally include in API requests. By default, fields with 8954 // empty values are omitted from API requests. However, any non-pointer, 8955 // non-interface field appearing in ForceSendFields will be sent to the 8956 // server regardless of whether the field is empty or not. This may be 8957 // used to include empty fields in Patch requests. 8958 ForceSendFields []string `json:"-"` 8959 8960 // NullFields is a list of field names (e.g. "Carrier") to include in 8961 // API requests with the JSON null value. By default, fields with empty 8962 // values are omitted from API requests. However, any field with an 8963 // empty value appearing in NullFields will be sent to the server as 8964 // null. It is an error if a field in this list has a non-empty value. 8965 // This may be used to include null fields in Patch requests. 8966 NullFields []string `json:"-"` 8967} 8968 8969func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { 8970 type NoMethod OrdersUpdateShipmentRequest 8971 raw := NoMethod(*s) 8972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8973} 8974 8975type OrdersUpdateShipmentResponse struct { 8976 // ExecutionStatus: The status of the execution. 8977 // 8978 // Acceptable values are: 8979 // - "duplicate" 8980 // - "executed" 8981 ExecutionStatus string `json:"executionStatus,omitempty"` 8982 8983 // Kind: Identifies what kind of resource this is. Value: the fixed 8984 // string "content#ordersUpdateShipmentResponse". 8985 Kind string `json:"kind,omitempty"` 8986 8987 // ServerResponse contains the HTTP response code and headers from the 8988 // server. 8989 googleapi.ServerResponse `json:"-"` 8990 8991 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8992 // unconditionally include in API requests. By default, fields with 8993 // empty values are omitted from API requests. However, any non-pointer, 8994 // non-interface field appearing in ForceSendFields will be sent to the 8995 // server regardless of whether the field is empty or not. This may be 8996 // used to include empty fields in Patch requests. 8997 ForceSendFields []string `json:"-"` 8998 8999 // NullFields is a list of field names (e.g. "ExecutionStatus") to 9000 // include in API requests with the JSON null value. By default, fields 9001 // with empty values are omitted from API requests. However, any field 9002 // with an empty value appearing in NullFields will be sent to the 9003 // server as null. It is an error if a field in this list has a 9004 // non-empty value. This may be used to include null fields in Patch 9005 // requests. 9006 NullFields []string `json:"-"` 9007} 9008 9009func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { 9010 type NoMethod OrdersUpdateShipmentResponse 9011 raw := NoMethod(*s) 9012 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9013} 9014 9015type PickupCarrierService struct { 9016 // CarrierName: The name of the pickup carrier (e.g., "UPS"). 9017 // Required. 9018 CarrierName string `json:"carrierName,omitempty"` 9019 9020 // ServiceName: The name of the pickup service (e.g., "Access point"). 9021 // Required. 9022 ServiceName string `json:"serviceName,omitempty"` 9023 9024 // ForceSendFields is a list of field names (e.g. "CarrierName") 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. "CarrierName") to include 9033 // in API requests with the JSON null value. By default, fields with 9034 // empty values are omitted from API requests. However, any field with 9035 // an 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 *PickupCarrierService) MarshalJSON() ([]byte, error) { 9042 type NoMethod PickupCarrierService 9043 raw := NoMethod(*s) 9044 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9045} 9046 9047type PickupServicesPickupService struct { 9048 // CarrierName: The name of the carrier (e.g., "UPS"). Always present. 9049 CarrierName string `json:"carrierName,omitempty"` 9050 9051 // Country: The CLDR country code of the carrier (e.g., "US"). Always 9052 // present. 9053 Country string `json:"country,omitempty"` 9054 9055 // ServiceName: The name of the pickup service (e.g., "Access point"). 9056 // Always present. 9057 ServiceName string `json:"serviceName,omitempty"` 9058 9059 // ForceSendFields is a list of field names (e.g. "CarrierName") to 9060 // unconditionally include in API requests. By default, fields with 9061 // empty values are omitted from API requests. However, any non-pointer, 9062 // non-interface field appearing in ForceSendFields will be sent to the 9063 // server regardless of whether the field is empty or not. This may be 9064 // used to include empty fields in Patch requests. 9065 ForceSendFields []string `json:"-"` 9066 9067 // NullFields is a list of field names (e.g. "CarrierName") to include 9068 // in API requests with the JSON null value. By default, fields with 9069 // empty values are omitted from API requests. However, any field with 9070 // an empty value appearing in NullFields will be sent to the server as 9071 // null. It is an error if a field in this list has a non-empty value. 9072 // This may be used to include null fields in Patch requests. 9073 NullFields []string `json:"-"` 9074} 9075 9076func (s *PickupServicesPickupService) MarshalJSON() ([]byte, error) { 9077 type NoMethod PickupServicesPickupService 9078 raw := NoMethod(*s) 9079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9080} 9081 9082type PosCustomBatchRequest struct { 9083 // Entries: The request entries to be processed in the batch. 9084 Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` 9085 9086 // ForceSendFields is a list of field names (e.g. "Entries") to 9087 // unconditionally include in API requests. By default, fields with 9088 // empty values are omitted from API requests. However, any non-pointer, 9089 // non-interface field appearing in ForceSendFields will be sent to the 9090 // server regardless of whether the field is empty or not. This may be 9091 // used to include empty fields in Patch requests. 9092 ForceSendFields []string `json:"-"` 9093 9094 // NullFields is a list of field names (e.g. "Entries") to include in 9095 // API requests with the JSON null value. By default, fields with empty 9096 // values are omitted from API requests. However, any field with an 9097 // empty value appearing in NullFields will be sent to the server as 9098 // null. It is an error if a field in this list has a non-empty value. 9099 // This may be used to include null fields in Patch requests. 9100 NullFields []string `json:"-"` 9101} 9102 9103func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) { 9104 type NoMethod PosCustomBatchRequest 9105 raw := NoMethod(*s) 9106 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9107} 9108 9109type PosCustomBatchRequestEntry struct { 9110 // BatchId: An entry ID, unique within the batch request. 9111 BatchId int64 `json:"batchId,omitempty"` 9112 9113 // Inventory: The inventory to submit. Set this only if the method is 9114 // `inventory`. 9115 Inventory *PosInventory `json:"inventory,omitempty"` 9116 9117 // MerchantId: The ID of the POS data provider. 9118 MerchantId uint64 `json:"merchantId,omitempty,string"` 9119 9120 // Method: The method of the batch entry. 9121 // 9122 // Acceptable values are: 9123 // - "delete" 9124 // - "get" 9125 // - "insert" 9126 // - "inventory" 9127 // - "sale" 9128 Method string `json:"method,omitempty"` 9129 9130 // Sale: The sale information to submit. Set this only if the method is 9131 // `sale`. 9132 Sale *PosSale `json:"sale,omitempty"` 9133 9134 // Store: The store information to submit. Set this only if the method 9135 // is `insert`. 9136 Store *PosStore `json:"store,omitempty"` 9137 9138 // StoreCode: The store code. Set this only if the method is `delete` or 9139 // `get`. 9140 StoreCode string `json:"storeCode,omitempty"` 9141 9142 // TargetMerchantId: The ID of the account for which to get/submit data. 9143 TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` 9144 9145 // ForceSendFields is a list of field names (e.g. "BatchId") to 9146 // unconditionally include in API requests. By default, fields with 9147 // empty values are omitted from API requests. However, any non-pointer, 9148 // non-interface field appearing in ForceSendFields will be sent to the 9149 // server regardless of whether the field is empty or not. This may be 9150 // used to include empty fields in Patch requests. 9151 ForceSendFields []string `json:"-"` 9152 9153 // NullFields is a list of field names (e.g. "BatchId") to include in 9154 // API requests with the JSON null value. By default, fields with empty 9155 // values are omitted from API requests. However, any field with an 9156 // empty value appearing in NullFields will be sent to the server as 9157 // null. It is an error if a field in this list has a non-empty value. 9158 // This may be used to include null fields in Patch requests. 9159 NullFields []string `json:"-"` 9160} 9161 9162func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 9163 type NoMethod PosCustomBatchRequestEntry 9164 raw := NoMethod(*s) 9165 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9166} 9167 9168type PosCustomBatchResponse struct { 9169 // Entries: The result of the execution of the batch requests. 9170 Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` 9171 9172 // Kind: Identifies what kind of resource this is. Value: the fixed 9173 // string "content#posCustomBatchResponse". 9174 Kind string `json:"kind,omitempty"` 9175 9176 // ServerResponse contains the HTTP response code and headers from the 9177 // server. 9178 googleapi.ServerResponse `json:"-"` 9179 9180 // ForceSendFields is a list of field names (e.g. "Entries") to 9181 // unconditionally include in API requests. By default, fields with 9182 // empty values are omitted from API requests. However, any non-pointer, 9183 // non-interface field appearing in ForceSendFields will be sent to the 9184 // server regardless of whether the field is empty or not. This may be 9185 // used to include empty fields in Patch requests. 9186 ForceSendFields []string `json:"-"` 9187 9188 // NullFields is a list of field names (e.g. "Entries") to include in 9189 // API requests with the JSON null value. By default, fields with empty 9190 // values are omitted from API requests. However, any field with an 9191 // empty value appearing in NullFields will be sent to the server as 9192 // null. It is an error if a field in this list has a non-empty value. 9193 // This may be used to include null fields in Patch requests. 9194 NullFields []string `json:"-"` 9195} 9196 9197func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) { 9198 type NoMethod PosCustomBatchResponse 9199 raw := NoMethod(*s) 9200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9201} 9202 9203type PosCustomBatchResponseEntry struct { 9204 // BatchId: The ID of the request entry to which this entry responds. 9205 BatchId int64 `json:"batchId,omitempty"` 9206 9207 // Errors: A list of errors defined if, and only if, the request failed. 9208 Errors *Errors `json:"errors,omitempty"` 9209 9210 // Inventory: The updated inventory information. 9211 Inventory *PosInventory `json:"inventory,omitempty"` 9212 9213 // Kind: Identifies what kind of resource this is. Value: the fixed 9214 // string "content#posCustomBatchResponseEntry" 9215 Kind string `json:"kind,omitempty"` 9216 9217 // Sale: The updated sale information. 9218 Sale *PosSale `json:"sale,omitempty"` 9219 9220 // Store: The retrieved or updated store information. 9221 Store *PosStore `json:"store,omitempty"` 9222 9223 // ForceSendFields is a list of field names (e.g. "BatchId") to 9224 // unconditionally include in API requests. By default, fields with 9225 // empty values are omitted from API requests. However, any non-pointer, 9226 // non-interface field appearing in ForceSendFields will be sent to the 9227 // server regardless of whether the field is empty or not. This may be 9228 // used to include empty fields in Patch requests. 9229 ForceSendFields []string `json:"-"` 9230 9231 // NullFields is a list of field names (e.g. "BatchId") to include in 9232 // API requests with the JSON null value. By default, fields with empty 9233 // values are omitted from API requests. However, any field with an 9234 // empty value appearing in NullFields will be sent to the server as 9235 // null. It is an error if a field in this list has a non-empty value. 9236 // This may be used to include null fields in Patch requests. 9237 NullFields []string `json:"-"` 9238} 9239 9240func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 9241 type NoMethod PosCustomBatchResponseEntry 9242 raw := NoMethod(*s) 9243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9244} 9245 9246type PosDataProviders struct { 9247 // Country: Country code. 9248 Country string `json:"country,omitempty"` 9249 9250 // PosDataProviders: A list of POS data providers. 9251 PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` 9252 9253 // ForceSendFields is a list of field names (e.g. "Country") to 9254 // unconditionally include in API requests. By default, fields with 9255 // empty values are omitted from API requests. However, any non-pointer, 9256 // non-interface field appearing in ForceSendFields will be sent to the 9257 // server regardless of whether the field is empty or not. This may be 9258 // used to include empty fields in Patch requests. 9259 ForceSendFields []string `json:"-"` 9260 9261 // NullFields is a list of field names (e.g. "Country") to include in 9262 // API requests with the JSON null value. By default, fields with empty 9263 // values are omitted from API requests. However, any field with an 9264 // empty value appearing in NullFields will be sent to the server as 9265 // null. It is an error if a field in this list has a non-empty value. 9266 // This may be used to include null fields in Patch requests. 9267 NullFields []string `json:"-"` 9268} 9269 9270func (s *PosDataProviders) MarshalJSON() ([]byte, error) { 9271 type NoMethod PosDataProviders 9272 raw := NoMethod(*s) 9273 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9274} 9275 9276type PosDataProvidersPosDataProvider struct { 9277 // DisplayName: The display name of Pos data Provider. 9278 DisplayName string `json:"displayName,omitempty"` 9279 9280 // FullName: The full name of this POS data Provider. 9281 FullName string `json:"fullName,omitempty"` 9282 9283 // ProviderId: The ID of the account. 9284 ProviderId uint64 `json:"providerId,omitempty,string"` 9285 9286 // ForceSendFields is a list of field names (e.g. "DisplayName") to 9287 // unconditionally include in API requests. By default, fields with 9288 // empty values are omitted from API requests. However, any non-pointer, 9289 // non-interface field appearing in ForceSendFields will be sent to the 9290 // server regardless of whether the field is empty or not. This may be 9291 // used to include empty fields in Patch requests. 9292 ForceSendFields []string `json:"-"` 9293 9294 // NullFields is a list of field names (e.g. "DisplayName") to include 9295 // in API requests with the JSON null value. By default, fields with 9296 // empty values are omitted from API requests. However, any field with 9297 // an empty value appearing in NullFields will be sent to the server as 9298 // null. It is an error if a field in this list has a non-empty value. 9299 // This may be used to include null fields in Patch requests. 9300 NullFields []string `json:"-"` 9301} 9302 9303func (s *PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { 9304 type NoMethod PosDataProvidersPosDataProvider 9305 raw := NoMethod(*s) 9306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9307} 9308 9309// PosInventory: The absolute quantity of an item available at the given 9310// store. 9311type PosInventory struct { 9312 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9313 // the item. 9314 ContentLanguage string `json:"contentLanguage,omitempty"` 9315 9316 // Gtin: Global Trade Item Number. 9317 Gtin string `json:"gtin,omitempty"` 9318 9319 // ItemId: Required. A unique identifier for the item. 9320 ItemId string `json:"itemId,omitempty"` 9321 9322 // Kind: Identifies what kind of resource this is. Value: the fixed 9323 // string "content#posInventory" 9324 Kind string `json:"kind,omitempty"` 9325 9326 // Price: Required. The current price of the item. 9327 Price *Price `json:"price,omitempty"` 9328 9329 // Quantity: Required. The available quantity of the item. 9330 Quantity int64 `json:"quantity,omitempty,string"` 9331 9332 // StoreCode: Required. The identifier of the merchant's store. Either a 9333 // `storeCode` inserted via the API or the code of the store in Google 9334 // My Business. 9335 StoreCode string `json:"storeCode,omitempty"` 9336 9337 // TargetCountry: Required. The CLDR territory code for the item. 9338 TargetCountry string `json:"targetCountry,omitempty"` 9339 9340 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9341 Timestamp string `json:"timestamp,omitempty"` 9342 9343 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9344 // unconditionally include in API requests. By default, fields with 9345 // empty values are omitted from API requests. However, any non-pointer, 9346 // non-interface field appearing in ForceSendFields will be sent to the 9347 // server regardless of whether the field is empty or not. This may be 9348 // used to include empty fields in Patch requests. 9349 ForceSendFields []string `json:"-"` 9350 9351 // NullFields is a list of field names (e.g. "ContentLanguage") to 9352 // include in API requests with the JSON null value. By default, fields 9353 // with empty values are omitted from API requests. However, any field 9354 // with an empty value appearing in NullFields will be sent to the 9355 // server as null. It is an error if a field in this list has a 9356 // non-empty value. This may be used to include null fields in Patch 9357 // requests. 9358 NullFields []string `json:"-"` 9359} 9360 9361func (s *PosInventory) MarshalJSON() ([]byte, error) { 9362 type NoMethod PosInventory 9363 raw := NoMethod(*s) 9364 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9365} 9366 9367type PosInventoryRequest struct { 9368 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9369 // the item. 9370 ContentLanguage string `json:"contentLanguage,omitempty"` 9371 9372 // Gtin: Global Trade Item Number. 9373 Gtin string `json:"gtin,omitempty"` 9374 9375 // ItemId: Required. A unique identifier for the item. 9376 ItemId string `json:"itemId,omitempty"` 9377 9378 // Price: Required. The current price of the item. 9379 Price *Price `json:"price,omitempty"` 9380 9381 // Quantity: Required. The available quantity of the item. 9382 Quantity int64 `json:"quantity,omitempty,string"` 9383 9384 // StoreCode: Required. The identifier of the merchant's store. Either a 9385 // `storeCode` inserted via the API or the code of the store in Google 9386 // My Business. 9387 StoreCode string `json:"storeCode,omitempty"` 9388 9389 // TargetCountry: Required. The CLDR territory code for the item. 9390 TargetCountry string `json:"targetCountry,omitempty"` 9391 9392 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9393 Timestamp string `json:"timestamp,omitempty"` 9394 9395 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9396 // unconditionally include in API requests. By default, fields with 9397 // empty values are omitted from API requests. However, any non-pointer, 9398 // non-interface field appearing in ForceSendFields will be sent to the 9399 // server regardless of whether the field is empty or not. This may be 9400 // used to include empty fields in Patch requests. 9401 ForceSendFields []string `json:"-"` 9402 9403 // NullFields is a list of field names (e.g. "ContentLanguage") to 9404 // include in API requests with the JSON null value. By default, fields 9405 // with empty values are omitted from API requests. However, any field 9406 // with an empty value appearing in NullFields will be sent to the 9407 // server as null. It is an error if a field in this list has a 9408 // non-empty value. This may be used to include null fields in Patch 9409 // requests. 9410 NullFields []string `json:"-"` 9411} 9412 9413func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) { 9414 type NoMethod PosInventoryRequest 9415 raw := NoMethod(*s) 9416 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9417} 9418 9419type PosInventoryResponse struct { 9420 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9421 // the item. 9422 ContentLanguage string `json:"contentLanguage,omitempty"` 9423 9424 // Gtin: Global Trade Item Number. 9425 Gtin string `json:"gtin,omitempty"` 9426 9427 // ItemId: Required. A unique identifier for the item. 9428 ItemId string `json:"itemId,omitempty"` 9429 9430 // Kind: Identifies what kind of resource this is. Value: the fixed 9431 // string "content#posInventoryResponse". 9432 Kind string `json:"kind,omitempty"` 9433 9434 // Price: Required. The current price of the item. 9435 Price *Price `json:"price,omitempty"` 9436 9437 // Quantity: Required. The available quantity of the item. 9438 Quantity int64 `json:"quantity,omitempty,string"` 9439 9440 // StoreCode: Required. The identifier of the merchant's store. Either a 9441 // `storeCode` inserted via the API or the code of the store in Google 9442 // My Business. 9443 StoreCode string `json:"storeCode,omitempty"` 9444 9445 // TargetCountry: Required. The CLDR territory code for the item. 9446 TargetCountry string `json:"targetCountry,omitempty"` 9447 9448 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9449 Timestamp string `json:"timestamp,omitempty"` 9450 9451 // ServerResponse contains the HTTP response code and headers from the 9452 // server. 9453 googleapi.ServerResponse `json:"-"` 9454 9455 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9456 // unconditionally include in API requests. By default, fields with 9457 // empty values are omitted from API requests. However, any non-pointer, 9458 // non-interface field appearing in ForceSendFields will be sent to the 9459 // server regardless of whether the field is empty or not. This may be 9460 // used to include empty fields in Patch requests. 9461 ForceSendFields []string `json:"-"` 9462 9463 // NullFields is a list of field names (e.g. "ContentLanguage") to 9464 // include in API requests with the JSON null value. By default, fields 9465 // with empty values are omitted from API requests. However, any field 9466 // with an empty value appearing in NullFields will be sent to the 9467 // server as null. It is an error if a field in this list has a 9468 // non-empty value. This may be used to include null fields in Patch 9469 // requests. 9470 NullFields []string `json:"-"` 9471} 9472 9473func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) { 9474 type NoMethod PosInventoryResponse 9475 raw := NoMethod(*s) 9476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9477} 9478 9479type PosListResponse struct { 9480 // Kind: Identifies what kind of resource this is. Value: the fixed 9481 // string "content#posListResponse". 9482 Kind string `json:"kind,omitempty"` 9483 9484 Resources []*PosStore `json:"resources,omitempty"` 9485 9486 // ServerResponse contains the HTTP response code and headers from the 9487 // server. 9488 googleapi.ServerResponse `json:"-"` 9489 9490 // ForceSendFields is a list of field names (e.g. "Kind") to 9491 // unconditionally include in API requests. By default, fields with 9492 // empty values are omitted from API requests. However, any non-pointer, 9493 // non-interface field appearing in ForceSendFields will be sent to the 9494 // server regardless of whether the field is empty or not. This may be 9495 // used to include empty fields in Patch requests. 9496 ForceSendFields []string `json:"-"` 9497 9498 // NullFields is a list of field names (e.g. "Kind") to include in API 9499 // requests with the JSON null value. By default, fields with empty 9500 // values are omitted from API requests. However, any field with an 9501 // empty value appearing in NullFields will be sent to the server as 9502 // null. It is an error if a field in this list has a non-empty value. 9503 // This may be used to include null fields in Patch requests. 9504 NullFields []string `json:"-"` 9505} 9506 9507func (s *PosListResponse) MarshalJSON() ([]byte, error) { 9508 type NoMethod PosListResponse 9509 raw := NoMethod(*s) 9510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9511} 9512 9513// PosSale: The change of the available quantity of an item at the given 9514// store. 9515type PosSale struct { 9516 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9517 // the item. 9518 ContentLanguage string `json:"contentLanguage,omitempty"` 9519 9520 // Gtin: Global Trade Item Number. 9521 Gtin string `json:"gtin,omitempty"` 9522 9523 // ItemId: Required. A unique identifier for the item. 9524 ItemId string `json:"itemId,omitempty"` 9525 9526 // Kind: Identifies what kind of resource this is. Value: the fixed 9527 // string "content#posSale" 9528 Kind string `json:"kind,omitempty"` 9529 9530 // Price: Required. The price of the item. 9531 Price *Price `json:"price,omitempty"` 9532 9533 // Quantity: Required. The relative change of the available quantity. 9534 // Negative for items returned. 9535 Quantity int64 `json:"quantity,omitempty,string"` 9536 9537 // SaleId: A unique ID to group items from the same sale event. 9538 SaleId string `json:"saleId,omitempty"` 9539 9540 // StoreCode: Required. The identifier of the merchant's store. Either a 9541 // `storeCode` inserted via the API or the code of the store in Google 9542 // My Business. 9543 StoreCode string `json:"storeCode,omitempty"` 9544 9545 // TargetCountry: Required. The CLDR territory code for the item. 9546 TargetCountry string `json:"targetCountry,omitempty"` 9547 9548 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9549 Timestamp string `json:"timestamp,omitempty"` 9550 9551 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9552 // unconditionally include in API requests. By default, fields with 9553 // empty values are omitted from API requests. However, any non-pointer, 9554 // non-interface field appearing in ForceSendFields will be sent to the 9555 // server regardless of whether the field is empty or not. This may be 9556 // used to include empty fields in Patch requests. 9557 ForceSendFields []string `json:"-"` 9558 9559 // NullFields is a list of field names (e.g. "ContentLanguage") to 9560 // include in API requests with the JSON null value. By default, fields 9561 // with empty values are omitted from API requests. However, any field 9562 // with an empty value appearing in NullFields will be sent to the 9563 // server as null. It is an error if a field in this list has a 9564 // non-empty value. This may be used to include null fields in Patch 9565 // requests. 9566 NullFields []string `json:"-"` 9567} 9568 9569func (s *PosSale) MarshalJSON() ([]byte, error) { 9570 type NoMethod PosSale 9571 raw := NoMethod(*s) 9572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9573} 9574 9575type PosSaleRequest struct { 9576 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9577 // the item. 9578 ContentLanguage string `json:"contentLanguage,omitempty"` 9579 9580 // Gtin: Global Trade Item Number. 9581 Gtin string `json:"gtin,omitempty"` 9582 9583 // ItemId: Required. A unique identifier for the item. 9584 ItemId string `json:"itemId,omitempty"` 9585 9586 // Price: Required. The price of the item. 9587 Price *Price `json:"price,omitempty"` 9588 9589 // Quantity: Required. The relative change of the available quantity. 9590 // Negative for items returned. 9591 Quantity int64 `json:"quantity,omitempty,string"` 9592 9593 // SaleId: A unique ID to group items from the same sale event. 9594 SaleId string `json:"saleId,omitempty"` 9595 9596 // StoreCode: Required. The identifier of the merchant's store. Either a 9597 // `storeCode` inserted via the API or the code of the store in Google 9598 // My Business. 9599 StoreCode string `json:"storeCode,omitempty"` 9600 9601 // TargetCountry: Required. The CLDR territory code for the item. 9602 TargetCountry string `json:"targetCountry,omitempty"` 9603 9604 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9605 Timestamp string `json:"timestamp,omitempty"` 9606 9607 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9608 // unconditionally include in API requests. By default, fields with 9609 // empty values are omitted from API requests. However, any non-pointer, 9610 // non-interface field appearing in ForceSendFields will be sent to the 9611 // server regardless of whether the field is empty or not. This may be 9612 // used to include empty fields in Patch requests. 9613 ForceSendFields []string `json:"-"` 9614 9615 // NullFields is a list of field names (e.g. "ContentLanguage") to 9616 // include in API requests with the JSON null value. By default, fields 9617 // with empty values are omitted from API requests. However, any field 9618 // with an empty value appearing in NullFields will be sent to the 9619 // server as null. It is an error if a field in this list has a 9620 // non-empty value. This may be used to include null fields in Patch 9621 // requests. 9622 NullFields []string `json:"-"` 9623} 9624 9625func (s *PosSaleRequest) MarshalJSON() ([]byte, error) { 9626 type NoMethod PosSaleRequest 9627 raw := NoMethod(*s) 9628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9629} 9630 9631type PosSaleResponse struct { 9632 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9633 // the item. 9634 ContentLanguage string `json:"contentLanguage,omitempty"` 9635 9636 // Gtin: Global Trade Item Number. 9637 Gtin string `json:"gtin,omitempty"` 9638 9639 // ItemId: Required. A unique identifier for the item. 9640 ItemId string `json:"itemId,omitempty"` 9641 9642 // Kind: Identifies what kind of resource this is. Value: the fixed 9643 // string "content#posSaleResponse". 9644 Kind string `json:"kind,omitempty"` 9645 9646 // Price: Required. The price of the item. 9647 Price *Price `json:"price,omitempty"` 9648 9649 // Quantity: Required. The relative change of the available quantity. 9650 // Negative for items returned. 9651 Quantity int64 `json:"quantity,omitempty,string"` 9652 9653 // SaleId: A unique ID to group items from the same sale event. 9654 SaleId string `json:"saleId,omitempty"` 9655 9656 // StoreCode: Required. The identifier of the merchant's store. Either a 9657 // `storeCode` inserted via the API or the code of the store in Google 9658 // My Business. 9659 StoreCode string `json:"storeCode,omitempty"` 9660 9661 // TargetCountry: Required. The CLDR territory code for the item. 9662 TargetCountry string `json:"targetCountry,omitempty"` 9663 9664 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9665 Timestamp string `json:"timestamp,omitempty"` 9666 9667 // ServerResponse contains the HTTP response code and headers from the 9668 // server. 9669 googleapi.ServerResponse `json:"-"` 9670 9671 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9672 // unconditionally include in API requests. By default, fields with 9673 // empty values are omitted from API requests. However, any non-pointer, 9674 // non-interface field appearing in ForceSendFields will be sent to the 9675 // server regardless of whether the field is empty or not. This may be 9676 // used to include empty fields in Patch requests. 9677 ForceSendFields []string `json:"-"` 9678 9679 // NullFields is a list of field names (e.g. "ContentLanguage") to 9680 // include in API requests with the JSON null value. By default, fields 9681 // with empty values are omitted from API requests. However, any field 9682 // with an empty value appearing in NullFields will be sent to the 9683 // server as null. It is an error if a field in this list has a 9684 // non-empty value. This may be used to include null fields in Patch 9685 // requests. 9686 NullFields []string `json:"-"` 9687} 9688 9689func (s *PosSaleResponse) MarshalJSON() ([]byte, error) { 9690 type NoMethod PosSaleResponse 9691 raw := NoMethod(*s) 9692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9693} 9694 9695// PosStore: Store resource. 9696type PosStore struct { 9697 // Kind: Identifies what kind of resource this is. Value: the fixed 9698 // string "content#posStore" 9699 Kind string `json:"kind,omitempty"` 9700 9701 // StoreAddress: Required. The street address of the store. 9702 StoreAddress string `json:"storeAddress,omitempty"` 9703 9704 // StoreCode: Required. A store identifier that is unique for the given 9705 // merchant. 9706 StoreCode string `json:"storeCode,omitempty"` 9707 9708 // ServerResponse contains the HTTP response code and headers from the 9709 // server. 9710 googleapi.ServerResponse `json:"-"` 9711 9712 // ForceSendFields is a list of field names (e.g. "Kind") to 9713 // unconditionally include in API requests. By default, fields with 9714 // empty values are omitted from API requests. However, any non-pointer, 9715 // non-interface field appearing in ForceSendFields will be sent to the 9716 // server regardless of whether the field is empty or not. This may be 9717 // used to include empty fields in Patch requests. 9718 ForceSendFields []string `json:"-"` 9719 9720 // NullFields is a list of field names (e.g. "Kind") to include in API 9721 // requests with the JSON null value. By default, fields with empty 9722 // values are omitted from API requests. However, any field with an 9723 // empty value appearing in NullFields will be sent to the server as 9724 // null. It is an error if a field in this list has a non-empty value. 9725 // This may be used to include null fields in Patch requests. 9726 NullFields []string `json:"-"` 9727} 9728 9729func (s *PosStore) MarshalJSON() ([]byte, error) { 9730 type NoMethod PosStore 9731 raw := NoMethod(*s) 9732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9733} 9734 9735type PostalCodeGroup struct { 9736 // Country: The CLDR territory code of the country the postal code group 9737 // applies to. Required. 9738 Country string `json:"country,omitempty"` 9739 9740 // Name: The name of the postal code group, referred to in headers. 9741 // Required. 9742 Name string `json:"name,omitempty"` 9743 9744 // PostalCodeRanges: A range of postal codes. Required. 9745 PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` 9746 9747 // ForceSendFields is a list of field names (e.g. "Country") to 9748 // unconditionally include in API requests. By default, fields with 9749 // empty values are omitted from API requests. However, any non-pointer, 9750 // non-interface field appearing in ForceSendFields will be sent to the 9751 // server regardless of whether the field is empty or not. This may be 9752 // used to include empty fields in Patch requests. 9753 ForceSendFields []string `json:"-"` 9754 9755 // NullFields is a list of field names (e.g. "Country") to include in 9756 // API requests with the JSON null value. By default, fields with empty 9757 // values are omitted from API requests. However, any field with an 9758 // empty value appearing in NullFields will be sent to the server as 9759 // null. It is an error if a field in this list has a non-empty value. 9760 // This may be used to include null fields in Patch requests. 9761 NullFields []string `json:"-"` 9762} 9763 9764func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) { 9765 type NoMethod PostalCodeGroup 9766 raw := NoMethod(*s) 9767 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9768} 9769 9770type PostalCodeRange struct { 9771 // PostalCodeRangeBegin: A postal code or a pattern of the form 9772 // `prefix*` denoting the inclusive lower bound of the range defining 9773 // the area. Examples values: "94108", "9410*", "9*". Required. 9774 PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` 9775 9776 // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` 9777 // denoting the inclusive upper bound of the range defining the area. It 9778 // must have the same length as `postalCodeRangeBegin`: if 9779 // `postalCodeRangeBegin` is a postal code then `postalCodeRangeEnd` 9780 // must be a postal code too; if `postalCodeRangeBegin` is a pattern 9781 // then `postalCodeRangeEnd` must be a pattern with the same prefix 9782 // length. Optional: if not set, then the area is defined as being all 9783 // the postal codes matching `postalCodeRangeBegin`. 9784 PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` 9785 9786 // ForceSendFields is a list of field names (e.g. 9787 // "PostalCodeRangeBegin") to unconditionally include in API requests. 9788 // By default, fields with empty values are omitted from API requests. 9789 // However, any non-pointer, non-interface field appearing in 9790 // ForceSendFields will be sent to the server regardless of whether the 9791 // field is empty or not. This may be used to include empty fields in 9792 // Patch requests. 9793 ForceSendFields []string `json:"-"` 9794 9795 // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to 9796 // include in API requests with the JSON null value. By default, fields 9797 // with empty values are omitted from API requests. However, any field 9798 // with an empty value appearing in NullFields will be sent to the 9799 // server as null. It is an error if a field in this list has a 9800 // non-empty value. This may be used to include null fields in Patch 9801 // requests. 9802 NullFields []string `json:"-"` 9803} 9804 9805func (s *PostalCodeRange) MarshalJSON() ([]byte, error) { 9806 type NoMethod PostalCodeRange 9807 raw := NoMethod(*s) 9808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9809} 9810 9811type Price struct { 9812 // Currency: The currency of the price. 9813 Currency string `json:"currency,omitempty"` 9814 9815 // Value: The price represented as a number. 9816 Value string `json:"value,omitempty"` 9817 9818 // ForceSendFields is a list of field names (e.g. "Currency") to 9819 // unconditionally include in API requests. By default, fields with 9820 // empty values are omitted from API requests. However, any non-pointer, 9821 // non-interface field appearing in ForceSendFields will be sent to the 9822 // server regardless of whether the field is empty or not. This may be 9823 // used to include empty fields in Patch requests. 9824 ForceSendFields []string `json:"-"` 9825 9826 // NullFields is a list of field names (e.g. "Currency") to include in 9827 // API requests with the JSON null value. By default, fields with empty 9828 // values are omitted from API requests. However, any field with an 9829 // empty value appearing in NullFields will be sent to the server as 9830 // null. It is an error if a field in this list has a non-empty value. 9831 // This may be used to include null fields in Patch requests. 9832 NullFields []string `json:"-"` 9833} 9834 9835func (s *Price) MarshalJSON() ([]byte, error) { 9836 type NoMethod Price 9837 raw := NoMethod(*s) 9838 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9839} 9840 9841// Product: Required product attributes are primarily defined by the 9842// products data specification. See the Products Data Specification 9843// Help Center article for information. 9844// 9845// Some attributes are country-specific, so make sure you select the 9846// appropriate country in the drop-down selector at the top of the page. 9847// 9848// 9849// Product data. After inserting, updating, or deleting a product, it 9850// may take several minutes before changes take effect. 9851type Product struct { 9852 // AdditionalImageLinks: Additional URLs of images of the item. 9853 AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` 9854 9855 // AdditionalProductTypes: Additional categories of the item (formatted 9856 // as in products data specification). 9857 AdditionalProductTypes []string `json:"additionalProductTypes,omitempty"` 9858 9859 // Adult: Set to true if the item is targeted towards adults. 9860 Adult bool `json:"adult,omitempty"` 9861 9862 // AdwordsGrouping: Used to group items in an arbitrary way. Only for 9863 // CPA%, discouraged otherwise. 9864 AdwordsGrouping string `json:"adwordsGrouping,omitempty"` 9865 9866 // AdwordsLabels: Similar to adwords_grouping, but only works on CPC. 9867 AdwordsLabels []string `json:"adwordsLabels,omitempty"` 9868 9869 // AdwordsRedirect: Allows advertisers to override the item URL when the 9870 // product is shown within the context of Product Ads. 9871 AdwordsRedirect string `json:"adwordsRedirect,omitempty"` 9872 9873 // AgeGroup: Target age group of the item. 9874 // 9875 // Acceptable values are: 9876 // - "adult" 9877 // - "infant" 9878 // - "kids" 9879 // - "newborn" 9880 // - "toddler" 9881 // - "youngAdult" 9882 AgeGroup string `json:"ageGroup,omitempty"` 9883 9884 // Aspects: Deprecated. Do not use. 9885 Aspects []*ProductAspect `json:"aspects,omitempty"` 9886 9887 // Availability: Availability status of the item. 9888 // 9889 // Acceptable values are: 9890 // - "in stock" 9891 // - "out of stock" 9892 // - "preorder" 9893 Availability string `json:"availability,omitempty"` 9894 9895 // AvailabilityDate: The day a pre-ordered product becomes available for 9896 // delivery, in ISO 8601 format. 9897 AvailabilityDate string `json:"availabilityDate,omitempty"` 9898 9899 // Brand: Brand of the item. 9900 Brand string `json:"brand,omitempty"` 9901 9902 // Channel: Required. The item's channel (online or local). 9903 // 9904 // Acceptable values are: 9905 // - "local" 9906 // - "online" 9907 Channel string `json:"channel,omitempty"` 9908 9909 // Color: Color of the item. 9910 Color string `json:"color,omitempty"` 9911 9912 // Condition: Condition or state of the item. 9913 // 9914 // Acceptable values are: 9915 // - "local" 9916 // - "online" 9917 Condition string `json:"condition,omitempty"` 9918 9919 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9920 // the item. 9921 ContentLanguage string `json:"contentLanguage,omitempty"` 9922 9923 // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. 9924 CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` 9925 9926 // CustomAttributes: A list of custom (merchant-provided) attributes. It 9927 // can also be used for submitting any attribute of the feed 9928 // specification in its generic form (e.g., `{ "name": "size type", 9929 // "value": "regular" }`). This is useful for submitting attributes not 9930 // explicitly exposed by the API, such as additional attributes used for 9931 // Shopping Actions. 9932 CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` 9933 9934 // CustomGroups: A list of custom (merchant-provided) custom attribute 9935 // groups. 9936 CustomGroups []*CustomGroup `json:"customGroups,omitempty"` 9937 9938 // CustomLabel0: Custom label 0 for custom grouping of items in a 9939 // Shopping campaign. 9940 CustomLabel0 string `json:"customLabel0,omitempty"` 9941 9942 // CustomLabel1: Custom label 1 for custom grouping of items in a 9943 // Shopping campaign. 9944 CustomLabel1 string `json:"customLabel1,omitempty"` 9945 9946 // CustomLabel2: Custom label 2 for custom grouping of items in a 9947 // Shopping campaign. 9948 CustomLabel2 string `json:"customLabel2,omitempty"` 9949 9950 // CustomLabel3: Custom label 3 for custom grouping of items in a 9951 // Shopping campaign. 9952 CustomLabel3 string `json:"customLabel3,omitempty"` 9953 9954 // CustomLabel4: Custom label 4 for custom grouping of items in a 9955 // Shopping campaign. 9956 CustomLabel4 string `json:"customLabel4,omitempty"` 9957 9958 // Description: Description of the item. 9959 Description string `json:"description,omitempty"` 9960 9961 // Destinations: Specifies the intended destinations for the product. 9962 Destinations []*ProductDestination `json:"destinations,omitempty"` 9963 9964 // DisplayAdsId: An identifier for an item for dynamic remarketing 9965 // campaigns. 9966 DisplayAdsId string `json:"displayAdsId,omitempty"` 9967 9968 // DisplayAdsLink: URL directly to your item's landing page for dynamic 9969 // remarketing campaigns. 9970 DisplayAdsLink string `json:"displayAdsLink,omitempty"` 9971 9972 // DisplayAdsSimilarIds: Advertiser-specified recommendations. 9973 DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` 9974 9975 // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. 9976 DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` 9977 9978 // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. 9979 DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` 9980 9981 // EnergyEfficiencyClass: The energy efficiency class as defined in EU 9982 // directive 2010/30/EU. 9983 // 9984 // Acceptable values are: 9985 // - "A" 9986 // - "A+" 9987 // - "A++" 9988 // - "A+++" 9989 // - "B" 9990 // - "C" 9991 // - "D" 9992 // - "E" 9993 // - "F" 9994 // - "G" 9995 EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` 9996 9997 // ExpirationDate: Date on which the item should expire, as specified 9998 // upon insertion, in ISO 8601 format. The actual expiration date in 9999 // Google Shopping is exposed in `productstatuses` as 10000 // `googleExpirationDate` and might be earlier if `expirationDate` is 10001 // too far in the future. 10002 ExpirationDate string `json:"expirationDate,omitempty"` 10003 10004 // Gender: Target gender of the item. 10005 // 10006 // Acceptable values are: 10007 // - "female" 10008 // - "male" 10009 // - "unisex" 10010 Gender string `json:"gender,omitempty"` 10011 10012 // GoogleProductCategory: Google's category of the item (see Google 10013 // product taxonomy). 10014 GoogleProductCategory string `json:"googleProductCategory,omitempty"` 10015 10016 // Gtin: Global Trade Item Number (GTIN) of the item. 10017 Gtin string `json:"gtin,omitempty"` 10018 10019 // Id: The REST ID of the product. Content API methods that operate on 10020 // products take this as their `productId` parameter. 10021 // The REST ID for a product is of the form 10022 // channel:contentLanguage:targetCountry: offerId. 10023 Id string `json:"id,omitempty"` 10024 10025 // IdentifierExists: False when the item does not have unique product 10026 // identifiers appropriate to its category, such as GTIN, MPN, and 10027 // brand. Required according to the Unique Product Identifier Rules for 10028 // all target countries except for Canada. 10029 IdentifierExists bool `json:"identifierExists,omitempty"` 10030 10031 // ImageLink: URL of an image of the item. 10032 ImageLink string `json:"imageLink,omitempty"` 10033 10034 // Installment: Number and amount of installments to pay for an item. 10035 // Brazil only. 10036 Installment *Installment `json:"installment,omitempty"` 10037 10038 // IsBundle: Whether the item is a merchant-defined bundle. A bundle is 10039 // a custom grouping of different products sold by a merchant for a 10040 // single price. 10041 IsBundle bool `json:"isBundle,omitempty"` 10042 10043 // ItemGroupId: Shared identifier for all variants of the same product. 10044 ItemGroupId string `json:"itemGroupId,omitempty"` 10045 10046 // Kind: Identifies what kind of resource this is. Value: the fixed 10047 // string "content#product" 10048 Kind string `json:"kind,omitempty"` 10049 10050 // Link: URL directly linking to your item's page on your website. 10051 Link string `json:"link,omitempty"` 10052 10053 // LoyaltyPoints: Loyalty points that users receive after purchasing the 10054 // item. Japan only. 10055 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 10056 10057 // Material: The material of which the item is made. 10058 Material string `json:"material,omitempty"` 10059 10060 // MaxEnergyEfficiencyClass: The energy efficiency class as defined in 10061 // EU directive 2010/30/EU. 10062 // 10063 // Acceptable values are: 10064 // - "A" 10065 // - "A+" 10066 // - "A++" 10067 // - "A+++" 10068 // - "B" 10069 // - "C" 10070 // - "D" 10071 // - "E" 10072 // - "F" 10073 // - "G" 10074 MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` 10075 10076 // MaxHandlingTime: Maximal product handling time (in business days). 10077 MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` 10078 10079 // MinEnergyEfficiencyClass: The energy efficiency class as defined in 10080 // EU directive 2010/30/EU. 10081 // 10082 // Acceptable values are: 10083 // - "A" 10084 // - "A+" 10085 // - "A++" 10086 // - "A+++" 10087 // - "B" 10088 // - "C" 10089 // - "D" 10090 // - "E" 10091 // - "F" 10092 // - "G" 10093 MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` 10094 10095 // MinHandlingTime: Minimal product handling time (in business days). 10096 MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` 10097 10098 // MobileLink: Link to a mobile-optimized version of the landing page. 10099 MobileLink string `json:"mobileLink,omitempty"` 10100 10101 // Mpn: Manufacturer Part Number (MPN) of the item. 10102 Mpn string `json:"mpn,omitempty"` 10103 10104 // Multipack: The number of identical products in a merchant-defined 10105 // multipack. 10106 Multipack int64 `json:"multipack,omitempty,string"` 10107 10108 // OfferId: Required. A unique identifier for the item. Leading and 10109 // trailing whitespaces are stripped and multiple whitespaces are 10110 // replaced by a single whitespace upon submission. Only valid unicode 10111 // characters are accepted. See the products feed specification for 10112 // details. 10113 // Note: Content API methods that operate on products take the REST ID 10114 // of the product, not this identifier. 10115 OfferId string `json:"offerId,omitempty"` 10116 10117 // OnlineOnly: Deprecated. 10118 OnlineOnly bool `json:"onlineOnly,omitempty"` 10119 10120 // Pattern: The item's pattern (e.g. polka dots). 10121 Pattern string `json:"pattern,omitempty"` 10122 10123 // Price: Price of the item. 10124 Price *Price `json:"price,omitempty"` 10125 10126 // ProductType: Your category of the item (formatted as in products data 10127 // specification). 10128 ProductType string `json:"productType,omitempty"` 10129 10130 // PromotionIds: The unique ID of a promotion. 10131 PromotionIds []string `json:"promotionIds,omitempty"` 10132 10133 // SalePrice: Advertised sale price of the item. 10134 SalePrice *Price `json:"salePrice,omitempty"` 10135 10136 // SalePriceEffectiveDate: Date range during which the item is on sale 10137 // (see products data specification). 10138 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 10139 10140 // SellOnGoogleQuantity: The quantity of the product that is available 10141 // for selling on Google. Supported only for online products. 10142 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` 10143 10144 // Shipping: Shipping rules. 10145 Shipping []*ProductShipping `json:"shipping,omitempty"` 10146 10147 // ShippingHeight: Height of the item for shipping. 10148 ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` 10149 10150 // ShippingLabel: The shipping label of the product, used to group 10151 // product in account-level shipping rules. 10152 ShippingLabel string `json:"shippingLabel,omitempty"` 10153 10154 // ShippingLength: Length of the item for shipping. 10155 ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` 10156 10157 // ShippingWeight: Weight of the item for shipping. 10158 ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` 10159 10160 // ShippingWidth: Width of the item for shipping. 10161 ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` 10162 10163 // SizeSystem: System in which the size is specified. Recommended for 10164 // apparel items. 10165 // 10166 // Acceptable values are: 10167 // - "AU" 10168 // - "BR" 10169 // - "CN" 10170 // - "DE" 10171 // - "EU" 10172 // - "FR" 10173 // - "IT" 10174 // - "JP" 10175 // - "MEX" 10176 // - "UK" 10177 // - "US" 10178 SizeSystem string `json:"sizeSystem,omitempty"` 10179 10180 // SizeType: The cut of the item. Recommended for apparel 10181 // items. 10182 // 10183 // Acceptable values are: 10184 // - "big and tall" 10185 // - "maternity" 10186 // - "oversize" 10187 // - "petite" 10188 // - "plus" 10189 // - "regular" 10190 SizeType string `json:"sizeType,omitempty"` 10191 10192 // Sizes: Size of the item. Only one value is allowed. For variants with 10193 // different sizes, insert a separate product for each size with the 10194 // same `itemGroupId` value (see size definition). 10195 Sizes []string `json:"sizes,omitempty"` 10196 10197 // Source: The source of the offer, i.e., how the offer was 10198 // created. 10199 // 10200 // Acceptable values are: 10201 // - "api" 10202 // - "crawl" 10203 // - "feed" 10204 Source string `json:"source,omitempty"` 10205 10206 // TargetCountry: Required. The CLDR territory code for the item. 10207 TargetCountry string `json:"targetCountry,omitempty"` 10208 10209 // Taxes: Tax information. 10210 Taxes []*ProductTax `json:"taxes,omitempty"` 10211 10212 // Title: Title of the item. 10213 Title string `json:"title,omitempty"` 10214 10215 // UnitPricingBaseMeasure: The preference of the denominator of the unit 10216 // price. 10217 UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` 10218 10219 // UnitPricingMeasure: The measure and dimension of an item. 10220 UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` 10221 10222 // ValidatedDestinations: Deprecated. The read-only list of intended 10223 // destinations which passed validation. 10224 ValidatedDestinations []string `json:"validatedDestinations,omitempty"` 10225 10226 // Warnings: Read-only warnings. 10227 Warnings []*Error `json:"warnings,omitempty"` 10228 10229 // ServerResponse contains the HTTP response code and headers from the 10230 // server. 10231 googleapi.ServerResponse `json:"-"` 10232 10233 // ForceSendFields is a list of field names (e.g. 10234 // "AdditionalImageLinks") to unconditionally include in API requests. 10235 // By default, fields with empty values are omitted from API requests. 10236 // However, any non-pointer, non-interface field appearing in 10237 // ForceSendFields will be sent to the server regardless of whether the 10238 // field is empty or not. This may be used to include empty fields in 10239 // Patch requests. 10240 ForceSendFields []string `json:"-"` 10241 10242 // NullFields is a list of field names (e.g. "AdditionalImageLinks") to 10243 // include in API requests with the JSON null value. By default, fields 10244 // with empty values are omitted from API requests. However, any field 10245 // with an empty value appearing in NullFields will be sent to the 10246 // server as null. It is an error if a field in this list has a 10247 // non-empty value. This may be used to include null fields in Patch 10248 // requests. 10249 NullFields []string `json:"-"` 10250} 10251 10252func (s *Product) MarshalJSON() ([]byte, error) { 10253 type NoMethod Product 10254 raw := NoMethod(*s) 10255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10256} 10257 10258func (s *Product) UnmarshalJSON(data []byte) error { 10259 type NoMethod Product 10260 var s1 struct { 10261 DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` 10262 *NoMethod 10263 } 10264 s1.NoMethod = (*NoMethod)(s) 10265 if err := json.Unmarshal(data, &s1); err != nil { 10266 return err 10267 } 10268 s.DisplayAdsValue = float64(s1.DisplayAdsValue) 10269 return nil 10270} 10271 10272type ProductAmount struct { 10273 // PriceAmount: The pre-tax or post-tax price depending on the location 10274 // of the order. 10275 PriceAmount *Price `json:"priceAmount,omitempty"` 10276 10277 // RemittedTaxAmount: Remitted tax value. 10278 RemittedTaxAmount *Price `json:"remittedTaxAmount,omitempty"` 10279 10280 // TaxAmount: Tax value. 10281 TaxAmount *Price `json:"taxAmount,omitempty"` 10282 10283 // ForceSendFields is a list of field names (e.g. "PriceAmount") to 10284 // unconditionally include in API requests. By default, fields with 10285 // empty values are omitted from API requests. However, any non-pointer, 10286 // non-interface field appearing in ForceSendFields will be sent to the 10287 // server regardless of whether the field is empty or not. This may be 10288 // used to include empty fields in Patch requests. 10289 ForceSendFields []string `json:"-"` 10290 10291 // NullFields is a list of field names (e.g. "PriceAmount") to include 10292 // in API requests with the JSON null value. By default, fields with 10293 // empty values are omitted from API requests. However, any field with 10294 // an empty value appearing in NullFields will be sent to the server as 10295 // null. It is an error if a field in this list has a non-empty value. 10296 // This may be used to include null fields in Patch requests. 10297 NullFields []string `json:"-"` 10298} 10299 10300func (s *ProductAmount) MarshalJSON() ([]byte, error) { 10301 type NoMethod ProductAmount 10302 raw := NoMethod(*s) 10303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10304} 10305 10306type ProductAspect struct { 10307 // AspectName: Deprecated. 10308 AspectName string `json:"aspectName,omitempty"` 10309 10310 // DestinationName: Deprecated. 10311 DestinationName string `json:"destinationName,omitempty"` 10312 10313 // Intention: Deprecated. 10314 Intention string `json:"intention,omitempty"` 10315 10316 // ForceSendFields is a list of field names (e.g. "AspectName") to 10317 // unconditionally include in API requests. By default, fields with 10318 // empty values are omitted from API requests. However, any non-pointer, 10319 // non-interface field appearing in ForceSendFields will be sent to the 10320 // server regardless of whether the field is empty or not. This may be 10321 // used to include empty fields in Patch requests. 10322 ForceSendFields []string `json:"-"` 10323 10324 // NullFields is a list of field names (e.g. "AspectName") to include in 10325 // API requests with the JSON null value. By default, fields with empty 10326 // values are omitted from API requests. However, any field with an 10327 // empty value appearing in NullFields will be sent to the server as 10328 // null. It is an error if a field in this list has a non-empty value. 10329 // This may be used to include null fields in Patch requests. 10330 NullFields []string `json:"-"` 10331} 10332 10333func (s *ProductAspect) MarshalJSON() ([]byte, error) { 10334 type NoMethod ProductAspect 10335 raw := NoMethod(*s) 10336 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10337} 10338 10339type ProductDestination struct { 10340 // DestinationName: The name of the destination. 10341 DestinationName string `json:"destinationName,omitempty"` 10342 10343 // Intention: Whether the destination is required, excluded or should be 10344 // validated. 10345 // 10346 // Acceptable values are: 10347 // - "default" 10348 // - "excluded" 10349 // - "optional" 10350 // - "required" 10351 Intention string `json:"intention,omitempty"` 10352 10353 // ForceSendFields is a list of field names (e.g. "DestinationName") to 10354 // unconditionally include in API requests. By default, fields with 10355 // empty values are omitted from API requests. However, any non-pointer, 10356 // non-interface field appearing in ForceSendFields will be sent to the 10357 // server regardless of whether the field is empty or not. This may be 10358 // used to include empty fields in Patch requests. 10359 ForceSendFields []string `json:"-"` 10360 10361 // NullFields is a list of field names (e.g. "DestinationName") to 10362 // include in API requests with the JSON null value. By default, fields 10363 // with empty values are omitted from API requests. However, any field 10364 // with an empty value appearing in NullFields will be sent to the 10365 // server as null. It is an error if a field in this list has a 10366 // non-empty value. This may be used to include null fields in Patch 10367 // requests. 10368 NullFields []string `json:"-"` 10369} 10370 10371func (s *ProductDestination) MarshalJSON() ([]byte, error) { 10372 type NoMethod ProductDestination 10373 raw := NoMethod(*s) 10374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10375} 10376 10377type ProductShipping struct { 10378 // Country: The CLDR territory code of the country to which an item will 10379 // ship. 10380 Country string `json:"country,omitempty"` 10381 10382 // LocationGroupName: The location where the shipping is applicable, 10383 // represented by a location group name. 10384 LocationGroupName string `json:"locationGroupName,omitempty"` 10385 10386 // LocationId: The numeric ID of a location that the shipping rate 10387 // applies to as defined in the AdWords API. 10388 LocationId int64 `json:"locationId,omitempty,string"` 10389 10390 // PostalCode: The postal code range that the shipping rate applies to, 10391 // represented by a postal code, a postal code prefix followed by a * 10392 // wildcard, a range between two postal codes or two postal code 10393 // prefixes of equal length. 10394 PostalCode string `json:"postalCode,omitempty"` 10395 10396 // Price: Fixed shipping price, represented as a number. 10397 Price *Price `json:"price,omitempty"` 10398 10399 // Region: The geographic region to which a shipping rate applies. 10400 Region string `json:"region,omitempty"` 10401 10402 // Service: A free-form description of the service class or delivery 10403 // speed. 10404 Service string `json:"service,omitempty"` 10405 10406 // ForceSendFields is a list of field names (e.g. "Country") to 10407 // unconditionally include in API requests. By default, fields with 10408 // empty values are omitted from API requests. However, any non-pointer, 10409 // non-interface field appearing in ForceSendFields will be sent to the 10410 // server regardless of whether the field is empty or not. This may be 10411 // used to include empty fields in Patch requests. 10412 ForceSendFields []string `json:"-"` 10413 10414 // NullFields is a list of field names (e.g. "Country") to include in 10415 // API requests with the JSON null value. By default, fields with empty 10416 // values are omitted from API requests. However, any field with an 10417 // empty value appearing in NullFields will be sent to the server as 10418 // null. It is an error if a field in this list has a non-empty value. 10419 // This may be used to include null fields in Patch requests. 10420 NullFields []string `json:"-"` 10421} 10422 10423func (s *ProductShipping) MarshalJSON() ([]byte, error) { 10424 type NoMethod ProductShipping 10425 raw := NoMethod(*s) 10426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10427} 10428 10429type ProductShippingDimension struct { 10430 // Unit: The unit of value. 10431 Unit string `json:"unit,omitempty"` 10432 10433 // Value: The dimension of the product used to calculate the shipping 10434 // cost of the item. 10435 Value float64 `json:"value,omitempty"` 10436 10437 // ForceSendFields is a list of field names (e.g. "Unit") to 10438 // unconditionally include in API requests. By default, fields with 10439 // empty values are omitted from API requests. However, any non-pointer, 10440 // non-interface field appearing in ForceSendFields will be sent to the 10441 // server regardless of whether the field is empty or not. This may be 10442 // used to include empty fields in Patch requests. 10443 ForceSendFields []string `json:"-"` 10444 10445 // NullFields is a list of field names (e.g. "Unit") to include in API 10446 // requests with the JSON null value. By default, fields with empty 10447 // values are omitted from API requests. However, any field with an 10448 // empty value appearing in NullFields will be sent to the server as 10449 // null. It is an error if a field in this list has a non-empty value. 10450 // This may be used to include null fields in Patch requests. 10451 NullFields []string `json:"-"` 10452} 10453 10454func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) { 10455 type NoMethod ProductShippingDimension 10456 raw := NoMethod(*s) 10457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10458} 10459 10460func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { 10461 type NoMethod ProductShippingDimension 10462 var s1 struct { 10463 Value gensupport.JSONFloat64 `json:"value"` 10464 *NoMethod 10465 } 10466 s1.NoMethod = (*NoMethod)(s) 10467 if err := json.Unmarshal(data, &s1); err != nil { 10468 return err 10469 } 10470 s.Value = float64(s1.Value) 10471 return nil 10472} 10473 10474type ProductShippingWeight struct { 10475 // Unit: The unit of value. 10476 Unit string `json:"unit,omitempty"` 10477 10478 // Value: The weight of the product used to calculate the shipping cost 10479 // of the item. 10480 Value float64 `json:"value,omitempty"` 10481 10482 // ForceSendFields is a list of field names (e.g. "Unit") to 10483 // unconditionally include in API requests. By default, fields with 10484 // empty values are omitted from API requests. However, any non-pointer, 10485 // non-interface field appearing in ForceSendFields will be sent to the 10486 // server regardless of whether the field is empty or not. This may be 10487 // used to include empty fields in Patch requests. 10488 ForceSendFields []string `json:"-"` 10489 10490 // NullFields is a list of field names (e.g. "Unit") to include in API 10491 // requests with the JSON null value. By default, fields with empty 10492 // values are omitted from API requests. However, any field with an 10493 // empty value appearing in NullFields will be sent to the server as 10494 // null. It is an error if a field in this list has a non-empty value. 10495 // This may be used to include null fields in Patch requests. 10496 NullFields []string `json:"-"` 10497} 10498 10499func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) { 10500 type NoMethod ProductShippingWeight 10501 raw := NoMethod(*s) 10502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10503} 10504 10505func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { 10506 type NoMethod ProductShippingWeight 10507 var s1 struct { 10508 Value gensupport.JSONFloat64 `json:"value"` 10509 *NoMethod 10510 } 10511 s1.NoMethod = (*NoMethod)(s) 10512 if err := json.Unmarshal(data, &s1); err != nil { 10513 return err 10514 } 10515 s.Value = float64(s1.Value) 10516 return nil 10517} 10518 10519// ProductStatus: The status of a product, i.e., information about a 10520// product computed asynchronously. 10521type ProductStatus struct { 10522 // CreationDate: Date on which the item has been created, in ISO 8601 10523 // format. 10524 CreationDate string `json:"creationDate,omitempty"` 10525 10526 // DataQualityIssues: DEPRECATED - never populated 10527 DataQualityIssues []*ProductStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 10528 10529 // DestinationStatuses: The intended destinations for the product. 10530 DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` 10531 10532 // GoogleExpirationDate: Date on which the item expires in Google 10533 // Shopping, in ISO 8601 format. 10534 GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` 10535 10536 // ItemLevelIssues: A list of all issues associated with the product. 10537 ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 10538 10539 // Kind: Identifies what kind of resource this is. Value: the fixed 10540 // string "content#productStatus" 10541 Kind string `json:"kind,omitempty"` 10542 10543 // LastUpdateDate: Date on which the item has been last updated, in ISO 10544 // 8601 format. 10545 LastUpdateDate string `json:"lastUpdateDate,omitempty"` 10546 10547 // Link: The link to the product. 10548 Link string `json:"link,omitempty"` 10549 10550 // Product: Product data after applying all the join inputs. 10551 Product *Product `json:"product,omitempty"` 10552 10553 // ProductId: The ID of the product for which status is reported. 10554 ProductId string `json:"productId,omitempty"` 10555 10556 // Title: The title of the product. 10557 Title string `json:"title,omitempty"` 10558 10559 // ServerResponse contains the HTTP response code and headers from the 10560 // server. 10561 googleapi.ServerResponse `json:"-"` 10562 10563 // ForceSendFields is a list of field names (e.g. "CreationDate") to 10564 // unconditionally include in API requests. By default, fields with 10565 // empty values are omitted from API requests. However, any non-pointer, 10566 // non-interface field appearing in ForceSendFields will be sent to the 10567 // server regardless of whether the field is empty or not. This may be 10568 // used to include empty fields in Patch requests. 10569 ForceSendFields []string `json:"-"` 10570 10571 // NullFields is a list of field names (e.g. "CreationDate") to include 10572 // in API requests with the JSON null value. By default, fields with 10573 // empty values are omitted from API requests. However, any field with 10574 // an empty value appearing in NullFields will be sent to the server as 10575 // null. It is an error if a field in this list has a non-empty value. 10576 // This may be used to include null fields in Patch requests. 10577 NullFields []string `json:"-"` 10578} 10579 10580func (s *ProductStatus) MarshalJSON() ([]byte, error) { 10581 type NoMethod ProductStatus 10582 raw := NoMethod(*s) 10583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10584} 10585 10586type ProductStatusDataQualityIssue struct { 10587 Destination string `json:"destination,omitempty"` 10588 10589 Detail string `json:"detail,omitempty"` 10590 10591 FetchStatus string `json:"fetchStatus,omitempty"` 10592 10593 Id string `json:"id,omitempty"` 10594 10595 Location string `json:"location,omitempty"` 10596 10597 Severity string `json:"severity,omitempty"` 10598 10599 Timestamp string `json:"timestamp,omitempty"` 10600 10601 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 10602 10603 ValueProvided string `json:"valueProvided,omitempty"` 10604 10605 // ForceSendFields is a list of field names (e.g. "Destination") to 10606 // unconditionally include in API requests. By default, fields with 10607 // empty values are omitted from API requests. However, any non-pointer, 10608 // non-interface field appearing in ForceSendFields will be sent to the 10609 // server regardless of whether the field is empty or not. This may be 10610 // used to include empty fields in Patch requests. 10611 ForceSendFields []string `json:"-"` 10612 10613 // NullFields is a list of field names (e.g. "Destination") to include 10614 // in API requests with the JSON null value. By default, fields with 10615 // empty values are omitted from API requests. However, any field with 10616 // an empty value appearing in NullFields will be sent to the server as 10617 // null. It is an error if a field in this list has a non-empty value. 10618 // This may be used to include null fields in Patch requests. 10619 NullFields []string `json:"-"` 10620} 10621 10622func (s *ProductStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 10623 type NoMethod ProductStatusDataQualityIssue 10624 raw := NoMethod(*s) 10625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10626} 10627 10628type ProductStatusDestinationStatus struct { 10629 // ApprovalPending: Whether the approval status might change due to 10630 // further processing. 10631 ApprovalPending bool `json:"approvalPending,omitempty"` 10632 10633 // ApprovalStatus: The destination's approval status. 10634 // 10635 // Acceptable values are: 10636 // - "approved" 10637 // - "disapproved" 10638 ApprovalStatus string `json:"approvalStatus,omitempty"` 10639 10640 // Destination: The name of the destination 10641 Destination string `json:"destination,omitempty"` 10642 10643 // Intention: Provided for backward compatibility only. Always set to 10644 // "required". 10645 // 10646 // Acceptable values are: 10647 // - "default" 10648 // - "excluded" 10649 // - "optional" 10650 // - "required" 10651 Intention string `json:"intention,omitempty"` 10652 10653 // ForceSendFields is a list of field names (e.g. "ApprovalPending") to 10654 // unconditionally include in API requests. By default, fields with 10655 // empty values are omitted from API requests. However, any non-pointer, 10656 // non-interface field appearing in ForceSendFields will be sent to the 10657 // server regardless of whether the field is empty or not. This may be 10658 // used to include empty fields in Patch requests. 10659 ForceSendFields []string `json:"-"` 10660 10661 // NullFields is a list of field names (e.g. "ApprovalPending") to 10662 // include in API requests with the JSON null value. By default, fields 10663 // with empty values are omitted from API requests. However, any field 10664 // with an empty value appearing in NullFields will be sent to the 10665 // server as null. It is an error if a field in this list has a 10666 // non-empty value. This may be used to include null fields in Patch 10667 // requests. 10668 NullFields []string `json:"-"` 10669} 10670 10671func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { 10672 type NoMethod ProductStatusDestinationStatus 10673 raw := NoMethod(*s) 10674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10675} 10676 10677type ProductStatusItemLevelIssue struct { 10678 // AttributeName: The attribute's name, if the issue is caused by a 10679 // single attribute. 10680 AttributeName string `json:"attributeName,omitempty"` 10681 10682 // Code: The error code of the issue. 10683 Code string `json:"code,omitempty"` 10684 10685 // Description: A short issue description in English. 10686 Description string `json:"description,omitempty"` 10687 10688 // Destination: The destination the issue applies to. 10689 Destination string `json:"destination,omitempty"` 10690 10691 // Detail: A detailed issue description in English. 10692 Detail string `json:"detail,omitempty"` 10693 10694 // Documentation: The URL of a web page to help with resolving this 10695 // issue. 10696 Documentation string `json:"documentation,omitempty"` 10697 10698 // Resolution: Whether the issue can be resolved by the merchant. 10699 Resolution string `json:"resolution,omitempty"` 10700 10701 // Servability: How this issue affects serving of the offer. 10702 Servability string `json:"servability,omitempty"` 10703 10704 // ForceSendFields is a list of field names (e.g. "AttributeName") to 10705 // unconditionally include in API requests. By default, fields with 10706 // empty values are omitted from API requests. However, any non-pointer, 10707 // non-interface field appearing in ForceSendFields will be sent to the 10708 // server regardless of whether the field is empty or not. This may be 10709 // used to include empty fields in Patch requests. 10710 ForceSendFields []string `json:"-"` 10711 10712 // NullFields is a list of field names (e.g. "AttributeName") to include 10713 // in API requests with the JSON null value. By default, fields with 10714 // empty values are omitted from API requests. However, any field with 10715 // an empty value appearing in NullFields will be sent to the server as 10716 // null. It is an error if a field in this list has a non-empty value. 10717 // This may be used to include null fields in Patch requests. 10718 NullFields []string `json:"-"` 10719} 10720 10721func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 10722 type NoMethod ProductStatusItemLevelIssue 10723 raw := NoMethod(*s) 10724 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10725} 10726 10727type ProductTax struct { 10728 // Country: The country within which the item is taxed, specified as a 10729 // CLDR territory code. 10730 Country string `json:"country,omitempty"` 10731 10732 // LocationId: The numeric ID of a location that the tax rate applies to 10733 // as defined in the AdWords API. 10734 LocationId int64 `json:"locationId,omitempty,string"` 10735 10736 // PostalCode: The postal code range that the tax rate applies to, 10737 // represented by a ZIP code, a ZIP code prefix using * wildcard, a 10738 // range between two ZIP codes or two ZIP code prefixes of equal length. 10739 // Examples: 94114, 94*, 94002-95460, 94*-95*. 10740 PostalCode string `json:"postalCode,omitempty"` 10741 10742 // Rate: The percentage of tax rate that applies to the item price. 10743 Rate float64 `json:"rate,omitempty"` 10744 10745 // Region: The geographic region to which the tax rate applies. 10746 Region string `json:"region,omitempty"` 10747 10748 // TaxShip: Set to true if tax is charged on shipping. 10749 TaxShip bool `json:"taxShip,omitempty"` 10750 10751 // ForceSendFields is a list of field names (e.g. "Country") to 10752 // unconditionally include in API requests. By default, fields with 10753 // empty values are omitted from API requests. However, any non-pointer, 10754 // non-interface field appearing in ForceSendFields will be sent to the 10755 // server regardless of whether the field is empty or not. This may be 10756 // used to include empty fields in Patch requests. 10757 ForceSendFields []string `json:"-"` 10758 10759 // NullFields is a list of field names (e.g. "Country") to include in 10760 // API requests with the JSON null value. By default, fields with empty 10761 // values are omitted from API requests. However, any field with an 10762 // empty value appearing in NullFields will be sent to the server as 10763 // null. It is an error if a field in this list has a non-empty value. 10764 // This may be used to include null fields in Patch requests. 10765 NullFields []string `json:"-"` 10766} 10767 10768func (s *ProductTax) MarshalJSON() ([]byte, error) { 10769 type NoMethod ProductTax 10770 raw := NoMethod(*s) 10771 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10772} 10773 10774func (s *ProductTax) UnmarshalJSON(data []byte) error { 10775 type NoMethod ProductTax 10776 var s1 struct { 10777 Rate gensupport.JSONFloat64 `json:"rate"` 10778 *NoMethod 10779 } 10780 s1.NoMethod = (*NoMethod)(s) 10781 if err := json.Unmarshal(data, &s1); err != nil { 10782 return err 10783 } 10784 s.Rate = float64(s1.Rate) 10785 return nil 10786} 10787 10788type ProductUnitPricingBaseMeasure struct { 10789 // Unit: The unit of the denominator. 10790 Unit string `json:"unit,omitempty"` 10791 10792 // Value: The denominator of the unit price. 10793 Value int64 `json:"value,omitempty,string"` 10794 10795 // ForceSendFields is a list of field names (e.g. "Unit") to 10796 // unconditionally include in API requests. By default, fields with 10797 // empty values are omitted from API requests. However, any non-pointer, 10798 // non-interface field appearing in ForceSendFields will be sent to the 10799 // server regardless of whether the field is empty or not. This may be 10800 // used to include empty fields in Patch requests. 10801 ForceSendFields []string `json:"-"` 10802 10803 // NullFields is a list of field names (e.g. "Unit") to include in API 10804 // requests with the JSON null value. By default, fields with empty 10805 // values are omitted from API requests. However, any field with an 10806 // empty value appearing in NullFields will be sent to the server as 10807 // null. It is an error if a field in this list has a non-empty value. 10808 // This may be used to include null fields in Patch requests. 10809 NullFields []string `json:"-"` 10810} 10811 10812func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { 10813 type NoMethod ProductUnitPricingBaseMeasure 10814 raw := NoMethod(*s) 10815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10816} 10817 10818type ProductUnitPricingMeasure struct { 10819 // Unit: The unit of the measure. 10820 Unit string `json:"unit,omitempty"` 10821 10822 // Value: The measure of an item. 10823 Value float64 `json:"value,omitempty"` 10824 10825 // ForceSendFields is a list of field names (e.g. "Unit") to 10826 // unconditionally include in API requests. By default, fields with 10827 // empty values are omitted from API requests. However, any non-pointer, 10828 // non-interface field appearing in ForceSendFields will be sent to the 10829 // server regardless of whether the field is empty or not. This may be 10830 // used to include empty fields in Patch requests. 10831 ForceSendFields []string `json:"-"` 10832 10833 // NullFields is a list of field names (e.g. "Unit") to include in API 10834 // requests with the JSON null value. By default, fields with empty 10835 // values are omitted from API requests. However, any field with an 10836 // empty value appearing in NullFields will be sent to the server as 10837 // null. It is an error if a field in this list has a non-empty value. 10838 // This may be used to include null fields in Patch requests. 10839 NullFields []string `json:"-"` 10840} 10841 10842func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { 10843 type NoMethod ProductUnitPricingMeasure 10844 raw := NoMethod(*s) 10845 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10846} 10847 10848func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { 10849 type NoMethod ProductUnitPricingMeasure 10850 var s1 struct { 10851 Value gensupport.JSONFloat64 `json:"value"` 10852 *NoMethod 10853 } 10854 s1.NoMethod = (*NoMethod)(s) 10855 if err := json.Unmarshal(data, &s1); err != nil { 10856 return err 10857 } 10858 s.Value = float64(s1.Value) 10859 return nil 10860} 10861 10862type ProductsCustomBatchRequest struct { 10863 // Entries: The request entries to be processed in the batch. 10864 Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` 10865 10866 // ForceSendFields is a list of field names (e.g. "Entries") to 10867 // unconditionally include in API requests. By default, fields with 10868 // empty values are omitted from API requests. However, any non-pointer, 10869 // non-interface field appearing in ForceSendFields will be sent to the 10870 // server regardless of whether the field is empty or not. This may be 10871 // used to include empty fields in Patch requests. 10872 ForceSendFields []string `json:"-"` 10873 10874 // NullFields is a list of field names (e.g. "Entries") to include in 10875 // API requests with the JSON null value. By default, fields with empty 10876 // values are omitted from API requests. However, any field with an 10877 // empty value appearing in NullFields will be sent to the server as 10878 // null. It is an error if a field in this list has a non-empty value. 10879 // This may be used to include null fields in Patch requests. 10880 NullFields []string `json:"-"` 10881} 10882 10883func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { 10884 type NoMethod ProductsCustomBatchRequest 10885 raw := NoMethod(*s) 10886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10887} 10888 10889// ProductsCustomBatchRequestEntry: A batch entry encoding a single 10890// non-batch products request. 10891type ProductsCustomBatchRequestEntry struct { 10892 // BatchId: An entry ID, unique within the batch request. 10893 BatchId int64 `json:"batchId,omitempty"` 10894 10895 // MerchantId: The ID of the managing account. 10896 MerchantId uint64 `json:"merchantId,omitempty,string"` 10897 10898 // Method: The method of the batch entry. 10899 // 10900 // Acceptable values are: 10901 // - "delete" 10902 // - "get" 10903 // - "insert" 10904 Method string `json:"method,omitempty"` 10905 10906 // Product: The product to insert. Only required if the method is 10907 // `insert`. 10908 Product *Product `json:"product,omitempty"` 10909 10910 // ProductId: The ID of the product to get or delete. Only defined if 10911 // the method is `get` or `delete`. 10912 ProductId string `json:"productId,omitempty"` 10913 10914 // ForceSendFields is a list of field names (e.g. "BatchId") to 10915 // unconditionally include in API requests. By default, fields with 10916 // empty values are omitted from API requests. However, any non-pointer, 10917 // non-interface field appearing in ForceSendFields will be sent to the 10918 // server regardless of whether the field is empty or not. This may be 10919 // used to include empty fields in Patch requests. 10920 ForceSendFields []string `json:"-"` 10921 10922 // NullFields is a list of field names (e.g. "BatchId") to include in 10923 // API requests with the JSON null value. By default, fields with empty 10924 // values are omitted from API requests. However, any field with an 10925 // empty value appearing in NullFields will be sent to the server as 10926 // null. It is an error if a field in this list has a non-empty value. 10927 // This may be used to include null fields in Patch requests. 10928 NullFields []string `json:"-"` 10929} 10930 10931func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 10932 type NoMethod ProductsCustomBatchRequestEntry 10933 raw := NoMethod(*s) 10934 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10935} 10936 10937type ProductsCustomBatchResponse struct { 10938 // Entries: The result of the execution of the batch requests. 10939 Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` 10940 10941 // Kind: Identifies what kind of resource this is. Value: the fixed 10942 // string "content#productsCustomBatchResponse". 10943 Kind string `json:"kind,omitempty"` 10944 10945 // ServerResponse contains the HTTP response code and headers from the 10946 // server. 10947 googleapi.ServerResponse `json:"-"` 10948 10949 // ForceSendFields is a list of field names (e.g. "Entries") to 10950 // unconditionally include in API requests. By default, fields with 10951 // empty values are omitted from API requests. However, any non-pointer, 10952 // non-interface field appearing in ForceSendFields will be sent to the 10953 // server regardless of whether the field is empty or not. This may be 10954 // used to include empty fields in Patch requests. 10955 ForceSendFields []string `json:"-"` 10956 10957 // NullFields is a list of field names (e.g. "Entries") to include in 10958 // API requests with the JSON null value. By default, fields with empty 10959 // values are omitted from API requests. However, any field with an 10960 // empty value appearing in NullFields will be sent to the server as 10961 // null. It is an error if a field in this list has a non-empty value. 10962 // This may be used to include null fields in Patch requests. 10963 NullFields []string `json:"-"` 10964} 10965 10966func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { 10967 type NoMethod ProductsCustomBatchResponse 10968 raw := NoMethod(*s) 10969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10970} 10971 10972// ProductsCustomBatchResponseEntry: A batch entry encoding a single 10973// non-batch products response. 10974type ProductsCustomBatchResponseEntry struct { 10975 // BatchId: The ID of the request entry this entry responds to. 10976 BatchId int64 `json:"batchId,omitempty"` 10977 10978 // Errors: A list of errors defined if and only if the request failed. 10979 Errors *Errors `json:"errors,omitempty"` 10980 10981 // Kind: Identifies what kind of resource this is. Value: the fixed 10982 // string "content#productsCustomBatchResponseEntry" 10983 Kind string `json:"kind,omitempty"` 10984 10985 // Product: The inserted product. Only defined if the method is `insert` 10986 // and if the request was successful. 10987 Product *Product `json:"product,omitempty"` 10988 10989 // ForceSendFields is a list of field names (e.g. "BatchId") to 10990 // unconditionally include in API requests. By default, fields with 10991 // empty values are omitted from API requests. However, any non-pointer, 10992 // non-interface field appearing in ForceSendFields will be sent to the 10993 // server regardless of whether the field is empty or not. This may be 10994 // used to include empty fields in Patch requests. 10995 ForceSendFields []string `json:"-"` 10996 10997 // NullFields is a list of field names (e.g. "BatchId") to include in 10998 // API requests with the JSON null value. By default, fields with empty 10999 // values are omitted from API requests. However, any field with an 11000 // empty value appearing in NullFields will be sent to the server as 11001 // null. It is an error if a field in this list has a non-empty value. 11002 // This may be used to include null fields in Patch requests. 11003 NullFields []string `json:"-"` 11004} 11005 11006func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 11007 type NoMethod ProductsCustomBatchResponseEntry 11008 raw := NoMethod(*s) 11009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11010} 11011 11012type ProductsListResponse struct { 11013 // Kind: Identifies what kind of resource this is. Value: the fixed 11014 // string "content#productsListResponse". 11015 Kind string `json:"kind,omitempty"` 11016 11017 // NextPageToken: The token for the retrieval of the next page of 11018 // products. 11019 NextPageToken string `json:"nextPageToken,omitempty"` 11020 11021 Resources []*Product `json:"resources,omitempty"` 11022 11023 // ServerResponse contains the HTTP response code and headers from the 11024 // server. 11025 googleapi.ServerResponse `json:"-"` 11026 11027 // ForceSendFields is a list of field names (e.g. "Kind") to 11028 // unconditionally include in API requests. By default, fields with 11029 // empty values are omitted from API requests. However, any non-pointer, 11030 // non-interface field appearing in ForceSendFields will be sent to the 11031 // server regardless of whether the field is empty or not. This may be 11032 // used to include empty fields in Patch requests. 11033 ForceSendFields []string `json:"-"` 11034 11035 // NullFields is a list of field names (e.g. "Kind") to include in API 11036 // requests with the JSON null value. By default, fields with empty 11037 // values are omitted from API requests. However, any field with an 11038 // empty value appearing in NullFields will be sent to the server as 11039 // null. It is an error if a field in this list has a non-empty value. 11040 // This may be used to include null fields in Patch requests. 11041 NullFields []string `json:"-"` 11042} 11043 11044func (s *ProductsListResponse) MarshalJSON() ([]byte, error) { 11045 type NoMethod ProductsListResponse 11046 raw := NoMethod(*s) 11047 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11048} 11049 11050type ProductstatusesCustomBatchRequest struct { 11051 // Entries: The request entries to be processed in the batch. 11052 Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 11053 11054 // ForceSendFields is a list of field names (e.g. "Entries") to 11055 // unconditionally include in API requests. By default, fields with 11056 // empty values are omitted from API requests. However, any non-pointer, 11057 // non-interface field appearing in ForceSendFields will be sent to the 11058 // server regardless of whether the field is empty or not. This may be 11059 // used to include empty fields in Patch requests. 11060 ForceSendFields []string `json:"-"` 11061 11062 // NullFields is a list of field names (e.g. "Entries") to include in 11063 // API requests with the JSON null value. By default, fields with empty 11064 // values are omitted from API requests. However, any field with an 11065 // empty value appearing in NullFields will be sent to the server as 11066 // null. It is an error if a field in this list has a non-empty value. 11067 // This may be used to include null fields in Patch requests. 11068 NullFields []string `json:"-"` 11069} 11070 11071func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 11072 type NoMethod ProductstatusesCustomBatchRequest 11073 raw := NoMethod(*s) 11074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11075} 11076 11077// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a 11078// single non-batch productstatuses request. 11079type ProductstatusesCustomBatchRequestEntry struct { 11080 // BatchId: An entry ID, unique within the batch request. 11081 BatchId int64 `json:"batchId,omitempty"` 11082 11083 // Destinations: If set, only issues for the specified destinations are 11084 // returned, otherwise only issues for the Shopping destination. 11085 Destinations []string `json:"destinations,omitempty"` 11086 11087 IncludeAttributes bool `json:"includeAttributes,omitempty"` 11088 11089 // MerchantId: The ID of the managing account. 11090 MerchantId uint64 `json:"merchantId,omitempty,string"` 11091 11092 // Method: The method of the batch entry. 11093 // 11094 // Acceptable values are: 11095 // - "get" 11096 Method string `json:"method,omitempty"` 11097 11098 // ProductId: The ID of the product whose status to get. 11099 ProductId string `json:"productId,omitempty"` 11100 11101 // ForceSendFields is a list of field names (e.g. "BatchId") to 11102 // unconditionally include in API requests. By default, fields with 11103 // empty values are omitted from API requests. However, any non-pointer, 11104 // non-interface field appearing in ForceSendFields will be sent to the 11105 // server regardless of whether the field is empty or not. This may be 11106 // used to include empty fields in Patch requests. 11107 ForceSendFields []string `json:"-"` 11108 11109 // NullFields is a list of field names (e.g. "BatchId") to include in 11110 // API requests with the JSON null value. By default, fields with empty 11111 // values are omitted from API requests. However, any field with an 11112 // empty value appearing in NullFields will be sent to the server as 11113 // null. It is an error if a field in this list has a non-empty value. 11114 // This may be used to include null fields in Patch requests. 11115 NullFields []string `json:"-"` 11116} 11117 11118func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 11119 type NoMethod ProductstatusesCustomBatchRequestEntry 11120 raw := NoMethod(*s) 11121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11122} 11123 11124type ProductstatusesCustomBatchResponse struct { 11125 // Entries: The result of the execution of the batch requests. 11126 Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 11127 11128 // Kind: Identifies what kind of resource this is. Value: the fixed 11129 // string "content#productstatusesCustomBatchResponse". 11130 Kind string `json:"kind,omitempty"` 11131 11132 // ServerResponse contains the HTTP response code and headers from the 11133 // server. 11134 googleapi.ServerResponse `json:"-"` 11135 11136 // ForceSendFields is a list of field names (e.g. "Entries") to 11137 // unconditionally include in API requests. By default, fields with 11138 // empty values are omitted from API requests. However, any non-pointer, 11139 // non-interface field appearing in ForceSendFields will be sent to the 11140 // server regardless of whether the field is empty or not. This may be 11141 // used to include empty fields in Patch requests. 11142 ForceSendFields []string `json:"-"` 11143 11144 // NullFields is a list of field names (e.g. "Entries") to include in 11145 // API requests with the JSON null value. By default, fields with empty 11146 // values are omitted from API requests. However, any field with an 11147 // empty value appearing in NullFields will be sent to the server as 11148 // null. It is an error if a field in this list has a non-empty value. 11149 // This may be used to include null fields in Patch requests. 11150 NullFields []string `json:"-"` 11151} 11152 11153func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 11154 type NoMethod ProductstatusesCustomBatchResponse 11155 raw := NoMethod(*s) 11156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11157} 11158 11159// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a 11160// single non-batch productstatuses response. 11161type ProductstatusesCustomBatchResponseEntry struct { 11162 // BatchId: The ID of the request entry this entry responds to. 11163 BatchId int64 `json:"batchId,omitempty"` 11164 11165 // Errors: A list of errors, if the request failed. 11166 Errors *Errors `json:"errors,omitempty"` 11167 11168 // Kind: Identifies what kind of resource this is. Value: the fixed 11169 // string "content#productstatusesCustomBatchResponseEntry" 11170 Kind string `json:"kind,omitempty"` 11171 11172 // ProductStatus: The requested product status. Only defined if the 11173 // request was successful. 11174 ProductStatus *ProductStatus `json:"productStatus,omitempty"` 11175 11176 // ForceSendFields is a list of field names (e.g. "BatchId") to 11177 // unconditionally include in API requests. By default, fields with 11178 // empty values are omitted from API requests. However, any non-pointer, 11179 // non-interface field appearing in ForceSendFields will be sent to the 11180 // server regardless of whether the field is empty or not. This may be 11181 // used to include empty fields in Patch requests. 11182 ForceSendFields []string `json:"-"` 11183 11184 // NullFields is a list of field names (e.g. "BatchId") to include in 11185 // API requests with the JSON null value. By default, fields with empty 11186 // values are omitted from API requests. However, any field with an 11187 // empty value appearing in NullFields will be sent to the server as 11188 // null. It is an error if a field in this list has a non-empty value. 11189 // This may be used to include null fields in Patch requests. 11190 NullFields []string `json:"-"` 11191} 11192 11193func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 11194 type NoMethod ProductstatusesCustomBatchResponseEntry 11195 raw := NoMethod(*s) 11196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11197} 11198 11199type ProductstatusesListResponse struct { 11200 // Kind: Identifies what kind of resource this is. Value: the fixed 11201 // string "content#productstatusesListResponse". 11202 Kind string `json:"kind,omitempty"` 11203 11204 // NextPageToken: The token for the retrieval of the next page of 11205 // products statuses. 11206 NextPageToken string `json:"nextPageToken,omitempty"` 11207 11208 Resources []*ProductStatus `json:"resources,omitempty"` 11209 11210 // ServerResponse contains the HTTP response code and headers from the 11211 // server. 11212 googleapi.ServerResponse `json:"-"` 11213 11214 // ForceSendFields is a list of field names (e.g. "Kind") to 11215 // unconditionally include in API requests. By default, fields with 11216 // empty values are omitted from API requests. However, any non-pointer, 11217 // non-interface field appearing in ForceSendFields will be sent to the 11218 // server regardless of whether the field is empty or not. This may be 11219 // used to include empty fields in Patch requests. 11220 ForceSendFields []string `json:"-"` 11221 11222 // NullFields is a list of field names (e.g. "Kind") to include in API 11223 // requests with the JSON null value. By default, fields with empty 11224 // values are omitted from API requests. However, any field with an 11225 // empty value appearing in NullFields will be sent to the server as 11226 // null. It is an error if a field in this list has a non-empty value. 11227 // This may be used to include null fields in Patch requests. 11228 NullFields []string `json:"-"` 11229} 11230 11231func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) { 11232 type NoMethod ProductstatusesListResponse 11233 raw := NoMethod(*s) 11234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11235} 11236 11237type Promotion struct { 11238 // PromotionAmount: [required] Amount of the promotion. The values here 11239 // are the promotion applied to the unit price pretax and to the total 11240 // of the tax amounts. 11241 PromotionAmount *Amount `json:"promotionAmount,omitempty"` 11242 11243 // PromotionId: [required] ID of the promotion. 11244 PromotionId string `json:"promotionId,omitempty"` 11245 11246 // ForceSendFields is a list of field names (e.g. "PromotionAmount") to 11247 // unconditionally include in API requests. By default, fields with 11248 // empty values are omitted from API requests. However, any non-pointer, 11249 // non-interface field appearing in ForceSendFields will be sent to the 11250 // server regardless of whether the field is empty or not. This may be 11251 // used to include empty fields in Patch requests. 11252 ForceSendFields []string `json:"-"` 11253 11254 // NullFields is a list of field names (e.g. "PromotionAmount") to 11255 // include in API requests with the JSON null value. By default, fields 11256 // with empty values are omitted from API requests. However, any field 11257 // with an empty value appearing in NullFields will be sent to the 11258 // server as null. It is an error if a field in this list has a 11259 // non-empty value. This may be used to include null fields in Patch 11260 // requests. 11261 NullFields []string `json:"-"` 11262} 11263 11264func (s *Promotion) MarshalJSON() ([]byte, error) { 11265 type NoMethod Promotion 11266 raw := NoMethod(*s) 11267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11268} 11269 11270type RateGroup struct { 11271 // ApplicableShippingLabels: A list of shipping labels defining the 11272 // products to which this rate group applies to. This is a disjunction: 11273 // only one of the labels has to match for the rate group to apply. May 11274 // only be empty for the last rate group of a service. Required. 11275 ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` 11276 11277 // CarrierRates: A list of carrier rates that can be referred to by 11278 // `mainTable` or `singleValue`. 11279 CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` 11280 11281 // MainTable: A table defining the rate group, when `singleValue` is not 11282 // expressive enough. Can only be set if `singleValue` is not set. 11283 MainTable *Table `json:"mainTable,omitempty"` 11284 11285 // Name: Name of the rate group. Optional. If set has to be unique 11286 // within shipping service. 11287 Name string `json:"name,omitempty"` 11288 11289 // SingleValue: The value of the rate group (e.g. flat rate $10). Can 11290 // only be set if `mainTable` and `subtables` are not set. 11291 SingleValue *Value `json:"singleValue,omitempty"` 11292 11293 // Subtables: A list of subtables referred to by `mainTable`. Can only 11294 // be set if `mainTable` is set. 11295 Subtables []*Table `json:"subtables,omitempty"` 11296 11297 // ForceSendFields is a list of field names (e.g. 11298 // "ApplicableShippingLabels") to unconditionally include in API 11299 // requests. By default, fields with empty values are omitted from API 11300 // requests. However, any non-pointer, non-interface field appearing in 11301 // ForceSendFields will be sent to the server regardless of whether the 11302 // field is empty or not. This may be used to include empty fields in 11303 // Patch requests. 11304 ForceSendFields []string `json:"-"` 11305 11306 // NullFields is a list of field names (e.g. "ApplicableShippingLabels") 11307 // to include in API requests with the JSON null value. By default, 11308 // fields with empty values are omitted from API requests. However, any 11309 // field with an empty value appearing in NullFields will be sent to the 11310 // server as null. It is an error if a field in this list has a 11311 // non-empty value. This may be used to include null fields in Patch 11312 // requests. 11313 NullFields []string `json:"-"` 11314} 11315 11316func (s *RateGroup) MarshalJSON() ([]byte, error) { 11317 type NoMethod RateGroup 11318 raw := NoMethod(*s) 11319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11320} 11321 11322type RefundReason struct { 11323 // Description: Description of the reason. 11324 Description string `json:"description,omitempty"` 11325 11326 // ReasonCode: Code of the refund reason. 11327 // 11328 // Acceptable values are: 11329 // - "adjustment" 11330 // - "autoPostInternal" 11331 // - "autoPostInvalidBillingAddress" 11332 // - "autoPostNoInventory" 11333 // - "autoPostPriceError" 11334 // - "autoPostUndeliverableShippingAddress" 11335 // - "couponAbuse" 11336 // - "courtesyAdjustment" 11337 // - "customerCanceled" 11338 // - "customerDiscretionaryReturn" 11339 // - "customerInitiatedMerchantCancel" 11340 // - "customerSupportRequested" 11341 // - "deliveredLateByCarrier" 11342 // - "deliveredTooLate" 11343 // - "expiredItem" 11344 // - "failToPushOrderGoogleError" 11345 // - "failToPushOrderMerchantError" 11346 // - "failToPushOrderMerchantFulfillmentError" 11347 // - "failToPushOrderToMerchant" 11348 // - "failToPushOrderToMerchantOutOfStock" 11349 // - "feeAdjustment" 11350 // - "invalidCoupon" 11351 // - "lateShipmentCredit" 11352 // - "malformedShippingAddress" 11353 // - "merchantDidNotShipOnTime" 11354 // - "noInventory" 11355 // - "orderTimeout" 11356 // - "other" 11357 // - "paymentAbuse" 11358 // - "paymentDeclined" 11359 // - "priceAdjustment" 11360 // - "priceError" 11361 // - "productArrivedDamaged" 11362 // - "productNotAsDescribed" 11363 // - "promoReallocation" 11364 // - "qualityNotAsExpected" 11365 // - "returnRefundAbuse" 11366 // - "shippingCostAdjustment" 11367 // - "shippingPriceError" 11368 // - "taxAdjustment" 11369 // - "taxError" 11370 // - "undeliverableShippingAddress" 11371 // - "unsupportedPoBoxAddress" 11372 // - "wrongProductShipped" 11373 ReasonCode string `json:"reasonCode,omitempty"` 11374 11375 // ForceSendFields is a list of field names (e.g. "Description") to 11376 // unconditionally include in API requests. By default, fields with 11377 // empty values are omitted from API requests. However, any non-pointer, 11378 // non-interface field appearing in ForceSendFields will be sent to the 11379 // server regardless of whether the field is empty or not. This may be 11380 // used to include empty fields in Patch requests. 11381 ForceSendFields []string `json:"-"` 11382 11383 // NullFields is a list of field names (e.g. "Description") to include 11384 // in API requests with the JSON null value. By default, fields with 11385 // empty values are omitted from API requests. However, any field with 11386 // an empty value appearing in NullFields will be sent to the server as 11387 // null. It is an error if a field in this list has a non-empty value. 11388 // This may be used to include null fields in Patch requests. 11389 NullFields []string `json:"-"` 11390} 11391 11392func (s *RefundReason) MarshalJSON() ([]byte, error) { 11393 type NoMethod RefundReason 11394 raw := NoMethod(*s) 11395 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11396} 11397 11398type ReturnShipment struct { 11399 // CreationDate: The date of creation of the shipment, in ISO 8601 11400 // format. 11401 CreationDate string `json:"creationDate,omitempty"` 11402 11403 // DeliveryDate: The date of delivery of the shipment, in ISO 8601 11404 // format. 11405 DeliveryDate string `json:"deliveryDate,omitempty"` 11406 11407 // ReturnMethodType: Type of the return method. 11408 // 11409 // Acceptable values are: 11410 // - "byMail" 11411 // - "contactCustomerSupport" 11412 // - "returnless" 11413 ReturnMethodType string `json:"returnMethodType,omitempty"` 11414 11415 // ShipmentId: Shipment ID generated by Google. 11416 ShipmentId string `json:"shipmentId,omitempty"` 11417 11418 // ShipmentTrackingInfos: Tracking information of the shipment. One 11419 // return shipment might be handled by several shipping carriers 11420 // sequentially. 11421 ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` 11422 11423 // ShippingDate: The date of shipping of the shipment, in ISO 8601 11424 // format. 11425 ShippingDate string `json:"shippingDate,omitempty"` 11426 11427 // State: State of the shipment. 11428 // 11429 // Acceptable values are: 11430 // - "completed" 11431 // - "new" 11432 // - "shipped" 11433 // - "undeliverable" 11434 State string `json:"state,omitempty"` 11435 11436 // ForceSendFields is a list of field names (e.g. "CreationDate") to 11437 // unconditionally include in API requests. By default, fields with 11438 // empty values are omitted from API requests. However, any non-pointer, 11439 // non-interface field appearing in ForceSendFields will be sent to the 11440 // server regardless of whether the field is empty or not. This may be 11441 // used to include empty fields in Patch requests. 11442 ForceSendFields []string `json:"-"` 11443 11444 // NullFields is a list of field names (e.g. "CreationDate") to include 11445 // in API requests with the JSON null value. By default, fields with 11446 // empty values are omitted from API requests. However, any field with 11447 // an empty value appearing in NullFields will be sent to the server as 11448 // null. It is an error if a field in this list has a non-empty value. 11449 // This may be used to include null fields in Patch requests. 11450 NullFields []string `json:"-"` 11451} 11452 11453func (s *ReturnShipment) MarshalJSON() ([]byte, error) { 11454 type NoMethod ReturnShipment 11455 raw := NoMethod(*s) 11456 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11457} 11458 11459type Row struct { 11460 // Cells: The list of cells that constitute the row. Must have the same 11461 // length as `columnHeaders` for two-dimensional tables, a length of 1 11462 // for one-dimensional tables. Required. 11463 Cells []*Value `json:"cells,omitempty"` 11464 11465 // ForceSendFields is a list of field names (e.g. "Cells") to 11466 // unconditionally include in API requests. By default, fields with 11467 // empty values are omitted from API requests. However, any non-pointer, 11468 // non-interface field appearing in ForceSendFields will be sent to the 11469 // server regardless of whether the field is empty or not. This may be 11470 // used to include empty fields in Patch requests. 11471 ForceSendFields []string `json:"-"` 11472 11473 // NullFields is a list of field names (e.g. "Cells") to include in API 11474 // requests with the JSON null value. By default, fields with empty 11475 // values are omitted from API requests. However, any field with an 11476 // empty value appearing in NullFields will be sent to the server as 11477 // null. It is an error if a field in this list has a non-empty value. 11478 // This may be used to include null fields in Patch requests. 11479 NullFields []string `json:"-"` 11480} 11481 11482func (s *Row) MarshalJSON() ([]byte, error) { 11483 type NoMethod Row 11484 raw := NoMethod(*s) 11485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11486} 11487 11488type Service struct { 11489 // Active: A boolean exposing the active status of the shipping service. 11490 // Required. 11491 Active bool `json:"active,omitempty"` 11492 11493 // Currency: The CLDR code of the currency to which this service 11494 // applies. Must match that of the prices in rate groups. 11495 Currency string `json:"currency,omitempty"` 11496 11497 // DeliveryCountry: The CLDR territory code of the country to which the 11498 // service applies. Required. 11499 DeliveryCountry string `json:"deliveryCountry,omitempty"` 11500 11501 // DeliveryTime: Time spent in various aspects from order to the 11502 // delivery of the product. Required. 11503 DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` 11504 11505 // Eligibility: Eligibility for this service. 11506 // 11507 // Acceptable values are: 11508 // - "All scenarios" 11509 // - "All scenarios except Shopping Actions" 11510 // - "Shopping Actions" 11511 Eligibility string `json:"eligibility,omitempty"` 11512 11513 // MinimumOrderValue: Minimum order value for this service. If set, 11514 // indicates that customers will have to spend at least this amount. All 11515 // prices within a service must have the same currency. Cannot be set 11516 // together with minimum_order_value_table. 11517 MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` 11518 11519 // MinimumOrderValueTable: Table of per store minimum order values for 11520 // the pickup fulfillment type. Cannot be set together with 11521 // minimum_order_value. 11522 MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` 11523 11524 // Name: Free-form name of the service. Must be unique within target 11525 // account. Required. 11526 Name string `json:"name,omitempty"` 11527 11528 // PickupService: The carrier-service pair delivering items to 11529 // collection points. The list of supported pickup services can be 11530 // retrieved via the `getSupportedPickupServices` method. Required if 11531 // and only if the service delivery type is `pickup`. 11532 PickupService *PickupCarrierService `json:"pickupService,omitempty"` 11533 11534 // RateGroups: Shipping rate group definitions. Only the last one is 11535 // allowed to have an empty `applicableShippingLabels`, which means 11536 // "everything else". The other `applicableShippingLabels` must not 11537 // overlap. 11538 RateGroups []*RateGroup `json:"rateGroups,omitempty"` 11539 11540 // ShipmentType: Type of locations this service ships orders 11541 // to. 11542 // 11543 // Acceptable values are: 11544 // - "delivery" 11545 // - "pickup" 11546 ShipmentType string `json:"shipmentType,omitempty"` 11547 11548 // ForceSendFields is a list of field names (e.g. "Active") to 11549 // unconditionally include in API requests. By default, fields with 11550 // empty values are omitted from API requests. However, any non-pointer, 11551 // non-interface field appearing in ForceSendFields will be sent to the 11552 // server regardless of whether the field is empty or not. This may be 11553 // used to include empty fields in Patch requests. 11554 ForceSendFields []string `json:"-"` 11555 11556 // NullFields is a list of field names (e.g. "Active") to include in API 11557 // requests with the JSON null value. By default, fields with empty 11558 // values are omitted from API requests. However, any field with an 11559 // empty value appearing in NullFields will be sent to the server as 11560 // null. It is an error if a field in this list has a non-empty value. 11561 // This may be used to include null fields in Patch requests. 11562 NullFields []string `json:"-"` 11563} 11564 11565func (s *Service) MarshalJSON() ([]byte, error) { 11566 type NoMethod Service 11567 raw := NoMethod(*s) 11568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11569} 11570 11571type ShipmentInvoice struct { 11572 // InvoiceSummary: [required] Invoice summary. 11573 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 11574 11575 // LineItemInvoices: [required] Invoice details per line item. 11576 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 11577 11578 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 11579 // by the merchant in the `shipLineItems` method and is used to group 11580 // multiple line items that have the same kind of shipping charges. 11581 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 11582 11583 // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to 11584 // unconditionally include in API requests. By default, fields with 11585 // empty values are omitted from API requests. However, any non-pointer, 11586 // non-interface field appearing in ForceSendFields will be sent to the 11587 // server regardless of whether the field is empty or not. This may be 11588 // used to include empty fields in Patch requests. 11589 ForceSendFields []string `json:"-"` 11590 11591 // NullFields is a list of field names (e.g. "InvoiceSummary") to 11592 // include in API requests with the JSON null value. By default, fields 11593 // with empty values are omitted from API requests. However, any field 11594 // with an empty value appearing in NullFields will be sent to the 11595 // server as null. It is an error if a field in this list has a 11596 // non-empty value. This may be used to include null fields in Patch 11597 // requests. 11598 NullFields []string `json:"-"` 11599} 11600 11601func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) { 11602 type NoMethod ShipmentInvoice 11603 raw := NoMethod(*s) 11604 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11605} 11606 11607type ShipmentInvoiceLineItemInvoice struct { 11608 // LineItemId: ID of the line item. Either lineItemId or productId must 11609 // be set. 11610 LineItemId string `json:"lineItemId,omitempty"` 11611 11612 // ProductId: ID of the product. This is the REST ID used in the 11613 // products service. Either lineItemId or productId must be set. 11614 ProductId string `json:"productId,omitempty"` 11615 11616 // ShipmentUnitIds: [required] The shipment unit ID is assigned by the 11617 // merchant and defines individual quantities within a line item. The 11618 // same ID can be assigned to units that are the same while units that 11619 // differ must be assigned a different ID (for example: free or 11620 // promotional units). 11621 ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` 11622 11623 // UnitInvoice: [required] Invoice details for a single unit. 11624 UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` 11625 11626 // ForceSendFields is a list of field names (e.g. "LineItemId") to 11627 // unconditionally include in API requests. By default, fields with 11628 // empty values are omitted from API requests. However, any non-pointer, 11629 // non-interface field appearing in ForceSendFields will be sent to the 11630 // server regardless of whether the field is empty or not. This may be 11631 // used to include empty fields in Patch requests. 11632 ForceSendFields []string `json:"-"` 11633 11634 // NullFields is a list of field names (e.g. "LineItemId") to include in 11635 // API requests with the JSON null value. By default, fields with empty 11636 // values are omitted from API requests. However, any field with an 11637 // empty value appearing in NullFields will be sent to the server as 11638 // null. It is an error if a field in this list has a non-empty value. 11639 // This may be used to include null fields in Patch requests. 11640 NullFields []string `json:"-"` 11641} 11642 11643func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { 11644 type NoMethod ShipmentInvoiceLineItemInvoice 11645 raw := NoMethod(*s) 11646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11647} 11648 11649type ShipmentTrackingInfo struct { 11650 // Carrier: The shipping carrier that handles the package. 11651 // 11652 // Acceptable values are: 11653 // - "boxtal" 11654 // - "bpost" 11655 // - "chronopost" 11656 // - "colisPrive" 11657 // - "colissimo" 11658 // - "cxt" 11659 // - "deliv" 11660 // - "dhl" 11661 // - "dpd" 11662 // - "dynamex" 11663 // - "eCourier" 11664 // - "easypost" 11665 // - "efw" 11666 // - "fedex" 11667 // - "fedexSmartpost" 11668 // - "geodis" 11669 // - "gls" 11670 // - "googleCourier" 11671 // - "gsx" 11672 // - "jdLogistics" 11673 // - "laPoste" 11674 // - "lasership" 11675 // - "manual" 11676 // - "mpx" 11677 // - "onTrac" 11678 // - "other" 11679 // - "tnt" 11680 // - "uds" 11681 // - "ups" 11682 // - "usps" 11683 Carrier string `json:"carrier,omitempty"` 11684 11685 // TrackingNumber: The tracking number for the package. 11686 TrackingNumber string `json:"trackingNumber,omitempty"` 11687 11688 // ForceSendFields is a list of field names (e.g. "Carrier") to 11689 // unconditionally include in API requests. By default, fields with 11690 // empty values are omitted from API requests. However, any non-pointer, 11691 // non-interface field appearing in ForceSendFields will be sent to the 11692 // server regardless of whether the field is empty or not. This may be 11693 // used to include empty fields in Patch requests. 11694 ForceSendFields []string `json:"-"` 11695 11696 // NullFields is a list of field names (e.g. "Carrier") to include in 11697 // API requests with the JSON null value. By default, fields with empty 11698 // values are omitted from API requests. However, any field with an 11699 // empty value appearing in NullFields will be sent to the server as 11700 // null. It is an error if a field in this list has a non-empty value. 11701 // This may be used to include null fields in Patch requests. 11702 NullFields []string `json:"-"` 11703} 11704 11705func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { 11706 type NoMethod ShipmentTrackingInfo 11707 raw := NoMethod(*s) 11708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11709} 11710 11711// ShippingSettings: The merchant account's shipping settings. All 11712// methods except getsupportedcarriers and getsupportedholidays require 11713// the admin role. 11714type ShippingSettings struct { 11715 // AccountId: The ID of the account to which these account shipping 11716 // settings belong. Ignored upon update, always present in get request 11717 // responses. 11718 AccountId uint64 `json:"accountId,omitempty,string"` 11719 11720 // PostalCodeGroups: A list of postal code groups that can be referred 11721 // to in `services`. Optional. 11722 PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` 11723 11724 // Services: The target account's list of services. Optional. 11725 Services []*Service `json:"services,omitempty"` 11726 11727 // ServerResponse contains the HTTP response code and headers from the 11728 // server. 11729 googleapi.ServerResponse `json:"-"` 11730 11731 // ForceSendFields is a list of field names (e.g. "AccountId") to 11732 // unconditionally include in API requests. By default, fields with 11733 // empty values are omitted from API requests. However, any non-pointer, 11734 // non-interface field appearing in ForceSendFields will be sent to the 11735 // server regardless of whether the field is empty or not. This may be 11736 // used to include empty fields in Patch requests. 11737 ForceSendFields []string `json:"-"` 11738 11739 // NullFields is a list of field names (e.g. "AccountId") to include in 11740 // API requests with the JSON null value. By default, fields with empty 11741 // values are omitted from API requests. However, any field with an 11742 // empty value appearing in NullFields will be sent to the server as 11743 // null. It is an error if a field in this list has a non-empty value. 11744 // This may be used to include null fields in Patch requests. 11745 NullFields []string `json:"-"` 11746} 11747 11748func (s *ShippingSettings) MarshalJSON() ([]byte, error) { 11749 type NoMethod ShippingSettings 11750 raw := NoMethod(*s) 11751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11752} 11753 11754type ShippingsettingsCustomBatchRequest struct { 11755 // Entries: The request entries to be processed in the batch. 11756 Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` 11757 11758 // ForceSendFields is a list of field names (e.g. "Entries") to 11759 // unconditionally include in API requests. By default, fields with 11760 // empty values are omitted from API requests. However, any non-pointer, 11761 // non-interface field appearing in ForceSendFields will be sent to the 11762 // server regardless of whether the field is empty or not. This may be 11763 // used to include empty fields in Patch requests. 11764 ForceSendFields []string `json:"-"` 11765 11766 // NullFields is a list of field names (e.g. "Entries") to include in 11767 // API requests with the JSON null value. By default, fields with empty 11768 // values are omitted from API requests. However, any field with an 11769 // empty value appearing in NullFields will be sent to the server as 11770 // null. It is an error if a field in this list has a non-empty value. 11771 // This may be used to include null fields in Patch requests. 11772 NullFields []string `json:"-"` 11773} 11774 11775func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 11776 type NoMethod ShippingsettingsCustomBatchRequest 11777 raw := NoMethod(*s) 11778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11779} 11780 11781// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a 11782// single non-batch shippingsettings request. 11783type ShippingsettingsCustomBatchRequestEntry struct { 11784 // AccountId: The ID of the account for which to get/update account 11785 // shipping settings. 11786 AccountId uint64 `json:"accountId,omitempty,string"` 11787 11788 // BatchId: An entry ID, unique within the batch request. 11789 BatchId int64 `json:"batchId,omitempty"` 11790 11791 // MerchantId: The ID of the managing account. 11792 MerchantId uint64 `json:"merchantId,omitempty,string"` 11793 11794 // Method: The method of the batch entry. 11795 // 11796 // Acceptable values are: 11797 // - "get" 11798 // - "update" 11799 Method string `json:"method,omitempty"` 11800 11801 // ShippingSettings: The account shipping settings to update. Only 11802 // defined if the method is `update`. 11803 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11804 11805 // ForceSendFields is a list of field names (e.g. "AccountId") to 11806 // unconditionally include in API requests. By default, fields with 11807 // empty values are omitted from API requests. However, any non-pointer, 11808 // non-interface field appearing in ForceSendFields will be sent to the 11809 // server regardless of whether the field is empty or not. This may be 11810 // used to include empty fields in Patch requests. 11811 ForceSendFields []string `json:"-"` 11812 11813 // NullFields is a list of field names (e.g. "AccountId") to include in 11814 // API requests with the JSON null value. By default, fields with empty 11815 // values are omitted from API requests. However, any field with an 11816 // empty value appearing in NullFields will be sent to the server as 11817 // null. It is an error if a field in this list has a non-empty value. 11818 // This may be used to include null fields in Patch requests. 11819 NullFields []string `json:"-"` 11820} 11821 11822func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 11823 type NoMethod ShippingsettingsCustomBatchRequestEntry 11824 raw := NoMethod(*s) 11825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11826} 11827 11828type ShippingsettingsCustomBatchResponse struct { 11829 // Entries: The result of the execution of the batch requests. 11830 Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` 11831 11832 // Kind: Identifies what kind of resource this is. Value: the fixed 11833 // string "content#shippingsettingsCustomBatchResponse". 11834 Kind string `json:"kind,omitempty"` 11835 11836 // ServerResponse contains the HTTP response code and headers from the 11837 // server. 11838 googleapi.ServerResponse `json:"-"` 11839 11840 // ForceSendFields is a list of field names (e.g. "Entries") to 11841 // unconditionally include in API requests. By default, fields with 11842 // empty values are omitted from API requests. However, any non-pointer, 11843 // non-interface field appearing in ForceSendFields will be sent to the 11844 // server regardless of whether the field is empty or not. This may be 11845 // used to include empty fields in Patch requests. 11846 ForceSendFields []string `json:"-"` 11847 11848 // NullFields is a list of field names (e.g. "Entries") to include in 11849 // API requests with the JSON null value. By default, fields with empty 11850 // values are omitted from API requests. However, any field with an 11851 // empty value appearing in NullFields will be sent to the server as 11852 // null. It is an error if a field in this list has a non-empty value. 11853 // This may be used to include null fields in Patch requests. 11854 NullFields []string `json:"-"` 11855} 11856 11857func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 11858 type NoMethod ShippingsettingsCustomBatchResponse 11859 raw := NoMethod(*s) 11860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11861} 11862 11863// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a 11864// single non-batch shipping settings response. 11865type ShippingsettingsCustomBatchResponseEntry struct { 11866 // BatchId: The ID of the request entry to which this entry responds. 11867 BatchId int64 `json:"batchId,omitempty"` 11868 11869 // Errors: A list of errors defined if, and only if, the request failed. 11870 Errors *Errors `json:"errors,omitempty"` 11871 11872 // Kind: Identifies what kind of resource this is. Value: the fixed 11873 // string "content#shippingsettingsCustomBatchResponseEntry" 11874 Kind string `json:"kind,omitempty"` 11875 11876 // ShippingSettings: The retrieved or updated account shipping settings. 11877 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11878 11879 // ForceSendFields is a list of field names (e.g. "BatchId") to 11880 // unconditionally include in API requests. By default, fields with 11881 // empty values are omitted from API requests. However, any non-pointer, 11882 // non-interface field appearing in ForceSendFields will be sent to the 11883 // server regardless of whether the field is empty or not. This may be 11884 // used to include empty fields in Patch requests. 11885 ForceSendFields []string `json:"-"` 11886 11887 // NullFields is a list of field names (e.g. "BatchId") to include in 11888 // API requests with the JSON null value. By default, fields with empty 11889 // values are omitted from API requests. However, any field with an 11890 // empty value appearing in NullFields will be sent to the server as 11891 // null. It is an error if a field in this list has a non-empty value. 11892 // This may be used to include null fields in Patch requests. 11893 NullFields []string `json:"-"` 11894} 11895 11896func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 11897 type NoMethod ShippingsettingsCustomBatchResponseEntry 11898 raw := NoMethod(*s) 11899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11900} 11901 11902type ShippingsettingsGetSupportedCarriersResponse struct { 11903 // Carriers: A list of supported carriers. May be empty. 11904 Carriers []*CarriersCarrier `json:"carriers,omitempty"` 11905 11906 // Kind: Identifies what kind of resource this is. Value: the fixed 11907 // string "content#shippingsettingsGetSupportedCarriersResponse". 11908 Kind string `json:"kind,omitempty"` 11909 11910 // ServerResponse contains the HTTP response code and headers from the 11911 // server. 11912 googleapi.ServerResponse `json:"-"` 11913 11914 // ForceSendFields is a list of field names (e.g. "Carriers") to 11915 // unconditionally include in API requests. By default, fields with 11916 // empty values are omitted from API requests. However, any non-pointer, 11917 // non-interface field appearing in ForceSendFields will be sent to the 11918 // server regardless of whether the field is empty or not. This may be 11919 // used to include empty fields in Patch requests. 11920 ForceSendFields []string `json:"-"` 11921 11922 // NullFields is a list of field names (e.g. "Carriers") to include in 11923 // API requests with the JSON null value. By default, fields with empty 11924 // values are omitted from API requests. However, any field with an 11925 // empty value appearing in NullFields will be sent to the server as 11926 // null. It is an error if a field in this list has a non-empty value. 11927 // This may be used to include null fields in Patch requests. 11928 NullFields []string `json:"-"` 11929} 11930 11931func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { 11932 type NoMethod ShippingsettingsGetSupportedCarriersResponse 11933 raw := NoMethod(*s) 11934 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11935} 11936 11937type ShippingsettingsGetSupportedHolidaysResponse struct { 11938 // Holidays: A list of holidays applicable for delivery guarantees. May 11939 // be empty. 11940 Holidays []*HolidaysHoliday `json:"holidays,omitempty"` 11941 11942 // Kind: Identifies what kind of resource this is. Value: the fixed 11943 // string "content#shippingsettingsGetSupportedHolidaysResponse". 11944 Kind string `json:"kind,omitempty"` 11945 11946 // ServerResponse contains the HTTP response code and headers from the 11947 // server. 11948 googleapi.ServerResponse `json:"-"` 11949 11950 // ForceSendFields is a list of field names (e.g. "Holidays") to 11951 // unconditionally include in API requests. By default, fields with 11952 // empty values are omitted from API requests. However, any non-pointer, 11953 // non-interface field appearing in ForceSendFields will be sent to the 11954 // server regardless of whether the field is empty or not. This may be 11955 // used to include empty fields in Patch requests. 11956 ForceSendFields []string `json:"-"` 11957 11958 // NullFields is a list of field names (e.g. "Holidays") to include in 11959 // API requests with the JSON null value. By default, fields with empty 11960 // values are omitted from API requests. However, any field with an 11961 // empty value appearing in NullFields will be sent to the server as 11962 // null. It is an error if a field in this list has a non-empty value. 11963 // This may be used to include null fields in Patch requests. 11964 NullFields []string `json:"-"` 11965} 11966 11967func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { 11968 type NoMethod ShippingsettingsGetSupportedHolidaysResponse 11969 raw := NoMethod(*s) 11970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11971} 11972 11973type ShippingsettingsGetSupportedPickupServicesResponse struct { 11974 // Kind: Identifies what kind of resource this is. Value: the fixed 11975 // string "content#shippingsettingsGetSupportedPickupServicesResponse". 11976 Kind string `json:"kind,omitempty"` 11977 11978 // PickupServices: A list of supported pickup services. May be empty. 11979 PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` 11980 11981 // ServerResponse contains the HTTP response code and headers from the 11982 // server. 11983 googleapi.ServerResponse `json:"-"` 11984 11985 // ForceSendFields is a list of field names (e.g. "Kind") to 11986 // unconditionally include in API requests. By default, fields with 11987 // empty values are omitted from API requests. However, any non-pointer, 11988 // non-interface field appearing in ForceSendFields will be sent to the 11989 // server regardless of whether the field is empty or not. This may be 11990 // used to include empty fields in Patch requests. 11991 ForceSendFields []string `json:"-"` 11992 11993 // NullFields is a list of field names (e.g. "Kind") to include in API 11994 // requests with the JSON null value. By default, fields with empty 11995 // values are omitted from API requests. However, any field with an 11996 // empty value appearing in NullFields will be sent to the server as 11997 // null. It is an error if a field in this list has a non-empty value. 11998 // This may be used to include null fields in Patch requests. 11999 NullFields []string `json:"-"` 12000} 12001 12002func (s *ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { 12003 type NoMethod ShippingsettingsGetSupportedPickupServicesResponse 12004 raw := NoMethod(*s) 12005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12006} 12007 12008type ShippingsettingsListResponse struct { 12009 // Kind: Identifies what kind of resource this is. Value: the fixed 12010 // string "content#shippingsettingsListResponse". 12011 Kind string `json:"kind,omitempty"` 12012 12013 // NextPageToken: The token for the retrieval of the next page of 12014 // shipping settings. 12015 NextPageToken string `json:"nextPageToken,omitempty"` 12016 12017 Resources []*ShippingSettings `json:"resources,omitempty"` 12018 12019 // ServerResponse contains the HTTP response code and headers from the 12020 // server. 12021 googleapi.ServerResponse `json:"-"` 12022 12023 // ForceSendFields is a list of field names (e.g. "Kind") to 12024 // unconditionally include in API requests. By default, fields with 12025 // empty values are omitted from API requests. However, any non-pointer, 12026 // non-interface field appearing in ForceSendFields will be sent to the 12027 // server regardless of whether the field is empty or not. This may be 12028 // used to include empty fields in Patch requests. 12029 ForceSendFields []string `json:"-"` 12030 12031 // NullFields is a list of field names (e.g. "Kind") to include in API 12032 // requests with the JSON null value. By default, fields with empty 12033 // values are omitted from API requests. However, any field with an 12034 // empty value appearing in NullFields will be sent to the server as 12035 // null. It is an error if a field in this list has a non-empty value. 12036 // This may be used to include null fields in Patch requests. 12037 NullFields []string `json:"-"` 12038} 12039 12040func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { 12041 type NoMethod ShippingsettingsListResponse 12042 raw := NoMethod(*s) 12043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12044} 12045 12046type Table struct { 12047 // ColumnHeaders: Headers of the table's columns. Optional: if not set 12048 // then the table has only one dimension. 12049 ColumnHeaders *Headers `json:"columnHeaders,omitempty"` 12050 12051 // Name: Name of the table. Required for subtables, ignored for the main 12052 // table. 12053 Name string `json:"name,omitempty"` 12054 12055 // RowHeaders: Headers of the table's rows. Required. 12056 RowHeaders *Headers `json:"rowHeaders,omitempty"` 12057 12058 // Rows: The list of rows that constitute the table. Must have the same 12059 // length as `rowHeaders`. Required. 12060 Rows []*Row `json:"rows,omitempty"` 12061 12062 // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to 12063 // unconditionally include in API requests. By default, fields with 12064 // empty values are omitted from API requests. However, any non-pointer, 12065 // non-interface field appearing in ForceSendFields will be sent to the 12066 // server regardless of whether the field is empty or not. This may be 12067 // used to include empty fields in Patch requests. 12068 ForceSendFields []string `json:"-"` 12069 12070 // NullFields is a list of field names (e.g. "ColumnHeaders") to include 12071 // in API requests with the JSON null value. By default, fields with 12072 // empty values are omitted from API requests. However, any field with 12073 // an empty value appearing in NullFields will be sent to the server as 12074 // null. It is an error if a field in this list has a non-empty value. 12075 // This may be used to include null fields in Patch requests. 12076 NullFields []string `json:"-"` 12077} 12078 12079func (s *Table) MarshalJSON() ([]byte, error) { 12080 type NoMethod Table 12081 raw := NoMethod(*s) 12082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12083} 12084 12085type TestOrder struct { 12086 // Customer: Required. The details of the customer who placed the order. 12087 Customer *TestOrderCustomer `json:"customer,omitempty"` 12088 12089 // EnableOrderinvoices: Whether the orderinvoices service should support 12090 // this order. 12091 EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` 12092 12093 // Kind: Identifies what kind of resource this is. Value: the fixed 12094 // string "content#testOrder" 12095 Kind string `json:"kind,omitempty"` 12096 12097 // LineItems: Required. Line items that are ordered. At least one line 12098 // item must be provided. 12099 LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` 12100 12101 // NotificationMode: Restricted. Do not use. 12102 NotificationMode string `json:"notificationMode,omitempty"` 12103 12104 // PaymentMethod: The details of the payment method. 12105 PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"` 12106 12107 // PredefinedDeliveryAddress: Required. Identifier of one of the 12108 // predefined delivery addresses for the delivery. 12109 // 12110 // Acceptable values are: 12111 // - "dwight" 12112 // - "jim" 12113 // - "pam" 12114 PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` 12115 12116 // PredefinedPickupDetails: Identifier of one of the predefined pickup 12117 // details. Required for orders containing line items with shipping type 12118 // `pickup`. 12119 // 12120 // Acceptable values are: 12121 // - "dwight" 12122 // - "jim" 12123 // - "pam" 12124 PredefinedPickupDetails string `json:"predefinedPickupDetails,omitempty"` 12125 12126 // Promotions: Deprecated. Ignored if provided. 12127 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 12128 12129 // ShippingCost: Required. The price of shipping for all items. Shipping 12130 // tax is automatically calculated for orders where marketplace 12131 // facilitator tax laws are applicable. Otherwise, tax settings from 12132 // Merchant Center are applied. Note that shipping is not taxed in 12133 // certain states. 12134 ShippingCost *Price `json:"shippingCost,omitempty"` 12135 12136 // ShippingCostTax: Deprecated. Ignored if provided. 12137 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 12138 12139 // ShippingOption: Required. The requested shipping option. 12140 // 12141 // Acceptable values are: 12142 // - "economy" 12143 // - "expedited" 12144 // - "oneDay" 12145 // - "sameDay" 12146 // - "standard" 12147 // - "twoDay" 12148 ShippingOption string `json:"shippingOption,omitempty"` 12149 12150 // ForceSendFields is a list of field names (e.g. "Customer") to 12151 // unconditionally include in API requests. By default, fields with 12152 // empty values are omitted from API requests. However, any non-pointer, 12153 // non-interface field appearing in ForceSendFields will be sent to the 12154 // server regardless of whether the field is empty or not. This may be 12155 // used to include empty fields in Patch requests. 12156 ForceSendFields []string `json:"-"` 12157 12158 // NullFields is a list of field names (e.g. "Customer") to include in 12159 // API requests with the JSON null value. By default, fields with empty 12160 // values are omitted from API requests. However, any field with an 12161 // empty value appearing in NullFields will be sent to the server as 12162 // null. It is an error if a field in this list has a non-empty value. 12163 // This may be used to include null fields in Patch requests. 12164 NullFields []string `json:"-"` 12165} 12166 12167func (s *TestOrder) MarshalJSON() ([]byte, error) { 12168 type NoMethod TestOrder 12169 raw := NoMethod(*s) 12170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12171} 12172 12173type TestOrderCustomer struct { 12174 // Email: Required. Email address of the customer. 12175 // 12176 // Acceptable values are: 12177 // - "pog.dwight.schrute@gmail.com" 12178 // - "pog.jim.halpert@gmail.com" 12179 // - "penpog.pam.beesly@gmail.comding" 12180 Email string `json:"email,omitempty"` 12181 12182 // ExplicitMarketingPreference: Deprecated. Please use 12183 // marketingRightsInfo instead. 12184 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 12185 12186 // FullName: Full name of the customer. 12187 FullName string `json:"fullName,omitempty"` 12188 12189 // MarketingRightsInfo: Customer's marketing preferences. 12190 MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 12191 12192 // ForceSendFields is a list of field names (e.g. "Email") to 12193 // unconditionally include in API requests. By default, fields with 12194 // empty values are omitted from API requests. However, any non-pointer, 12195 // non-interface field appearing in ForceSendFields will be sent to the 12196 // server regardless of whether the field is empty or not. This may be 12197 // used to include empty fields in Patch requests. 12198 ForceSendFields []string `json:"-"` 12199 12200 // NullFields is a list of field names (e.g. "Email") to include in API 12201 // requests with the JSON null value. By default, fields with empty 12202 // values are omitted from API requests. However, any field with an 12203 // empty value appearing in NullFields will be sent to the server as 12204 // null. It is an error if a field in this list has a non-empty value. 12205 // This may be used to include null fields in Patch requests. 12206 NullFields []string `json:"-"` 12207} 12208 12209func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) { 12210 type NoMethod TestOrderCustomer 12211 raw := NoMethod(*s) 12212 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12213} 12214 12215type TestOrderCustomerMarketingRightsInfo struct { 12216 // ExplicitMarketingPreference: Last know user use selection regards 12217 // marketing preferences. In certain cases selection might not be known, 12218 // so this field would be empty. 12219 // 12220 // Acceptable values are: 12221 // - "denied" 12222 // - "granted" 12223 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 12224 12225 // LastUpdatedTimestamp: Timestamp when last time marketing preference 12226 // was updated. Could be empty, if user wasn't offered a selection yet. 12227 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 12228 12229 // ForceSendFields is a list of field names (e.g. 12230 // "ExplicitMarketingPreference") to unconditionally include in API 12231 // requests. By default, fields with empty values are omitted from API 12232 // requests. However, any non-pointer, non-interface field appearing in 12233 // ForceSendFields will be sent to the server regardless of whether the 12234 // field is empty or not. This may be used to include empty fields in 12235 // Patch requests. 12236 ForceSendFields []string `json:"-"` 12237 12238 // NullFields is a list of field names (e.g. 12239 // "ExplicitMarketingPreference") to include in API requests with the 12240 // JSON null value. By default, fields with empty values are omitted 12241 // from API requests. However, any field with an empty value appearing 12242 // in NullFields will be sent to the server as null. It is an error if a 12243 // field in this list has a non-empty value. This may be used to include 12244 // null fields in Patch requests. 12245 NullFields []string `json:"-"` 12246} 12247 12248func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 12249 type NoMethod TestOrderCustomerMarketingRightsInfo 12250 raw := NoMethod(*s) 12251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12252} 12253 12254type TestOrderLineItem struct { 12255 // Product: Required. Product data from the time of the order placement. 12256 Product *TestOrderLineItemProduct `json:"product,omitempty"` 12257 12258 // QuantityOrdered: Required. Number of items ordered. 12259 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 12260 12261 // ReturnInfo: Required. Details of the return policy for the line item. 12262 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 12263 12264 // ShippingDetails: Required. Details of the requested shipping for the 12265 // line item. 12266 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 12267 12268 // UnitTax: Deprecated. Ignored if provided. 12269 UnitTax *Price `json:"unitTax,omitempty"` 12270 12271 // ForceSendFields is a list of field names (e.g. "Product") to 12272 // unconditionally include in API requests. By default, fields with 12273 // empty values are omitted from API requests. However, any non-pointer, 12274 // non-interface field appearing in ForceSendFields will be sent to the 12275 // server regardless of whether the field is empty or not. This may be 12276 // used to include empty fields in Patch requests. 12277 ForceSendFields []string `json:"-"` 12278 12279 // NullFields is a list of field names (e.g. "Product") to include in 12280 // API requests with the JSON null value. By default, fields with empty 12281 // values are omitted from API requests. However, any field with an 12282 // empty value appearing in NullFields will be sent to the server as 12283 // null. It is an error if a field in this list has a non-empty value. 12284 // This may be used to include null fields in Patch requests. 12285 NullFields []string `json:"-"` 12286} 12287 12288func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) { 12289 type NoMethod TestOrderLineItem 12290 raw := NoMethod(*s) 12291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12292} 12293 12294type TestOrderLineItemProduct struct { 12295 // Brand: Required. Brand of the item. 12296 Brand string `json:"brand,omitempty"` 12297 12298 // Channel: Deprecated. 12299 // 12300 // Acceptable values are: 12301 // - "online" 12302 Channel string `json:"channel,omitempty"` 12303 12304 // Condition: Required. Condition or state of the item. 12305 // 12306 // Acceptable values are: 12307 // - "new" 12308 Condition string `json:"condition,omitempty"` 12309 12310 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 12311 // the item. 12312 // 12313 // Acceptable values are: 12314 // - "en" 12315 // - "fr" 12316 ContentLanguage string `json:"contentLanguage,omitempty"` 12317 12318 // Fees: Fees for the item. Optional. 12319 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 12320 12321 // Gtin: Global Trade Item Number (GTIN) of the item. Optional. 12322 Gtin string `json:"gtin,omitempty"` 12323 12324 // ImageLink: Required. URL of an image of the item. 12325 ImageLink string `json:"imageLink,omitempty"` 12326 12327 // ItemGroupId: Shared identifier for all variants of the same product. 12328 // Optional. 12329 ItemGroupId string `json:"itemGroupId,omitempty"` 12330 12331 // Mpn: Manufacturer Part Number (MPN) of the item. Optional. 12332 Mpn string `json:"mpn,omitempty"` 12333 12334 // OfferId: Required. An identifier of the item. 12335 OfferId string `json:"offerId,omitempty"` 12336 12337 // Price: Required. The price for the product. Tax is automatically 12338 // calculated for orders where marketplace facilitator tax laws are 12339 // applicable. Otherwise, tax settings from Merchant Center are applied. 12340 Price *Price `json:"price,omitempty"` 12341 12342 // TargetCountry: Required. The CLDR territory code of the target 12343 // country of the product. 12344 TargetCountry string `json:"targetCountry,omitempty"` 12345 12346 // Title: Required. The title of the product. 12347 Title string `json:"title,omitempty"` 12348 12349 // VariantAttributes: Variant attributes for the item. Optional. 12350 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 12351 12352 // ForceSendFields is a list of field names (e.g. "Brand") to 12353 // unconditionally include in API requests. By default, fields with 12354 // empty values are omitted from API requests. However, any non-pointer, 12355 // non-interface field appearing in ForceSendFields will be sent to the 12356 // server regardless of whether the field is empty or not. This may be 12357 // used to include empty fields in Patch requests. 12358 ForceSendFields []string `json:"-"` 12359 12360 // NullFields is a list of field names (e.g. "Brand") to include in API 12361 // requests with the JSON null value. By default, fields with empty 12362 // values are omitted from API requests. However, any field with an 12363 // empty value appearing in NullFields will be sent to the server as 12364 // null. It is an error if a field in this list has a non-empty value. 12365 // This may be used to include null fields in Patch requests. 12366 NullFields []string `json:"-"` 12367} 12368 12369func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { 12370 type NoMethod TestOrderLineItemProduct 12371 raw := NoMethod(*s) 12372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12373} 12374 12375type TestOrderPaymentMethod struct { 12376 // ExpirationMonth: The card expiration month (January = 1, February = 2 12377 // etc.). 12378 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 12379 12380 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 12381 ExpirationYear int64 `json:"expirationYear,omitempty"` 12382 12383 // LastFourDigits: The last four digits of the card number. 12384 LastFourDigits string `json:"lastFourDigits,omitempty"` 12385 12386 // PredefinedBillingAddress: The billing address. 12387 // 12388 // Acceptable values are: 12389 // - "dwight" 12390 // - "jim" 12391 // - "pam" 12392 PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` 12393 12394 // Type: The type of instrument. Note that real orders might have 12395 // different values than the four values accepted by 12396 // `createTestOrder`. 12397 // 12398 // Acceptable values are: 12399 // - "AMEX" 12400 // - "DISCOVER" 12401 // - "MASTERCARD" 12402 // - "VISA" 12403 Type string `json:"type,omitempty"` 12404 12405 // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to 12406 // unconditionally include in API requests. By default, fields with 12407 // empty values are omitted from API requests. However, any non-pointer, 12408 // non-interface field appearing in ForceSendFields will be sent to the 12409 // server regardless of whether the field is empty or not. This may be 12410 // used to include empty fields in Patch requests. 12411 ForceSendFields []string `json:"-"` 12412 12413 // NullFields is a list of field names (e.g. "ExpirationMonth") to 12414 // include in API requests with the JSON null value. By default, fields 12415 // with empty values are omitted from API requests. However, any field 12416 // with an empty value appearing in NullFields will be sent to the 12417 // server as null. It is an error if a field in this list has a 12418 // non-empty value. This may be used to include null fields in Patch 12419 // requests. 12420 NullFields []string `json:"-"` 12421} 12422 12423func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) { 12424 type NoMethod TestOrderPaymentMethod 12425 raw := NoMethod(*s) 12426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12427} 12428 12429type TransitTable struct { 12430 // PostalCodeGroupNames: A list of postal group names. The last value 12431 // can be "all other locations". Example: `["zone 1", "zone 2", "all 12432 // other locations"]`. The referred postal code groups must match the 12433 // delivery country of the service. 12434 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 12435 12436 Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` 12437 12438 // TransitTimeLabels: A list of transit time labels. The last value can 12439 // be "all other labels". Example: `["food", "electronics", "all other 12440 // labels"]`. 12441 TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` 12442 12443 // ForceSendFields is a list of field names (e.g. 12444 // "PostalCodeGroupNames") to unconditionally include in API requests. 12445 // By default, fields with empty values are omitted from API requests. 12446 // However, any non-pointer, non-interface field appearing in 12447 // ForceSendFields will be sent to the server regardless of whether the 12448 // field is empty or not. This may be used to include empty fields in 12449 // Patch requests. 12450 ForceSendFields []string `json:"-"` 12451 12452 // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to 12453 // include in API requests with the JSON null value. By default, fields 12454 // with empty values are omitted from API requests. However, any field 12455 // with an empty value appearing in NullFields will be sent to the 12456 // server as null. It is an error if a field in this list has a 12457 // non-empty value. This may be used to include null fields in Patch 12458 // requests. 12459 NullFields []string `json:"-"` 12460} 12461 12462func (s *TransitTable) MarshalJSON() ([]byte, error) { 12463 type NoMethod TransitTable 12464 raw := NoMethod(*s) 12465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12466} 12467 12468type TransitTableTransitTimeRow struct { 12469 Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` 12470 12471 // ForceSendFields is a list of field names (e.g. "Values") to 12472 // unconditionally include in API requests. By default, fields with 12473 // empty values are omitted from API requests. However, any non-pointer, 12474 // non-interface field appearing in ForceSendFields will be sent to the 12475 // server regardless of whether the field is empty or not. This may be 12476 // used to include empty fields in Patch requests. 12477 ForceSendFields []string `json:"-"` 12478 12479 // NullFields is a list of field names (e.g. "Values") to include in API 12480 // requests with the JSON null value. By default, fields with empty 12481 // values are omitted from API requests. However, any field with an 12482 // empty value appearing in NullFields will be sent to the server as 12483 // null. It is an error if a field in this list has a non-empty value. 12484 // This may be used to include null fields in Patch requests. 12485 NullFields []string `json:"-"` 12486} 12487 12488func (s *TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { 12489 type NoMethod TransitTableTransitTimeRow 12490 raw := NoMethod(*s) 12491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12492} 12493 12494type TransitTableTransitTimeRowTransitTimeValue struct { 12495 // MaxTransitTimeInDays: Must be greater than or equal to 12496 // `minTransitTimeInDays`. 12497 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 12498 12499 // MinTransitTimeInDays: Transit time range (min-max) in business days. 12500 // 0 means same day delivery, 1 means next day delivery. 12501 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 12502 12503 // ForceSendFields is a list of field names (e.g. 12504 // "MaxTransitTimeInDays") to unconditionally include in API requests. 12505 // By default, fields with empty values are omitted from API requests. 12506 // However, any non-pointer, non-interface field appearing in 12507 // ForceSendFields will be sent to the server regardless of whether the 12508 // field is empty or not. This may be used to include empty fields in 12509 // Patch requests. 12510 ForceSendFields []string `json:"-"` 12511 12512 // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to 12513 // include in API requests with the JSON null value. By default, fields 12514 // with empty values are omitted from API requests. However, any field 12515 // with an empty value appearing in NullFields will be sent to the 12516 // server as null. It is an error if a field in this list has a 12517 // non-empty value. This may be used to include null fields in Patch 12518 // requests. 12519 NullFields []string `json:"-"` 12520} 12521 12522func (s *TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { 12523 type NoMethod TransitTableTransitTimeRowTransitTimeValue 12524 raw := NoMethod(*s) 12525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12526} 12527 12528type UnitInvoice struct { 12529 // AdditionalCharges: Additional charges for a unit, e.g. shipping 12530 // costs. 12531 AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` 12532 12533 // Promotions: Deprecated. 12534 Promotions []*Promotion `json:"promotions,omitempty"` 12535 12536 // UnitPricePretax: [required] Price of the unit, before applying taxes. 12537 UnitPricePretax *Price `json:"unitPricePretax,omitempty"` 12538 12539 // UnitPriceTaxes: Tax amounts to apply to the unit price. 12540 UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` 12541 12542 // ForceSendFields is a list of field names (e.g. "AdditionalCharges") 12543 // to unconditionally include in API requests. By default, fields with 12544 // empty values are omitted from API requests. However, any non-pointer, 12545 // non-interface field appearing in ForceSendFields will be sent to the 12546 // server regardless of whether the field is empty or not. This may be 12547 // used to include empty fields in Patch requests. 12548 ForceSendFields []string `json:"-"` 12549 12550 // NullFields is a list of field names (e.g. "AdditionalCharges") to 12551 // include in API requests with the JSON null value. By default, fields 12552 // with empty values are omitted from API requests. However, any field 12553 // with an empty value appearing in NullFields will be sent to the 12554 // server as null. It is an error if a field in this list has a 12555 // non-empty value. This may be used to include null fields in Patch 12556 // requests. 12557 NullFields []string `json:"-"` 12558} 12559 12560func (s *UnitInvoice) MarshalJSON() ([]byte, error) { 12561 type NoMethod UnitInvoice 12562 raw := NoMethod(*s) 12563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12564} 12565 12566type UnitInvoiceAdditionalCharge struct { 12567 // AdditionalChargeAmount: [required] Amount of the additional charge. 12568 AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` 12569 12570 // AdditionalChargePromotions: Deprecated. 12571 AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"` 12572 12573 // Type: [required] Type of the additional charge. 12574 // 12575 // Acceptable values are: 12576 // - "shipping" 12577 Type string `json:"type,omitempty"` 12578 12579 // ForceSendFields is a list of field names (e.g. 12580 // "AdditionalChargeAmount") to unconditionally include in API requests. 12581 // By default, fields with empty values are omitted from API requests. 12582 // However, any non-pointer, non-interface field appearing in 12583 // ForceSendFields will be sent to the server regardless of whether the 12584 // field is empty or not. This may be used to include empty fields in 12585 // Patch requests. 12586 ForceSendFields []string `json:"-"` 12587 12588 // NullFields is a list of field names (e.g. "AdditionalChargeAmount") 12589 // to include in API requests with the JSON null value. By default, 12590 // fields with empty values are omitted from API requests. However, any 12591 // field with an empty value appearing in NullFields will be sent to the 12592 // server as null. It is an error if a field in this list has a 12593 // non-empty value. This may be used to include null fields in Patch 12594 // requests. 12595 NullFields []string `json:"-"` 12596} 12597 12598func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { 12599 type NoMethod UnitInvoiceAdditionalCharge 12600 raw := NoMethod(*s) 12601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12602} 12603 12604type UnitInvoiceTaxLine struct { 12605 // TaxAmount: [required] Tax amount for the tax type. 12606 TaxAmount *Price `json:"taxAmount,omitempty"` 12607 12608 // TaxName: Optional name of the tax type. This should only be provided 12609 // if `taxType` is `otherFeeTax`. 12610 TaxName string `json:"taxName,omitempty"` 12611 12612 // TaxType: [required] Type of the tax. 12613 // 12614 // Acceptable values are: 12615 // - "otherFee" 12616 // - "otherFeeTax" 12617 // - "sales" 12618 TaxType string `json:"taxType,omitempty"` 12619 12620 // ForceSendFields is a list of field names (e.g. "TaxAmount") to 12621 // unconditionally include in API requests. By default, fields with 12622 // empty values are omitted from API requests. However, any non-pointer, 12623 // non-interface field appearing in ForceSendFields will be sent to the 12624 // server regardless of whether the field is empty or not. This may be 12625 // used to include empty fields in Patch requests. 12626 ForceSendFields []string `json:"-"` 12627 12628 // NullFields is a list of field names (e.g. "TaxAmount") to include in 12629 // API requests with the JSON null value. By default, fields with empty 12630 // values are omitted from API requests. However, any field with an 12631 // empty value appearing in NullFields will be sent to the server as 12632 // null. It is an error if a field in this list has a non-empty value. 12633 // This may be used to include null fields in Patch requests. 12634 NullFields []string `json:"-"` 12635} 12636 12637func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { 12638 type NoMethod UnitInvoiceTaxLine 12639 raw := NoMethod(*s) 12640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12641} 12642 12643// Value: The single value of a rate group or the value of a rate group 12644// table's cell. Exactly one of `noShipping`, `flatRate`, 12645// `pricePercentage`, `carrierRateName`, `subtableName` must be set. 12646type Value struct { 12647 // CarrierRateName: The name of a carrier rate referring to a carrier 12648 // rate defined in the same rate group. Can only be set if all other 12649 // fields are not set. 12650 CarrierRateName string `json:"carrierRateName,omitempty"` 12651 12652 // FlatRate: A flat rate. Can only be set if all other fields are not 12653 // set. 12654 FlatRate *Price `json:"flatRate,omitempty"` 12655 12656 // NoShipping: If true, then the product can't ship. Must be true when 12657 // set, can only be set if all other fields are not set. 12658 NoShipping bool `json:"noShipping,omitempty"` 12659 12660 // PricePercentage: A percentage of the price represented as a number in 12661 // decimal notation (e.g., "5.4"). Can only be set if all other fields 12662 // are not set. 12663 PricePercentage string `json:"pricePercentage,omitempty"` 12664 12665 // SubtableName: The name of a subtable. Can only be set in table cells 12666 // (i.e., not for single values), and only if all other fields are not 12667 // set. 12668 SubtableName string `json:"subtableName,omitempty"` 12669 12670 // ForceSendFields is a list of field names (e.g. "CarrierRateName") to 12671 // unconditionally include in API requests. By default, fields with 12672 // empty values are omitted from API requests. However, any non-pointer, 12673 // non-interface field appearing in ForceSendFields will be sent to the 12674 // server regardless of whether the field is empty or not. This may be 12675 // used to include empty fields in Patch requests. 12676 ForceSendFields []string `json:"-"` 12677 12678 // NullFields is a list of field names (e.g. "CarrierRateName") to 12679 // include in API requests with the JSON null value. By default, fields 12680 // with empty values are omitted from API requests. However, any field 12681 // with an empty value appearing in NullFields will be sent to the 12682 // server as null. It is an error if a field in this list has a 12683 // non-empty value. This may be used to include null fields in Patch 12684 // requests. 12685 NullFields []string `json:"-"` 12686} 12687 12688func (s *Value) MarshalJSON() ([]byte, error) { 12689 type NoMethod Value 12690 raw := NoMethod(*s) 12691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12692} 12693 12694type Weight struct { 12695 // Unit: Required. The weight unit. 12696 // 12697 // Acceptable values are: 12698 // - "kg" 12699 // - "lb" 12700 Unit string `json:"unit,omitempty"` 12701 12702 // Value: Required. The weight represented as a number. 12703 Value string `json:"value,omitempty"` 12704 12705 // ForceSendFields is a list of field names (e.g. "Unit") to 12706 // unconditionally include in API requests. By default, fields with 12707 // empty values are omitted from API requests. However, any non-pointer, 12708 // non-interface field appearing in ForceSendFields will be sent to the 12709 // server regardless of whether the field is empty or not. This may be 12710 // used to include empty fields in Patch requests. 12711 ForceSendFields []string `json:"-"` 12712 12713 // NullFields is a list of field names (e.g. "Unit") to include in API 12714 // requests with the JSON null value. By default, fields with empty 12715 // values are omitted from API requests. However, any field with an 12716 // empty value appearing in NullFields will be sent to the server as 12717 // null. It is an error if a field in this list has a non-empty value. 12718 // This may be used to include null fields in Patch requests. 12719 NullFields []string `json:"-"` 12720} 12721 12722func (s *Weight) MarshalJSON() ([]byte, error) { 12723 type NoMethod Weight 12724 raw := NoMethod(*s) 12725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12726} 12727 12728// method id "content.accounts.authinfo": 12729 12730type AccountsAuthinfoCall struct { 12731 s *APIService 12732 urlParams_ gensupport.URLParams 12733 ifNoneMatch_ string 12734 ctx_ context.Context 12735 header_ http.Header 12736} 12737 12738// Authinfo: Returns information about the authenticated user. 12739func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { 12740 c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12741 return c 12742} 12743 12744// Fields allows partial responses to be retrieved. See 12745// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12746// for more information. 12747func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { 12748 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12749 return c 12750} 12751 12752// IfNoneMatch sets the optional parameter which makes the operation 12753// fail if the object's ETag matches the given value. This is useful for 12754// getting updates only after the object has changed since the last 12755// request. Use googleapi.IsNotModified to check whether the response 12756// error from Do is the result of In-None-Match. 12757func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { 12758 c.ifNoneMatch_ = entityTag 12759 return c 12760} 12761 12762// Context sets the context to be used in this call's Do method. Any 12763// pending HTTP request will be aborted if the provided context is 12764// canceled. 12765func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 12766 c.ctx_ = ctx 12767 return c 12768} 12769 12770// Header returns an http.Header that can be modified by the caller to 12771// add HTTP headers to the request. 12772func (c *AccountsAuthinfoCall) Header() http.Header { 12773 if c.header_ == nil { 12774 c.header_ = make(http.Header) 12775 } 12776 return c.header_ 12777} 12778 12779func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { 12780 reqHeaders := make(http.Header) 12781 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12782 for k, v := range c.header_ { 12783 reqHeaders[k] = v 12784 } 12785 reqHeaders.Set("User-Agent", c.s.userAgent()) 12786 if c.ifNoneMatch_ != "" { 12787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12788 } 12789 var body io.Reader = nil 12790 c.urlParams_.Set("alt", alt) 12791 c.urlParams_.Set("prettyPrint", "false") 12792 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") 12793 urls += "?" + c.urlParams_.Encode() 12794 req, err := http.NewRequest("GET", urls, body) 12795 if err != nil { 12796 return nil, err 12797 } 12798 req.Header = reqHeaders 12799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12800} 12801 12802// Do executes the "content.accounts.authinfo" call. 12803// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. 12804// Any non-2xx status code is an error. Response headers are in either 12805// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was 12806// returned at all) in error.(*googleapi.Error).Header. Use 12807// googleapi.IsNotModified to check whether the returned error was 12808// because http.StatusNotModified was returned. 12809func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { 12810 gensupport.SetOptions(c.urlParams_, opts...) 12811 res, err := c.doRequest("json") 12812 if res != nil && res.StatusCode == http.StatusNotModified { 12813 if res.Body != nil { 12814 res.Body.Close() 12815 } 12816 return nil, &googleapi.Error{ 12817 Code: res.StatusCode, 12818 Header: res.Header, 12819 } 12820 } 12821 if err != nil { 12822 return nil, err 12823 } 12824 defer googleapi.CloseBody(res) 12825 if err := googleapi.CheckResponse(res); err != nil { 12826 return nil, err 12827 } 12828 ret := &AccountsAuthInfoResponse{ 12829 ServerResponse: googleapi.ServerResponse{ 12830 Header: res.Header, 12831 HTTPStatusCode: res.StatusCode, 12832 }, 12833 } 12834 target := &ret 12835 if err := gensupport.DecodeResponse(target, res); err != nil { 12836 return nil, err 12837 } 12838 return ret, nil 12839 // { 12840 // "description": "Returns information about the authenticated user.", 12841 // "httpMethod": "GET", 12842 // "id": "content.accounts.authinfo", 12843 // "path": "accounts/authinfo", 12844 // "response": { 12845 // "$ref": "AccountsAuthInfoResponse" 12846 // }, 12847 // "scopes": [ 12848 // "https://www.googleapis.com/auth/content" 12849 // ] 12850 // } 12851 12852} 12853 12854// method id "content.accounts.claimwebsite": 12855 12856type AccountsClaimwebsiteCall struct { 12857 s *APIService 12858 merchantId uint64 12859 accountId uint64 12860 urlParams_ gensupport.URLParams 12861 ctx_ context.Context 12862 header_ http.Header 12863} 12864 12865// Claimwebsite: Claims the website of a Merchant Center sub-account. 12866func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { 12867 c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12868 c.merchantId = merchantId 12869 c.accountId = accountId 12870 return c 12871} 12872 12873// Overwrite sets the optional parameter "overwrite": Only available to 12874// selected merchants. When set to `True`, this flag removes any 12875// existing claim on the requested website by another account and 12876// replaces it with a claim from this account. 12877func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { 12878 c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 12879 return c 12880} 12881 12882// Fields allows partial responses to be retrieved. See 12883// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12884// for more information. 12885func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 12886 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12887 return c 12888} 12889 12890// Context sets the context to be used in this call's Do method. Any 12891// pending HTTP request will be aborted if the provided context is 12892// canceled. 12893func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 12894 c.ctx_ = ctx 12895 return c 12896} 12897 12898// Header returns an http.Header that can be modified by the caller to 12899// add HTTP headers to the request. 12900func (c *AccountsClaimwebsiteCall) Header() http.Header { 12901 if c.header_ == nil { 12902 c.header_ = make(http.Header) 12903 } 12904 return c.header_ 12905} 12906 12907func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { 12908 reqHeaders := make(http.Header) 12909 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12910 for k, v := range c.header_ { 12911 reqHeaders[k] = v 12912 } 12913 reqHeaders.Set("User-Agent", c.s.userAgent()) 12914 var body io.Reader = nil 12915 c.urlParams_.Set("alt", alt) 12916 c.urlParams_.Set("prettyPrint", "false") 12917 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") 12918 urls += "?" + c.urlParams_.Encode() 12919 req, err := http.NewRequest("POST", urls, body) 12920 if err != nil { 12921 return nil, err 12922 } 12923 req.Header = reqHeaders 12924 googleapi.Expand(req.URL, map[string]string{ 12925 "merchantId": strconv.FormatUint(c.merchantId, 10), 12926 "accountId": strconv.FormatUint(c.accountId, 10), 12927 }) 12928 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12929} 12930 12931// Do executes the "content.accounts.claimwebsite" call. 12932// Exactly one of *AccountsClaimWebsiteResponse or error will be 12933// non-nil. Any non-2xx status code is an error. Response headers are in 12934// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a 12935// response was returned at all) in error.(*googleapi.Error).Header. Use 12936// googleapi.IsNotModified to check whether the returned error was 12937// because http.StatusNotModified was returned. 12938func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { 12939 gensupport.SetOptions(c.urlParams_, opts...) 12940 res, err := c.doRequest("json") 12941 if res != nil && res.StatusCode == http.StatusNotModified { 12942 if res.Body != nil { 12943 res.Body.Close() 12944 } 12945 return nil, &googleapi.Error{ 12946 Code: res.StatusCode, 12947 Header: res.Header, 12948 } 12949 } 12950 if err != nil { 12951 return nil, err 12952 } 12953 defer googleapi.CloseBody(res) 12954 if err := googleapi.CheckResponse(res); err != nil { 12955 return nil, err 12956 } 12957 ret := &AccountsClaimWebsiteResponse{ 12958 ServerResponse: googleapi.ServerResponse{ 12959 Header: res.Header, 12960 HTTPStatusCode: res.StatusCode, 12961 }, 12962 } 12963 target := &ret 12964 if err := gensupport.DecodeResponse(target, res); err != nil { 12965 return nil, err 12966 } 12967 return ret, nil 12968 // { 12969 // "description": "Claims the website of a Merchant Center sub-account.", 12970 // "httpMethod": "POST", 12971 // "id": "content.accounts.claimwebsite", 12972 // "parameterOrder": [ 12973 // "merchantId", 12974 // "accountId" 12975 // ], 12976 // "parameters": { 12977 // "accountId": { 12978 // "description": "The ID of the account whose website is claimed.", 12979 // "format": "uint64", 12980 // "location": "path", 12981 // "required": true, 12982 // "type": "string" 12983 // }, 12984 // "merchantId": { 12985 // "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.", 12986 // "format": "uint64", 12987 // "location": "path", 12988 // "required": true, 12989 // "type": "string" 12990 // }, 12991 // "overwrite": { 12992 // "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.", 12993 // "location": "query", 12994 // "type": "boolean" 12995 // } 12996 // }, 12997 // "path": "{merchantId}/accounts/{accountId}/claimwebsite", 12998 // "response": { 12999 // "$ref": "AccountsClaimWebsiteResponse" 13000 // }, 13001 // "scopes": [ 13002 // "https://www.googleapis.com/auth/content" 13003 // ] 13004 // } 13005 13006} 13007 13008// method id "content.accounts.custombatch": 13009 13010type AccountsCustombatchCall struct { 13011 s *APIService 13012 accountscustombatchrequest *AccountsCustomBatchRequest 13013 urlParams_ gensupport.URLParams 13014 ctx_ context.Context 13015 header_ http.Header 13016} 13017 13018// Custombatch: Retrieves, inserts, updates, and deletes multiple 13019// Merchant Center (sub-)accounts in a single request. 13020func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { 13021 c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13022 c.accountscustombatchrequest = accountscustombatchrequest 13023 return c 13024} 13025 13026// DryRun sets the optional parameter "dryRun": Flag to simulate a 13027// request like in a live environment. If set to true, dry-run mode 13028// checks the validity of the request and returns errors (if any). 13029func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { 13030 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13031 return c 13032} 13033 13034// Fields allows partial responses to be retrieved. See 13035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13036// for more information. 13037func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { 13038 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13039 return c 13040} 13041 13042// Context sets the context to be used in this call's Do method. Any 13043// pending HTTP request will be aborted if the provided context is 13044// canceled. 13045func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 13046 c.ctx_ = ctx 13047 return c 13048} 13049 13050// Header returns an http.Header that can be modified by the caller to 13051// add HTTP headers to the request. 13052func (c *AccountsCustombatchCall) Header() http.Header { 13053 if c.header_ == nil { 13054 c.header_ = make(http.Header) 13055 } 13056 return c.header_ 13057} 13058 13059func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { 13060 reqHeaders := make(http.Header) 13061 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13062 for k, v := range c.header_ { 13063 reqHeaders[k] = v 13064 } 13065 reqHeaders.Set("User-Agent", c.s.userAgent()) 13066 var body io.Reader = nil 13067 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) 13068 if err != nil { 13069 return nil, err 13070 } 13071 reqHeaders.Set("Content-Type", "application/json") 13072 c.urlParams_.Set("alt", alt) 13073 c.urlParams_.Set("prettyPrint", "false") 13074 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 13075 urls += "?" + c.urlParams_.Encode() 13076 req, err := http.NewRequest("POST", urls, body) 13077 if err != nil { 13078 return nil, err 13079 } 13080 req.Header = reqHeaders 13081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13082} 13083 13084// Do executes the "content.accounts.custombatch" call. 13085// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. 13086// Any non-2xx status code is an error. Response headers are in either 13087// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response 13088// was returned at all) in error.(*googleapi.Error).Header. Use 13089// googleapi.IsNotModified to check whether the returned error was 13090// because http.StatusNotModified was returned. 13091func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { 13092 gensupport.SetOptions(c.urlParams_, opts...) 13093 res, err := c.doRequest("json") 13094 if res != nil && res.StatusCode == http.StatusNotModified { 13095 if res.Body != nil { 13096 res.Body.Close() 13097 } 13098 return nil, &googleapi.Error{ 13099 Code: res.StatusCode, 13100 Header: res.Header, 13101 } 13102 } 13103 if err != nil { 13104 return nil, err 13105 } 13106 defer googleapi.CloseBody(res) 13107 if err := googleapi.CheckResponse(res); err != nil { 13108 return nil, err 13109 } 13110 ret := &AccountsCustomBatchResponse{ 13111 ServerResponse: googleapi.ServerResponse{ 13112 Header: res.Header, 13113 HTTPStatusCode: res.StatusCode, 13114 }, 13115 } 13116 target := &ret 13117 if err := gensupport.DecodeResponse(target, res); err != nil { 13118 return nil, err 13119 } 13120 return ret, nil 13121 // { 13122 // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", 13123 // "httpMethod": "POST", 13124 // "id": "content.accounts.custombatch", 13125 // "parameters": { 13126 // "dryRun": { 13127 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 13128 // "location": "query", 13129 // "type": "boolean" 13130 // } 13131 // }, 13132 // "path": "accounts/batch", 13133 // "request": { 13134 // "$ref": "AccountsCustomBatchRequest" 13135 // }, 13136 // "response": { 13137 // "$ref": "AccountsCustomBatchResponse" 13138 // }, 13139 // "scopes": [ 13140 // "https://www.googleapis.com/auth/content" 13141 // ] 13142 // } 13143 13144} 13145 13146// method id "content.accounts.delete": 13147 13148type AccountsDeleteCall struct { 13149 s *APIService 13150 merchantId uint64 13151 accountId uint64 13152 urlParams_ gensupport.URLParams 13153 ctx_ context.Context 13154 header_ http.Header 13155} 13156 13157// Delete: Deletes a Merchant Center sub-account. 13158func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { 13159 c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13160 c.merchantId = merchantId 13161 c.accountId = accountId 13162 return c 13163} 13164 13165// DryRun sets the optional parameter "dryRun": Flag to simulate a 13166// request like in a live environment. If set to true, dry-run mode 13167// checks the validity of the request and returns errors (if any). 13168func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { 13169 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13170 return c 13171} 13172 13173// Force sets the optional parameter "force": Flag to delete 13174// sub-accounts with products. The default value is false. 13175func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { 13176 c.urlParams_.Set("force", fmt.Sprint(force)) 13177 return c 13178} 13179 13180// Fields allows partial responses to be retrieved. See 13181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13182// for more information. 13183func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { 13184 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13185 return c 13186} 13187 13188// Context sets the context to be used in this call's Do method. Any 13189// pending HTTP request will be aborted if the provided context is 13190// canceled. 13191func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 13192 c.ctx_ = ctx 13193 return c 13194} 13195 13196// Header returns an http.Header that can be modified by the caller to 13197// add HTTP headers to the request. 13198func (c *AccountsDeleteCall) Header() http.Header { 13199 if c.header_ == nil { 13200 c.header_ = make(http.Header) 13201 } 13202 return c.header_ 13203} 13204 13205func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { 13206 reqHeaders := make(http.Header) 13207 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13208 for k, v := range c.header_ { 13209 reqHeaders[k] = v 13210 } 13211 reqHeaders.Set("User-Agent", c.s.userAgent()) 13212 var body io.Reader = nil 13213 c.urlParams_.Set("alt", alt) 13214 c.urlParams_.Set("prettyPrint", "false") 13215 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 13216 urls += "?" + c.urlParams_.Encode() 13217 req, err := http.NewRequest("DELETE", urls, body) 13218 if err != nil { 13219 return nil, err 13220 } 13221 req.Header = reqHeaders 13222 googleapi.Expand(req.URL, map[string]string{ 13223 "merchantId": strconv.FormatUint(c.merchantId, 10), 13224 "accountId": strconv.FormatUint(c.accountId, 10), 13225 }) 13226 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13227} 13228 13229// Do executes the "content.accounts.delete" call. 13230func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { 13231 gensupport.SetOptions(c.urlParams_, opts...) 13232 res, err := c.doRequest("json") 13233 if err != nil { 13234 return err 13235 } 13236 defer googleapi.CloseBody(res) 13237 if err := googleapi.CheckResponse(res); err != nil { 13238 return err 13239 } 13240 return nil 13241 // { 13242 // "description": "Deletes a Merchant Center sub-account.", 13243 // "httpMethod": "DELETE", 13244 // "id": "content.accounts.delete", 13245 // "parameterOrder": [ 13246 // "merchantId", 13247 // "accountId" 13248 // ], 13249 // "parameters": { 13250 // "accountId": { 13251 // "description": "The ID of the account.", 13252 // "format": "uint64", 13253 // "location": "path", 13254 // "required": true, 13255 // "type": "string" 13256 // }, 13257 // "dryRun": { 13258 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 13259 // "location": "query", 13260 // "type": "boolean" 13261 // }, 13262 // "force": { 13263 // "default": "false", 13264 // "description": "Flag to delete sub-accounts with products. The default value is false.", 13265 // "location": "query", 13266 // "type": "boolean" 13267 // }, 13268 // "merchantId": { 13269 // "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.", 13270 // "format": "uint64", 13271 // "location": "path", 13272 // "required": true, 13273 // "type": "string" 13274 // } 13275 // }, 13276 // "path": "{merchantId}/accounts/{accountId}", 13277 // "scopes": [ 13278 // "https://www.googleapis.com/auth/content" 13279 // ] 13280 // } 13281 13282} 13283 13284// method id "content.accounts.get": 13285 13286type AccountsGetCall struct { 13287 s *APIService 13288 merchantId uint64 13289 accountId uint64 13290 urlParams_ gensupport.URLParams 13291 ifNoneMatch_ string 13292 ctx_ context.Context 13293 header_ http.Header 13294} 13295 13296// Get: Retrieves a Merchant Center account. 13297func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { 13298 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13299 c.merchantId = merchantId 13300 c.accountId = accountId 13301 return c 13302} 13303 13304// Fields allows partial responses to be retrieved. See 13305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13306// for more information. 13307func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 13308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13309 return c 13310} 13311 13312// IfNoneMatch sets the optional parameter which makes the operation 13313// fail if the object's ETag matches the given value. This is useful for 13314// getting updates only after the object has changed since the last 13315// request. Use googleapi.IsNotModified to check whether the response 13316// error from Do is the result of In-None-Match. 13317func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 13318 c.ifNoneMatch_ = entityTag 13319 return c 13320} 13321 13322// Context sets the context to be used in this call's Do method. Any 13323// pending HTTP request will be aborted if the provided context is 13324// canceled. 13325func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 13326 c.ctx_ = ctx 13327 return c 13328} 13329 13330// Header returns an http.Header that can be modified by the caller to 13331// add HTTP headers to the request. 13332func (c *AccountsGetCall) Header() http.Header { 13333 if c.header_ == nil { 13334 c.header_ = make(http.Header) 13335 } 13336 return c.header_ 13337} 13338 13339func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 13340 reqHeaders := make(http.Header) 13341 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13342 for k, v := range c.header_ { 13343 reqHeaders[k] = v 13344 } 13345 reqHeaders.Set("User-Agent", c.s.userAgent()) 13346 if c.ifNoneMatch_ != "" { 13347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13348 } 13349 var body io.Reader = nil 13350 c.urlParams_.Set("alt", alt) 13351 c.urlParams_.Set("prettyPrint", "false") 13352 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 13353 urls += "?" + c.urlParams_.Encode() 13354 req, err := http.NewRequest("GET", urls, body) 13355 if err != nil { 13356 return nil, err 13357 } 13358 req.Header = reqHeaders 13359 googleapi.Expand(req.URL, map[string]string{ 13360 "merchantId": strconv.FormatUint(c.merchantId, 10), 13361 "accountId": strconv.FormatUint(c.accountId, 10), 13362 }) 13363 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13364} 13365 13366// Do executes the "content.accounts.get" call. 13367// Exactly one of *Account or error will be non-nil. Any non-2xx status 13368// code is an error. Response headers are in either 13369// *Account.ServerResponse.Header or (if a response was returned at all) 13370// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13371// check whether the returned error was because http.StatusNotModified 13372// was returned. 13373func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { 13374 gensupport.SetOptions(c.urlParams_, opts...) 13375 res, err := c.doRequest("json") 13376 if res != nil && res.StatusCode == http.StatusNotModified { 13377 if res.Body != nil { 13378 res.Body.Close() 13379 } 13380 return nil, &googleapi.Error{ 13381 Code: res.StatusCode, 13382 Header: res.Header, 13383 } 13384 } 13385 if err != nil { 13386 return nil, err 13387 } 13388 defer googleapi.CloseBody(res) 13389 if err := googleapi.CheckResponse(res); err != nil { 13390 return nil, err 13391 } 13392 ret := &Account{ 13393 ServerResponse: googleapi.ServerResponse{ 13394 Header: res.Header, 13395 HTTPStatusCode: res.StatusCode, 13396 }, 13397 } 13398 target := &ret 13399 if err := gensupport.DecodeResponse(target, res); err != nil { 13400 return nil, err 13401 } 13402 return ret, nil 13403 // { 13404 // "description": "Retrieves a Merchant Center account.", 13405 // "httpMethod": "GET", 13406 // "id": "content.accounts.get", 13407 // "parameterOrder": [ 13408 // "merchantId", 13409 // "accountId" 13410 // ], 13411 // "parameters": { 13412 // "accountId": { 13413 // "description": "The ID of the account.", 13414 // "format": "uint64", 13415 // "location": "path", 13416 // "required": true, 13417 // "type": "string" 13418 // }, 13419 // "merchantId": { 13420 // "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.", 13421 // "format": "uint64", 13422 // "location": "path", 13423 // "required": true, 13424 // "type": "string" 13425 // } 13426 // }, 13427 // "path": "{merchantId}/accounts/{accountId}", 13428 // "response": { 13429 // "$ref": "Account" 13430 // }, 13431 // "scopes": [ 13432 // "https://www.googleapis.com/auth/content" 13433 // ] 13434 // } 13435 13436} 13437 13438// method id "content.accounts.insert": 13439 13440type AccountsInsertCall struct { 13441 s *APIService 13442 merchantId uint64 13443 account *Account 13444 urlParams_ gensupport.URLParams 13445 ctx_ context.Context 13446 header_ http.Header 13447} 13448 13449// Insert: Creates a Merchant Center sub-account. 13450func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { 13451 c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13452 c.merchantId = merchantId 13453 c.account = account 13454 return c 13455} 13456 13457// DryRun sets the optional parameter "dryRun": Flag to simulate a 13458// request like in a live environment. If set to true, dry-run mode 13459// checks the validity of the request and returns errors (if any). 13460func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { 13461 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13462 return c 13463} 13464 13465// Fields allows partial responses to be retrieved. See 13466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13467// for more information. 13468func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 13469 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13470 return c 13471} 13472 13473// Context sets the context to be used in this call's Do method. Any 13474// pending HTTP request will be aborted if the provided context is 13475// canceled. 13476func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 13477 c.ctx_ = ctx 13478 return c 13479} 13480 13481// Header returns an http.Header that can be modified by the caller to 13482// add HTTP headers to the request. 13483func (c *AccountsInsertCall) Header() http.Header { 13484 if c.header_ == nil { 13485 c.header_ = make(http.Header) 13486 } 13487 return c.header_ 13488} 13489 13490func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { 13491 reqHeaders := make(http.Header) 13492 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13493 for k, v := range c.header_ { 13494 reqHeaders[k] = v 13495 } 13496 reqHeaders.Set("User-Agent", c.s.userAgent()) 13497 var body io.Reader = nil 13498 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 13499 if err != nil { 13500 return nil, err 13501 } 13502 reqHeaders.Set("Content-Type", "application/json") 13503 c.urlParams_.Set("alt", alt) 13504 c.urlParams_.Set("prettyPrint", "false") 13505 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 13506 urls += "?" + c.urlParams_.Encode() 13507 req, err := http.NewRequest("POST", urls, body) 13508 if err != nil { 13509 return nil, err 13510 } 13511 req.Header = reqHeaders 13512 googleapi.Expand(req.URL, map[string]string{ 13513 "merchantId": strconv.FormatUint(c.merchantId, 10), 13514 }) 13515 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13516} 13517 13518// Do executes the "content.accounts.insert" call. 13519// Exactly one of *Account or error will be non-nil. Any non-2xx status 13520// code is an error. Response headers are in either 13521// *Account.ServerResponse.Header or (if a response was returned at all) 13522// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13523// check whether the returned error was because http.StatusNotModified 13524// was returned. 13525func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { 13526 gensupport.SetOptions(c.urlParams_, opts...) 13527 res, err := c.doRequest("json") 13528 if res != nil && res.StatusCode == http.StatusNotModified { 13529 if res.Body != nil { 13530 res.Body.Close() 13531 } 13532 return nil, &googleapi.Error{ 13533 Code: res.StatusCode, 13534 Header: res.Header, 13535 } 13536 } 13537 if err != nil { 13538 return nil, err 13539 } 13540 defer googleapi.CloseBody(res) 13541 if err := googleapi.CheckResponse(res); err != nil { 13542 return nil, err 13543 } 13544 ret := &Account{ 13545 ServerResponse: googleapi.ServerResponse{ 13546 Header: res.Header, 13547 HTTPStatusCode: res.StatusCode, 13548 }, 13549 } 13550 target := &ret 13551 if err := gensupport.DecodeResponse(target, res); err != nil { 13552 return nil, err 13553 } 13554 return ret, nil 13555 // { 13556 // "description": "Creates a Merchant Center sub-account.", 13557 // "httpMethod": "POST", 13558 // "id": "content.accounts.insert", 13559 // "parameterOrder": [ 13560 // "merchantId" 13561 // ], 13562 // "parameters": { 13563 // "dryRun": { 13564 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 13565 // "location": "query", 13566 // "type": "boolean" 13567 // }, 13568 // "merchantId": { 13569 // "description": "The ID of the managing account. This must be a multi-client account.", 13570 // "format": "uint64", 13571 // "location": "path", 13572 // "required": true, 13573 // "type": "string" 13574 // } 13575 // }, 13576 // "path": "{merchantId}/accounts", 13577 // "request": { 13578 // "$ref": "Account" 13579 // }, 13580 // "response": { 13581 // "$ref": "Account" 13582 // }, 13583 // "scopes": [ 13584 // "https://www.googleapis.com/auth/content" 13585 // ] 13586 // } 13587 13588} 13589 13590// method id "content.accounts.link": 13591 13592type AccountsLinkCall struct { 13593 s *APIService 13594 merchantId uint64 13595 accountId uint64 13596 accountslinkrequest *AccountsLinkRequest 13597 urlParams_ gensupport.URLParams 13598 ctx_ context.Context 13599 header_ http.Header 13600} 13601 13602// Link: Performs an action on a link between two Merchant Center 13603// accounts, namely accountId and linkedAccountId. 13604func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { 13605 c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13606 c.merchantId = merchantId 13607 c.accountId = accountId 13608 c.accountslinkrequest = accountslinkrequest 13609 return c 13610} 13611 13612// Fields allows partial responses to be retrieved. See 13613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13614// for more information. 13615func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { 13616 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13617 return c 13618} 13619 13620// Context sets the context to be used in this call's Do method. Any 13621// pending HTTP request will be aborted if the provided context is 13622// canceled. 13623func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { 13624 c.ctx_ = ctx 13625 return c 13626} 13627 13628// Header returns an http.Header that can be modified by the caller to 13629// add HTTP headers to the request. 13630func (c *AccountsLinkCall) Header() http.Header { 13631 if c.header_ == nil { 13632 c.header_ = make(http.Header) 13633 } 13634 return c.header_ 13635} 13636 13637func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { 13638 reqHeaders := make(http.Header) 13639 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13640 for k, v := range c.header_ { 13641 reqHeaders[k] = v 13642 } 13643 reqHeaders.Set("User-Agent", c.s.userAgent()) 13644 var body io.Reader = nil 13645 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) 13646 if err != nil { 13647 return nil, err 13648 } 13649 reqHeaders.Set("Content-Type", "application/json") 13650 c.urlParams_.Set("alt", alt) 13651 c.urlParams_.Set("prettyPrint", "false") 13652 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") 13653 urls += "?" + c.urlParams_.Encode() 13654 req, err := http.NewRequest("POST", urls, body) 13655 if err != nil { 13656 return nil, err 13657 } 13658 req.Header = reqHeaders 13659 googleapi.Expand(req.URL, map[string]string{ 13660 "merchantId": strconv.FormatUint(c.merchantId, 10), 13661 "accountId": strconv.FormatUint(c.accountId, 10), 13662 }) 13663 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13664} 13665 13666// Do executes the "content.accounts.link" call. 13667// Exactly one of *AccountsLinkResponse or error will be non-nil. Any 13668// non-2xx status code is an error. Response headers are in either 13669// *AccountsLinkResponse.ServerResponse.Header or (if a response was 13670// returned at all) in error.(*googleapi.Error).Header. Use 13671// googleapi.IsNotModified to check whether the returned error was 13672// because http.StatusNotModified was returned. 13673func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { 13674 gensupport.SetOptions(c.urlParams_, opts...) 13675 res, err := c.doRequest("json") 13676 if res != nil && res.StatusCode == http.StatusNotModified { 13677 if res.Body != nil { 13678 res.Body.Close() 13679 } 13680 return nil, &googleapi.Error{ 13681 Code: res.StatusCode, 13682 Header: res.Header, 13683 } 13684 } 13685 if err != nil { 13686 return nil, err 13687 } 13688 defer googleapi.CloseBody(res) 13689 if err := googleapi.CheckResponse(res); err != nil { 13690 return nil, err 13691 } 13692 ret := &AccountsLinkResponse{ 13693 ServerResponse: googleapi.ServerResponse{ 13694 Header: res.Header, 13695 HTTPStatusCode: res.StatusCode, 13696 }, 13697 } 13698 target := &ret 13699 if err := gensupport.DecodeResponse(target, res); err != nil { 13700 return nil, err 13701 } 13702 return ret, nil 13703 // { 13704 // "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", 13705 // "httpMethod": "POST", 13706 // "id": "content.accounts.link", 13707 // "parameterOrder": [ 13708 // "merchantId", 13709 // "accountId" 13710 // ], 13711 // "parameters": { 13712 // "accountId": { 13713 // "description": "The ID of the account that should be linked.", 13714 // "format": "uint64", 13715 // "location": "path", 13716 // "required": true, 13717 // "type": "string" 13718 // }, 13719 // "merchantId": { 13720 // "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.", 13721 // "format": "uint64", 13722 // "location": "path", 13723 // "required": true, 13724 // "type": "string" 13725 // } 13726 // }, 13727 // "path": "{merchantId}/accounts/{accountId}/link", 13728 // "request": { 13729 // "$ref": "AccountsLinkRequest" 13730 // }, 13731 // "response": { 13732 // "$ref": "AccountsLinkResponse" 13733 // }, 13734 // "scopes": [ 13735 // "https://www.googleapis.com/auth/content" 13736 // ] 13737 // } 13738 13739} 13740 13741// method id "content.accounts.list": 13742 13743type AccountsListCall struct { 13744 s *APIService 13745 merchantId uint64 13746 urlParams_ gensupport.URLParams 13747 ifNoneMatch_ string 13748 ctx_ context.Context 13749 header_ http.Header 13750} 13751 13752// List: Lists the sub-accounts in your Merchant Center account. 13753func (r *AccountsService) List(merchantId uint64) *AccountsListCall { 13754 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13755 c.merchantId = merchantId 13756 return c 13757} 13758 13759// MaxResults sets the optional parameter "maxResults": The maximum 13760// number of accounts to return in the response, used for paging. 13761func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { 13762 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13763 return c 13764} 13765 13766// PageToken sets the optional parameter "pageToken": The token returned 13767// by the previous request. 13768func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { 13769 c.urlParams_.Set("pageToken", pageToken) 13770 return c 13771} 13772 13773// Fields allows partial responses to be retrieved. See 13774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13775// for more information. 13776func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 13777 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13778 return c 13779} 13780 13781// IfNoneMatch sets the optional parameter which makes the operation 13782// fail if the object's ETag matches the given value. This is useful for 13783// getting updates only after the object has changed since the last 13784// request. Use googleapi.IsNotModified to check whether the response 13785// error from Do is the result of In-None-Match. 13786func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 13787 c.ifNoneMatch_ = entityTag 13788 return c 13789} 13790 13791// Context sets the context to be used in this call's Do method. Any 13792// pending HTTP request will be aborted if the provided context is 13793// canceled. 13794func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 13795 c.ctx_ = ctx 13796 return c 13797} 13798 13799// Header returns an http.Header that can be modified by the caller to 13800// add HTTP headers to the request. 13801func (c *AccountsListCall) Header() http.Header { 13802 if c.header_ == nil { 13803 c.header_ = make(http.Header) 13804 } 13805 return c.header_ 13806} 13807 13808func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 13809 reqHeaders := make(http.Header) 13810 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13811 for k, v := range c.header_ { 13812 reqHeaders[k] = v 13813 } 13814 reqHeaders.Set("User-Agent", c.s.userAgent()) 13815 if c.ifNoneMatch_ != "" { 13816 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13817 } 13818 var body io.Reader = nil 13819 c.urlParams_.Set("alt", alt) 13820 c.urlParams_.Set("prettyPrint", "false") 13821 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 13822 urls += "?" + c.urlParams_.Encode() 13823 req, err := http.NewRequest("GET", urls, body) 13824 if err != nil { 13825 return nil, err 13826 } 13827 req.Header = reqHeaders 13828 googleapi.Expand(req.URL, map[string]string{ 13829 "merchantId": strconv.FormatUint(c.merchantId, 10), 13830 }) 13831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13832} 13833 13834// Do executes the "content.accounts.list" call. 13835// Exactly one of *AccountsListResponse or error will be non-nil. Any 13836// non-2xx status code is an error. Response headers are in either 13837// *AccountsListResponse.ServerResponse.Header or (if a response was 13838// returned at all) in error.(*googleapi.Error).Header. Use 13839// googleapi.IsNotModified to check whether the returned error was 13840// because http.StatusNotModified was returned. 13841func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { 13842 gensupport.SetOptions(c.urlParams_, opts...) 13843 res, err := c.doRequest("json") 13844 if res != nil && res.StatusCode == http.StatusNotModified { 13845 if res.Body != nil { 13846 res.Body.Close() 13847 } 13848 return nil, &googleapi.Error{ 13849 Code: res.StatusCode, 13850 Header: res.Header, 13851 } 13852 } 13853 if err != nil { 13854 return nil, err 13855 } 13856 defer googleapi.CloseBody(res) 13857 if err := googleapi.CheckResponse(res); err != nil { 13858 return nil, err 13859 } 13860 ret := &AccountsListResponse{ 13861 ServerResponse: googleapi.ServerResponse{ 13862 Header: res.Header, 13863 HTTPStatusCode: res.StatusCode, 13864 }, 13865 } 13866 target := &ret 13867 if err := gensupport.DecodeResponse(target, res); err != nil { 13868 return nil, err 13869 } 13870 return ret, nil 13871 // { 13872 // "description": "Lists the sub-accounts in your Merchant Center account.", 13873 // "httpMethod": "GET", 13874 // "id": "content.accounts.list", 13875 // "parameterOrder": [ 13876 // "merchantId" 13877 // ], 13878 // "parameters": { 13879 // "maxResults": { 13880 // "description": "The maximum number of accounts to return in the response, used for paging.", 13881 // "format": "uint32", 13882 // "location": "query", 13883 // "type": "integer" 13884 // }, 13885 // "merchantId": { 13886 // "description": "The ID of the managing account. This must be a multi-client account.", 13887 // "format": "uint64", 13888 // "location": "path", 13889 // "required": true, 13890 // "type": "string" 13891 // }, 13892 // "pageToken": { 13893 // "description": "The token returned by the previous request.", 13894 // "location": "query", 13895 // "type": "string" 13896 // } 13897 // }, 13898 // "path": "{merchantId}/accounts", 13899 // "response": { 13900 // "$ref": "AccountsListResponse" 13901 // }, 13902 // "scopes": [ 13903 // "https://www.googleapis.com/auth/content" 13904 // ] 13905 // } 13906 13907} 13908 13909// Pages invokes f for each page of results. 13910// A non-nil error returned from f will halt the iteration. 13911// The provided context supersedes any context provided to the Context method. 13912func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { 13913 c.ctx_ = ctx 13914 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13915 for { 13916 x, err := c.Do() 13917 if err != nil { 13918 return err 13919 } 13920 if err := f(x); err != nil { 13921 return err 13922 } 13923 if x.NextPageToken == "" { 13924 return nil 13925 } 13926 c.PageToken(x.NextPageToken) 13927 } 13928} 13929 13930// method id "content.accounts.update": 13931 13932type AccountsUpdateCall struct { 13933 s *APIService 13934 merchantId uint64 13935 accountId uint64 13936 account *Account 13937 urlParams_ gensupport.URLParams 13938 ctx_ context.Context 13939 header_ http.Header 13940} 13941 13942// Update: Updates a Merchant Center account. 13943func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { 13944 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13945 c.merchantId = merchantId 13946 c.accountId = accountId 13947 c.account = account 13948 return c 13949} 13950 13951// DryRun sets the optional parameter "dryRun": Flag to simulate a 13952// request like in a live environment. If set to true, dry-run mode 13953// checks the validity of the request and returns errors (if any). 13954func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { 13955 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13956 return c 13957} 13958 13959// Fields allows partial responses to be retrieved. See 13960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13961// for more information. 13962func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 13963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13964 return c 13965} 13966 13967// Context sets the context to be used in this call's Do method. Any 13968// pending HTTP request will be aborted if the provided context is 13969// canceled. 13970func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 13971 c.ctx_ = ctx 13972 return c 13973} 13974 13975// Header returns an http.Header that can be modified by the caller to 13976// add HTTP headers to the request. 13977func (c *AccountsUpdateCall) Header() http.Header { 13978 if c.header_ == nil { 13979 c.header_ = make(http.Header) 13980 } 13981 return c.header_ 13982} 13983 13984func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { 13985 reqHeaders := make(http.Header) 13986 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13987 for k, v := range c.header_ { 13988 reqHeaders[k] = v 13989 } 13990 reqHeaders.Set("User-Agent", c.s.userAgent()) 13991 var body io.Reader = nil 13992 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 13993 if err != nil { 13994 return nil, err 13995 } 13996 reqHeaders.Set("Content-Type", "application/json") 13997 c.urlParams_.Set("alt", alt) 13998 c.urlParams_.Set("prettyPrint", "false") 13999 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 14000 urls += "?" + c.urlParams_.Encode() 14001 req, err := http.NewRequest("PUT", urls, body) 14002 if err != nil { 14003 return nil, err 14004 } 14005 req.Header = reqHeaders 14006 googleapi.Expand(req.URL, map[string]string{ 14007 "merchantId": strconv.FormatUint(c.merchantId, 10), 14008 "accountId": strconv.FormatUint(c.accountId, 10), 14009 }) 14010 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14011} 14012 14013// Do executes the "content.accounts.update" call. 14014// Exactly one of *Account or error will be non-nil. Any non-2xx status 14015// code is an error. Response headers are in either 14016// *Account.ServerResponse.Header or (if a response was returned at all) 14017// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14018// check whether the returned error was because http.StatusNotModified 14019// was returned. 14020func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { 14021 gensupport.SetOptions(c.urlParams_, opts...) 14022 res, err := c.doRequest("json") 14023 if res != nil && res.StatusCode == http.StatusNotModified { 14024 if res.Body != nil { 14025 res.Body.Close() 14026 } 14027 return nil, &googleapi.Error{ 14028 Code: res.StatusCode, 14029 Header: res.Header, 14030 } 14031 } 14032 if err != nil { 14033 return nil, err 14034 } 14035 defer googleapi.CloseBody(res) 14036 if err := googleapi.CheckResponse(res); err != nil { 14037 return nil, err 14038 } 14039 ret := &Account{ 14040 ServerResponse: googleapi.ServerResponse{ 14041 Header: res.Header, 14042 HTTPStatusCode: res.StatusCode, 14043 }, 14044 } 14045 target := &ret 14046 if err := gensupport.DecodeResponse(target, res); err != nil { 14047 return nil, err 14048 } 14049 return ret, nil 14050 // { 14051 // "description": "Updates a Merchant Center account.", 14052 // "httpMethod": "PUT", 14053 // "id": "content.accounts.update", 14054 // "parameterOrder": [ 14055 // "merchantId", 14056 // "accountId" 14057 // ], 14058 // "parameters": { 14059 // "accountId": { 14060 // "description": "The ID of the account.", 14061 // "format": "uint64", 14062 // "location": "path", 14063 // "required": true, 14064 // "type": "string" 14065 // }, 14066 // "dryRun": { 14067 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 14068 // "location": "query", 14069 // "type": "boolean" 14070 // }, 14071 // "merchantId": { 14072 // "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.", 14073 // "format": "uint64", 14074 // "location": "path", 14075 // "required": true, 14076 // "type": "string" 14077 // } 14078 // }, 14079 // "path": "{merchantId}/accounts/{accountId}", 14080 // "request": { 14081 // "$ref": "Account" 14082 // }, 14083 // "response": { 14084 // "$ref": "Account" 14085 // }, 14086 // "scopes": [ 14087 // "https://www.googleapis.com/auth/content" 14088 // ] 14089 // } 14090 14091} 14092 14093// method id "content.accountstatuses.custombatch": 14094 14095type AccountstatusesCustombatchCall struct { 14096 s *APIService 14097 accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest 14098 urlParams_ gensupport.URLParams 14099 ctx_ context.Context 14100 header_ http.Header 14101} 14102 14103// Custombatch: Retrieves multiple Merchant Center account statuses in a 14104// single request. 14105func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { 14106 c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14107 c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 14108 return c 14109} 14110 14111// Fields allows partial responses to be retrieved. See 14112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14113// for more information. 14114func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { 14115 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14116 return c 14117} 14118 14119// Context sets the context to be used in this call's Do method. Any 14120// pending HTTP request will be aborted if the provided context is 14121// canceled. 14122func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 14123 c.ctx_ = ctx 14124 return c 14125} 14126 14127// Header returns an http.Header that can be modified by the caller to 14128// add HTTP headers to the request. 14129func (c *AccountstatusesCustombatchCall) Header() http.Header { 14130 if c.header_ == nil { 14131 c.header_ = make(http.Header) 14132 } 14133 return c.header_ 14134} 14135 14136func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 14137 reqHeaders := make(http.Header) 14138 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14139 for k, v := range c.header_ { 14140 reqHeaders[k] = v 14141 } 14142 reqHeaders.Set("User-Agent", c.s.userAgent()) 14143 var body io.Reader = nil 14144 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) 14145 if err != nil { 14146 return nil, err 14147 } 14148 reqHeaders.Set("Content-Type", "application/json") 14149 c.urlParams_.Set("alt", alt) 14150 c.urlParams_.Set("prettyPrint", "false") 14151 urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 14152 urls += "?" + c.urlParams_.Encode() 14153 req, err := http.NewRequest("POST", urls, body) 14154 if err != nil { 14155 return nil, err 14156 } 14157 req.Header = reqHeaders 14158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14159} 14160 14161// Do executes the "content.accountstatuses.custombatch" call. 14162// Exactly one of *AccountstatusesCustomBatchResponse or error will be 14163// non-nil. Any non-2xx status code is an error. Response headers are in 14164// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or 14165// (if a response was returned at all) in 14166// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14167// whether the returned error was because http.StatusNotModified was 14168// returned. 14169func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { 14170 gensupport.SetOptions(c.urlParams_, opts...) 14171 res, err := c.doRequest("json") 14172 if res != nil && res.StatusCode == http.StatusNotModified { 14173 if res.Body != nil { 14174 res.Body.Close() 14175 } 14176 return nil, &googleapi.Error{ 14177 Code: res.StatusCode, 14178 Header: res.Header, 14179 } 14180 } 14181 if err != nil { 14182 return nil, err 14183 } 14184 defer googleapi.CloseBody(res) 14185 if err := googleapi.CheckResponse(res); err != nil { 14186 return nil, err 14187 } 14188 ret := &AccountstatusesCustomBatchResponse{ 14189 ServerResponse: googleapi.ServerResponse{ 14190 Header: res.Header, 14191 HTTPStatusCode: res.StatusCode, 14192 }, 14193 } 14194 target := &ret 14195 if err := gensupport.DecodeResponse(target, res); err != nil { 14196 return nil, err 14197 } 14198 return ret, nil 14199 // { 14200 // "description": "Retrieves multiple Merchant Center account statuses in a single request.", 14201 // "httpMethod": "POST", 14202 // "id": "content.accountstatuses.custombatch", 14203 // "path": "accountstatuses/batch", 14204 // "request": { 14205 // "$ref": "AccountstatusesCustomBatchRequest" 14206 // }, 14207 // "response": { 14208 // "$ref": "AccountstatusesCustomBatchResponse" 14209 // }, 14210 // "scopes": [ 14211 // "https://www.googleapis.com/auth/content" 14212 // ] 14213 // } 14214 14215} 14216 14217// method id "content.accountstatuses.get": 14218 14219type AccountstatusesGetCall struct { 14220 s *APIService 14221 merchantId uint64 14222 accountId uint64 14223 urlParams_ gensupport.URLParams 14224 ifNoneMatch_ string 14225 ctx_ context.Context 14226 header_ http.Header 14227} 14228 14229// Get: Retrieves the status of a Merchant Center account. No 14230// itemLevelIssues are returned for multi-client accounts. 14231func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { 14232 c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14233 c.merchantId = merchantId 14234 c.accountId = accountId 14235 return c 14236} 14237 14238// Destinations sets the optional parameter "destinations": If set, only 14239// issues for the specified destinations are returned, otherwise only 14240// issues for the Shopping destination. 14241func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { 14242 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 14243 return c 14244} 14245 14246// Fields allows partial responses to be retrieved. See 14247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14248// for more information. 14249func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 14250 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14251 return c 14252} 14253 14254// IfNoneMatch sets the optional parameter which makes the operation 14255// fail if the object's ETag matches the given value. This is useful for 14256// getting updates only after the object has changed since the last 14257// request. Use googleapi.IsNotModified to check whether the response 14258// error from Do is the result of In-None-Match. 14259func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { 14260 c.ifNoneMatch_ = entityTag 14261 return c 14262} 14263 14264// Context sets the context to be used in this call's Do method. Any 14265// pending HTTP request will be aborted if the provided context is 14266// canceled. 14267func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 14268 c.ctx_ = ctx 14269 return c 14270} 14271 14272// Header returns an http.Header that can be modified by the caller to 14273// add HTTP headers to the request. 14274func (c *AccountstatusesGetCall) Header() http.Header { 14275 if c.header_ == nil { 14276 c.header_ = make(http.Header) 14277 } 14278 return c.header_ 14279} 14280 14281func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { 14282 reqHeaders := make(http.Header) 14283 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14284 for k, v := range c.header_ { 14285 reqHeaders[k] = v 14286 } 14287 reqHeaders.Set("User-Agent", c.s.userAgent()) 14288 if c.ifNoneMatch_ != "" { 14289 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14290 } 14291 var body io.Reader = nil 14292 c.urlParams_.Set("alt", alt) 14293 c.urlParams_.Set("prettyPrint", "false") 14294 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") 14295 urls += "?" + c.urlParams_.Encode() 14296 req, err := http.NewRequest("GET", urls, body) 14297 if err != nil { 14298 return nil, err 14299 } 14300 req.Header = reqHeaders 14301 googleapi.Expand(req.URL, map[string]string{ 14302 "merchantId": strconv.FormatUint(c.merchantId, 10), 14303 "accountId": strconv.FormatUint(c.accountId, 10), 14304 }) 14305 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14306} 14307 14308// Do executes the "content.accountstatuses.get" call. 14309// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx 14310// status code is an error. Response headers are in either 14311// *AccountStatus.ServerResponse.Header or (if a response was returned 14312// at all) in error.(*googleapi.Error).Header. Use 14313// googleapi.IsNotModified to check whether the returned error was 14314// because http.StatusNotModified was returned. 14315func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { 14316 gensupport.SetOptions(c.urlParams_, opts...) 14317 res, err := c.doRequest("json") 14318 if res != nil && res.StatusCode == http.StatusNotModified { 14319 if res.Body != nil { 14320 res.Body.Close() 14321 } 14322 return nil, &googleapi.Error{ 14323 Code: res.StatusCode, 14324 Header: res.Header, 14325 } 14326 } 14327 if err != nil { 14328 return nil, err 14329 } 14330 defer googleapi.CloseBody(res) 14331 if err := googleapi.CheckResponse(res); err != nil { 14332 return nil, err 14333 } 14334 ret := &AccountStatus{ 14335 ServerResponse: googleapi.ServerResponse{ 14336 Header: res.Header, 14337 HTTPStatusCode: res.StatusCode, 14338 }, 14339 } 14340 target := &ret 14341 if err := gensupport.DecodeResponse(target, res); err != nil { 14342 return nil, err 14343 } 14344 return ret, nil 14345 // { 14346 // "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", 14347 // "httpMethod": "GET", 14348 // "id": "content.accountstatuses.get", 14349 // "parameterOrder": [ 14350 // "merchantId", 14351 // "accountId" 14352 // ], 14353 // "parameters": { 14354 // "accountId": { 14355 // "description": "The ID of the account.", 14356 // "format": "uint64", 14357 // "location": "path", 14358 // "required": true, 14359 // "type": "string" 14360 // }, 14361 // "destinations": { 14362 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 14363 // "location": "query", 14364 // "repeated": true, 14365 // "type": "string" 14366 // }, 14367 // "merchantId": { 14368 // "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.", 14369 // "format": "uint64", 14370 // "location": "path", 14371 // "required": true, 14372 // "type": "string" 14373 // } 14374 // }, 14375 // "path": "{merchantId}/accountstatuses/{accountId}", 14376 // "response": { 14377 // "$ref": "AccountStatus" 14378 // }, 14379 // "scopes": [ 14380 // "https://www.googleapis.com/auth/content" 14381 // ] 14382 // } 14383 14384} 14385 14386// method id "content.accountstatuses.list": 14387 14388type AccountstatusesListCall struct { 14389 s *APIService 14390 merchantId uint64 14391 urlParams_ gensupport.URLParams 14392 ifNoneMatch_ string 14393 ctx_ context.Context 14394 header_ http.Header 14395} 14396 14397// List: Lists the statuses of the sub-accounts in your Merchant Center 14398// account. 14399func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { 14400 c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14401 c.merchantId = merchantId 14402 return c 14403} 14404 14405// Destinations sets the optional parameter "destinations": If set, only 14406// issues for the specified destinations are returned, otherwise only 14407// issues for the Shopping destination. 14408func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { 14409 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 14410 return c 14411} 14412 14413// MaxResults sets the optional parameter "maxResults": The maximum 14414// number of account statuses to return in the response, used for 14415// paging. 14416func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { 14417 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14418 return c 14419} 14420 14421// PageToken sets the optional parameter "pageToken": The token returned 14422// by the previous request. 14423func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { 14424 c.urlParams_.Set("pageToken", pageToken) 14425 return c 14426} 14427 14428// Fields allows partial responses to be retrieved. See 14429// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14430// for more information. 14431func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { 14432 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14433 return c 14434} 14435 14436// IfNoneMatch sets the optional parameter which makes the operation 14437// fail if the object's ETag matches the given value. This is useful for 14438// getting updates only after the object has changed since the last 14439// request. Use googleapi.IsNotModified to check whether the response 14440// error from Do is the result of In-None-Match. 14441func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { 14442 c.ifNoneMatch_ = entityTag 14443 return c 14444} 14445 14446// Context sets the context to be used in this call's Do method. Any 14447// pending HTTP request will be aborted if the provided context is 14448// canceled. 14449func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 14450 c.ctx_ = ctx 14451 return c 14452} 14453 14454// Header returns an http.Header that can be modified by the caller to 14455// add HTTP headers to the request. 14456func (c *AccountstatusesListCall) Header() http.Header { 14457 if c.header_ == nil { 14458 c.header_ = make(http.Header) 14459 } 14460 return c.header_ 14461} 14462 14463func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { 14464 reqHeaders := make(http.Header) 14465 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14466 for k, v := range c.header_ { 14467 reqHeaders[k] = v 14468 } 14469 reqHeaders.Set("User-Agent", c.s.userAgent()) 14470 if c.ifNoneMatch_ != "" { 14471 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14472 } 14473 var body io.Reader = nil 14474 c.urlParams_.Set("alt", alt) 14475 c.urlParams_.Set("prettyPrint", "false") 14476 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") 14477 urls += "?" + c.urlParams_.Encode() 14478 req, err := http.NewRequest("GET", urls, body) 14479 if err != nil { 14480 return nil, err 14481 } 14482 req.Header = reqHeaders 14483 googleapi.Expand(req.URL, map[string]string{ 14484 "merchantId": strconv.FormatUint(c.merchantId, 10), 14485 }) 14486 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14487} 14488 14489// Do executes the "content.accountstatuses.list" call. 14490// Exactly one of *AccountstatusesListResponse or error will be non-nil. 14491// Any non-2xx status code is an error. Response headers are in either 14492// *AccountstatusesListResponse.ServerResponse.Header or (if a response 14493// was returned at all) in error.(*googleapi.Error).Header. Use 14494// googleapi.IsNotModified to check whether the returned error was 14495// because http.StatusNotModified was returned. 14496func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { 14497 gensupport.SetOptions(c.urlParams_, opts...) 14498 res, err := c.doRequest("json") 14499 if res != nil && res.StatusCode == http.StatusNotModified { 14500 if res.Body != nil { 14501 res.Body.Close() 14502 } 14503 return nil, &googleapi.Error{ 14504 Code: res.StatusCode, 14505 Header: res.Header, 14506 } 14507 } 14508 if err != nil { 14509 return nil, err 14510 } 14511 defer googleapi.CloseBody(res) 14512 if err := googleapi.CheckResponse(res); err != nil { 14513 return nil, err 14514 } 14515 ret := &AccountstatusesListResponse{ 14516 ServerResponse: googleapi.ServerResponse{ 14517 Header: res.Header, 14518 HTTPStatusCode: res.StatusCode, 14519 }, 14520 } 14521 target := &ret 14522 if err := gensupport.DecodeResponse(target, res); err != nil { 14523 return nil, err 14524 } 14525 return ret, nil 14526 // { 14527 // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", 14528 // "httpMethod": "GET", 14529 // "id": "content.accountstatuses.list", 14530 // "parameterOrder": [ 14531 // "merchantId" 14532 // ], 14533 // "parameters": { 14534 // "destinations": { 14535 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 14536 // "location": "query", 14537 // "repeated": true, 14538 // "type": "string" 14539 // }, 14540 // "maxResults": { 14541 // "description": "The maximum number of account statuses to return in the response, used for paging.", 14542 // "format": "uint32", 14543 // "location": "query", 14544 // "type": "integer" 14545 // }, 14546 // "merchantId": { 14547 // "description": "The ID of the managing account. This must be a multi-client account.", 14548 // "format": "uint64", 14549 // "location": "path", 14550 // "required": true, 14551 // "type": "string" 14552 // }, 14553 // "pageToken": { 14554 // "description": "The token returned by the previous request.", 14555 // "location": "query", 14556 // "type": "string" 14557 // } 14558 // }, 14559 // "path": "{merchantId}/accountstatuses", 14560 // "response": { 14561 // "$ref": "AccountstatusesListResponse" 14562 // }, 14563 // "scopes": [ 14564 // "https://www.googleapis.com/auth/content" 14565 // ] 14566 // } 14567 14568} 14569 14570// Pages invokes f for each page of results. 14571// A non-nil error returned from f will halt the iteration. 14572// The provided context supersedes any context provided to the Context method. 14573func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { 14574 c.ctx_ = ctx 14575 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14576 for { 14577 x, err := c.Do() 14578 if err != nil { 14579 return err 14580 } 14581 if err := f(x); err != nil { 14582 return err 14583 } 14584 if x.NextPageToken == "" { 14585 return nil 14586 } 14587 c.PageToken(x.NextPageToken) 14588 } 14589} 14590 14591// method id "content.accounttax.custombatch": 14592 14593type AccounttaxCustombatchCall struct { 14594 s *APIService 14595 accounttaxcustombatchrequest *AccounttaxCustomBatchRequest 14596 urlParams_ gensupport.URLParams 14597 ctx_ context.Context 14598 header_ http.Header 14599} 14600 14601// Custombatch: Retrieves and updates tax settings of multiple accounts 14602// in a single request. 14603func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { 14604 c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14605 c.accounttaxcustombatchrequest = accounttaxcustombatchrequest 14606 return c 14607} 14608 14609// DryRun sets the optional parameter "dryRun": Flag to simulate a 14610// request like in a live environment. If set to true, dry-run mode 14611// checks the validity of the request and returns errors (if any). 14612func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { 14613 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14614 return c 14615} 14616 14617// Fields allows partial responses to be retrieved. See 14618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14619// for more information. 14620func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { 14621 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14622 return c 14623} 14624 14625// Context sets the context to be used in this call's Do method. Any 14626// pending HTTP request will be aborted if the provided context is 14627// canceled. 14628func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 14629 c.ctx_ = ctx 14630 return c 14631} 14632 14633// Header returns an http.Header that can be modified by the caller to 14634// add HTTP headers to the request. 14635func (c *AccounttaxCustombatchCall) Header() http.Header { 14636 if c.header_ == nil { 14637 c.header_ = make(http.Header) 14638 } 14639 return c.header_ 14640} 14641 14642func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { 14643 reqHeaders := make(http.Header) 14644 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14645 for k, v := range c.header_ { 14646 reqHeaders[k] = v 14647 } 14648 reqHeaders.Set("User-Agent", c.s.userAgent()) 14649 var body io.Reader = nil 14650 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) 14651 if err != nil { 14652 return nil, err 14653 } 14654 reqHeaders.Set("Content-Type", "application/json") 14655 c.urlParams_.Set("alt", alt) 14656 c.urlParams_.Set("prettyPrint", "false") 14657 urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 14658 urls += "?" + c.urlParams_.Encode() 14659 req, err := http.NewRequest("POST", urls, body) 14660 if err != nil { 14661 return nil, err 14662 } 14663 req.Header = reqHeaders 14664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14665} 14666 14667// Do executes the "content.accounttax.custombatch" call. 14668// Exactly one of *AccounttaxCustomBatchResponse or error will be 14669// non-nil. Any non-2xx status code is an error. Response headers are in 14670// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a 14671// response was returned at all) in error.(*googleapi.Error).Header. Use 14672// googleapi.IsNotModified to check whether the returned error was 14673// because http.StatusNotModified was returned. 14674func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { 14675 gensupport.SetOptions(c.urlParams_, opts...) 14676 res, err := c.doRequest("json") 14677 if res != nil && res.StatusCode == http.StatusNotModified { 14678 if res.Body != nil { 14679 res.Body.Close() 14680 } 14681 return nil, &googleapi.Error{ 14682 Code: res.StatusCode, 14683 Header: res.Header, 14684 } 14685 } 14686 if err != nil { 14687 return nil, err 14688 } 14689 defer googleapi.CloseBody(res) 14690 if err := googleapi.CheckResponse(res); err != nil { 14691 return nil, err 14692 } 14693 ret := &AccounttaxCustomBatchResponse{ 14694 ServerResponse: googleapi.ServerResponse{ 14695 Header: res.Header, 14696 HTTPStatusCode: res.StatusCode, 14697 }, 14698 } 14699 target := &ret 14700 if err := gensupport.DecodeResponse(target, res); err != nil { 14701 return nil, err 14702 } 14703 return ret, nil 14704 // { 14705 // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", 14706 // "httpMethod": "POST", 14707 // "id": "content.accounttax.custombatch", 14708 // "parameters": { 14709 // "dryRun": { 14710 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 14711 // "location": "query", 14712 // "type": "boolean" 14713 // } 14714 // }, 14715 // "path": "accounttax/batch", 14716 // "request": { 14717 // "$ref": "AccounttaxCustomBatchRequest" 14718 // }, 14719 // "response": { 14720 // "$ref": "AccounttaxCustomBatchResponse" 14721 // }, 14722 // "scopes": [ 14723 // "https://www.googleapis.com/auth/content" 14724 // ] 14725 // } 14726 14727} 14728 14729// method id "content.accounttax.get": 14730 14731type AccounttaxGetCall struct { 14732 s *APIService 14733 merchantId uint64 14734 accountId uint64 14735 urlParams_ gensupport.URLParams 14736 ifNoneMatch_ string 14737 ctx_ context.Context 14738 header_ http.Header 14739} 14740 14741// Get: Retrieves the tax settings of the account. 14742func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { 14743 c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14744 c.merchantId = merchantId 14745 c.accountId = accountId 14746 return c 14747} 14748 14749// Fields allows partial responses to be retrieved. See 14750// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14751// for more information. 14752func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 14753 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14754 return c 14755} 14756 14757// IfNoneMatch sets the optional parameter which makes the operation 14758// fail if the object's ETag matches the given value. This is useful for 14759// getting updates only after the object has changed since the last 14760// request. Use googleapi.IsNotModified to check whether the response 14761// error from Do is the result of In-None-Match. 14762func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { 14763 c.ifNoneMatch_ = entityTag 14764 return c 14765} 14766 14767// Context sets the context to be used in this call's Do method. Any 14768// pending HTTP request will be aborted if the provided context is 14769// canceled. 14770func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 14771 c.ctx_ = ctx 14772 return c 14773} 14774 14775// Header returns an http.Header that can be modified by the caller to 14776// add HTTP headers to the request. 14777func (c *AccounttaxGetCall) Header() http.Header { 14778 if c.header_ == nil { 14779 c.header_ = make(http.Header) 14780 } 14781 return c.header_ 14782} 14783 14784func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { 14785 reqHeaders := make(http.Header) 14786 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14787 for k, v := range c.header_ { 14788 reqHeaders[k] = v 14789 } 14790 reqHeaders.Set("User-Agent", c.s.userAgent()) 14791 if c.ifNoneMatch_ != "" { 14792 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14793 } 14794 var body io.Reader = nil 14795 c.urlParams_.Set("alt", alt) 14796 c.urlParams_.Set("prettyPrint", "false") 14797 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 14798 urls += "?" + c.urlParams_.Encode() 14799 req, err := http.NewRequest("GET", urls, body) 14800 if err != nil { 14801 return nil, err 14802 } 14803 req.Header = reqHeaders 14804 googleapi.Expand(req.URL, map[string]string{ 14805 "merchantId": strconv.FormatUint(c.merchantId, 10), 14806 "accountId": strconv.FormatUint(c.accountId, 10), 14807 }) 14808 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14809} 14810 14811// Do executes the "content.accounttax.get" call. 14812// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 14813// status code is an error. Response headers are in either 14814// *AccountTax.ServerResponse.Header or (if a response was returned at 14815// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14816// to check whether the returned error was because 14817// http.StatusNotModified was returned. 14818func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 14819 gensupport.SetOptions(c.urlParams_, opts...) 14820 res, err := c.doRequest("json") 14821 if res != nil && res.StatusCode == http.StatusNotModified { 14822 if res.Body != nil { 14823 res.Body.Close() 14824 } 14825 return nil, &googleapi.Error{ 14826 Code: res.StatusCode, 14827 Header: res.Header, 14828 } 14829 } 14830 if err != nil { 14831 return nil, err 14832 } 14833 defer googleapi.CloseBody(res) 14834 if err := googleapi.CheckResponse(res); err != nil { 14835 return nil, err 14836 } 14837 ret := &AccountTax{ 14838 ServerResponse: googleapi.ServerResponse{ 14839 Header: res.Header, 14840 HTTPStatusCode: res.StatusCode, 14841 }, 14842 } 14843 target := &ret 14844 if err := gensupport.DecodeResponse(target, res); err != nil { 14845 return nil, err 14846 } 14847 return ret, nil 14848 // { 14849 // "description": "Retrieves the tax settings of the account.", 14850 // "httpMethod": "GET", 14851 // "id": "content.accounttax.get", 14852 // "parameterOrder": [ 14853 // "merchantId", 14854 // "accountId" 14855 // ], 14856 // "parameters": { 14857 // "accountId": { 14858 // "description": "The ID of the account for which to get/update account tax settings.", 14859 // "format": "uint64", 14860 // "location": "path", 14861 // "required": true, 14862 // "type": "string" 14863 // }, 14864 // "merchantId": { 14865 // "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.", 14866 // "format": "uint64", 14867 // "location": "path", 14868 // "required": true, 14869 // "type": "string" 14870 // } 14871 // }, 14872 // "path": "{merchantId}/accounttax/{accountId}", 14873 // "response": { 14874 // "$ref": "AccountTax" 14875 // }, 14876 // "scopes": [ 14877 // "https://www.googleapis.com/auth/content" 14878 // ] 14879 // } 14880 14881} 14882 14883// method id "content.accounttax.list": 14884 14885type AccounttaxListCall struct { 14886 s *APIService 14887 merchantId uint64 14888 urlParams_ gensupport.URLParams 14889 ifNoneMatch_ string 14890 ctx_ context.Context 14891 header_ http.Header 14892} 14893 14894// List: Lists the tax settings of the sub-accounts in your Merchant 14895// Center account. 14896func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { 14897 c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14898 c.merchantId = merchantId 14899 return c 14900} 14901 14902// MaxResults sets the optional parameter "maxResults": The maximum 14903// number of tax settings to return in the response, used for paging. 14904func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { 14905 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14906 return c 14907} 14908 14909// PageToken sets the optional parameter "pageToken": The token returned 14910// by the previous request. 14911func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { 14912 c.urlParams_.Set("pageToken", pageToken) 14913 return c 14914} 14915 14916// Fields allows partial responses to be retrieved. See 14917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14918// for more information. 14919func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { 14920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14921 return c 14922} 14923 14924// IfNoneMatch sets the optional parameter which makes the operation 14925// fail if the object's ETag matches the given value. This is useful for 14926// getting updates only after the object has changed since the last 14927// request. Use googleapi.IsNotModified to check whether the response 14928// error from Do is the result of In-None-Match. 14929func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { 14930 c.ifNoneMatch_ = entityTag 14931 return c 14932} 14933 14934// Context sets the context to be used in this call's Do method. Any 14935// pending HTTP request will be aborted if the provided context is 14936// canceled. 14937func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 14938 c.ctx_ = ctx 14939 return c 14940} 14941 14942// Header returns an http.Header that can be modified by the caller to 14943// add HTTP headers to the request. 14944func (c *AccounttaxListCall) Header() http.Header { 14945 if c.header_ == nil { 14946 c.header_ = make(http.Header) 14947 } 14948 return c.header_ 14949} 14950 14951func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { 14952 reqHeaders := make(http.Header) 14953 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14954 for k, v := range c.header_ { 14955 reqHeaders[k] = v 14956 } 14957 reqHeaders.Set("User-Agent", c.s.userAgent()) 14958 if c.ifNoneMatch_ != "" { 14959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14960 } 14961 var body io.Reader = nil 14962 c.urlParams_.Set("alt", alt) 14963 c.urlParams_.Set("prettyPrint", "false") 14964 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") 14965 urls += "?" + c.urlParams_.Encode() 14966 req, err := http.NewRequest("GET", urls, body) 14967 if err != nil { 14968 return nil, err 14969 } 14970 req.Header = reqHeaders 14971 googleapi.Expand(req.URL, map[string]string{ 14972 "merchantId": strconv.FormatUint(c.merchantId, 10), 14973 }) 14974 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14975} 14976 14977// Do executes the "content.accounttax.list" call. 14978// Exactly one of *AccounttaxListResponse or error will be non-nil. Any 14979// non-2xx status code is an error. Response headers are in either 14980// *AccounttaxListResponse.ServerResponse.Header or (if a response was 14981// returned at all) in error.(*googleapi.Error).Header. Use 14982// googleapi.IsNotModified to check whether the returned error was 14983// because http.StatusNotModified was returned. 14984func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { 14985 gensupport.SetOptions(c.urlParams_, opts...) 14986 res, err := c.doRequest("json") 14987 if res != nil && res.StatusCode == http.StatusNotModified { 14988 if res.Body != nil { 14989 res.Body.Close() 14990 } 14991 return nil, &googleapi.Error{ 14992 Code: res.StatusCode, 14993 Header: res.Header, 14994 } 14995 } 14996 if err != nil { 14997 return nil, err 14998 } 14999 defer googleapi.CloseBody(res) 15000 if err := googleapi.CheckResponse(res); err != nil { 15001 return nil, err 15002 } 15003 ret := &AccounttaxListResponse{ 15004 ServerResponse: googleapi.ServerResponse{ 15005 Header: res.Header, 15006 HTTPStatusCode: res.StatusCode, 15007 }, 15008 } 15009 target := &ret 15010 if err := gensupport.DecodeResponse(target, res); err != nil { 15011 return nil, err 15012 } 15013 return ret, nil 15014 // { 15015 // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", 15016 // "httpMethod": "GET", 15017 // "id": "content.accounttax.list", 15018 // "parameterOrder": [ 15019 // "merchantId" 15020 // ], 15021 // "parameters": { 15022 // "maxResults": { 15023 // "description": "The maximum number of tax settings to return in the response, used for paging.", 15024 // "format": "uint32", 15025 // "location": "query", 15026 // "type": "integer" 15027 // }, 15028 // "merchantId": { 15029 // "description": "The ID of the managing account. This must be a multi-client account.", 15030 // "format": "uint64", 15031 // "location": "path", 15032 // "required": true, 15033 // "type": "string" 15034 // }, 15035 // "pageToken": { 15036 // "description": "The token returned by the previous request.", 15037 // "location": "query", 15038 // "type": "string" 15039 // } 15040 // }, 15041 // "path": "{merchantId}/accounttax", 15042 // "response": { 15043 // "$ref": "AccounttaxListResponse" 15044 // }, 15045 // "scopes": [ 15046 // "https://www.googleapis.com/auth/content" 15047 // ] 15048 // } 15049 15050} 15051 15052// Pages invokes f for each page of results. 15053// A non-nil error returned from f will halt the iteration. 15054// The provided context supersedes any context provided to the Context method. 15055func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { 15056 c.ctx_ = ctx 15057 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15058 for { 15059 x, err := c.Do() 15060 if err != nil { 15061 return err 15062 } 15063 if err := f(x); err != nil { 15064 return err 15065 } 15066 if x.NextPageToken == "" { 15067 return nil 15068 } 15069 c.PageToken(x.NextPageToken) 15070 } 15071} 15072 15073// method id "content.accounttax.update": 15074 15075type AccounttaxUpdateCall struct { 15076 s *APIService 15077 merchantId uint64 15078 accountId uint64 15079 accounttax *AccountTax 15080 urlParams_ gensupport.URLParams 15081 ctx_ context.Context 15082 header_ http.Header 15083} 15084 15085// Update: Updates the tax settings of the account. 15086func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { 15087 c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15088 c.merchantId = merchantId 15089 c.accountId = accountId 15090 c.accounttax = accounttax 15091 return c 15092} 15093 15094// DryRun sets the optional parameter "dryRun": Flag to simulate a 15095// request like in a live environment. If set to true, dry-run mode 15096// checks the validity of the request and returns errors (if any). 15097func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { 15098 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15099 return c 15100} 15101 15102// Fields allows partial responses to be retrieved. See 15103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15104// for more information. 15105func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { 15106 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15107 return c 15108} 15109 15110// Context sets the context to be used in this call's Do method. Any 15111// pending HTTP request will be aborted if the provided context is 15112// canceled. 15113func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 15114 c.ctx_ = ctx 15115 return c 15116} 15117 15118// Header returns an http.Header that can be modified by the caller to 15119// add HTTP headers to the request. 15120func (c *AccounttaxUpdateCall) Header() http.Header { 15121 if c.header_ == nil { 15122 c.header_ = make(http.Header) 15123 } 15124 return c.header_ 15125} 15126 15127func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { 15128 reqHeaders := make(http.Header) 15129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15130 for k, v := range c.header_ { 15131 reqHeaders[k] = v 15132 } 15133 reqHeaders.Set("User-Agent", c.s.userAgent()) 15134 var body io.Reader = nil 15135 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) 15136 if err != nil { 15137 return nil, err 15138 } 15139 reqHeaders.Set("Content-Type", "application/json") 15140 c.urlParams_.Set("alt", alt) 15141 c.urlParams_.Set("prettyPrint", "false") 15142 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 15143 urls += "?" + c.urlParams_.Encode() 15144 req, err := http.NewRequest("PUT", urls, body) 15145 if err != nil { 15146 return nil, err 15147 } 15148 req.Header = reqHeaders 15149 googleapi.Expand(req.URL, map[string]string{ 15150 "merchantId": strconv.FormatUint(c.merchantId, 10), 15151 "accountId": strconv.FormatUint(c.accountId, 10), 15152 }) 15153 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15154} 15155 15156// Do executes the "content.accounttax.update" call. 15157// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 15158// status code is an error. Response headers are in either 15159// *AccountTax.ServerResponse.Header or (if a response was returned at 15160// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15161// to check whether the returned error was because 15162// http.StatusNotModified was returned. 15163func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 15164 gensupport.SetOptions(c.urlParams_, opts...) 15165 res, err := c.doRequest("json") 15166 if res != nil && res.StatusCode == http.StatusNotModified { 15167 if res.Body != nil { 15168 res.Body.Close() 15169 } 15170 return nil, &googleapi.Error{ 15171 Code: res.StatusCode, 15172 Header: res.Header, 15173 } 15174 } 15175 if err != nil { 15176 return nil, err 15177 } 15178 defer googleapi.CloseBody(res) 15179 if err := googleapi.CheckResponse(res); err != nil { 15180 return nil, err 15181 } 15182 ret := &AccountTax{ 15183 ServerResponse: googleapi.ServerResponse{ 15184 Header: res.Header, 15185 HTTPStatusCode: res.StatusCode, 15186 }, 15187 } 15188 target := &ret 15189 if err := gensupport.DecodeResponse(target, res); err != nil { 15190 return nil, err 15191 } 15192 return ret, nil 15193 // { 15194 // "description": "Updates the tax settings of the account.", 15195 // "httpMethod": "PUT", 15196 // "id": "content.accounttax.update", 15197 // "parameterOrder": [ 15198 // "merchantId", 15199 // "accountId" 15200 // ], 15201 // "parameters": { 15202 // "accountId": { 15203 // "description": "The ID of the account for which to get/update account tax settings.", 15204 // "format": "uint64", 15205 // "location": "path", 15206 // "required": true, 15207 // "type": "string" 15208 // }, 15209 // "dryRun": { 15210 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 15211 // "location": "query", 15212 // "type": "boolean" 15213 // }, 15214 // "merchantId": { 15215 // "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.", 15216 // "format": "uint64", 15217 // "location": "path", 15218 // "required": true, 15219 // "type": "string" 15220 // } 15221 // }, 15222 // "path": "{merchantId}/accounttax/{accountId}", 15223 // "request": { 15224 // "$ref": "AccountTax" 15225 // }, 15226 // "response": { 15227 // "$ref": "AccountTax" 15228 // }, 15229 // "scopes": [ 15230 // "https://www.googleapis.com/auth/content" 15231 // ] 15232 // } 15233 15234} 15235 15236// method id "content.datafeeds.custombatch": 15237 15238type DatafeedsCustombatchCall struct { 15239 s *APIService 15240 datafeedscustombatchrequest *DatafeedsCustomBatchRequest 15241 urlParams_ gensupport.URLParams 15242 ctx_ context.Context 15243 header_ http.Header 15244} 15245 15246// Custombatch: Deletes, fetches, gets, inserts and updates multiple 15247// datafeeds in a single request. 15248func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { 15249 c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15250 c.datafeedscustombatchrequest = datafeedscustombatchrequest 15251 return c 15252} 15253 15254// DryRun sets the optional parameter "dryRun": Flag to simulate a 15255// request like in a live environment. If set to true, dry-run mode 15256// checks the validity of the request and returns errors (if any). 15257func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { 15258 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15259 return c 15260} 15261 15262// Fields allows partial responses to be retrieved. See 15263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15264// for more information. 15265func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 15266 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15267 return c 15268} 15269 15270// Context sets the context to be used in this call's Do method. Any 15271// pending HTTP request will be aborted if the provided context is 15272// canceled. 15273func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 15274 c.ctx_ = ctx 15275 return c 15276} 15277 15278// Header returns an http.Header that can be modified by the caller to 15279// add HTTP headers to the request. 15280func (c *DatafeedsCustombatchCall) Header() http.Header { 15281 if c.header_ == nil { 15282 c.header_ = make(http.Header) 15283 } 15284 return c.header_ 15285} 15286 15287func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { 15288 reqHeaders := make(http.Header) 15289 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15290 for k, v := range c.header_ { 15291 reqHeaders[k] = v 15292 } 15293 reqHeaders.Set("User-Agent", c.s.userAgent()) 15294 var body io.Reader = nil 15295 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) 15296 if err != nil { 15297 return nil, err 15298 } 15299 reqHeaders.Set("Content-Type", "application/json") 15300 c.urlParams_.Set("alt", alt) 15301 c.urlParams_.Set("prettyPrint", "false") 15302 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") 15303 urls += "?" + c.urlParams_.Encode() 15304 req, err := http.NewRequest("POST", urls, body) 15305 if err != nil { 15306 return nil, err 15307 } 15308 req.Header = reqHeaders 15309 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15310} 15311 15312// Do executes the "content.datafeeds.custombatch" call. 15313// Exactly one of *DatafeedsCustomBatchResponse or error will be 15314// non-nil. Any non-2xx status code is an error. Response headers are in 15315// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a 15316// response was returned at all) in error.(*googleapi.Error).Header. Use 15317// googleapi.IsNotModified to check whether the returned error was 15318// because http.StatusNotModified was returned. 15319func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { 15320 gensupport.SetOptions(c.urlParams_, opts...) 15321 res, err := c.doRequest("json") 15322 if res != nil && res.StatusCode == http.StatusNotModified { 15323 if res.Body != nil { 15324 res.Body.Close() 15325 } 15326 return nil, &googleapi.Error{ 15327 Code: res.StatusCode, 15328 Header: res.Header, 15329 } 15330 } 15331 if err != nil { 15332 return nil, err 15333 } 15334 defer googleapi.CloseBody(res) 15335 if err := googleapi.CheckResponse(res); err != nil { 15336 return nil, err 15337 } 15338 ret := &DatafeedsCustomBatchResponse{ 15339 ServerResponse: googleapi.ServerResponse{ 15340 Header: res.Header, 15341 HTTPStatusCode: res.StatusCode, 15342 }, 15343 } 15344 target := &ret 15345 if err := gensupport.DecodeResponse(target, res); err != nil { 15346 return nil, err 15347 } 15348 return ret, nil 15349 // { 15350 // "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", 15351 // "httpMethod": "POST", 15352 // "id": "content.datafeeds.custombatch", 15353 // "parameters": { 15354 // "dryRun": { 15355 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 15356 // "location": "query", 15357 // "type": "boolean" 15358 // } 15359 // }, 15360 // "path": "datafeeds/batch", 15361 // "request": { 15362 // "$ref": "DatafeedsCustomBatchRequest" 15363 // }, 15364 // "response": { 15365 // "$ref": "DatafeedsCustomBatchResponse" 15366 // }, 15367 // "scopes": [ 15368 // "https://www.googleapis.com/auth/content" 15369 // ] 15370 // } 15371 15372} 15373 15374// method id "content.datafeeds.delete": 15375 15376type DatafeedsDeleteCall struct { 15377 s *APIService 15378 merchantId uint64 15379 datafeedId uint64 15380 urlParams_ gensupport.URLParams 15381 ctx_ context.Context 15382 header_ http.Header 15383} 15384 15385// Delete: Deletes a datafeed configuration from your Merchant Center 15386// account. 15387func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { 15388 c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15389 c.merchantId = merchantId 15390 c.datafeedId = datafeedId 15391 return c 15392} 15393 15394// DryRun sets the optional parameter "dryRun": Flag to simulate a 15395// request like in a live environment. If set to true, dry-run mode 15396// checks the validity of the request and returns errors (if any). 15397func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { 15398 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15399 return c 15400} 15401 15402// Fields allows partial responses to be retrieved. See 15403// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15404// for more information. 15405func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 15406 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15407 return c 15408} 15409 15410// Context sets the context to be used in this call's Do method. Any 15411// pending HTTP request will be aborted if the provided context is 15412// canceled. 15413func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 15414 c.ctx_ = ctx 15415 return c 15416} 15417 15418// Header returns an http.Header that can be modified by the caller to 15419// add HTTP headers to the request. 15420func (c *DatafeedsDeleteCall) Header() http.Header { 15421 if c.header_ == nil { 15422 c.header_ = make(http.Header) 15423 } 15424 return c.header_ 15425} 15426 15427func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { 15428 reqHeaders := make(http.Header) 15429 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15430 for k, v := range c.header_ { 15431 reqHeaders[k] = v 15432 } 15433 reqHeaders.Set("User-Agent", c.s.userAgent()) 15434 var body io.Reader = nil 15435 c.urlParams_.Set("alt", alt) 15436 c.urlParams_.Set("prettyPrint", "false") 15437 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15438 urls += "?" + c.urlParams_.Encode() 15439 req, err := http.NewRequest("DELETE", urls, body) 15440 if err != nil { 15441 return nil, err 15442 } 15443 req.Header = reqHeaders 15444 googleapi.Expand(req.URL, map[string]string{ 15445 "merchantId": strconv.FormatUint(c.merchantId, 10), 15446 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15447 }) 15448 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15449} 15450 15451// Do executes the "content.datafeeds.delete" call. 15452func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { 15453 gensupport.SetOptions(c.urlParams_, opts...) 15454 res, err := c.doRequest("json") 15455 if err != nil { 15456 return err 15457 } 15458 defer googleapi.CloseBody(res) 15459 if err := googleapi.CheckResponse(res); err != nil { 15460 return err 15461 } 15462 return nil 15463 // { 15464 // "description": "Deletes a datafeed configuration from your Merchant Center account.", 15465 // "httpMethod": "DELETE", 15466 // "id": "content.datafeeds.delete", 15467 // "parameterOrder": [ 15468 // "merchantId", 15469 // "datafeedId" 15470 // ], 15471 // "parameters": { 15472 // "datafeedId": { 15473 // "description": "The ID of the datafeed.", 15474 // "format": "uint64", 15475 // "location": "path", 15476 // "required": true, 15477 // "type": "string" 15478 // }, 15479 // "dryRun": { 15480 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 15481 // "location": "query", 15482 // "type": "boolean" 15483 // }, 15484 // "merchantId": { 15485 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15486 // "format": "uint64", 15487 // "location": "path", 15488 // "required": true, 15489 // "type": "string" 15490 // } 15491 // }, 15492 // "path": "{merchantId}/datafeeds/{datafeedId}", 15493 // "scopes": [ 15494 // "https://www.googleapis.com/auth/content" 15495 // ] 15496 // } 15497 15498} 15499 15500// method id "content.datafeeds.fetchnow": 15501 15502type DatafeedsFetchnowCall struct { 15503 s *APIService 15504 merchantId uint64 15505 datafeedId uint64 15506 urlParams_ gensupport.URLParams 15507 ctx_ context.Context 15508 header_ http.Header 15509} 15510 15511// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center 15512// account. 15513func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { 15514 c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15515 c.merchantId = merchantId 15516 c.datafeedId = datafeedId 15517 return c 15518} 15519 15520// DryRun sets the optional parameter "dryRun": Flag to simulate a 15521// request like in a live environment. If set to true, dry-run mode 15522// checks the validity of the request and returns errors (if any). 15523func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { 15524 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15525 return c 15526} 15527 15528// Fields allows partial responses to be retrieved. See 15529// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15530// for more information. 15531func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { 15532 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15533 return c 15534} 15535 15536// Context sets the context to be used in this call's Do method. Any 15537// pending HTTP request will be aborted if the provided context is 15538// canceled. 15539func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 15540 c.ctx_ = ctx 15541 return c 15542} 15543 15544// Header returns an http.Header that can be modified by the caller to 15545// add HTTP headers to the request. 15546func (c *DatafeedsFetchnowCall) Header() http.Header { 15547 if c.header_ == nil { 15548 c.header_ = make(http.Header) 15549 } 15550 return c.header_ 15551} 15552 15553func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { 15554 reqHeaders := make(http.Header) 15555 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15556 for k, v := range c.header_ { 15557 reqHeaders[k] = v 15558 } 15559 reqHeaders.Set("User-Agent", c.s.userAgent()) 15560 var body io.Reader = nil 15561 c.urlParams_.Set("alt", alt) 15562 c.urlParams_.Set("prettyPrint", "false") 15563 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") 15564 urls += "?" + c.urlParams_.Encode() 15565 req, err := http.NewRequest("POST", urls, body) 15566 if err != nil { 15567 return nil, err 15568 } 15569 req.Header = reqHeaders 15570 googleapi.Expand(req.URL, map[string]string{ 15571 "merchantId": strconv.FormatUint(c.merchantId, 10), 15572 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15573 }) 15574 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15575} 15576 15577// Do executes the "content.datafeeds.fetchnow" call. 15578// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. 15579// Any non-2xx status code is an error. Response headers are in either 15580// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response 15581// was returned at all) in error.(*googleapi.Error).Header. Use 15582// googleapi.IsNotModified to check whether the returned error was 15583// because http.StatusNotModified was returned. 15584func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { 15585 gensupport.SetOptions(c.urlParams_, opts...) 15586 res, err := c.doRequest("json") 15587 if res != nil && res.StatusCode == http.StatusNotModified { 15588 if res.Body != nil { 15589 res.Body.Close() 15590 } 15591 return nil, &googleapi.Error{ 15592 Code: res.StatusCode, 15593 Header: res.Header, 15594 } 15595 } 15596 if err != nil { 15597 return nil, err 15598 } 15599 defer googleapi.CloseBody(res) 15600 if err := googleapi.CheckResponse(res); err != nil { 15601 return nil, err 15602 } 15603 ret := &DatafeedsFetchNowResponse{ 15604 ServerResponse: googleapi.ServerResponse{ 15605 Header: res.Header, 15606 HTTPStatusCode: res.StatusCode, 15607 }, 15608 } 15609 target := &ret 15610 if err := gensupport.DecodeResponse(target, res); err != nil { 15611 return nil, err 15612 } 15613 return ret, nil 15614 // { 15615 // "description": "Invokes a fetch for the datafeed in your Merchant Center account.", 15616 // "httpMethod": "POST", 15617 // "id": "content.datafeeds.fetchnow", 15618 // "parameterOrder": [ 15619 // "merchantId", 15620 // "datafeedId" 15621 // ], 15622 // "parameters": { 15623 // "datafeedId": { 15624 // "description": "The ID of the datafeed to be fetched.", 15625 // "format": "uint64", 15626 // "location": "path", 15627 // "required": true, 15628 // "type": "string" 15629 // }, 15630 // "dryRun": { 15631 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 15632 // "location": "query", 15633 // "type": "boolean" 15634 // }, 15635 // "merchantId": { 15636 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15637 // "format": "uint64", 15638 // "location": "path", 15639 // "required": true, 15640 // "type": "string" 15641 // } 15642 // }, 15643 // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 15644 // "response": { 15645 // "$ref": "DatafeedsFetchNowResponse" 15646 // }, 15647 // "scopes": [ 15648 // "https://www.googleapis.com/auth/content" 15649 // ] 15650 // } 15651 15652} 15653 15654// method id "content.datafeeds.get": 15655 15656type DatafeedsGetCall struct { 15657 s *APIService 15658 merchantId uint64 15659 datafeedId uint64 15660 urlParams_ gensupport.URLParams 15661 ifNoneMatch_ string 15662 ctx_ context.Context 15663 header_ http.Header 15664} 15665 15666// Get: Retrieves a datafeed configuration from your Merchant Center 15667// account. 15668func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { 15669 c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15670 c.merchantId = merchantId 15671 c.datafeedId = datafeedId 15672 return c 15673} 15674 15675// Fields allows partial responses to be retrieved. See 15676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15677// for more information. 15678func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { 15679 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15680 return c 15681} 15682 15683// IfNoneMatch sets the optional parameter which makes the operation 15684// fail if the object's ETag matches the given value. This is useful for 15685// getting updates only after the object has changed since the last 15686// request. Use googleapi.IsNotModified to check whether the response 15687// error from Do is the result of In-None-Match. 15688func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { 15689 c.ifNoneMatch_ = entityTag 15690 return c 15691} 15692 15693// Context sets the context to be used in this call's Do method. Any 15694// pending HTTP request will be aborted if the provided context is 15695// canceled. 15696func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 15697 c.ctx_ = ctx 15698 return c 15699} 15700 15701// Header returns an http.Header that can be modified by the caller to 15702// add HTTP headers to the request. 15703func (c *DatafeedsGetCall) Header() http.Header { 15704 if c.header_ == nil { 15705 c.header_ = make(http.Header) 15706 } 15707 return c.header_ 15708} 15709 15710func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { 15711 reqHeaders := make(http.Header) 15712 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15713 for k, v := range c.header_ { 15714 reqHeaders[k] = v 15715 } 15716 reqHeaders.Set("User-Agent", c.s.userAgent()) 15717 if c.ifNoneMatch_ != "" { 15718 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15719 } 15720 var body io.Reader = nil 15721 c.urlParams_.Set("alt", alt) 15722 c.urlParams_.Set("prettyPrint", "false") 15723 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15724 urls += "?" + c.urlParams_.Encode() 15725 req, err := http.NewRequest("GET", urls, body) 15726 if err != nil { 15727 return nil, err 15728 } 15729 req.Header = reqHeaders 15730 googleapi.Expand(req.URL, map[string]string{ 15731 "merchantId": strconv.FormatUint(c.merchantId, 10), 15732 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15733 }) 15734 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15735} 15736 15737// Do executes the "content.datafeeds.get" call. 15738// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15739// code is an error. Response headers are in either 15740// *Datafeed.ServerResponse.Header or (if a response was returned at 15741// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15742// to check whether the returned error was because 15743// http.StatusNotModified was returned. 15744func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15745 gensupport.SetOptions(c.urlParams_, opts...) 15746 res, err := c.doRequest("json") 15747 if res != nil && res.StatusCode == http.StatusNotModified { 15748 if res.Body != nil { 15749 res.Body.Close() 15750 } 15751 return nil, &googleapi.Error{ 15752 Code: res.StatusCode, 15753 Header: res.Header, 15754 } 15755 } 15756 if err != nil { 15757 return nil, err 15758 } 15759 defer googleapi.CloseBody(res) 15760 if err := googleapi.CheckResponse(res); err != nil { 15761 return nil, err 15762 } 15763 ret := &Datafeed{ 15764 ServerResponse: googleapi.ServerResponse{ 15765 Header: res.Header, 15766 HTTPStatusCode: res.StatusCode, 15767 }, 15768 } 15769 target := &ret 15770 if err := gensupport.DecodeResponse(target, res); err != nil { 15771 return nil, err 15772 } 15773 return ret, nil 15774 // { 15775 // "description": "Retrieves a datafeed configuration from your Merchant Center account.", 15776 // "httpMethod": "GET", 15777 // "id": "content.datafeeds.get", 15778 // "parameterOrder": [ 15779 // "merchantId", 15780 // "datafeedId" 15781 // ], 15782 // "parameters": { 15783 // "datafeedId": { 15784 // "description": "The ID of the datafeed.", 15785 // "format": "uint64", 15786 // "location": "path", 15787 // "required": true, 15788 // "type": "string" 15789 // }, 15790 // "merchantId": { 15791 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15792 // "format": "uint64", 15793 // "location": "path", 15794 // "required": true, 15795 // "type": "string" 15796 // } 15797 // }, 15798 // "path": "{merchantId}/datafeeds/{datafeedId}", 15799 // "response": { 15800 // "$ref": "Datafeed" 15801 // }, 15802 // "scopes": [ 15803 // "https://www.googleapis.com/auth/content" 15804 // ] 15805 // } 15806 15807} 15808 15809// method id "content.datafeeds.insert": 15810 15811type DatafeedsInsertCall struct { 15812 s *APIService 15813 merchantId uint64 15814 datafeed *Datafeed 15815 urlParams_ gensupport.URLParams 15816 ctx_ context.Context 15817 header_ http.Header 15818} 15819 15820// Insert: Registers a datafeed configuration with your Merchant Center 15821// account. 15822func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { 15823 c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15824 c.merchantId = merchantId 15825 c.datafeed = datafeed 15826 return c 15827} 15828 15829// DryRun sets the optional parameter "dryRun": Flag to simulate a 15830// request like in a live environment. If set to true, dry-run mode 15831// checks the validity of the request and returns errors (if any). 15832func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { 15833 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15834 return c 15835} 15836 15837// Fields allows partial responses to be retrieved. See 15838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15839// for more information. 15840func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { 15841 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15842 return c 15843} 15844 15845// Context sets the context to be used in this call's Do method. Any 15846// pending HTTP request will be aborted if the provided context is 15847// canceled. 15848func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 15849 c.ctx_ = ctx 15850 return c 15851} 15852 15853// Header returns an http.Header that can be modified by the caller to 15854// add HTTP headers to the request. 15855func (c *DatafeedsInsertCall) Header() http.Header { 15856 if c.header_ == nil { 15857 c.header_ = make(http.Header) 15858 } 15859 return c.header_ 15860} 15861 15862func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { 15863 reqHeaders := make(http.Header) 15864 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15865 for k, v := range c.header_ { 15866 reqHeaders[k] = v 15867 } 15868 reqHeaders.Set("User-Agent", c.s.userAgent()) 15869 var body io.Reader = nil 15870 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 15871 if err != nil { 15872 return nil, err 15873 } 15874 reqHeaders.Set("Content-Type", "application/json") 15875 c.urlParams_.Set("alt", alt) 15876 c.urlParams_.Set("prettyPrint", "false") 15877 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 15878 urls += "?" + c.urlParams_.Encode() 15879 req, err := http.NewRequest("POST", urls, body) 15880 if err != nil { 15881 return nil, err 15882 } 15883 req.Header = reqHeaders 15884 googleapi.Expand(req.URL, map[string]string{ 15885 "merchantId": strconv.FormatUint(c.merchantId, 10), 15886 }) 15887 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15888} 15889 15890// Do executes the "content.datafeeds.insert" call. 15891// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15892// code is an error. Response headers are in either 15893// *Datafeed.ServerResponse.Header or (if a response was returned at 15894// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15895// to check whether the returned error was because 15896// http.StatusNotModified was returned. 15897func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15898 gensupport.SetOptions(c.urlParams_, opts...) 15899 res, err := c.doRequest("json") 15900 if res != nil && res.StatusCode == http.StatusNotModified { 15901 if res.Body != nil { 15902 res.Body.Close() 15903 } 15904 return nil, &googleapi.Error{ 15905 Code: res.StatusCode, 15906 Header: res.Header, 15907 } 15908 } 15909 if err != nil { 15910 return nil, err 15911 } 15912 defer googleapi.CloseBody(res) 15913 if err := googleapi.CheckResponse(res); err != nil { 15914 return nil, err 15915 } 15916 ret := &Datafeed{ 15917 ServerResponse: googleapi.ServerResponse{ 15918 Header: res.Header, 15919 HTTPStatusCode: res.StatusCode, 15920 }, 15921 } 15922 target := &ret 15923 if err := gensupport.DecodeResponse(target, res); err != nil { 15924 return nil, err 15925 } 15926 return ret, nil 15927 // { 15928 // "description": "Registers a datafeed configuration with your Merchant Center account.", 15929 // "httpMethod": "POST", 15930 // "id": "content.datafeeds.insert", 15931 // "parameterOrder": [ 15932 // "merchantId" 15933 // ], 15934 // "parameters": { 15935 // "dryRun": { 15936 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 15937 // "location": "query", 15938 // "type": "boolean" 15939 // }, 15940 // "merchantId": { 15941 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15942 // "format": "uint64", 15943 // "location": "path", 15944 // "required": true, 15945 // "type": "string" 15946 // } 15947 // }, 15948 // "path": "{merchantId}/datafeeds", 15949 // "request": { 15950 // "$ref": "Datafeed" 15951 // }, 15952 // "response": { 15953 // "$ref": "Datafeed" 15954 // }, 15955 // "scopes": [ 15956 // "https://www.googleapis.com/auth/content" 15957 // ] 15958 // } 15959 15960} 15961 15962// method id "content.datafeeds.list": 15963 15964type DatafeedsListCall struct { 15965 s *APIService 15966 merchantId uint64 15967 urlParams_ gensupport.URLParams 15968 ifNoneMatch_ string 15969 ctx_ context.Context 15970 header_ http.Header 15971} 15972 15973// List: Lists the configurations for datafeeds in your Merchant Center 15974// account. 15975func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { 15976 c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15977 c.merchantId = merchantId 15978 return c 15979} 15980 15981// MaxResults sets the optional parameter "maxResults": The maximum 15982// number of products to return in the response, used for paging. 15983func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { 15984 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 15985 return c 15986} 15987 15988// PageToken sets the optional parameter "pageToken": The token returned 15989// by the previous request. 15990func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { 15991 c.urlParams_.Set("pageToken", pageToken) 15992 return c 15993} 15994 15995// Fields allows partial responses to be retrieved. See 15996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15997// for more information. 15998func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { 15999 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16000 return c 16001} 16002 16003// IfNoneMatch sets the optional parameter which makes the operation 16004// fail if the object's ETag matches the given value. This is useful for 16005// getting updates only after the object has changed since the last 16006// request. Use googleapi.IsNotModified to check whether the response 16007// error from Do is the result of In-None-Match. 16008func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { 16009 c.ifNoneMatch_ = entityTag 16010 return c 16011} 16012 16013// Context sets the context to be used in this call's Do method. Any 16014// pending HTTP request will be aborted if the provided context is 16015// canceled. 16016func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 16017 c.ctx_ = ctx 16018 return c 16019} 16020 16021// Header returns an http.Header that can be modified by the caller to 16022// add HTTP headers to the request. 16023func (c *DatafeedsListCall) Header() http.Header { 16024 if c.header_ == nil { 16025 c.header_ = make(http.Header) 16026 } 16027 return c.header_ 16028} 16029 16030func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { 16031 reqHeaders := make(http.Header) 16032 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16033 for k, v := range c.header_ { 16034 reqHeaders[k] = v 16035 } 16036 reqHeaders.Set("User-Agent", c.s.userAgent()) 16037 if c.ifNoneMatch_ != "" { 16038 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16039 } 16040 var body io.Reader = nil 16041 c.urlParams_.Set("alt", alt) 16042 c.urlParams_.Set("prettyPrint", "false") 16043 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 16044 urls += "?" + c.urlParams_.Encode() 16045 req, err := http.NewRequest("GET", urls, body) 16046 if err != nil { 16047 return nil, err 16048 } 16049 req.Header = reqHeaders 16050 googleapi.Expand(req.URL, map[string]string{ 16051 "merchantId": strconv.FormatUint(c.merchantId, 10), 16052 }) 16053 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16054} 16055 16056// Do executes the "content.datafeeds.list" call. 16057// Exactly one of *DatafeedsListResponse or error will be non-nil. Any 16058// non-2xx status code is an error. Response headers are in either 16059// *DatafeedsListResponse.ServerResponse.Header or (if a response was 16060// returned at all) in error.(*googleapi.Error).Header. Use 16061// googleapi.IsNotModified to check whether the returned error was 16062// because http.StatusNotModified was returned. 16063func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { 16064 gensupport.SetOptions(c.urlParams_, opts...) 16065 res, err := c.doRequest("json") 16066 if res != nil && res.StatusCode == http.StatusNotModified { 16067 if res.Body != nil { 16068 res.Body.Close() 16069 } 16070 return nil, &googleapi.Error{ 16071 Code: res.StatusCode, 16072 Header: res.Header, 16073 } 16074 } 16075 if err != nil { 16076 return nil, err 16077 } 16078 defer googleapi.CloseBody(res) 16079 if err := googleapi.CheckResponse(res); err != nil { 16080 return nil, err 16081 } 16082 ret := &DatafeedsListResponse{ 16083 ServerResponse: googleapi.ServerResponse{ 16084 Header: res.Header, 16085 HTTPStatusCode: res.StatusCode, 16086 }, 16087 } 16088 target := &ret 16089 if err := gensupport.DecodeResponse(target, res); err != nil { 16090 return nil, err 16091 } 16092 return ret, nil 16093 // { 16094 // "description": "Lists the configurations for datafeeds in your Merchant Center account.", 16095 // "httpMethod": "GET", 16096 // "id": "content.datafeeds.list", 16097 // "parameterOrder": [ 16098 // "merchantId" 16099 // ], 16100 // "parameters": { 16101 // "maxResults": { 16102 // "description": "The maximum number of products to return in the response, used for paging.", 16103 // "format": "uint32", 16104 // "location": "query", 16105 // "type": "integer" 16106 // }, 16107 // "merchantId": { 16108 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 16109 // "format": "uint64", 16110 // "location": "path", 16111 // "required": true, 16112 // "type": "string" 16113 // }, 16114 // "pageToken": { 16115 // "description": "The token returned by the previous request.", 16116 // "location": "query", 16117 // "type": "string" 16118 // } 16119 // }, 16120 // "path": "{merchantId}/datafeeds", 16121 // "response": { 16122 // "$ref": "DatafeedsListResponse" 16123 // }, 16124 // "scopes": [ 16125 // "https://www.googleapis.com/auth/content" 16126 // ] 16127 // } 16128 16129} 16130 16131// Pages invokes f for each page of results. 16132// A non-nil error returned from f will halt the iteration. 16133// The provided context supersedes any context provided to the Context method. 16134func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { 16135 c.ctx_ = ctx 16136 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16137 for { 16138 x, err := c.Do() 16139 if err != nil { 16140 return err 16141 } 16142 if err := f(x); err != nil { 16143 return err 16144 } 16145 if x.NextPageToken == "" { 16146 return nil 16147 } 16148 c.PageToken(x.NextPageToken) 16149 } 16150} 16151 16152// method id "content.datafeeds.update": 16153 16154type DatafeedsUpdateCall struct { 16155 s *APIService 16156 merchantId uint64 16157 datafeedId uint64 16158 datafeed *Datafeed 16159 urlParams_ gensupport.URLParams 16160 ctx_ context.Context 16161 header_ http.Header 16162} 16163 16164// Update: Updates a datafeed configuration of your Merchant Center 16165// account. 16166func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { 16167 c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16168 c.merchantId = merchantId 16169 c.datafeedId = datafeedId 16170 c.datafeed = datafeed 16171 return c 16172} 16173 16174// DryRun sets the optional parameter "dryRun": Flag to simulate a 16175// request like in a live environment. If set to true, dry-run mode 16176// checks the validity of the request and returns errors (if any). 16177func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { 16178 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16179 return c 16180} 16181 16182// Fields allows partial responses to be retrieved. See 16183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16184// for more information. 16185func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { 16186 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16187 return c 16188} 16189 16190// Context sets the context to be used in this call's Do method. Any 16191// pending HTTP request will be aborted if the provided context is 16192// canceled. 16193func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 16194 c.ctx_ = ctx 16195 return c 16196} 16197 16198// Header returns an http.Header that can be modified by the caller to 16199// add HTTP headers to the request. 16200func (c *DatafeedsUpdateCall) Header() http.Header { 16201 if c.header_ == nil { 16202 c.header_ = make(http.Header) 16203 } 16204 return c.header_ 16205} 16206 16207func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { 16208 reqHeaders := make(http.Header) 16209 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16210 for k, v := range c.header_ { 16211 reqHeaders[k] = v 16212 } 16213 reqHeaders.Set("User-Agent", c.s.userAgent()) 16214 var body io.Reader = nil 16215 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 16216 if err != nil { 16217 return nil, err 16218 } 16219 reqHeaders.Set("Content-Type", "application/json") 16220 c.urlParams_.Set("alt", alt) 16221 c.urlParams_.Set("prettyPrint", "false") 16222 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 16223 urls += "?" + c.urlParams_.Encode() 16224 req, err := http.NewRequest("PUT", urls, body) 16225 if err != nil { 16226 return nil, err 16227 } 16228 req.Header = reqHeaders 16229 googleapi.Expand(req.URL, map[string]string{ 16230 "merchantId": strconv.FormatUint(c.merchantId, 10), 16231 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 16232 }) 16233 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16234} 16235 16236// Do executes the "content.datafeeds.update" call. 16237// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 16238// code is an error. Response headers are in either 16239// *Datafeed.ServerResponse.Header or (if a response was returned at 16240// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16241// to check whether the returned error was because 16242// http.StatusNotModified was returned. 16243func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 16244 gensupport.SetOptions(c.urlParams_, opts...) 16245 res, err := c.doRequest("json") 16246 if res != nil && res.StatusCode == http.StatusNotModified { 16247 if res.Body != nil { 16248 res.Body.Close() 16249 } 16250 return nil, &googleapi.Error{ 16251 Code: res.StatusCode, 16252 Header: res.Header, 16253 } 16254 } 16255 if err != nil { 16256 return nil, err 16257 } 16258 defer googleapi.CloseBody(res) 16259 if err := googleapi.CheckResponse(res); err != nil { 16260 return nil, err 16261 } 16262 ret := &Datafeed{ 16263 ServerResponse: googleapi.ServerResponse{ 16264 Header: res.Header, 16265 HTTPStatusCode: res.StatusCode, 16266 }, 16267 } 16268 target := &ret 16269 if err := gensupport.DecodeResponse(target, res); err != nil { 16270 return nil, err 16271 } 16272 return ret, nil 16273 // { 16274 // "description": "Updates a datafeed configuration of your Merchant Center account.", 16275 // "httpMethod": "PUT", 16276 // "id": "content.datafeeds.update", 16277 // "parameterOrder": [ 16278 // "merchantId", 16279 // "datafeedId" 16280 // ], 16281 // "parameters": { 16282 // "datafeedId": { 16283 // "description": "The ID of the datafeed.", 16284 // "format": "uint64", 16285 // "location": "path", 16286 // "required": true, 16287 // "type": "string" 16288 // }, 16289 // "dryRun": { 16290 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 16291 // "location": "query", 16292 // "type": "boolean" 16293 // }, 16294 // "merchantId": { 16295 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 16296 // "format": "uint64", 16297 // "location": "path", 16298 // "required": true, 16299 // "type": "string" 16300 // } 16301 // }, 16302 // "path": "{merchantId}/datafeeds/{datafeedId}", 16303 // "request": { 16304 // "$ref": "Datafeed" 16305 // }, 16306 // "response": { 16307 // "$ref": "Datafeed" 16308 // }, 16309 // "scopes": [ 16310 // "https://www.googleapis.com/auth/content" 16311 // ] 16312 // } 16313 16314} 16315 16316// method id "content.datafeedstatuses.custombatch": 16317 16318type DatafeedstatusesCustombatchCall struct { 16319 s *APIService 16320 datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest 16321 urlParams_ gensupport.URLParams 16322 ctx_ context.Context 16323 header_ http.Header 16324} 16325 16326// Custombatch: Gets multiple Merchant Center datafeed statuses in a 16327// single request. 16328func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { 16329 c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16330 c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 16331 return c 16332} 16333 16334// Fields allows partial responses to be retrieved. See 16335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16336// for more information. 16337func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { 16338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16339 return c 16340} 16341 16342// Context sets the context to be used in this call's Do method. Any 16343// pending HTTP request will be aborted if the provided context is 16344// canceled. 16345func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 16346 c.ctx_ = ctx 16347 return c 16348} 16349 16350// Header returns an http.Header that can be modified by the caller to 16351// add HTTP headers to the request. 16352func (c *DatafeedstatusesCustombatchCall) Header() http.Header { 16353 if c.header_ == nil { 16354 c.header_ = make(http.Header) 16355 } 16356 return c.header_ 16357} 16358 16359func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 16360 reqHeaders := make(http.Header) 16361 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16362 for k, v := range c.header_ { 16363 reqHeaders[k] = v 16364 } 16365 reqHeaders.Set("User-Agent", c.s.userAgent()) 16366 var body io.Reader = nil 16367 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) 16368 if err != nil { 16369 return nil, err 16370 } 16371 reqHeaders.Set("Content-Type", "application/json") 16372 c.urlParams_.Set("alt", alt) 16373 c.urlParams_.Set("prettyPrint", "false") 16374 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 16375 urls += "?" + c.urlParams_.Encode() 16376 req, err := http.NewRequest("POST", urls, body) 16377 if err != nil { 16378 return nil, err 16379 } 16380 req.Header = reqHeaders 16381 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16382} 16383 16384// Do executes the "content.datafeedstatuses.custombatch" call. 16385// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be 16386// non-nil. Any non-2xx status code is an error. Response headers are in 16387// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or 16388// (if a response was returned at all) in 16389// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16390// whether the returned error was because http.StatusNotModified was 16391// returned. 16392func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { 16393 gensupport.SetOptions(c.urlParams_, opts...) 16394 res, err := c.doRequest("json") 16395 if res != nil && res.StatusCode == http.StatusNotModified { 16396 if res.Body != nil { 16397 res.Body.Close() 16398 } 16399 return nil, &googleapi.Error{ 16400 Code: res.StatusCode, 16401 Header: res.Header, 16402 } 16403 } 16404 if err != nil { 16405 return nil, err 16406 } 16407 defer googleapi.CloseBody(res) 16408 if err := googleapi.CheckResponse(res); err != nil { 16409 return nil, err 16410 } 16411 ret := &DatafeedstatusesCustomBatchResponse{ 16412 ServerResponse: googleapi.ServerResponse{ 16413 Header: res.Header, 16414 HTTPStatusCode: res.StatusCode, 16415 }, 16416 } 16417 target := &ret 16418 if err := gensupport.DecodeResponse(target, res); err != nil { 16419 return nil, err 16420 } 16421 return ret, nil 16422 // { 16423 // "description": "Gets multiple Merchant Center datafeed statuses in a single request.", 16424 // "httpMethod": "POST", 16425 // "id": "content.datafeedstatuses.custombatch", 16426 // "path": "datafeedstatuses/batch", 16427 // "request": { 16428 // "$ref": "DatafeedstatusesCustomBatchRequest" 16429 // }, 16430 // "response": { 16431 // "$ref": "DatafeedstatusesCustomBatchResponse" 16432 // }, 16433 // "scopes": [ 16434 // "https://www.googleapis.com/auth/content" 16435 // ] 16436 // } 16437 16438} 16439 16440// method id "content.datafeedstatuses.get": 16441 16442type DatafeedstatusesGetCall struct { 16443 s *APIService 16444 merchantId uint64 16445 datafeedId uint64 16446 urlParams_ gensupport.URLParams 16447 ifNoneMatch_ string 16448 ctx_ context.Context 16449 header_ http.Header 16450} 16451 16452// Get: Retrieves the status of a datafeed from your Merchant Center 16453// account. 16454func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { 16455 c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16456 c.merchantId = merchantId 16457 c.datafeedId = datafeedId 16458 return c 16459} 16460 16461// Country sets the optional parameter "country": The country for which 16462// to get the datafeed status. If this parameter is provided then 16463// language must also be provided. Note that this parameter is required 16464// for feeds targeting multiple countries and languages, since a feed 16465// may have a different status for each target. 16466func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { 16467 c.urlParams_.Set("country", country) 16468 return c 16469} 16470 16471// Language sets the optional parameter "language": The language for 16472// which to get the datafeed status. If this parameter is provided then 16473// country must also be provided. Note that this parameter is required 16474// for feeds targeting multiple countries and languages, since a feed 16475// may have a different status for each target. 16476func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { 16477 c.urlParams_.Set("language", language) 16478 return c 16479} 16480 16481// Fields allows partial responses to be retrieved. See 16482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16483// for more information. 16484func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 16485 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16486 return c 16487} 16488 16489// IfNoneMatch sets the optional parameter which makes the operation 16490// fail if the object's ETag matches the given value. This is useful for 16491// getting updates only after the object has changed since the last 16492// request. Use googleapi.IsNotModified to check whether the response 16493// error from Do is the result of In-None-Match. 16494func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { 16495 c.ifNoneMatch_ = entityTag 16496 return c 16497} 16498 16499// Context sets the context to be used in this call's Do method. Any 16500// pending HTTP request will be aborted if the provided context is 16501// canceled. 16502func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 16503 c.ctx_ = ctx 16504 return c 16505} 16506 16507// Header returns an http.Header that can be modified by the caller to 16508// add HTTP headers to the request. 16509func (c *DatafeedstatusesGetCall) Header() http.Header { 16510 if c.header_ == nil { 16511 c.header_ = make(http.Header) 16512 } 16513 return c.header_ 16514} 16515 16516func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { 16517 reqHeaders := make(http.Header) 16518 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16519 for k, v := range c.header_ { 16520 reqHeaders[k] = v 16521 } 16522 reqHeaders.Set("User-Agent", c.s.userAgent()) 16523 if c.ifNoneMatch_ != "" { 16524 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16525 } 16526 var body io.Reader = nil 16527 c.urlParams_.Set("alt", alt) 16528 c.urlParams_.Set("prettyPrint", "false") 16529 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") 16530 urls += "?" + c.urlParams_.Encode() 16531 req, err := http.NewRequest("GET", urls, body) 16532 if err != nil { 16533 return nil, err 16534 } 16535 req.Header = reqHeaders 16536 googleapi.Expand(req.URL, map[string]string{ 16537 "merchantId": strconv.FormatUint(c.merchantId, 10), 16538 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 16539 }) 16540 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16541} 16542 16543// Do executes the "content.datafeedstatuses.get" call. 16544// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx 16545// status code is an error. Response headers are in either 16546// *DatafeedStatus.ServerResponse.Header or (if a response was returned 16547// at all) in error.(*googleapi.Error).Header. Use 16548// googleapi.IsNotModified to check whether the returned error was 16549// because http.StatusNotModified was returned. 16550func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { 16551 gensupport.SetOptions(c.urlParams_, opts...) 16552 res, err := c.doRequest("json") 16553 if res != nil && res.StatusCode == http.StatusNotModified { 16554 if res.Body != nil { 16555 res.Body.Close() 16556 } 16557 return nil, &googleapi.Error{ 16558 Code: res.StatusCode, 16559 Header: res.Header, 16560 } 16561 } 16562 if err != nil { 16563 return nil, err 16564 } 16565 defer googleapi.CloseBody(res) 16566 if err := googleapi.CheckResponse(res); err != nil { 16567 return nil, err 16568 } 16569 ret := &DatafeedStatus{ 16570 ServerResponse: googleapi.ServerResponse{ 16571 Header: res.Header, 16572 HTTPStatusCode: res.StatusCode, 16573 }, 16574 } 16575 target := &ret 16576 if err := gensupport.DecodeResponse(target, res); err != nil { 16577 return nil, err 16578 } 16579 return ret, nil 16580 // { 16581 // "description": "Retrieves the status of a datafeed from your Merchant Center account.", 16582 // "httpMethod": "GET", 16583 // "id": "content.datafeedstatuses.get", 16584 // "parameterOrder": [ 16585 // "merchantId", 16586 // "datafeedId" 16587 // ], 16588 // "parameters": { 16589 // "country": { 16590 // "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.", 16591 // "location": "query", 16592 // "type": "string" 16593 // }, 16594 // "datafeedId": { 16595 // "description": "The ID of the datafeed.", 16596 // "format": "uint64", 16597 // "location": "path", 16598 // "required": true, 16599 // "type": "string" 16600 // }, 16601 // "language": { 16602 // "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.", 16603 // "location": "query", 16604 // "type": "string" 16605 // }, 16606 // "merchantId": { 16607 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 16608 // "format": "uint64", 16609 // "location": "path", 16610 // "required": true, 16611 // "type": "string" 16612 // } 16613 // }, 16614 // "path": "{merchantId}/datafeedstatuses/{datafeedId}", 16615 // "response": { 16616 // "$ref": "DatafeedStatus" 16617 // }, 16618 // "scopes": [ 16619 // "https://www.googleapis.com/auth/content" 16620 // ] 16621 // } 16622 16623} 16624 16625// method id "content.datafeedstatuses.list": 16626 16627type DatafeedstatusesListCall struct { 16628 s *APIService 16629 merchantId uint64 16630 urlParams_ gensupport.URLParams 16631 ifNoneMatch_ string 16632 ctx_ context.Context 16633 header_ http.Header 16634} 16635 16636// List: Lists the statuses of the datafeeds in your Merchant Center 16637// account. 16638func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { 16639 c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16640 c.merchantId = merchantId 16641 return c 16642} 16643 16644// MaxResults sets the optional parameter "maxResults": The maximum 16645// number of products to return in the response, used for paging. 16646func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { 16647 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 16648 return c 16649} 16650 16651// PageToken sets the optional parameter "pageToken": The token returned 16652// by the previous request. 16653func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { 16654 c.urlParams_.Set("pageToken", pageToken) 16655 return c 16656} 16657 16658// Fields allows partial responses to be retrieved. See 16659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16660// for more information. 16661func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 16662 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16663 return c 16664} 16665 16666// IfNoneMatch sets the optional parameter which makes the operation 16667// fail if the object's ETag matches the given value. This is useful for 16668// getting updates only after the object has changed since the last 16669// request. Use googleapi.IsNotModified to check whether the response 16670// error from Do is the result of In-None-Match. 16671func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { 16672 c.ifNoneMatch_ = entityTag 16673 return c 16674} 16675 16676// Context sets the context to be used in this call's Do method. Any 16677// pending HTTP request will be aborted if the provided context is 16678// canceled. 16679func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 16680 c.ctx_ = ctx 16681 return c 16682} 16683 16684// Header returns an http.Header that can be modified by the caller to 16685// add HTTP headers to the request. 16686func (c *DatafeedstatusesListCall) Header() http.Header { 16687 if c.header_ == nil { 16688 c.header_ = make(http.Header) 16689 } 16690 return c.header_ 16691} 16692 16693func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { 16694 reqHeaders := make(http.Header) 16695 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16696 for k, v := range c.header_ { 16697 reqHeaders[k] = v 16698 } 16699 reqHeaders.Set("User-Agent", c.s.userAgent()) 16700 if c.ifNoneMatch_ != "" { 16701 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16702 } 16703 var body io.Reader = nil 16704 c.urlParams_.Set("alt", alt) 16705 c.urlParams_.Set("prettyPrint", "false") 16706 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") 16707 urls += "?" + c.urlParams_.Encode() 16708 req, err := http.NewRequest("GET", urls, body) 16709 if err != nil { 16710 return nil, err 16711 } 16712 req.Header = reqHeaders 16713 googleapi.Expand(req.URL, map[string]string{ 16714 "merchantId": strconv.FormatUint(c.merchantId, 10), 16715 }) 16716 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16717} 16718 16719// Do executes the "content.datafeedstatuses.list" call. 16720// Exactly one of *DatafeedstatusesListResponse or error will be 16721// non-nil. Any non-2xx status code is an error. Response headers are in 16722// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a 16723// response was returned at all) in error.(*googleapi.Error).Header. Use 16724// googleapi.IsNotModified to check whether the returned error was 16725// because http.StatusNotModified was returned. 16726func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { 16727 gensupport.SetOptions(c.urlParams_, opts...) 16728 res, err := c.doRequest("json") 16729 if res != nil && res.StatusCode == http.StatusNotModified { 16730 if res.Body != nil { 16731 res.Body.Close() 16732 } 16733 return nil, &googleapi.Error{ 16734 Code: res.StatusCode, 16735 Header: res.Header, 16736 } 16737 } 16738 if err != nil { 16739 return nil, err 16740 } 16741 defer googleapi.CloseBody(res) 16742 if err := googleapi.CheckResponse(res); err != nil { 16743 return nil, err 16744 } 16745 ret := &DatafeedstatusesListResponse{ 16746 ServerResponse: googleapi.ServerResponse{ 16747 Header: res.Header, 16748 HTTPStatusCode: res.StatusCode, 16749 }, 16750 } 16751 target := &ret 16752 if err := gensupport.DecodeResponse(target, res); err != nil { 16753 return nil, err 16754 } 16755 return ret, nil 16756 // { 16757 // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", 16758 // "httpMethod": "GET", 16759 // "id": "content.datafeedstatuses.list", 16760 // "parameterOrder": [ 16761 // "merchantId" 16762 // ], 16763 // "parameters": { 16764 // "maxResults": { 16765 // "description": "The maximum number of products to return in the response, used for paging.", 16766 // "format": "uint32", 16767 // "location": "query", 16768 // "type": "integer" 16769 // }, 16770 // "merchantId": { 16771 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 16772 // "format": "uint64", 16773 // "location": "path", 16774 // "required": true, 16775 // "type": "string" 16776 // }, 16777 // "pageToken": { 16778 // "description": "The token returned by the previous request.", 16779 // "location": "query", 16780 // "type": "string" 16781 // } 16782 // }, 16783 // "path": "{merchantId}/datafeedstatuses", 16784 // "response": { 16785 // "$ref": "DatafeedstatusesListResponse" 16786 // }, 16787 // "scopes": [ 16788 // "https://www.googleapis.com/auth/content" 16789 // ] 16790 // } 16791 16792} 16793 16794// Pages invokes f for each page of results. 16795// A non-nil error returned from f will halt the iteration. 16796// The provided context supersedes any context provided to the Context method. 16797func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { 16798 c.ctx_ = ctx 16799 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16800 for { 16801 x, err := c.Do() 16802 if err != nil { 16803 return err 16804 } 16805 if err := f(x); err != nil { 16806 return err 16807 } 16808 if x.NextPageToken == "" { 16809 return nil 16810 } 16811 c.PageToken(x.NextPageToken) 16812 } 16813} 16814 16815// method id "content.inventory.custombatch": 16816 16817type InventoryCustombatchCall struct { 16818 s *APIService 16819 inventorycustombatchrequest *InventoryCustomBatchRequest 16820 urlParams_ gensupport.URLParams 16821 ctx_ context.Context 16822 header_ http.Header 16823} 16824 16825// Custombatch: Updates price and availability for multiple products or 16826// stores in a single request. This operation does not update the 16827// expiration date of the products. 16828func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall { 16829 c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16830 c.inventorycustombatchrequest = inventorycustombatchrequest 16831 return c 16832} 16833 16834// DryRun sets the optional parameter "dryRun": Flag to simulate a 16835// request like in a live environment. If set to true, dry-run mode 16836// checks the validity of the request and returns errors (if any). 16837func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall { 16838 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16839 return c 16840} 16841 16842// Fields allows partial responses to be retrieved. See 16843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16844// for more information. 16845func (c *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall { 16846 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16847 return c 16848} 16849 16850// Context sets the context to be used in this call's Do method. Any 16851// pending HTTP request will be aborted if the provided context is 16852// canceled. 16853func (c *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall { 16854 c.ctx_ = ctx 16855 return c 16856} 16857 16858// Header returns an http.Header that can be modified by the caller to 16859// add HTTP headers to the request. 16860func (c *InventoryCustombatchCall) Header() http.Header { 16861 if c.header_ == nil { 16862 c.header_ = make(http.Header) 16863 } 16864 return c.header_ 16865} 16866 16867func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { 16868 reqHeaders := make(http.Header) 16869 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16870 for k, v := range c.header_ { 16871 reqHeaders[k] = v 16872 } 16873 reqHeaders.Set("User-Agent", c.s.userAgent()) 16874 var body io.Reader = nil 16875 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest) 16876 if err != nil { 16877 return nil, err 16878 } 16879 reqHeaders.Set("Content-Type", "application/json") 16880 c.urlParams_.Set("alt", alt) 16881 c.urlParams_.Set("prettyPrint", "false") 16882 urls := googleapi.ResolveRelative(c.s.BasePath, "inventory/batch") 16883 urls += "?" + c.urlParams_.Encode() 16884 req, err := http.NewRequest("POST", urls, body) 16885 if err != nil { 16886 return nil, err 16887 } 16888 req.Header = reqHeaders 16889 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16890} 16891 16892// Do executes the "content.inventory.custombatch" call. 16893// Exactly one of *InventoryCustomBatchResponse or error will be 16894// non-nil. Any non-2xx status code is an error. Response headers are in 16895// either *InventoryCustomBatchResponse.ServerResponse.Header or (if a 16896// response was returned at all) in error.(*googleapi.Error).Header. Use 16897// googleapi.IsNotModified to check whether the returned error was 16898// because http.StatusNotModified was returned. 16899func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) { 16900 gensupport.SetOptions(c.urlParams_, opts...) 16901 res, err := c.doRequest("json") 16902 if res != nil && res.StatusCode == http.StatusNotModified { 16903 if res.Body != nil { 16904 res.Body.Close() 16905 } 16906 return nil, &googleapi.Error{ 16907 Code: res.StatusCode, 16908 Header: res.Header, 16909 } 16910 } 16911 if err != nil { 16912 return nil, err 16913 } 16914 defer googleapi.CloseBody(res) 16915 if err := googleapi.CheckResponse(res); err != nil { 16916 return nil, err 16917 } 16918 ret := &InventoryCustomBatchResponse{ 16919 ServerResponse: googleapi.ServerResponse{ 16920 Header: res.Header, 16921 HTTPStatusCode: res.StatusCode, 16922 }, 16923 } 16924 target := &ret 16925 if err := gensupport.DecodeResponse(target, res); err != nil { 16926 return nil, err 16927 } 16928 return ret, nil 16929 // { 16930 // "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.", 16931 // "httpMethod": "POST", 16932 // "id": "content.inventory.custombatch", 16933 // "parameters": { 16934 // "dryRun": { 16935 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 16936 // "location": "query", 16937 // "type": "boolean" 16938 // } 16939 // }, 16940 // "path": "inventory/batch", 16941 // "request": { 16942 // "$ref": "InventoryCustomBatchRequest" 16943 // }, 16944 // "response": { 16945 // "$ref": "InventoryCustomBatchResponse" 16946 // }, 16947 // "scopes": [ 16948 // "https://www.googleapis.com/auth/content" 16949 // ] 16950 // } 16951 16952} 16953 16954// method id "content.inventory.set": 16955 16956type InventorySetCall struct { 16957 s *APIService 16958 merchantId uint64 16959 storeCode string 16960 productId string 16961 inventorysetrequest *InventorySetRequest 16962 urlParams_ gensupport.URLParams 16963 ctx_ context.Context 16964 header_ http.Header 16965} 16966 16967// Set: Updates price and availability of a product in your Merchant 16968// Center account. 16969func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall { 16970 c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16971 c.merchantId = merchantId 16972 c.storeCode = storeCode 16973 c.productId = productId 16974 c.inventorysetrequest = inventorysetrequest 16975 return c 16976} 16977 16978// DryRun sets the optional parameter "dryRun": Flag to simulate a 16979// request like in a live environment. If set to true, dry-run mode 16980// checks the validity of the request and returns errors (if any). 16981func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall { 16982 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16983 return c 16984} 16985 16986// Fields allows partial responses to be retrieved. See 16987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16988// for more information. 16989func (c *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall { 16990 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16991 return c 16992} 16993 16994// Context sets the context to be used in this call's Do method. Any 16995// pending HTTP request will be aborted if the provided context is 16996// canceled. 16997func (c *InventorySetCall) Context(ctx context.Context) *InventorySetCall { 16998 c.ctx_ = ctx 16999 return c 17000} 17001 17002// Header returns an http.Header that can be modified by the caller to 17003// add HTTP headers to the request. 17004func (c *InventorySetCall) Header() http.Header { 17005 if c.header_ == nil { 17006 c.header_ = make(http.Header) 17007 } 17008 return c.header_ 17009} 17010 17011func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) { 17012 reqHeaders := make(http.Header) 17013 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17014 for k, v := range c.header_ { 17015 reqHeaders[k] = v 17016 } 17017 reqHeaders.Set("User-Agent", c.s.userAgent()) 17018 var body io.Reader = nil 17019 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest) 17020 if err != nil { 17021 return nil, err 17022 } 17023 reqHeaders.Set("Content-Type", "application/json") 17024 c.urlParams_.Set("alt", alt) 17025 c.urlParams_.Set("prettyPrint", "false") 17026 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/inventory/{storeCode}/products/{productId}") 17027 urls += "?" + c.urlParams_.Encode() 17028 req, err := http.NewRequest("POST", urls, body) 17029 if err != nil { 17030 return nil, err 17031 } 17032 req.Header = reqHeaders 17033 googleapi.Expand(req.URL, map[string]string{ 17034 "merchantId": strconv.FormatUint(c.merchantId, 10), 17035 "storeCode": c.storeCode, 17036 "productId": c.productId, 17037 }) 17038 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17039} 17040 17041// Do executes the "content.inventory.set" call. 17042// Exactly one of *InventorySetResponse or error will be non-nil. Any 17043// non-2xx status code is an error. Response headers are in either 17044// *InventorySetResponse.ServerResponse.Header or (if a response was 17045// returned at all) in error.(*googleapi.Error).Header. Use 17046// googleapi.IsNotModified to check whether the returned error was 17047// because http.StatusNotModified was returned. 17048func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) { 17049 gensupport.SetOptions(c.urlParams_, opts...) 17050 res, err := c.doRequest("json") 17051 if res != nil && res.StatusCode == http.StatusNotModified { 17052 if res.Body != nil { 17053 res.Body.Close() 17054 } 17055 return nil, &googleapi.Error{ 17056 Code: res.StatusCode, 17057 Header: res.Header, 17058 } 17059 } 17060 if err != nil { 17061 return nil, err 17062 } 17063 defer googleapi.CloseBody(res) 17064 if err := googleapi.CheckResponse(res); err != nil { 17065 return nil, err 17066 } 17067 ret := &InventorySetResponse{ 17068 ServerResponse: googleapi.ServerResponse{ 17069 Header: res.Header, 17070 HTTPStatusCode: res.StatusCode, 17071 }, 17072 } 17073 target := &ret 17074 if err := gensupport.DecodeResponse(target, res); err != nil { 17075 return nil, err 17076 } 17077 return ret, nil 17078 // { 17079 // "description": "Updates price and availability of a product in your Merchant Center account.", 17080 // "httpMethod": "POST", 17081 // "id": "content.inventory.set", 17082 // "parameterOrder": [ 17083 // "merchantId", 17084 // "storeCode", 17085 // "productId" 17086 // ], 17087 // "parameters": { 17088 // "dryRun": { 17089 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 17090 // "location": "query", 17091 // "type": "boolean" 17092 // }, 17093 // "merchantId": { 17094 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 17095 // "format": "uint64", 17096 // "location": "path", 17097 // "required": true, 17098 // "type": "string" 17099 // }, 17100 // "productId": { 17101 // "description": "The REST ID of the product for which to update price and availability.", 17102 // "location": "path", 17103 // "required": true, 17104 // "type": "string" 17105 // }, 17106 // "storeCode": { 17107 // "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", 17108 // "location": "path", 17109 // "required": true, 17110 // "type": "string" 17111 // } 17112 // }, 17113 // "path": "{merchantId}/inventory/{storeCode}/products/{productId}", 17114 // "request": { 17115 // "$ref": "InventorySetRequest" 17116 // }, 17117 // "response": { 17118 // "$ref": "InventorySetResponse" 17119 // }, 17120 // "scopes": [ 17121 // "https://www.googleapis.com/auth/content" 17122 // ] 17123 // } 17124 17125} 17126 17127// method id "content.liasettings.custombatch": 17128 17129type LiasettingsCustombatchCall struct { 17130 s *APIService 17131 liasettingscustombatchrequest *LiasettingsCustomBatchRequest 17132 urlParams_ gensupport.URLParams 17133 ctx_ context.Context 17134 header_ http.Header 17135} 17136 17137// Custombatch: Retrieves and/or updates the LIA settings of multiple 17138// accounts in a single request. 17139func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { 17140 c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17141 c.liasettingscustombatchrequest = liasettingscustombatchrequest 17142 return c 17143} 17144 17145// DryRun sets the optional parameter "dryRun": Flag to simulate a 17146// request like in a live environment. If set to true, dry-run mode 17147// checks the validity of the request and returns errors (if any). 17148func (c *LiasettingsCustombatchCall) DryRun(dryRun bool) *LiasettingsCustombatchCall { 17149 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 17150 return c 17151} 17152 17153// Fields allows partial responses to be retrieved. See 17154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17155// for more information. 17156func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { 17157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17158 return c 17159} 17160 17161// Context sets the context to be used in this call's Do method. Any 17162// pending HTTP request will be aborted if the provided context is 17163// canceled. 17164func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { 17165 c.ctx_ = ctx 17166 return c 17167} 17168 17169// Header returns an http.Header that can be modified by the caller to 17170// add HTTP headers to the request. 17171func (c *LiasettingsCustombatchCall) Header() http.Header { 17172 if c.header_ == nil { 17173 c.header_ = make(http.Header) 17174 } 17175 return c.header_ 17176} 17177 17178func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 17179 reqHeaders := make(http.Header) 17180 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17181 for k, v := range c.header_ { 17182 reqHeaders[k] = v 17183 } 17184 reqHeaders.Set("User-Agent", c.s.userAgent()) 17185 var body io.Reader = nil 17186 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) 17187 if err != nil { 17188 return nil, err 17189 } 17190 reqHeaders.Set("Content-Type", "application/json") 17191 c.urlParams_.Set("alt", alt) 17192 c.urlParams_.Set("prettyPrint", "false") 17193 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") 17194 urls += "?" + c.urlParams_.Encode() 17195 req, err := http.NewRequest("POST", urls, body) 17196 if err != nil { 17197 return nil, err 17198 } 17199 req.Header = reqHeaders 17200 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17201} 17202 17203// Do executes the "content.liasettings.custombatch" call. 17204// Exactly one of *LiasettingsCustomBatchResponse or error will be 17205// non-nil. Any non-2xx status code is an error. Response headers are in 17206// either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a 17207// response was returned at all) in error.(*googleapi.Error).Header. Use 17208// googleapi.IsNotModified to check whether the returned error was 17209// because http.StatusNotModified was returned. 17210func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { 17211 gensupport.SetOptions(c.urlParams_, opts...) 17212 res, err := c.doRequest("json") 17213 if res != nil && res.StatusCode == http.StatusNotModified { 17214 if res.Body != nil { 17215 res.Body.Close() 17216 } 17217 return nil, &googleapi.Error{ 17218 Code: res.StatusCode, 17219 Header: res.Header, 17220 } 17221 } 17222 if err != nil { 17223 return nil, err 17224 } 17225 defer googleapi.CloseBody(res) 17226 if err := googleapi.CheckResponse(res); err != nil { 17227 return nil, err 17228 } 17229 ret := &LiasettingsCustomBatchResponse{ 17230 ServerResponse: googleapi.ServerResponse{ 17231 Header: res.Header, 17232 HTTPStatusCode: res.StatusCode, 17233 }, 17234 } 17235 target := &ret 17236 if err := gensupport.DecodeResponse(target, res); err != nil { 17237 return nil, err 17238 } 17239 return ret, nil 17240 // { 17241 // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", 17242 // "httpMethod": "POST", 17243 // "id": "content.liasettings.custombatch", 17244 // "parameters": { 17245 // "dryRun": { 17246 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 17247 // "location": "query", 17248 // "type": "boolean" 17249 // } 17250 // }, 17251 // "path": "liasettings/batch", 17252 // "request": { 17253 // "$ref": "LiasettingsCustomBatchRequest" 17254 // }, 17255 // "response": { 17256 // "$ref": "LiasettingsCustomBatchResponse" 17257 // }, 17258 // "scopes": [ 17259 // "https://www.googleapis.com/auth/content" 17260 // ] 17261 // } 17262 17263} 17264 17265// method id "content.liasettings.get": 17266 17267type LiasettingsGetCall struct { 17268 s *APIService 17269 merchantId uint64 17270 accountId uint64 17271 urlParams_ gensupport.URLParams 17272 ifNoneMatch_ string 17273 ctx_ context.Context 17274 header_ http.Header 17275} 17276 17277// Get: Retrieves the LIA settings of the account. 17278func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { 17279 c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17280 c.merchantId = merchantId 17281 c.accountId = accountId 17282 return c 17283} 17284 17285// Fields allows partial responses to be retrieved. See 17286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17287// for more information. 17288func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { 17289 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17290 return c 17291} 17292 17293// IfNoneMatch sets the optional parameter which makes the operation 17294// fail if the object's ETag matches the given value. This is useful for 17295// getting updates only after the object has changed since the last 17296// request. Use googleapi.IsNotModified to check whether the response 17297// error from Do is the result of In-None-Match. 17298func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { 17299 c.ifNoneMatch_ = entityTag 17300 return c 17301} 17302 17303// Context sets the context to be used in this call's Do method. Any 17304// pending HTTP request will be aborted if the provided context is 17305// canceled. 17306func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { 17307 c.ctx_ = ctx 17308 return c 17309} 17310 17311// Header returns an http.Header that can be modified by the caller to 17312// add HTTP headers to the request. 17313func (c *LiasettingsGetCall) Header() http.Header { 17314 if c.header_ == nil { 17315 c.header_ = make(http.Header) 17316 } 17317 return c.header_ 17318} 17319 17320func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { 17321 reqHeaders := make(http.Header) 17322 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17323 for k, v := range c.header_ { 17324 reqHeaders[k] = v 17325 } 17326 reqHeaders.Set("User-Agent", c.s.userAgent()) 17327 if c.ifNoneMatch_ != "" { 17328 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17329 } 17330 var body io.Reader = nil 17331 c.urlParams_.Set("alt", alt) 17332 c.urlParams_.Set("prettyPrint", "false") 17333 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 17334 urls += "?" + c.urlParams_.Encode() 17335 req, err := http.NewRequest("GET", urls, body) 17336 if err != nil { 17337 return nil, err 17338 } 17339 req.Header = reqHeaders 17340 googleapi.Expand(req.URL, map[string]string{ 17341 "merchantId": strconv.FormatUint(c.merchantId, 10), 17342 "accountId": strconv.FormatUint(c.accountId, 10), 17343 }) 17344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17345} 17346 17347// Do executes the "content.liasettings.get" call. 17348// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 17349// status code is an error. Response headers are in either 17350// *LiaSettings.ServerResponse.Header or (if a response was returned at 17351// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17352// to check whether the returned error was because 17353// http.StatusNotModified was returned. 17354func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 17355 gensupport.SetOptions(c.urlParams_, opts...) 17356 res, err := c.doRequest("json") 17357 if res != nil && res.StatusCode == http.StatusNotModified { 17358 if res.Body != nil { 17359 res.Body.Close() 17360 } 17361 return nil, &googleapi.Error{ 17362 Code: res.StatusCode, 17363 Header: res.Header, 17364 } 17365 } 17366 if err != nil { 17367 return nil, err 17368 } 17369 defer googleapi.CloseBody(res) 17370 if err := googleapi.CheckResponse(res); err != nil { 17371 return nil, err 17372 } 17373 ret := &LiaSettings{ 17374 ServerResponse: googleapi.ServerResponse{ 17375 Header: res.Header, 17376 HTTPStatusCode: res.StatusCode, 17377 }, 17378 } 17379 target := &ret 17380 if err := gensupport.DecodeResponse(target, res); err != nil { 17381 return nil, err 17382 } 17383 return ret, nil 17384 // { 17385 // "description": "Retrieves the LIA settings of the account.", 17386 // "httpMethod": "GET", 17387 // "id": "content.liasettings.get", 17388 // "parameterOrder": [ 17389 // "merchantId", 17390 // "accountId" 17391 // ], 17392 // "parameters": { 17393 // "accountId": { 17394 // "description": "The ID of the account for which to get or update LIA settings.", 17395 // "format": "uint64", 17396 // "location": "path", 17397 // "required": true, 17398 // "type": "string" 17399 // }, 17400 // "merchantId": { 17401 // "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.", 17402 // "format": "uint64", 17403 // "location": "path", 17404 // "required": true, 17405 // "type": "string" 17406 // } 17407 // }, 17408 // "path": "{merchantId}/liasettings/{accountId}", 17409 // "response": { 17410 // "$ref": "LiaSettings" 17411 // }, 17412 // "scopes": [ 17413 // "https://www.googleapis.com/auth/content" 17414 // ] 17415 // } 17416 17417} 17418 17419// method id "content.liasettings.getaccessiblegmbaccounts": 17420 17421type LiasettingsGetaccessiblegmbaccountsCall struct { 17422 s *APIService 17423 merchantId uint64 17424 accountId uint64 17425 urlParams_ gensupport.URLParams 17426 ifNoneMatch_ string 17427 ctx_ context.Context 17428 header_ http.Header 17429} 17430 17431// Getaccessiblegmbaccounts: Retrieves the list of accessible Google My 17432// Business accounts. 17433func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { 17434 c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17435 c.merchantId = merchantId 17436 c.accountId = accountId 17437 return c 17438} 17439 17440// Fields allows partial responses to be retrieved. See 17441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17442// for more information. 17443func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { 17444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17445 return c 17446} 17447 17448// IfNoneMatch sets the optional parameter which makes the operation 17449// fail if the object's ETag matches the given value. This is useful for 17450// getting updates only after the object has changed since the last 17451// request. Use googleapi.IsNotModified to check whether the response 17452// error from Do is the result of In-None-Match. 17453func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { 17454 c.ifNoneMatch_ = entityTag 17455 return c 17456} 17457 17458// Context sets the context to be used in this call's Do method. Any 17459// pending HTTP request will be aborted if the provided context is 17460// canceled. 17461func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { 17462 c.ctx_ = ctx 17463 return c 17464} 17465 17466// Header returns an http.Header that can be modified by the caller to 17467// add HTTP headers to the request. 17468func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { 17469 if c.header_ == nil { 17470 c.header_ = make(http.Header) 17471 } 17472 return c.header_ 17473} 17474 17475func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { 17476 reqHeaders := make(http.Header) 17477 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17478 for k, v := range c.header_ { 17479 reqHeaders[k] = v 17480 } 17481 reqHeaders.Set("User-Agent", c.s.userAgent()) 17482 if c.ifNoneMatch_ != "" { 17483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17484 } 17485 var body io.Reader = nil 17486 c.urlParams_.Set("alt", alt) 17487 c.urlParams_.Set("prettyPrint", "false") 17488 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") 17489 urls += "?" + c.urlParams_.Encode() 17490 req, err := http.NewRequest("GET", urls, body) 17491 if err != nil { 17492 return nil, err 17493 } 17494 req.Header = reqHeaders 17495 googleapi.Expand(req.URL, map[string]string{ 17496 "merchantId": strconv.FormatUint(c.merchantId, 10), 17497 "accountId": strconv.FormatUint(c.accountId, 10), 17498 }) 17499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17500} 17501 17502// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. 17503// Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error 17504// will be non-nil. Any non-2xx status code is an error. Response 17505// headers are in either 17506// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or 17507// (if a response was returned at all) in 17508// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17509// whether the returned error was because http.StatusNotModified was 17510// returned. 17511func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { 17512 gensupport.SetOptions(c.urlParams_, opts...) 17513 res, err := c.doRequest("json") 17514 if res != nil && res.StatusCode == http.StatusNotModified { 17515 if res.Body != nil { 17516 res.Body.Close() 17517 } 17518 return nil, &googleapi.Error{ 17519 Code: res.StatusCode, 17520 Header: res.Header, 17521 } 17522 } 17523 if err != nil { 17524 return nil, err 17525 } 17526 defer googleapi.CloseBody(res) 17527 if err := googleapi.CheckResponse(res); err != nil { 17528 return nil, err 17529 } 17530 ret := &LiasettingsGetAccessibleGmbAccountsResponse{ 17531 ServerResponse: googleapi.ServerResponse{ 17532 Header: res.Header, 17533 HTTPStatusCode: res.StatusCode, 17534 }, 17535 } 17536 target := &ret 17537 if err := gensupport.DecodeResponse(target, res); err != nil { 17538 return nil, err 17539 } 17540 return ret, nil 17541 // { 17542 // "description": "Retrieves the list of accessible Google My Business accounts.", 17543 // "httpMethod": "GET", 17544 // "id": "content.liasettings.getaccessiblegmbaccounts", 17545 // "parameterOrder": [ 17546 // "merchantId", 17547 // "accountId" 17548 // ], 17549 // "parameters": { 17550 // "accountId": { 17551 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 17552 // "format": "uint64", 17553 // "location": "path", 17554 // "required": true, 17555 // "type": "string" 17556 // }, 17557 // "merchantId": { 17558 // "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.", 17559 // "format": "uint64", 17560 // "location": "path", 17561 // "required": true, 17562 // "type": "string" 17563 // } 17564 // }, 17565 // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 17566 // "response": { 17567 // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" 17568 // }, 17569 // "scopes": [ 17570 // "https://www.googleapis.com/auth/content" 17571 // ] 17572 // } 17573 17574} 17575 17576// method id "content.liasettings.list": 17577 17578type LiasettingsListCall struct { 17579 s *APIService 17580 merchantId uint64 17581 urlParams_ gensupport.URLParams 17582 ifNoneMatch_ string 17583 ctx_ context.Context 17584 header_ http.Header 17585} 17586 17587// List: Lists the LIA settings of the sub-accounts in your Merchant 17588// Center account. 17589func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { 17590 c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17591 c.merchantId = merchantId 17592 return c 17593} 17594 17595// MaxResults sets the optional parameter "maxResults": The maximum 17596// number of LIA settings to return in the response, used for paging. 17597func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { 17598 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 17599 return c 17600} 17601 17602// PageToken sets the optional parameter "pageToken": The token returned 17603// by the previous request. 17604func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { 17605 c.urlParams_.Set("pageToken", pageToken) 17606 return c 17607} 17608 17609// Fields allows partial responses to be retrieved. See 17610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17611// for more information. 17612func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { 17613 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17614 return c 17615} 17616 17617// IfNoneMatch sets the optional parameter which makes the operation 17618// fail if the object's ETag matches the given value. This is useful for 17619// getting updates only after the object has changed since the last 17620// request. Use googleapi.IsNotModified to check whether the response 17621// error from Do is the result of In-None-Match. 17622func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { 17623 c.ifNoneMatch_ = entityTag 17624 return c 17625} 17626 17627// Context sets the context to be used in this call's Do method. Any 17628// pending HTTP request will be aborted if the provided context is 17629// canceled. 17630func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { 17631 c.ctx_ = ctx 17632 return c 17633} 17634 17635// Header returns an http.Header that can be modified by the caller to 17636// add HTTP headers to the request. 17637func (c *LiasettingsListCall) Header() http.Header { 17638 if c.header_ == nil { 17639 c.header_ = make(http.Header) 17640 } 17641 return c.header_ 17642} 17643 17644func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { 17645 reqHeaders := make(http.Header) 17646 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17647 for k, v := range c.header_ { 17648 reqHeaders[k] = v 17649 } 17650 reqHeaders.Set("User-Agent", c.s.userAgent()) 17651 if c.ifNoneMatch_ != "" { 17652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17653 } 17654 var body io.Reader = nil 17655 c.urlParams_.Set("alt", alt) 17656 c.urlParams_.Set("prettyPrint", "false") 17657 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") 17658 urls += "?" + c.urlParams_.Encode() 17659 req, err := http.NewRequest("GET", urls, body) 17660 if err != nil { 17661 return nil, err 17662 } 17663 req.Header = reqHeaders 17664 googleapi.Expand(req.URL, map[string]string{ 17665 "merchantId": strconv.FormatUint(c.merchantId, 10), 17666 }) 17667 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17668} 17669 17670// Do executes the "content.liasettings.list" call. 17671// Exactly one of *LiasettingsListResponse or error will be non-nil. Any 17672// non-2xx status code is an error. Response headers are in either 17673// *LiasettingsListResponse.ServerResponse.Header or (if a response was 17674// returned at all) in error.(*googleapi.Error).Header. Use 17675// googleapi.IsNotModified to check whether the returned error was 17676// because http.StatusNotModified was returned. 17677func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { 17678 gensupport.SetOptions(c.urlParams_, opts...) 17679 res, err := c.doRequest("json") 17680 if res != nil && res.StatusCode == http.StatusNotModified { 17681 if res.Body != nil { 17682 res.Body.Close() 17683 } 17684 return nil, &googleapi.Error{ 17685 Code: res.StatusCode, 17686 Header: res.Header, 17687 } 17688 } 17689 if err != nil { 17690 return nil, err 17691 } 17692 defer googleapi.CloseBody(res) 17693 if err := googleapi.CheckResponse(res); err != nil { 17694 return nil, err 17695 } 17696 ret := &LiasettingsListResponse{ 17697 ServerResponse: googleapi.ServerResponse{ 17698 Header: res.Header, 17699 HTTPStatusCode: res.StatusCode, 17700 }, 17701 } 17702 target := &ret 17703 if err := gensupport.DecodeResponse(target, res); err != nil { 17704 return nil, err 17705 } 17706 return ret, nil 17707 // { 17708 // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", 17709 // "httpMethod": "GET", 17710 // "id": "content.liasettings.list", 17711 // "parameterOrder": [ 17712 // "merchantId" 17713 // ], 17714 // "parameters": { 17715 // "maxResults": { 17716 // "description": "The maximum number of LIA settings to return in the response, used for paging.", 17717 // "format": "uint32", 17718 // "location": "query", 17719 // "type": "integer" 17720 // }, 17721 // "merchantId": { 17722 // "description": "The ID of the managing account. This must be a multi-client account.", 17723 // "format": "uint64", 17724 // "location": "path", 17725 // "required": true, 17726 // "type": "string" 17727 // }, 17728 // "pageToken": { 17729 // "description": "The token returned by the previous request.", 17730 // "location": "query", 17731 // "type": "string" 17732 // } 17733 // }, 17734 // "path": "{merchantId}/liasettings", 17735 // "response": { 17736 // "$ref": "LiasettingsListResponse" 17737 // }, 17738 // "scopes": [ 17739 // "https://www.googleapis.com/auth/content" 17740 // ] 17741 // } 17742 17743} 17744 17745// Pages invokes f for each page of results. 17746// A non-nil error returned from f will halt the iteration. 17747// The provided context supersedes any context provided to the Context method. 17748func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { 17749 c.ctx_ = ctx 17750 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17751 for { 17752 x, err := c.Do() 17753 if err != nil { 17754 return err 17755 } 17756 if err := f(x); err != nil { 17757 return err 17758 } 17759 if x.NextPageToken == "" { 17760 return nil 17761 } 17762 c.PageToken(x.NextPageToken) 17763 } 17764} 17765 17766// method id "content.liasettings.listposdataproviders": 17767 17768type LiasettingsListposdataprovidersCall struct { 17769 s *APIService 17770 urlParams_ gensupport.URLParams 17771 ifNoneMatch_ string 17772 ctx_ context.Context 17773 header_ http.Header 17774} 17775 17776// Listposdataproviders: Retrieves the list of POS data providers that 17777// have active settings for the all eiligible countries. 17778func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { 17779 c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17780 return c 17781} 17782 17783// Fields allows partial responses to be retrieved. See 17784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17785// for more information. 17786func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { 17787 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17788 return c 17789} 17790 17791// IfNoneMatch sets the optional parameter which makes the operation 17792// fail if the object's ETag matches the given value. This is useful for 17793// getting updates only after the object has changed since the last 17794// request. Use googleapi.IsNotModified to check whether the response 17795// error from Do is the result of In-None-Match. 17796func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { 17797 c.ifNoneMatch_ = entityTag 17798 return c 17799} 17800 17801// Context sets the context to be used in this call's Do method. Any 17802// pending HTTP request will be aborted if the provided context is 17803// canceled. 17804func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { 17805 c.ctx_ = ctx 17806 return c 17807} 17808 17809// Header returns an http.Header that can be modified by the caller to 17810// add HTTP headers to the request. 17811func (c *LiasettingsListposdataprovidersCall) Header() http.Header { 17812 if c.header_ == nil { 17813 c.header_ = make(http.Header) 17814 } 17815 return c.header_ 17816} 17817 17818func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { 17819 reqHeaders := make(http.Header) 17820 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17821 for k, v := range c.header_ { 17822 reqHeaders[k] = v 17823 } 17824 reqHeaders.Set("User-Agent", c.s.userAgent()) 17825 if c.ifNoneMatch_ != "" { 17826 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17827 } 17828 var body io.Reader = nil 17829 c.urlParams_.Set("alt", alt) 17830 c.urlParams_.Set("prettyPrint", "false") 17831 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") 17832 urls += "?" + c.urlParams_.Encode() 17833 req, err := http.NewRequest("GET", urls, body) 17834 if err != nil { 17835 return nil, err 17836 } 17837 req.Header = reqHeaders 17838 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17839} 17840 17841// Do executes the "content.liasettings.listposdataproviders" call. 17842// Exactly one of *LiasettingsListPosDataProvidersResponse or error will 17843// be non-nil. Any non-2xx status code is an error. Response headers are 17844// in either 17845// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if 17846// a response was returned at all) in error.(*googleapi.Error).Header. 17847// Use googleapi.IsNotModified to check whether the returned error was 17848// because http.StatusNotModified was returned. 17849func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { 17850 gensupport.SetOptions(c.urlParams_, opts...) 17851 res, err := c.doRequest("json") 17852 if res != nil && res.StatusCode == http.StatusNotModified { 17853 if res.Body != nil { 17854 res.Body.Close() 17855 } 17856 return nil, &googleapi.Error{ 17857 Code: res.StatusCode, 17858 Header: res.Header, 17859 } 17860 } 17861 if err != nil { 17862 return nil, err 17863 } 17864 defer googleapi.CloseBody(res) 17865 if err := googleapi.CheckResponse(res); err != nil { 17866 return nil, err 17867 } 17868 ret := &LiasettingsListPosDataProvidersResponse{ 17869 ServerResponse: googleapi.ServerResponse{ 17870 Header: res.Header, 17871 HTTPStatusCode: res.StatusCode, 17872 }, 17873 } 17874 target := &ret 17875 if err := gensupport.DecodeResponse(target, res); err != nil { 17876 return nil, err 17877 } 17878 return ret, nil 17879 // { 17880 // "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.", 17881 // "httpMethod": "GET", 17882 // "id": "content.liasettings.listposdataproviders", 17883 // "path": "liasettings/posdataproviders", 17884 // "response": { 17885 // "$ref": "LiasettingsListPosDataProvidersResponse" 17886 // }, 17887 // "scopes": [ 17888 // "https://www.googleapis.com/auth/content" 17889 // ] 17890 // } 17891 17892} 17893 17894// method id "content.liasettings.requestgmbaccess": 17895 17896type LiasettingsRequestgmbaccessCall struct { 17897 s *APIService 17898 merchantId uint64 17899 accountId uint64 17900 urlParams_ gensupport.URLParams 17901 ctx_ context.Context 17902 header_ http.Header 17903} 17904 17905// Requestgmbaccess: Requests access to a specified Google My Business 17906// account. 17907func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { 17908 c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17909 c.merchantId = merchantId 17910 c.accountId = accountId 17911 c.urlParams_.Set("gmbEmail", gmbEmail) 17912 return c 17913} 17914 17915// Fields allows partial responses to be retrieved. See 17916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17917// for more information. 17918func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { 17919 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17920 return c 17921} 17922 17923// Context sets the context to be used in this call's Do method. Any 17924// pending HTTP request will be aborted if the provided context is 17925// canceled. 17926func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { 17927 c.ctx_ = ctx 17928 return c 17929} 17930 17931// Header returns an http.Header that can be modified by the caller to 17932// add HTTP headers to the request. 17933func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { 17934 if c.header_ == nil { 17935 c.header_ = make(http.Header) 17936 } 17937 return c.header_ 17938} 17939 17940func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { 17941 reqHeaders := make(http.Header) 17942 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17943 for k, v := range c.header_ { 17944 reqHeaders[k] = v 17945 } 17946 reqHeaders.Set("User-Agent", c.s.userAgent()) 17947 var body io.Reader = nil 17948 c.urlParams_.Set("alt", alt) 17949 c.urlParams_.Set("prettyPrint", "false") 17950 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") 17951 urls += "?" + c.urlParams_.Encode() 17952 req, err := http.NewRequest("POST", urls, body) 17953 if err != nil { 17954 return nil, err 17955 } 17956 req.Header = reqHeaders 17957 googleapi.Expand(req.URL, map[string]string{ 17958 "merchantId": strconv.FormatUint(c.merchantId, 10), 17959 "accountId": strconv.FormatUint(c.accountId, 10), 17960 }) 17961 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17962} 17963 17964// Do executes the "content.liasettings.requestgmbaccess" call. 17965// Exactly one of *LiasettingsRequestGmbAccessResponse or error will be 17966// non-nil. Any non-2xx status code is an error. Response headers are in 17967// either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or 17968// (if a response was returned at all) in 17969// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17970// whether the returned error was because http.StatusNotModified was 17971// returned. 17972func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { 17973 gensupport.SetOptions(c.urlParams_, opts...) 17974 res, err := c.doRequest("json") 17975 if res != nil && res.StatusCode == http.StatusNotModified { 17976 if res.Body != nil { 17977 res.Body.Close() 17978 } 17979 return nil, &googleapi.Error{ 17980 Code: res.StatusCode, 17981 Header: res.Header, 17982 } 17983 } 17984 if err != nil { 17985 return nil, err 17986 } 17987 defer googleapi.CloseBody(res) 17988 if err := googleapi.CheckResponse(res); err != nil { 17989 return nil, err 17990 } 17991 ret := &LiasettingsRequestGmbAccessResponse{ 17992 ServerResponse: googleapi.ServerResponse{ 17993 Header: res.Header, 17994 HTTPStatusCode: res.StatusCode, 17995 }, 17996 } 17997 target := &ret 17998 if err := gensupport.DecodeResponse(target, res); err != nil { 17999 return nil, err 18000 } 18001 return ret, nil 18002 // { 18003 // "description": "Requests access to a specified Google My Business account.", 18004 // "httpMethod": "POST", 18005 // "id": "content.liasettings.requestgmbaccess", 18006 // "parameterOrder": [ 18007 // "merchantId", 18008 // "accountId", 18009 // "gmbEmail" 18010 // ], 18011 // "parameters": { 18012 // "accountId": { 18013 // "description": "The ID of the account for which GMB access is requested.", 18014 // "format": "uint64", 18015 // "location": "path", 18016 // "required": true, 18017 // "type": "string" 18018 // }, 18019 // "gmbEmail": { 18020 // "description": "The email of the Google My Business account.", 18021 // "location": "query", 18022 // "required": true, 18023 // "type": "string" 18024 // }, 18025 // "merchantId": { 18026 // "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.", 18027 // "format": "uint64", 18028 // "location": "path", 18029 // "required": true, 18030 // "type": "string" 18031 // } 18032 // }, 18033 // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 18034 // "response": { 18035 // "$ref": "LiasettingsRequestGmbAccessResponse" 18036 // }, 18037 // "scopes": [ 18038 // "https://www.googleapis.com/auth/content" 18039 // ] 18040 // } 18041 18042} 18043 18044// method id "content.liasettings.requestinventoryverification": 18045 18046type LiasettingsRequestinventoryverificationCall struct { 18047 s *APIService 18048 merchantId uint64 18049 accountId uint64 18050 country string 18051 urlParams_ gensupport.URLParams 18052 ctx_ context.Context 18053 header_ http.Header 18054} 18055 18056// Requestinventoryverification: Requests inventory validation for the 18057// specified country. 18058func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { 18059 c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18060 c.merchantId = merchantId 18061 c.accountId = accountId 18062 c.country = country 18063 return c 18064} 18065 18066// Fields allows partial responses to be retrieved. See 18067// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18068// for more information. 18069func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 18070 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18071 return c 18072} 18073 18074// Context sets the context to be used in this call's Do method. Any 18075// pending HTTP request will be aborted if the provided context is 18076// canceled. 18077func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { 18078 c.ctx_ = ctx 18079 return c 18080} 18081 18082// Header returns an http.Header that can be modified by the caller to 18083// add HTTP headers to the request. 18084func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { 18085 if c.header_ == nil { 18086 c.header_ = make(http.Header) 18087 } 18088 return c.header_ 18089} 18090 18091func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { 18092 reqHeaders := make(http.Header) 18093 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18094 for k, v := range c.header_ { 18095 reqHeaders[k] = v 18096 } 18097 reqHeaders.Set("User-Agent", c.s.userAgent()) 18098 var body io.Reader = nil 18099 c.urlParams_.Set("alt", alt) 18100 c.urlParams_.Set("prettyPrint", "false") 18101 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") 18102 urls += "?" + c.urlParams_.Encode() 18103 req, err := http.NewRequest("POST", urls, body) 18104 if err != nil { 18105 return nil, err 18106 } 18107 req.Header = reqHeaders 18108 googleapi.Expand(req.URL, map[string]string{ 18109 "merchantId": strconv.FormatUint(c.merchantId, 10), 18110 "accountId": strconv.FormatUint(c.accountId, 10), 18111 "country": c.country, 18112 }) 18113 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18114} 18115 18116// Do executes the "content.liasettings.requestinventoryverification" call. 18117// Exactly one of *LiasettingsRequestInventoryVerificationResponse or 18118// error will be non-nil. Any non-2xx status code is an error. Response 18119// headers are in either 18120// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header 18121// or (if a response was returned at all) in 18122// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18123// whether the returned error was because http.StatusNotModified was 18124// returned. 18125func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { 18126 gensupport.SetOptions(c.urlParams_, opts...) 18127 res, err := c.doRequest("json") 18128 if res != nil && res.StatusCode == http.StatusNotModified { 18129 if res.Body != nil { 18130 res.Body.Close() 18131 } 18132 return nil, &googleapi.Error{ 18133 Code: res.StatusCode, 18134 Header: res.Header, 18135 } 18136 } 18137 if err != nil { 18138 return nil, err 18139 } 18140 defer googleapi.CloseBody(res) 18141 if err := googleapi.CheckResponse(res); err != nil { 18142 return nil, err 18143 } 18144 ret := &LiasettingsRequestInventoryVerificationResponse{ 18145 ServerResponse: googleapi.ServerResponse{ 18146 Header: res.Header, 18147 HTTPStatusCode: res.StatusCode, 18148 }, 18149 } 18150 target := &ret 18151 if err := gensupport.DecodeResponse(target, res); err != nil { 18152 return nil, err 18153 } 18154 return ret, nil 18155 // { 18156 // "description": "Requests inventory validation for the specified country.", 18157 // "httpMethod": "POST", 18158 // "id": "content.liasettings.requestinventoryverification", 18159 // "parameterOrder": [ 18160 // "merchantId", 18161 // "accountId", 18162 // "country" 18163 // ], 18164 // "parameters": { 18165 // "accountId": { 18166 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18167 // "format": "uint64", 18168 // "location": "path", 18169 // "required": true, 18170 // "type": "string" 18171 // }, 18172 // "country": { 18173 // "description": "The country for which inventory validation is requested.", 18174 // "location": "path", 18175 // "required": true, 18176 // "type": "string" 18177 // }, 18178 // "merchantId": { 18179 // "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.", 18180 // "format": "uint64", 18181 // "location": "path", 18182 // "required": true, 18183 // "type": "string" 18184 // } 18185 // }, 18186 // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 18187 // "response": { 18188 // "$ref": "LiasettingsRequestInventoryVerificationResponse" 18189 // }, 18190 // "scopes": [ 18191 // "https://www.googleapis.com/auth/content" 18192 // ] 18193 // } 18194 18195} 18196 18197// method id "content.liasettings.setinventoryverificationcontact": 18198 18199type LiasettingsSetinventoryverificationcontactCall struct { 18200 s *APIService 18201 merchantId uint64 18202 accountId uint64 18203 urlParams_ gensupport.URLParams 18204 ctx_ context.Context 18205 header_ http.Header 18206} 18207 18208// Setinventoryverificationcontact: Sets the inventory verification 18209// contract for the specified country. 18210func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, contactEmail string, contactName string, country string, language string) *LiasettingsSetinventoryverificationcontactCall { 18211 c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18212 c.merchantId = merchantId 18213 c.accountId = accountId 18214 c.urlParams_.Set("contactEmail", contactEmail) 18215 c.urlParams_.Set("contactName", contactName) 18216 c.urlParams_.Set("country", country) 18217 c.urlParams_.Set("language", language) 18218 return c 18219} 18220 18221// Fields allows partial responses to be retrieved. See 18222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18223// for more information. 18224func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { 18225 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18226 return c 18227} 18228 18229// Context sets the context to be used in this call's Do method. Any 18230// pending HTTP request will be aborted if the provided context is 18231// canceled. 18232func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { 18233 c.ctx_ = ctx 18234 return c 18235} 18236 18237// Header returns an http.Header that can be modified by the caller to 18238// add HTTP headers to the request. 18239func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { 18240 if c.header_ == nil { 18241 c.header_ = make(http.Header) 18242 } 18243 return c.header_ 18244} 18245 18246func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { 18247 reqHeaders := make(http.Header) 18248 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 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 c.urlParams_.Set("alt", alt) 18255 c.urlParams_.Set("prettyPrint", "false") 18256 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") 18257 urls += "?" + c.urlParams_.Encode() 18258 req, err := http.NewRequest("POST", urls, body) 18259 if err != nil { 18260 return nil, err 18261 } 18262 req.Header = reqHeaders 18263 googleapi.Expand(req.URL, map[string]string{ 18264 "merchantId": strconv.FormatUint(c.merchantId, 10), 18265 "accountId": strconv.FormatUint(c.accountId, 10), 18266 }) 18267 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18268} 18269 18270// Do executes the "content.liasettings.setinventoryverificationcontact" call. 18271// Exactly one of *LiasettingsSetInventoryVerificationContactResponse or 18272// error will be non-nil. Any non-2xx status code is an error. Response 18273// headers are in either 18274// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea 18275// der or (if a response was returned at all) in 18276// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18277// whether the returned error was because http.StatusNotModified was 18278// returned. 18279func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { 18280 gensupport.SetOptions(c.urlParams_, opts...) 18281 res, err := c.doRequest("json") 18282 if res != nil && res.StatusCode == http.StatusNotModified { 18283 if res.Body != nil { 18284 res.Body.Close() 18285 } 18286 return nil, &googleapi.Error{ 18287 Code: res.StatusCode, 18288 Header: res.Header, 18289 } 18290 } 18291 if err != nil { 18292 return nil, err 18293 } 18294 defer googleapi.CloseBody(res) 18295 if err := googleapi.CheckResponse(res); err != nil { 18296 return nil, err 18297 } 18298 ret := &LiasettingsSetInventoryVerificationContactResponse{ 18299 ServerResponse: googleapi.ServerResponse{ 18300 Header: res.Header, 18301 HTTPStatusCode: res.StatusCode, 18302 }, 18303 } 18304 target := &ret 18305 if err := gensupport.DecodeResponse(target, res); err != nil { 18306 return nil, err 18307 } 18308 return ret, nil 18309 // { 18310 // "description": "Sets the inventory verification contract for the specified country.", 18311 // "httpMethod": "POST", 18312 // "id": "content.liasettings.setinventoryverificationcontact", 18313 // "parameterOrder": [ 18314 // "merchantId", 18315 // "accountId", 18316 // "contactEmail", 18317 // "contactName", 18318 // "country", 18319 // "language" 18320 // ], 18321 // "parameters": { 18322 // "accountId": { 18323 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18324 // "format": "uint64", 18325 // "location": "path", 18326 // "required": true, 18327 // "type": "string" 18328 // }, 18329 // "contactEmail": { 18330 // "description": "The email of the inventory verification contact.", 18331 // "location": "query", 18332 // "required": true, 18333 // "type": "string" 18334 // }, 18335 // "contactName": { 18336 // "description": "The name of the inventory verification contact.", 18337 // "location": "query", 18338 // "required": true, 18339 // "type": "string" 18340 // }, 18341 // "country": { 18342 // "description": "The country for which inventory verification is requested.", 18343 // "location": "query", 18344 // "required": true, 18345 // "type": "string" 18346 // }, 18347 // "language": { 18348 // "description": "The language for which inventory verification is requested.", 18349 // "location": "query", 18350 // "required": true, 18351 // "type": "string" 18352 // }, 18353 // "merchantId": { 18354 // "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.", 18355 // "format": "uint64", 18356 // "location": "path", 18357 // "required": true, 18358 // "type": "string" 18359 // } 18360 // }, 18361 // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 18362 // "response": { 18363 // "$ref": "LiasettingsSetInventoryVerificationContactResponse" 18364 // }, 18365 // "scopes": [ 18366 // "https://www.googleapis.com/auth/content" 18367 // ] 18368 // } 18369 18370} 18371 18372// method id "content.liasettings.setposdataprovider": 18373 18374type LiasettingsSetposdataproviderCall struct { 18375 s *APIService 18376 merchantId uint64 18377 accountId uint64 18378 urlParams_ gensupport.URLParams 18379 ctx_ context.Context 18380 header_ http.Header 18381} 18382 18383// Setposdataprovider: Sets the POS data provider for the specified 18384// country. 18385func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { 18386 c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18387 c.merchantId = merchantId 18388 c.accountId = accountId 18389 c.urlParams_.Set("country", country) 18390 return c 18391} 18392 18393// PosDataProviderId sets the optional parameter "posDataProviderId": 18394// The ID of POS data provider. 18395func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { 18396 c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) 18397 return c 18398} 18399 18400// PosExternalAccountId sets the optional parameter 18401// "posExternalAccountId": The account ID by which this merchant is 18402// known to the POS data provider. 18403func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { 18404 c.urlParams_.Set("posExternalAccountId", posExternalAccountId) 18405 return c 18406} 18407 18408// Fields allows partial responses to be retrieved. See 18409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18410// for more information. 18411func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { 18412 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18413 return c 18414} 18415 18416// Context sets the context to be used in this call's Do method. Any 18417// pending HTTP request will be aborted if the provided context is 18418// canceled. 18419func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { 18420 c.ctx_ = ctx 18421 return c 18422} 18423 18424// Header returns an http.Header that can be modified by the caller to 18425// add HTTP headers to the request. 18426func (c *LiasettingsSetposdataproviderCall) Header() http.Header { 18427 if c.header_ == nil { 18428 c.header_ = make(http.Header) 18429 } 18430 return c.header_ 18431} 18432 18433func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { 18434 reqHeaders := make(http.Header) 18435 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18436 for k, v := range c.header_ { 18437 reqHeaders[k] = v 18438 } 18439 reqHeaders.Set("User-Agent", c.s.userAgent()) 18440 var body io.Reader = nil 18441 c.urlParams_.Set("alt", alt) 18442 c.urlParams_.Set("prettyPrint", "false") 18443 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") 18444 urls += "?" + c.urlParams_.Encode() 18445 req, err := http.NewRequest("POST", urls, body) 18446 if err != nil { 18447 return nil, err 18448 } 18449 req.Header = reqHeaders 18450 googleapi.Expand(req.URL, map[string]string{ 18451 "merchantId": strconv.FormatUint(c.merchantId, 10), 18452 "accountId": strconv.FormatUint(c.accountId, 10), 18453 }) 18454 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18455} 18456 18457// Do executes the "content.liasettings.setposdataprovider" call. 18458// Exactly one of *LiasettingsSetPosDataProviderResponse or error will 18459// be non-nil. Any non-2xx status code is an error. Response headers are 18460// in either 18461// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a 18462// response was returned at all) in error.(*googleapi.Error).Header. Use 18463// googleapi.IsNotModified to check whether the returned error was 18464// because http.StatusNotModified was returned. 18465func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { 18466 gensupport.SetOptions(c.urlParams_, opts...) 18467 res, err := c.doRequest("json") 18468 if res != nil && res.StatusCode == http.StatusNotModified { 18469 if res.Body != nil { 18470 res.Body.Close() 18471 } 18472 return nil, &googleapi.Error{ 18473 Code: res.StatusCode, 18474 Header: res.Header, 18475 } 18476 } 18477 if err != nil { 18478 return nil, err 18479 } 18480 defer googleapi.CloseBody(res) 18481 if err := googleapi.CheckResponse(res); err != nil { 18482 return nil, err 18483 } 18484 ret := &LiasettingsSetPosDataProviderResponse{ 18485 ServerResponse: googleapi.ServerResponse{ 18486 Header: res.Header, 18487 HTTPStatusCode: res.StatusCode, 18488 }, 18489 } 18490 target := &ret 18491 if err := gensupport.DecodeResponse(target, res); err != nil { 18492 return nil, err 18493 } 18494 return ret, nil 18495 // { 18496 // "description": "Sets the POS data provider for the specified country.", 18497 // "httpMethod": "POST", 18498 // "id": "content.liasettings.setposdataprovider", 18499 // "parameterOrder": [ 18500 // "merchantId", 18501 // "accountId", 18502 // "country" 18503 // ], 18504 // "parameters": { 18505 // "accountId": { 18506 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 18507 // "format": "uint64", 18508 // "location": "path", 18509 // "required": true, 18510 // "type": "string" 18511 // }, 18512 // "country": { 18513 // "description": "The country for which the POS data provider is selected.", 18514 // "location": "query", 18515 // "required": true, 18516 // "type": "string" 18517 // }, 18518 // "merchantId": { 18519 // "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.", 18520 // "format": "uint64", 18521 // "location": "path", 18522 // "required": true, 18523 // "type": "string" 18524 // }, 18525 // "posDataProviderId": { 18526 // "description": "The ID of POS data provider.", 18527 // "format": "uint64", 18528 // "location": "query", 18529 // "type": "string" 18530 // }, 18531 // "posExternalAccountId": { 18532 // "description": "The account ID by which this merchant is known to the POS data provider.", 18533 // "location": "query", 18534 // "type": "string" 18535 // } 18536 // }, 18537 // "path": "{merchantId}/liasettings/{accountId}/setposdataprovider", 18538 // "response": { 18539 // "$ref": "LiasettingsSetPosDataProviderResponse" 18540 // }, 18541 // "scopes": [ 18542 // "https://www.googleapis.com/auth/content" 18543 // ] 18544 // } 18545 18546} 18547 18548// method id "content.liasettings.update": 18549 18550type LiasettingsUpdateCall struct { 18551 s *APIService 18552 merchantId uint64 18553 accountId uint64 18554 liasettings *LiaSettings 18555 urlParams_ gensupport.URLParams 18556 ctx_ context.Context 18557 header_ http.Header 18558} 18559 18560// Update: Updates the LIA settings of the account. 18561func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { 18562 c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18563 c.merchantId = merchantId 18564 c.accountId = accountId 18565 c.liasettings = liasettings 18566 return c 18567} 18568 18569// DryRun sets the optional parameter "dryRun": Flag to simulate a 18570// request like in a live environment. If set to true, dry-run mode 18571// checks the validity of the request and returns errors (if any). 18572func (c *LiasettingsUpdateCall) DryRun(dryRun bool) *LiasettingsUpdateCall { 18573 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18574 return c 18575} 18576 18577// Fields allows partial responses to be retrieved. See 18578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18579// for more information. 18580func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { 18581 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18582 return c 18583} 18584 18585// Context sets the context to be used in this call's Do method. Any 18586// pending HTTP request will be aborted if the provided context is 18587// canceled. 18588func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { 18589 c.ctx_ = ctx 18590 return c 18591} 18592 18593// Header returns an http.Header that can be modified by the caller to 18594// add HTTP headers to the request. 18595func (c *LiasettingsUpdateCall) Header() http.Header { 18596 if c.header_ == nil { 18597 c.header_ = make(http.Header) 18598 } 18599 return c.header_ 18600} 18601 18602func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 18603 reqHeaders := make(http.Header) 18604 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18605 for k, v := range c.header_ { 18606 reqHeaders[k] = v 18607 } 18608 reqHeaders.Set("User-Agent", c.s.userAgent()) 18609 var body io.Reader = nil 18610 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) 18611 if err != nil { 18612 return nil, err 18613 } 18614 reqHeaders.Set("Content-Type", "application/json") 18615 c.urlParams_.Set("alt", alt) 18616 c.urlParams_.Set("prettyPrint", "false") 18617 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 18618 urls += "?" + c.urlParams_.Encode() 18619 req, err := http.NewRequest("PUT", urls, body) 18620 if err != nil { 18621 return nil, err 18622 } 18623 req.Header = reqHeaders 18624 googleapi.Expand(req.URL, map[string]string{ 18625 "merchantId": strconv.FormatUint(c.merchantId, 10), 18626 "accountId": strconv.FormatUint(c.accountId, 10), 18627 }) 18628 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18629} 18630 18631// Do executes the "content.liasettings.update" call. 18632// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 18633// status code is an error. Response headers are in either 18634// *LiaSettings.ServerResponse.Header or (if a response was returned at 18635// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18636// to check whether the returned error was because 18637// http.StatusNotModified was returned. 18638func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 18639 gensupport.SetOptions(c.urlParams_, opts...) 18640 res, err := c.doRequest("json") 18641 if res != nil && res.StatusCode == http.StatusNotModified { 18642 if res.Body != nil { 18643 res.Body.Close() 18644 } 18645 return nil, &googleapi.Error{ 18646 Code: res.StatusCode, 18647 Header: res.Header, 18648 } 18649 } 18650 if err != nil { 18651 return nil, err 18652 } 18653 defer googleapi.CloseBody(res) 18654 if err := googleapi.CheckResponse(res); err != nil { 18655 return nil, err 18656 } 18657 ret := &LiaSettings{ 18658 ServerResponse: googleapi.ServerResponse{ 18659 Header: res.Header, 18660 HTTPStatusCode: res.StatusCode, 18661 }, 18662 } 18663 target := &ret 18664 if err := gensupport.DecodeResponse(target, res); err != nil { 18665 return nil, err 18666 } 18667 return ret, nil 18668 // { 18669 // "description": "Updates the LIA settings of the account.", 18670 // "httpMethod": "PUT", 18671 // "id": "content.liasettings.update", 18672 // "parameterOrder": [ 18673 // "merchantId", 18674 // "accountId" 18675 // ], 18676 // "parameters": { 18677 // "accountId": { 18678 // "description": "The ID of the account for which to get or update LIA settings.", 18679 // "format": "uint64", 18680 // "location": "path", 18681 // "required": true, 18682 // "type": "string" 18683 // }, 18684 // "dryRun": { 18685 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 18686 // "location": "query", 18687 // "type": "boolean" 18688 // }, 18689 // "merchantId": { 18690 // "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.", 18691 // "format": "uint64", 18692 // "location": "path", 18693 // "required": true, 18694 // "type": "string" 18695 // } 18696 // }, 18697 // "path": "{merchantId}/liasettings/{accountId}", 18698 // "request": { 18699 // "$ref": "LiaSettings" 18700 // }, 18701 // "response": { 18702 // "$ref": "LiaSettings" 18703 // }, 18704 // "scopes": [ 18705 // "https://www.googleapis.com/auth/content" 18706 // ] 18707 // } 18708 18709} 18710 18711// method id "content.orderinvoices.createchargeinvoice": 18712 18713type OrderinvoicesCreatechargeinvoiceCall struct { 18714 s *APIService 18715 merchantId uint64 18716 orderId string 18717 orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest 18718 urlParams_ gensupport.URLParams 18719 ctx_ context.Context 18720 header_ http.Header 18721} 18722 18723// Createchargeinvoice: Creates a charge invoice for a shipment group, 18724// and triggers a charge capture for orderinvoice enabled orders. 18725func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { 18726 c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18727 c.merchantId = merchantId 18728 c.orderId = orderId 18729 c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest 18730 return c 18731} 18732 18733// Fields allows partial responses to be retrieved. See 18734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18735// for more information. 18736func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { 18737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18738 return c 18739} 18740 18741// Context sets the context to be used in this call's Do method. Any 18742// pending HTTP request will be aborted if the provided context is 18743// canceled. 18744func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { 18745 c.ctx_ = ctx 18746 return c 18747} 18748 18749// Header returns an http.Header that can be modified by the caller to 18750// add HTTP headers to the request. 18751func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { 18752 if c.header_ == nil { 18753 c.header_ = make(http.Header) 18754 } 18755 return c.header_ 18756} 18757 18758func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) { 18759 reqHeaders := make(http.Header) 18760 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18761 for k, v := range c.header_ { 18762 reqHeaders[k] = v 18763 } 18764 reqHeaders.Set("User-Agent", c.s.userAgent()) 18765 var body io.Reader = nil 18766 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest) 18767 if err != nil { 18768 return nil, err 18769 } 18770 reqHeaders.Set("Content-Type", "application/json") 18771 c.urlParams_.Set("alt", alt) 18772 c.urlParams_.Set("prettyPrint", "false") 18773 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") 18774 urls += "?" + c.urlParams_.Encode() 18775 req, err := http.NewRequest("POST", urls, body) 18776 if err != nil { 18777 return nil, err 18778 } 18779 req.Header = reqHeaders 18780 googleapi.Expand(req.URL, map[string]string{ 18781 "merchantId": strconv.FormatUint(c.merchantId, 10), 18782 "orderId": c.orderId, 18783 }) 18784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18785} 18786 18787// Do executes the "content.orderinvoices.createchargeinvoice" call. 18788// Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error 18789// will be non-nil. Any non-2xx status code is an error. Response 18790// headers are in either 18791// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or 18792// (if a response was returned at all) in 18793// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18794// whether the returned error was because http.StatusNotModified was 18795// returned. 18796func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { 18797 gensupport.SetOptions(c.urlParams_, opts...) 18798 res, err := c.doRequest("json") 18799 if res != nil && res.StatusCode == http.StatusNotModified { 18800 if res.Body != nil { 18801 res.Body.Close() 18802 } 18803 return nil, &googleapi.Error{ 18804 Code: res.StatusCode, 18805 Header: res.Header, 18806 } 18807 } 18808 if err != nil { 18809 return nil, err 18810 } 18811 defer googleapi.CloseBody(res) 18812 if err := googleapi.CheckResponse(res); err != nil { 18813 return nil, err 18814 } 18815 ret := &OrderinvoicesCreateChargeInvoiceResponse{ 18816 ServerResponse: googleapi.ServerResponse{ 18817 Header: res.Header, 18818 HTTPStatusCode: res.StatusCode, 18819 }, 18820 } 18821 target := &ret 18822 if err := gensupport.DecodeResponse(target, res); err != nil { 18823 return nil, err 18824 } 18825 return ret, nil 18826 // { 18827 // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", 18828 // "httpMethod": "POST", 18829 // "id": "content.orderinvoices.createchargeinvoice", 18830 // "parameterOrder": [ 18831 // "merchantId", 18832 // "orderId" 18833 // ], 18834 // "parameters": { 18835 // "merchantId": { 18836 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18837 // "format": "uint64", 18838 // "location": "path", 18839 // "required": true, 18840 // "type": "string" 18841 // }, 18842 // "orderId": { 18843 // "description": "The ID of the order.", 18844 // "location": "path", 18845 // "required": true, 18846 // "type": "string" 18847 // } 18848 // }, 18849 // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 18850 // "request": { 18851 // "$ref": "OrderinvoicesCreateChargeInvoiceRequest" 18852 // }, 18853 // "response": { 18854 // "$ref": "OrderinvoicesCreateChargeInvoiceResponse" 18855 // }, 18856 // "scopes": [ 18857 // "https://www.googleapis.com/auth/content" 18858 // ] 18859 // } 18860 18861} 18862 18863// method id "content.orderinvoices.createrefundinvoice": 18864 18865type OrderinvoicesCreaterefundinvoiceCall struct { 18866 s *APIService 18867 merchantId uint64 18868 orderId string 18869 orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest 18870 urlParams_ gensupport.URLParams 18871 ctx_ context.Context 18872 header_ http.Header 18873} 18874 18875// Createrefundinvoice: Creates a refund invoice for one or more 18876// shipment groups, and triggers a refund for orderinvoice enabled 18877// orders. This can only be used for line items that have previously 18878// been charged using `createChargeInvoice`. All amounts (except for the 18879// summary) are incremental with respect to the previous invoice. 18880func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { 18881 c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18882 c.merchantId = merchantId 18883 c.orderId = orderId 18884 c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest 18885 return c 18886} 18887 18888// Fields allows partial responses to be retrieved. See 18889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18890// for more information. 18891func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { 18892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18893 return c 18894} 18895 18896// Context sets the context to be used in this call's Do method. Any 18897// pending HTTP request will be aborted if the provided context is 18898// canceled. 18899func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { 18900 c.ctx_ = ctx 18901 return c 18902} 18903 18904// Header returns an http.Header that can be modified by the caller to 18905// add HTTP headers to the request. 18906func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { 18907 if c.header_ == nil { 18908 c.header_ = make(http.Header) 18909 } 18910 return c.header_ 18911} 18912 18913func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { 18914 reqHeaders := make(http.Header) 18915 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18916 for k, v := range c.header_ { 18917 reqHeaders[k] = v 18918 } 18919 reqHeaders.Set("User-Agent", c.s.userAgent()) 18920 var body io.Reader = nil 18921 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) 18922 if err != nil { 18923 return nil, err 18924 } 18925 reqHeaders.Set("Content-Type", "application/json") 18926 c.urlParams_.Set("alt", alt) 18927 c.urlParams_.Set("prettyPrint", "false") 18928 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") 18929 urls += "?" + c.urlParams_.Encode() 18930 req, err := http.NewRequest("POST", urls, body) 18931 if err != nil { 18932 return nil, err 18933 } 18934 req.Header = reqHeaders 18935 googleapi.Expand(req.URL, map[string]string{ 18936 "merchantId": strconv.FormatUint(c.merchantId, 10), 18937 "orderId": c.orderId, 18938 }) 18939 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18940} 18941 18942// Do executes the "content.orderinvoices.createrefundinvoice" call. 18943// Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error 18944// will be non-nil. Any non-2xx status code is an error. Response 18945// headers are in either 18946// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or 18947// (if a response was returned at all) in 18948// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18949// whether the returned error was because http.StatusNotModified was 18950// returned. 18951func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { 18952 gensupport.SetOptions(c.urlParams_, opts...) 18953 res, err := c.doRequest("json") 18954 if res != nil && res.StatusCode == http.StatusNotModified { 18955 if res.Body != nil { 18956 res.Body.Close() 18957 } 18958 return nil, &googleapi.Error{ 18959 Code: res.StatusCode, 18960 Header: res.Header, 18961 } 18962 } 18963 if err != nil { 18964 return nil, err 18965 } 18966 defer googleapi.CloseBody(res) 18967 if err := googleapi.CheckResponse(res); err != nil { 18968 return nil, err 18969 } 18970 ret := &OrderinvoicesCreateRefundInvoiceResponse{ 18971 ServerResponse: googleapi.ServerResponse{ 18972 Header: res.Header, 18973 HTTPStatusCode: res.StatusCode, 18974 }, 18975 } 18976 target := &ret 18977 if err := gensupport.DecodeResponse(target, res); err != nil { 18978 return nil, err 18979 } 18980 return ret, nil 18981 // { 18982 // "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.", 18983 // "httpMethod": "POST", 18984 // "id": "content.orderinvoices.createrefundinvoice", 18985 // "parameterOrder": [ 18986 // "merchantId", 18987 // "orderId" 18988 // ], 18989 // "parameters": { 18990 // "merchantId": { 18991 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18992 // "format": "uint64", 18993 // "location": "path", 18994 // "required": true, 18995 // "type": "string" 18996 // }, 18997 // "orderId": { 18998 // "description": "The ID of the order.", 18999 // "location": "path", 19000 // "required": true, 19001 // "type": "string" 19002 // } 19003 // }, 19004 // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 19005 // "request": { 19006 // "$ref": "OrderinvoicesCreateRefundInvoiceRequest" 19007 // }, 19008 // "response": { 19009 // "$ref": "OrderinvoicesCreateRefundInvoiceResponse" 19010 // }, 19011 // "scopes": [ 19012 // "https://www.googleapis.com/auth/content" 19013 // ] 19014 // } 19015 19016} 19017 19018// method id "content.orderreports.listdisbursements": 19019 19020type OrderreportsListdisbursementsCall struct { 19021 s *APIService 19022 merchantId uint64 19023 urlParams_ gensupport.URLParams 19024 ifNoneMatch_ string 19025 ctx_ context.Context 19026 header_ http.Header 19027} 19028 19029// Listdisbursements: Retrieves a report for disbursements from your 19030// Merchant Center account. 19031func (r *OrderreportsService) Listdisbursements(merchantId uint64, disbursementStartDate string) *OrderreportsListdisbursementsCall { 19032 c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19033 c.merchantId = merchantId 19034 c.urlParams_.Set("disbursementStartDate", disbursementStartDate) 19035 return c 19036} 19037 19038// DisbursementEndDate sets the optional parameter 19039// "disbursementEndDate": The last date which disbursements occurred. In 19040// ISO 8601 format. Default: current date. 19041func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall { 19042 c.urlParams_.Set("disbursementEndDate", disbursementEndDate) 19043 return c 19044} 19045 19046// MaxResults sets the optional parameter "maxResults": The maximum 19047// number of disbursements to return in the response, used for paging. 19048func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall { 19049 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19050 return c 19051} 19052 19053// PageToken sets the optional parameter "pageToken": The token returned 19054// by the previous request. 19055func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall { 19056 c.urlParams_.Set("pageToken", pageToken) 19057 return c 19058} 19059 19060// Fields allows partial responses to be retrieved. See 19061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19062// for more information. 19063func (c *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall { 19064 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19065 return c 19066} 19067 19068// IfNoneMatch sets the optional parameter which makes the operation 19069// fail if the object's ETag matches the given value. This is useful for 19070// getting updates only after the object has changed since the last 19071// request. Use googleapi.IsNotModified to check whether the response 19072// error from Do is the result of In-None-Match. 19073func (c *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall { 19074 c.ifNoneMatch_ = entityTag 19075 return c 19076} 19077 19078// Context sets the context to be used in this call's Do method. Any 19079// pending HTTP request will be aborted if the provided context is 19080// canceled. 19081func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall { 19082 c.ctx_ = ctx 19083 return c 19084} 19085 19086// Header returns an http.Header that can be modified by the caller to 19087// add HTTP headers to the request. 19088func (c *OrderreportsListdisbursementsCall) Header() http.Header { 19089 if c.header_ == nil { 19090 c.header_ = make(http.Header) 19091 } 19092 return c.header_ 19093} 19094 19095func (c *OrderreportsListdisbursementsCall) doRequest(alt string) (*http.Response, error) { 19096 reqHeaders := make(http.Header) 19097 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19098 for k, v := range c.header_ { 19099 reqHeaders[k] = v 19100 } 19101 reqHeaders.Set("User-Agent", c.s.userAgent()) 19102 if c.ifNoneMatch_ != "" { 19103 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19104 } 19105 var body io.Reader = nil 19106 c.urlParams_.Set("alt", alt) 19107 c.urlParams_.Set("prettyPrint", "false") 19108 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements") 19109 urls += "?" + c.urlParams_.Encode() 19110 req, err := http.NewRequest("GET", urls, body) 19111 if err != nil { 19112 return nil, err 19113 } 19114 req.Header = reqHeaders 19115 googleapi.Expand(req.URL, map[string]string{ 19116 "merchantId": strconv.FormatUint(c.merchantId, 10), 19117 }) 19118 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19119} 19120 19121// Do executes the "content.orderreports.listdisbursements" call. 19122// Exactly one of *OrderreportsListDisbursementsResponse or error will 19123// be non-nil. Any non-2xx status code is an error. Response headers are 19124// in either 19125// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a 19126// response was returned at all) in error.(*googleapi.Error).Header. Use 19127// googleapi.IsNotModified to check whether the returned error was 19128// because http.StatusNotModified was returned. 19129func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) { 19130 gensupport.SetOptions(c.urlParams_, opts...) 19131 res, err := c.doRequest("json") 19132 if res != nil && res.StatusCode == http.StatusNotModified { 19133 if res.Body != nil { 19134 res.Body.Close() 19135 } 19136 return nil, &googleapi.Error{ 19137 Code: res.StatusCode, 19138 Header: res.Header, 19139 } 19140 } 19141 if err != nil { 19142 return nil, err 19143 } 19144 defer googleapi.CloseBody(res) 19145 if err := googleapi.CheckResponse(res); err != nil { 19146 return nil, err 19147 } 19148 ret := &OrderreportsListDisbursementsResponse{ 19149 ServerResponse: googleapi.ServerResponse{ 19150 Header: res.Header, 19151 HTTPStatusCode: res.StatusCode, 19152 }, 19153 } 19154 target := &ret 19155 if err := gensupport.DecodeResponse(target, res); err != nil { 19156 return nil, err 19157 } 19158 return ret, nil 19159 // { 19160 // "description": "Retrieves a report for disbursements from your Merchant Center account.", 19161 // "httpMethod": "GET", 19162 // "id": "content.orderreports.listdisbursements", 19163 // "parameterOrder": [ 19164 // "merchantId", 19165 // "disbursementStartDate" 19166 // ], 19167 // "parameters": { 19168 // "disbursementEndDate": { 19169 // "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.", 19170 // "location": "query", 19171 // "type": "string" 19172 // }, 19173 // "disbursementStartDate": { 19174 // "description": "The first date which disbursements occurred. In ISO 8601 format.", 19175 // "location": "query", 19176 // "required": true, 19177 // "type": "string" 19178 // }, 19179 // "maxResults": { 19180 // "description": "The maximum number of disbursements to return in the response, used for paging.", 19181 // "format": "uint32", 19182 // "location": "query", 19183 // "type": "integer" 19184 // }, 19185 // "merchantId": { 19186 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19187 // "format": "uint64", 19188 // "location": "path", 19189 // "required": true, 19190 // "type": "string" 19191 // }, 19192 // "pageToken": { 19193 // "description": "The token returned by the previous request.", 19194 // "location": "query", 19195 // "type": "string" 19196 // } 19197 // }, 19198 // "path": "{merchantId}/orderreports/disbursements", 19199 // "response": { 19200 // "$ref": "OrderreportsListDisbursementsResponse" 19201 // }, 19202 // "scopes": [ 19203 // "https://www.googleapis.com/auth/content" 19204 // ] 19205 // } 19206 19207} 19208 19209// Pages invokes f for each page of results. 19210// A non-nil error returned from f will halt the iteration. 19211// The provided context supersedes any context provided to the Context method. 19212func (c *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) error) error { 19213 c.ctx_ = ctx 19214 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19215 for { 19216 x, err := c.Do() 19217 if err != nil { 19218 return err 19219 } 19220 if err := f(x); err != nil { 19221 return err 19222 } 19223 if x.NextPageToken == "" { 19224 return nil 19225 } 19226 c.PageToken(x.NextPageToken) 19227 } 19228} 19229 19230// method id "content.orderreports.listtransactions": 19231 19232type OrderreportsListtransactionsCall struct { 19233 s *APIService 19234 merchantId uint64 19235 disbursementId string 19236 urlParams_ gensupport.URLParams 19237 ifNoneMatch_ string 19238 ctx_ context.Context 19239 header_ http.Header 19240} 19241 19242// Listtransactions: Retrieves a list of transactions for a disbursement 19243// from your Merchant Center account. 19244func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string, transactionStartDate string) *OrderreportsListtransactionsCall { 19245 c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19246 c.merchantId = merchantId 19247 c.disbursementId = disbursementId 19248 c.urlParams_.Set("transactionStartDate", transactionStartDate) 19249 return c 19250} 19251 19252// MaxResults sets the optional parameter "maxResults": The maximum 19253// number of disbursements to return in the response, used for paging. 19254func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall { 19255 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19256 return c 19257} 19258 19259// PageToken sets the optional parameter "pageToken": The token returned 19260// by the previous request. 19261func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall { 19262 c.urlParams_.Set("pageToken", pageToken) 19263 return c 19264} 19265 19266// TransactionEndDate sets the optional parameter "transactionEndDate": 19267// The last date in which transaction occurred. In ISO 8601 format. 19268// Default: current date. 19269func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall { 19270 c.urlParams_.Set("transactionEndDate", transactionEndDate) 19271 return c 19272} 19273 19274// Fields allows partial responses to be retrieved. See 19275// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19276// for more information. 19277func (c *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall { 19278 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19279 return c 19280} 19281 19282// IfNoneMatch sets the optional parameter which makes the operation 19283// fail if the object's ETag matches the given value. This is useful for 19284// getting updates only after the object has changed since the last 19285// request. Use googleapi.IsNotModified to check whether the response 19286// error from Do is the result of In-None-Match. 19287func (c *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall { 19288 c.ifNoneMatch_ = entityTag 19289 return c 19290} 19291 19292// Context sets the context to be used in this call's Do method. Any 19293// pending HTTP request will be aborted if the provided context is 19294// canceled. 19295func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall { 19296 c.ctx_ = ctx 19297 return c 19298} 19299 19300// Header returns an http.Header that can be modified by the caller to 19301// add HTTP headers to the request. 19302func (c *OrderreportsListtransactionsCall) Header() http.Header { 19303 if c.header_ == nil { 19304 c.header_ = make(http.Header) 19305 } 19306 return c.header_ 19307} 19308 19309func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) { 19310 reqHeaders := make(http.Header) 19311 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19312 for k, v := range c.header_ { 19313 reqHeaders[k] = v 19314 } 19315 reqHeaders.Set("User-Agent", c.s.userAgent()) 19316 if c.ifNoneMatch_ != "" { 19317 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19318 } 19319 var body io.Reader = nil 19320 c.urlParams_.Set("alt", alt) 19321 c.urlParams_.Set("prettyPrint", "false") 19322 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions") 19323 urls += "?" + c.urlParams_.Encode() 19324 req, err := http.NewRequest("GET", urls, body) 19325 if err != nil { 19326 return nil, err 19327 } 19328 req.Header = reqHeaders 19329 googleapi.Expand(req.URL, map[string]string{ 19330 "merchantId": strconv.FormatUint(c.merchantId, 10), 19331 "disbursementId": c.disbursementId, 19332 }) 19333 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19334} 19335 19336// Do executes the "content.orderreports.listtransactions" call. 19337// Exactly one of *OrderreportsListTransactionsResponse or error will be 19338// non-nil. Any non-2xx status code is an error. Response headers are in 19339// either *OrderreportsListTransactionsResponse.ServerResponse.Header or 19340// (if a response was returned at all) in 19341// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19342// whether the returned error was because http.StatusNotModified was 19343// returned. 19344func (c *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) { 19345 gensupport.SetOptions(c.urlParams_, opts...) 19346 res, err := c.doRequest("json") 19347 if res != nil && res.StatusCode == http.StatusNotModified { 19348 if res.Body != nil { 19349 res.Body.Close() 19350 } 19351 return nil, &googleapi.Error{ 19352 Code: res.StatusCode, 19353 Header: res.Header, 19354 } 19355 } 19356 if err != nil { 19357 return nil, err 19358 } 19359 defer googleapi.CloseBody(res) 19360 if err := googleapi.CheckResponse(res); err != nil { 19361 return nil, err 19362 } 19363 ret := &OrderreportsListTransactionsResponse{ 19364 ServerResponse: googleapi.ServerResponse{ 19365 Header: res.Header, 19366 HTTPStatusCode: res.StatusCode, 19367 }, 19368 } 19369 target := &ret 19370 if err := gensupport.DecodeResponse(target, res); err != nil { 19371 return nil, err 19372 } 19373 return ret, nil 19374 // { 19375 // "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", 19376 // "httpMethod": "GET", 19377 // "id": "content.orderreports.listtransactions", 19378 // "parameterOrder": [ 19379 // "merchantId", 19380 // "disbursementId", 19381 // "transactionStartDate" 19382 // ], 19383 // "parameters": { 19384 // "disbursementId": { 19385 // "description": "The Google-provided ID of the disbursement (found in Wallet).", 19386 // "location": "path", 19387 // "required": true, 19388 // "type": "string" 19389 // }, 19390 // "maxResults": { 19391 // "description": "The maximum number of disbursements to return in the response, used for paging.", 19392 // "format": "uint32", 19393 // "location": "query", 19394 // "type": "integer" 19395 // }, 19396 // "merchantId": { 19397 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19398 // "format": "uint64", 19399 // "location": "path", 19400 // "required": true, 19401 // "type": "string" 19402 // }, 19403 // "pageToken": { 19404 // "description": "The token returned by the previous request.", 19405 // "location": "query", 19406 // "type": "string" 19407 // }, 19408 // "transactionEndDate": { 19409 // "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.", 19410 // "location": "query", 19411 // "type": "string" 19412 // }, 19413 // "transactionStartDate": { 19414 // "description": "The first date in which transaction occurred. In ISO 8601 format.", 19415 // "location": "query", 19416 // "required": true, 19417 // "type": "string" 19418 // } 19419 // }, 19420 // "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", 19421 // "response": { 19422 // "$ref": "OrderreportsListTransactionsResponse" 19423 // }, 19424 // "scopes": [ 19425 // "https://www.googleapis.com/auth/content" 19426 // ] 19427 // } 19428 19429} 19430 19431// Pages invokes f for each page of results. 19432// A non-nil error returned from f will halt the iteration. 19433// The provided context supersedes any context provided to the Context method. 19434func (c *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) error) error { 19435 c.ctx_ = ctx 19436 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19437 for { 19438 x, err := c.Do() 19439 if err != nil { 19440 return err 19441 } 19442 if err := f(x); err != nil { 19443 return err 19444 } 19445 if x.NextPageToken == "" { 19446 return nil 19447 } 19448 c.PageToken(x.NextPageToken) 19449 } 19450} 19451 19452// method id "content.orderreturns.get": 19453 19454type OrderreturnsGetCall struct { 19455 s *APIService 19456 merchantId uint64 19457 returnId string 19458 urlParams_ gensupport.URLParams 19459 ifNoneMatch_ string 19460 ctx_ context.Context 19461 header_ http.Header 19462} 19463 19464// Get: Retrieves an order return from your Merchant Center account. 19465func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { 19466 c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19467 c.merchantId = merchantId 19468 c.returnId = returnId 19469 return c 19470} 19471 19472// Fields allows partial responses to be retrieved. See 19473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19474// for more information. 19475func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { 19476 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19477 return c 19478} 19479 19480// IfNoneMatch sets the optional parameter which makes the operation 19481// fail if the object's ETag matches the given value. This is useful for 19482// getting updates only after the object has changed since the last 19483// request. Use googleapi.IsNotModified to check whether the response 19484// error from Do is the result of In-None-Match. 19485func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { 19486 c.ifNoneMatch_ = entityTag 19487 return c 19488} 19489 19490// Context sets the context to be used in this call's Do method. Any 19491// pending HTTP request will be aborted if the provided context is 19492// canceled. 19493func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { 19494 c.ctx_ = ctx 19495 return c 19496} 19497 19498// Header returns an http.Header that can be modified by the caller to 19499// add HTTP headers to the request. 19500func (c *OrderreturnsGetCall) Header() http.Header { 19501 if c.header_ == nil { 19502 c.header_ = make(http.Header) 19503 } 19504 return c.header_ 19505} 19506 19507func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) { 19508 reqHeaders := make(http.Header) 19509 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19510 for k, v := range c.header_ { 19511 reqHeaders[k] = v 19512 } 19513 reqHeaders.Set("User-Agent", c.s.userAgent()) 19514 if c.ifNoneMatch_ != "" { 19515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19516 } 19517 var body io.Reader = nil 19518 c.urlParams_.Set("alt", alt) 19519 c.urlParams_.Set("prettyPrint", "false") 19520 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") 19521 urls += "?" + c.urlParams_.Encode() 19522 req, err := http.NewRequest("GET", urls, body) 19523 if err != nil { 19524 return nil, err 19525 } 19526 req.Header = reqHeaders 19527 googleapi.Expand(req.URL, map[string]string{ 19528 "merchantId": strconv.FormatUint(c.merchantId, 10), 19529 "returnId": c.returnId, 19530 }) 19531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19532} 19533 19534// Do executes the "content.orderreturns.get" call. 19535// Exactly one of *MerchantOrderReturn or error will be non-nil. Any 19536// non-2xx status code is an error. Response headers are in either 19537// *MerchantOrderReturn.ServerResponse.Header or (if a response was 19538// returned at all) in error.(*googleapi.Error).Header. Use 19539// googleapi.IsNotModified to check whether the returned error was 19540// because http.StatusNotModified was returned. 19541func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { 19542 gensupport.SetOptions(c.urlParams_, opts...) 19543 res, err := c.doRequest("json") 19544 if res != nil && res.StatusCode == http.StatusNotModified { 19545 if res.Body != nil { 19546 res.Body.Close() 19547 } 19548 return nil, &googleapi.Error{ 19549 Code: res.StatusCode, 19550 Header: res.Header, 19551 } 19552 } 19553 if err != nil { 19554 return nil, err 19555 } 19556 defer googleapi.CloseBody(res) 19557 if err := googleapi.CheckResponse(res); err != nil { 19558 return nil, err 19559 } 19560 ret := &MerchantOrderReturn{ 19561 ServerResponse: googleapi.ServerResponse{ 19562 Header: res.Header, 19563 HTTPStatusCode: res.StatusCode, 19564 }, 19565 } 19566 target := &ret 19567 if err := gensupport.DecodeResponse(target, res); err != nil { 19568 return nil, err 19569 } 19570 return ret, nil 19571 // { 19572 // "description": "Retrieves an order return from your Merchant Center account.", 19573 // "httpMethod": "GET", 19574 // "id": "content.orderreturns.get", 19575 // "parameterOrder": [ 19576 // "merchantId", 19577 // "returnId" 19578 // ], 19579 // "parameters": { 19580 // "merchantId": { 19581 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19582 // "format": "uint64", 19583 // "location": "path", 19584 // "required": true, 19585 // "type": "string" 19586 // }, 19587 // "returnId": { 19588 // "description": "Merchant order return ID generated by Google.", 19589 // "location": "path", 19590 // "required": true, 19591 // "type": "string" 19592 // } 19593 // }, 19594 // "path": "{merchantId}/orderreturns/{returnId}", 19595 // "response": { 19596 // "$ref": "MerchantOrderReturn" 19597 // }, 19598 // "scopes": [ 19599 // "https://www.googleapis.com/auth/content" 19600 // ] 19601 // } 19602 19603} 19604 19605// method id "content.orderreturns.list": 19606 19607type OrderreturnsListCall struct { 19608 s *APIService 19609 merchantId uint64 19610 urlParams_ gensupport.URLParams 19611 ifNoneMatch_ string 19612 ctx_ context.Context 19613 header_ http.Header 19614} 19615 19616// List: Lists order returns in your Merchant Center account. 19617func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { 19618 c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19619 c.merchantId = merchantId 19620 return c 19621} 19622 19623// CreatedEndDate sets the optional parameter "createdEndDate": Obtains 19624// order returns created before this date (inclusively), in ISO 8601 19625// format. 19626func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { 19627 c.urlParams_.Set("createdEndDate", createdEndDate) 19628 return c 19629} 19630 19631// CreatedStartDate sets the optional parameter "createdStartDate": 19632// Obtains order returns created after this date (inclusively), in ISO 19633// 8601 format. 19634func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { 19635 c.urlParams_.Set("createdStartDate", createdStartDate) 19636 return c 19637} 19638 19639// MaxResults sets the optional parameter "maxResults": The maximum 19640// number of order returns to return in the response, used for paging. 19641// The default value is 25 returns per page, and the maximum allowed 19642// value is 250 returns per page. 19643func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { 19644 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19645 return c 19646} 19647 19648// OrderBy sets the optional parameter "orderBy": Return the results in 19649// the specified order. 19650// 19651// Possible values: 19652// "returnCreationTimeAsc" 19653// "returnCreationTimeDesc" 19654func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { 19655 c.urlParams_.Set("orderBy", orderBy) 19656 return c 19657} 19658 19659// PageToken sets the optional parameter "pageToken": The token returned 19660// by the previous request. 19661func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { 19662 c.urlParams_.Set("pageToken", pageToken) 19663 return c 19664} 19665 19666// Fields allows partial responses to be retrieved. See 19667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19668// for more information. 19669func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { 19670 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19671 return c 19672} 19673 19674// IfNoneMatch sets the optional parameter which makes the operation 19675// fail if the object's ETag matches the given value. This is useful for 19676// getting updates only after the object has changed since the last 19677// request. Use googleapi.IsNotModified to check whether the response 19678// error from Do is the result of In-None-Match. 19679func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { 19680 c.ifNoneMatch_ = entityTag 19681 return c 19682} 19683 19684// Context sets the context to be used in this call's Do method. Any 19685// pending HTTP request will be aborted if the provided context is 19686// canceled. 19687func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { 19688 c.ctx_ = ctx 19689 return c 19690} 19691 19692// Header returns an http.Header that can be modified by the caller to 19693// add HTTP headers to the request. 19694func (c *OrderreturnsListCall) Header() http.Header { 19695 if c.header_ == nil { 19696 c.header_ = make(http.Header) 19697 } 19698 return c.header_ 19699} 19700 19701func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { 19702 reqHeaders := make(http.Header) 19703 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19704 for k, v := range c.header_ { 19705 reqHeaders[k] = v 19706 } 19707 reqHeaders.Set("User-Agent", c.s.userAgent()) 19708 if c.ifNoneMatch_ != "" { 19709 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19710 } 19711 var body io.Reader = nil 19712 c.urlParams_.Set("alt", alt) 19713 c.urlParams_.Set("prettyPrint", "false") 19714 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") 19715 urls += "?" + c.urlParams_.Encode() 19716 req, err := http.NewRequest("GET", urls, body) 19717 if err != nil { 19718 return nil, err 19719 } 19720 req.Header = reqHeaders 19721 googleapi.Expand(req.URL, map[string]string{ 19722 "merchantId": strconv.FormatUint(c.merchantId, 10), 19723 }) 19724 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19725} 19726 19727// Do executes the "content.orderreturns.list" call. 19728// Exactly one of *OrderreturnsListResponse or error will be non-nil. 19729// Any non-2xx status code is an error. Response headers are in either 19730// *OrderreturnsListResponse.ServerResponse.Header or (if a response was 19731// returned at all) in error.(*googleapi.Error).Header. Use 19732// googleapi.IsNotModified to check whether the returned error was 19733// because http.StatusNotModified was returned. 19734func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { 19735 gensupport.SetOptions(c.urlParams_, opts...) 19736 res, err := c.doRequest("json") 19737 if res != nil && res.StatusCode == http.StatusNotModified { 19738 if res.Body != nil { 19739 res.Body.Close() 19740 } 19741 return nil, &googleapi.Error{ 19742 Code: res.StatusCode, 19743 Header: res.Header, 19744 } 19745 } 19746 if err != nil { 19747 return nil, err 19748 } 19749 defer googleapi.CloseBody(res) 19750 if err := googleapi.CheckResponse(res); err != nil { 19751 return nil, err 19752 } 19753 ret := &OrderreturnsListResponse{ 19754 ServerResponse: googleapi.ServerResponse{ 19755 Header: res.Header, 19756 HTTPStatusCode: res.StatusCode, 19757 }, 19758 } 19759 target := &ret 19760 if err := gensupport.DecodeResponse(target, res); err != nil { 19761 return nil, err 19762 } 19763 return ret, nil 19764 // { 19765 // "description": "Lists order returns in your Merchant Center account.", 19766 // "httpMethod": "GET", 19767 // "id": "content.orderreturns.list", 19768 // "parameterOrder": [ 19769 // "merchantId" 19770 // ], 19771 // "parameters": { 19772 // "createdEndDate": { 19773 // "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", 19774 // "location": "query", 19775 // "type": "string" 19776 // }, 19777 // "createdStartDate": { 19778 // "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", 19779 // "location": "query", 19780 // "type": "string" 19781 // }, 19782 // "maxResults": { 19783 // "description": "The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.", 19784 // "format": "uint32", 19785 // "location": "query", 19786 // "type": "integer" 19787 // }, 19788 // "merchantId": { 19789 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19790 // "format": "uint64", 19791 // "location": "path", 19792 // "required": true, 19793 // "type": "string" 19794 // }, 19795 // "orderBy": { 19796 // "description": "Return the results in the specified order.", 19797 // "enum": [ 19798 // "returnCreationTimeAsc", 19799 // "returnCreationTimeDesc" 19800 // ], 19801 // "enumDescriptions": [ 19802 // "", 19803 // "" 19804 // ], 19805 // "location": "query", 19806 // "type": "string" 19807 // }, 19808 // "pageToken": { 19809 // "description": "The token returned by the previous request.", 19810 // "location": "query", 19811 // "type": "string" 19812 // } 19813 // }, 19814 // "path": "{merchantId}/orderreturns", 19815 // "response": { 19816 // "$ref": "OrderreturnsListResponse" 19817 // }, 19818 // "scopes": [ 19819 // "https://www.googleapis.com/auth/content" 19820 // ] 19821 // } 19822 19823} 19824 19825// Pages invokes f for each page of results. 19826// A non-nil error returned from f will halt the iteration. 19827// The provided context supersedes any context provided to the Context method. 19828func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { 19829 c.ctx_ = ctx 19830 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19831 for { 19832 x, err := c.Do() 19833 if err != nil { 19834 return err 19835 } 19836 if err := f(x); err != nil { 19837 return err 19838 } 19839 if x.NextPageToken == "" { 19840 return nil 19841 } 19842 c.PageToken(x.NextPageToken) 19843 } 19844} 19845 19846// method id "content.orders.acknowledge": 19847 19848type OrdersAcknowledgeCall struct { 19849 s *APIService 19850 merchantId uint64 19851 orderId string 19852 ordersacknowledgerequest *OrdersAcknowledgeRequest 19853 urlParams_ gensupport.URLParams 19854 ctx_ context.Context 19855 header_ http.Header 19856} 19857 19858// Acknowledge: Marks an order as acknowledged. 19859func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { 19860 c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19861 c.merchantId = merchantId 19862 c.orderId = orderId 19863 c.ordersacknowledgerequest = ordersacknowledgerequest 19864 return c 19865} 19866 19867// Fields allows partial responses to be retrieved. See 19868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19869// for more information. 19870func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { 19871 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19872 return c 19873} 19874 19875// Context sets the context to be used in this call's Do method. Any 19876// pending HTTP request will be aborted if the provided context is 19877// canceled. 19878func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { 19879 c.ctx_ = ctx 19880 return c 19881} 19882 19883// Header returns an http.Header that can be modified by the caller to 19884// add HTTP headers to the request. 19885func (c *OrdersAcknowledgeCall) Header() http.Header { 19886 if c.header_ == nil { 19887 c.header_ = make(http.Header) 19888 } 19889 return c.header_ 19890} 19891 19892func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { 19893 reqHeaders := make(http.Header) 19894 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19895 for k, v := range c.header_ { 19896 reqHeaders[k] = v 19897 } 19898 reqHeaders.Set("User-Agent", c.s.userAgent()) 19899 var body io.Reader = nil 19900 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) 19901 if err != nil { 19902 return nil, err 19903 } 19904 reqHeaders.Set("Content-Type", "application/json") 19905 c.urlParams_.Set("alt", alt) 19906 c.urlParams_.Set("prettyPrint", "false") 19907 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") 19908 urls += "?" + c.urlParams_.Encode() 19909 req, err := http.NewRequest("POST", urls, body) 19910 if err != nil { 19911 return nil, err 19912 } 19913 req.Header = reqHeaders 19914 googleapi.Expand(req.URL, map[string]string{ 19915 "merchantId": strconv.FormatUint(c.merchantId, 10), 19916 "orderId": c.orderId, 19917 }) 19918 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19919} 19920 19921// Do executes the "content.orders.acknowledge" call. 19922// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil. 19923// Any non-2xx status code is an error. Response headers are in either 19924// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response 19925// was returned at all) in error.(*googleapi.Error).Header. Use 19926// googleapi.IsNotModified to check whether the returned error was 19927// because http.StatusNotModified was returned. 19928func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { 19929 gensupport.SetOptions(c.urlParams_, opts...) 19930 res, err := c.doRequest("json") 19931 if res != nil && res.StatusCode == http.StatusNotModified { 19932 if res.Body != nil { 19933 res.Body.Close() 19934 } 19935 return nil, &googleapi.Error{ 19936 Code: res.StatusCode, 19937 Header: res.Header, 19938 } 19939 } 19940 if err != nil { 19941 return nil, err 19942 } 19943 defer googleapi.CloseBody(res) 19944 if err := googleapi.CheckResponse(res); err != nil { 19945 return nil, err 19946 } 19947 ret := &OrdersAcknowledgeResponse{ 19948 ServerResponse: googleapi.ServerResponse{ 19949 Header: res.Header, 19950 HTTPStatusCode: res.StatusCode, 19951 }, 19952 } 19953 target := &ret 19954 if err := gensupport.DecodeResponse(target, res); err != nil { 19955 return nil, err 19956 } 19957 return ret, nil 19958 // { 19959 // "description": "Marks an order as acknowledged.", 19960 // "httpMethod": "POST", 19961 // "id": "content.orders.acknowledge", 19962 // "parameterOrder": [ 19963 // "merchantId", 19964 // "orderId" 19965 // ], 19966 // "parameters": { 19967 // "merchantId": { 19968 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19969 // "format": "uint64", 19970 // "location": "path", 19971 // "required": true, 19972 // "type": "string" 19973 // }, 19974 // "orderId": { 19975 // "description": "The ID of the order.", 19976 // "location": "path", 19977 // "required": true, 19978 // "type": "string" 19979 // } 19980 // }, 19981 // "path": "{merchantId}/orders/{orderId}/acknowledge", 19982 // "request": { 19983 // "$ref": "OrdersAcknowledgeRequest" 19984 // }, 19985 // "response": { 19986 // "$ref": "OrdersAcknowledgeResponse" 19987 // }, 19988 // "scopes": [ 19989 // "https://www.googleapis.com/auth/content" 19990 // ] 19991 // } 19992 19993} 19994 19995// method id "content.orders.advancetestorder": 19996 19997type OrdersAdvancetestorderCall struct { 19998 s *APIService 19999 merchantId uint64 20000 orderId string 20001 urlParams_ gensupport.URLParams 20002 ctx_ context.Context 20003 header_ http.Header 20004} 20005 20006// Advancetestorder: Sandbox only. Moves a test order from state 20007// "inProgress" to state "pendingShipment". 20008func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { 20009 c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20010 c.merchantId = merchantId 20011 c.orderId = orderId 20012 return c 20013} 20014 20015// Fields allows partial responses to be retrieved. See 20016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20017// for more information. 20018func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { 20019 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20020 return c 20021} 20022 20023// Context sets the context to be used in this call's Do method. Any 20024// pending HTTP request will be aborted if the provided context is 20025// canceled. 20026func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { 20027 c.ctx_ = ctx 20028 return c 20029} 20030 20031// Header returns an http.Header that can be modified by the caller to 20032// add HTTP headers to the request. 20033func (c *OrdersAdvancetestorderCall) Header() http.Header { 20034 if c.header_ == nil { 20035 c.header_ = make(http.Header) 20036 } 20037 return c.header_ 20038} 20039 20040func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { 20041 reqHeaders := make(http.Header) 20042 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20043 for k, v := range c.header_ { 20044 reqHeaders[k] = v 20045 } 20046 reqHeaders.Set("User-Agent", c.s.userAgent()) 20047 var body io.Reader = nil 20048 c.urlParams_.Set("alt", alt) 20049 c.urlParams_.Set("prettyPrint", "false") 20050 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") 20051 urls += "?" + c.urlParams_.Encode() 20052 req, err := http.NewRequest("POST", urls, body) 20053 if err != nil { 20054 return nil, err 20055 } 20056 req.Header = reqHeaders 20057 googleapi.Expand(req.URL, map[string]string{ 20058 "merchantId": strconv.FormatUint(c.merchantId, 10), 20059 "orderId": c.orderId, 20060 }) 20061 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20062} 20063 20064// Do executes the "content.orders.advancetestorder" call. 20065// Exactly one of *OrdersAdvanceTestOrderResponse or error will be 20066// non-nil. Any non-2xx status code is an error. Response headers are in 20067// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a 20068// response was returned at all) in error.(*googleapi.Error).Header. Use 20069// googleapi.IsNotModified to check whether the returned error was 20070// because http.StatusNotModified was returned. 20071func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { 20072 gensupport.SetOptions(c.urlParams_, opts...) 20073 res, err := c.doRequest("json") 20074 if res != nil && res.StatusCode == http.StatusNotModified { 20075 if res.Body != nil { 20076 res.Body.Close() 20077 } 20078 return nil, &googleapi.Error{ 20079 Code: res.StatusCode, 20080 Header: res.Header, 20081 } 20082 } 20083 if err != nil { 20084 return nil, err 20085 } 20086 defer googleapi.CloseBody(res) 20087 if err := googleapi.CheckResponse(res); err != nil { 20088 return nil, err 20089 } 20090 ret := &OrdersAdvanceTestOrderResponse{ 20091 ServerResponse: googleapi.ServerResponse{ 20092 Header: res.Header, 20093 HTTPStatusCode: res.StatusCode, 20094 }, 20095 } 20096 target := &ret 20097 if err := gensupport.DecodeResponse(target, res); err != nil { 20098 return nil, err 20099 } 20100 return ret, nil 20101 // { 20102 // "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", 20103 // "httpMethod": "POST", 20104 // "id": "content.orders.advancetestorder", 20105 // "parameterOrder": [ 20106 // "merchantId", 20107 // "orderId" 20108 // ], 20109 // "parameters": { 20110 // "merchantId": { 20111 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20112 // "format": "uint64", 20113 // "location": "path", 20114 // "required": true, 20115 // "type": "string" 20116 // }, 20117 // "orderId": { 20118 // "description": "The ID of the test order to modify.", 20119 // "location": "path", 20120 // "required": true, 20121 // "type": "string" 20122 // } 20123 // }, 20124 // "path": "{merchantId}/testorders/{orderId}/advance", 20125 // "response": { 20126 // "$ref": "OrdersAdvanceTestOrderResponse" 20127 // }, 20128 // "scopes": [ 20129 // "https://www.googleapis.com/auth/content" 20130 // ] 20131 // } 20132 20133} 20134 20135// method id "content.orders.cancel": 20136 20137type OrdersCancelCall struct { 20138 s *APIService 20139 merchantId uint64 20140 orderId string 20141 orderscancelrequest *OrdersCancelRequest 20142 urlParams_ gensupport.URLParams 20143 ctx_ context.Context 20144 header_ http.Header 20145} 20146 20147// Cancel: Cancels all line items in an order, making a full refund. 20148func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { 20149 c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20150 c.merchantId = merchantId 20151 c.orderId = orderId 20152 c.orderscancelrequest = orderscancelrequest 20153 return c 20154} 20155 20156// Fields allows partial responses to be retrieved. See 20157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20158// for more information. 20159func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { 20160 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20161 return c 20162} 20163 20164// Context sets the context to be used in this call's Do method. Any 20165// pending HTTP request will be aborted if the provided context is 20166// canceled. 20167func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { 20168 c.ctx_ = ctx 20169 return c 20170} 20171 20172// Header returns an http.Header that can be modified by the caller to 20173// add HTTP headers to the request. 20174func (c *OrdersCancelCall) Header() http.Header { 20175 if c.header_ == nil { 20176 c.header_ = make(http.Header) 20177 } 20178 return c.header_ 20179} 20180 20181func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { 20182 reqHeaders := make(http.Header) 20183 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20184 for k, v := range c.header_ { 20185 reqHeaders[k] = v 20186 } 20187 reqHeaders.Set("User-Agent", c.s.userAgent()) 20188 var body io.Reader = nil 20189 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) 20190 if err != nil { 20191 return nil, err 20192 } 20193 reqHeaders.Set("Content-Type", "application/json") 20194 c.urlParams_.Set("alt", alt) 20195 c.urlParams_.Set("prettyPrint", "false") 20196 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") 20197 urls += "?" + c.urlParams_.Encode() 20198 req, err := http.NewRequest("POST", urls, body) 20199 if err != nil { 20200 return nil, err 20201 } 20202 req.Header = reqHeaders 20203 googleapi.Expand(req.URL, map[string]string{ 20204 "merchantId": strconv.FormatUint(c.merchantId, 10), 20205 "orderId": c.orderId, 20206 }) 20207 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20208} 20209 20210// Do executes the "content.orders.cancel" call. 20211// Exactly one of *OrdersCancelResponse or error will be non-nil. Any 20212// non-2xx status code is an error. Response headers are in either 20213// *OrdersCancelResponse.ServerResponse.Header or (if a response was 20214// returned at all) in error.(*googleapi.Error).Header. Use 20215// googleapi.IsNotModified to check whether the returned error was 20216// because http.StatusNotModified was returned. 20217func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { 20218 gensupport.SetOptions(c.urlParams_, opts...) 20219 res, err := c.doRequest("json") 20220 if res != nil && res.StatusCode == http.StatusNotModified { 20221 if res.Body != nil { 20222 res.Body.Close() 20223 } 20224 return nil, &googleapi.Error{ 20225 Code: res.StatusCode, 20226 Header: res.Header, 20227 } 20228 } 20229 if err != nil { 20230 return nil, err 20231 } 20232 defer googleapi.CloseBody(res) 20233 if err := googleapi.CheckResponse(res); err != nil { 20234 return nil, err 20235 } 20236 ret := &OrdersCancelResponse{ 20237 ServerResponse: googleapi.ServerResponse{ 20238 Header: res.Header, 20239 HTTPStatusCode: res.StatusCode, 20240 }, 20241 } 20242 target := &ret 20243 if err := gensupport.DecodeResponse(target, res); err != nil { 20244 return nil, err 20245 } 20246 return ret, nil 20247 // { 20248 // "description": "Cancels all line items in an order, making a full refund.", 20249 // "httpMethod": "POST", 20250 // "id": "content.orders.cancel", 20251 // "parameterOrder": [ 20252 // "merchantId", 20253 // "orderId" 20254 // ], 20255 // "parameters": { 20256 // "merchantId": { 20257 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20258 // "format": "uint64", 20259 // "location": "path", 20260 // "required": true, 20261 // "type": "string" 20262 // }, 20263 // "orderId": { 20264 // "description": "The ID of the order to cancel.", 20265 // "location": "path", 20266 // "required": true, 20267 // "type": "string" 20268 // } 20269 // }, 20270 // "path": "{merchantId}/orders/{orderId}/cancel", 20271 // "request": { 20272 // "$ref": "OrdersCancelRequest" 20273 // }, 20274 // "response": { 20275 // "$ref": "OrdersCancelResponse" 20276 // }, 20277 // "scopes": [ 20278 // "https://www.googleapis.com/auth/content" 20279 // ] 20280 // } 20281 20282} 20283 20284// method id "content.orders.cancellineitem": 20285 20286type OrdersCancellineitemCall struct { 20287 s *APIService 20288 merchantId uint64 20289 orderId string 20290 orderscancellineitemrequest *OrdersCancelLineItemRequest 20291 urlParams_ gensupport.URLParams 20292 ctx_ context.Context 20293 header_ http.Header 20294} 20295 20296// Cancellineitem: Cancels a line item, making a full refund. 20297func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { 20298 c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20299 c.merchantId = merchantId 20300 c.orderId = orderId 20301 c.orderscancellineitemrequest = orderscancellineitemrequest 20302 return c 20303} 20304 20305// Fields allows partial responses to be retrieved. See 20306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20307// for more information. 20308func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { 20309 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20310 return c 20311} 20312 20313// Context sets the context to be used in this call's Do method. Any 20314// pending HTTP request will be aborted if the provided context is 20315// canceled. 20316func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { 20317 c.ctx_ = ctx 20318 return c 20319} 20320 20321// Header returns an http.Header that can be modified by the caller to 20322// add HTTP headers to the request. 20323func (c *OrdersCancellineitemCall) Header() http.Header { 20324 if c.header_ == nil { 20325 c.header_ = make(http.Header) 20326 } 20327 return c.header_ 20328} 20329 20330func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { 20331 reqHeaders := make(http.Header) 20332 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20333 for k, v := range c.header_ { 20334 reqHeaders[k] = v 20335 } 20336 reqHeaders.Set("User-Agent", c.s.userAgent()) 20337 var body io.Reader = nil 20338 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) 20339 if err != nil { 20340 return nil, err 20341 } 20342 reqHeaders.Set("Content-Type", "application/json") 20343 c.urlParams_.Set("alt", alt) 20344 c.urlParams_.Set("prettyPrint", "false") 20345 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") 20346 urls += "?" + c.urlParams_.Encode() 20347 req, err := http.NewRequest("POST", urls, body) 20348 if err != nil { 20349 return nil, err 20350 } 20351 req.Header = reqHeaders 20352 googleapi.Expand(req.URL, map[string]string{ 20353 "merchantId": strconv.FormatUint(c.merchantId, 10), 20354 "orderId": c.orderId, 20355 }) 20356 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20357} 20358 20359// Do executes the "content.orders.cancellineitem" call. 20360// Exactly one of *OrdersCancelLineItemResponse or error will be 20361// non-nil. Any non-2xx status code is an error. Response headers are in 20362// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a 20363// response was returned at all) in error.(*googleapi.Error).Header. Use 20364// googleapi.IsNotModified to check whether the returned error was 20365// because http.StatusNotModified was returned. 20366func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { 20367 gensupport.SetOptions(c.urlParams_, opts...) 20368 res, err := c.doRequest("json") 20369 if res != nil && res.StatusCode == http.StatusNotModified { 20370 if res.Body != nil { 20371 res.Body.Close() 20372 } 20373 return nil, &googleapi.Error{ 20374 Code: res.StatusCode, 20375 Header: res.Header, 20376 } 20377 } 20378 if err != nil { 20379 return nil, err 20380 } 20381 defer googleapi.CloseBody(res) 20382 if err := googleapi.CheckResponse(res); err != nil { 20383 return nil, err 20384 } 20385 ret := &OrdersCancelLineItemResponse{ 20386 ServerResponse: googleapi.ServerResponse{ 20387 Header: res.Header, 20388 HTTPStatusCode: res.StatusCode, 20389 }, 20390 } 20391 target := &ret 20392 if err := gensupport.DecodeResponse(target, res); err != nil { 20393 return nil, err 20394 } 20395 return ret, nil 20396 // { 20397 // "description": "Cancels a line item, making a full refund.", 20398 // "httpMethod": "POST", 20399 // "id": "content.orders.cancellineitem", 20400 // "parameterOrder": [ 20401 // "merchantId", 20402 // "orderId" 20403 // ], 20404 // "parameters": { 20405 // "merchantId": { 20406 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20407 // "format": "uint64", 20408 // "location": "path", 20409 // "required": true, 20410 // "type": "string" 20411 // }, 20412 // "orderId": { 20413 // "description": "The ID of the order.", 20414 // "location": "path", 20415 // "required": true, 20416 // "type": "string" 20417 // } 20418 // }, 20419 // "path": "{merchantId}/orders/{orderId}/cancelLineItem", 20420 // "request": { 20421 // "$ref": "OrdersCancelLineItemRequest" 20422 // }, 20423 // "response": { 20424 // "$ref": "OrdersCancelLineItemResponse" 20425 // }, 20426 // "scopes": [ 20427 // "https://www.googleapis.com/auth/content" 20428 // ] 20429 // } 20430 20431} 20432 20433// method id "content.orders.canceltestorderbycustomer": 20434 20435type OrdersCanceltestorderbycustomerCall struct { 20436 s *APIService 20437 merchantId uint64 20438 orderId string 20439 orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest 20440 urlParams_ gensupport.URLParams 20441 ctx_ context.Context 20442 header_ http.Header 20443} 20444 20445// Canceltestorderbycustomer: Sandbox only. Cancels a test order for 20446// customer-initiated cancellation. 20447func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { 20448 c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20449 c.merchantId = merchantId 20450 c.orderId = orderId 20451 c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest 20452 return c 20453} 20454 20455// Fields allows partial responses to be retrieved. See 20456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20457// for more information. 20458func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { 20459 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20460 return c 20461} 20462 20463// Context sets the context to be used in this call's Do method. Any 20464// pending HTTP request will be aborted if the provided context is 20465// canceled. 20466func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { 20467 c.ctx_ = ctx 20468 return c 20469} 20470 20471// Header returns an http.Header that can be modified by the caller to 20472// add HTTP headers to the request. 20473func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header { 20474 if c.header_ == nil { 20475 c.header_ = make(http.Header) 20476 } 20477 return c.header_ 20478} 20479 20480func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { 20481 reqHeaders := make(http.Header) 20482 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20483 for k, v := range c.header_ { 20484 reqHeaders[k] = v 20485 } 20486 reqHeaders.Set("User-Agent", c.s.userAgent()) 20487 var body io.Reader = nil 20488 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) 20489 if err != nil { 20490 return nil, err 20491 } 20492 reqHeaders.Set("Content-Type", "application/json") 20493 c.urlParams_.Set("alt", alt) 20494 c.urlParams_.Set("prettyPrint", "false") 20495 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") 20496 urls += "?" + c.urlParams_.Encode() 20497 req, err := http.NewRequest("POST", urls, body) 20498 if err != nil { 20499 return nil, err 20500 } 20501 req.Header = reqHeaders 20502 googleapi.Expand(req.URL, map[string]string{ 20503 "merchantId": strconv.FormatUint(c.merchantId, 10), 20504 "orderId": c.orderId, 20505 }) 20506 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20507} 20508 20509// Do executes the "content.orders.canceltestorderbycustomer" call. 20510// Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will 20511// be non-nil. Any non-2xx status code is an error. Response headers are 20512// in either 20513// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if 20514// a response was returned at all) in error.(*googleapi.Error).Header. 20515// Use googleapi.IsNotModified to check whether the returned error was 20516// because http.StatusNotModified was returned. 20517func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { 20518 gensupport.SetOptions(c.urlParams_, opts...) 20519 res, err := c.doRequest("json") 20520 if res != nil && res.StatusCode == http.StatusNotModified { 20521 if res.Body != nil { 20522 res.Body.Close() 20523 } 20524 return nil, &googleapi.Error{ 20525 Code: res.StatusCode, 20526 Header: res.Header, 20527 } 20528 } 20529 if err != nil { 20530 return nil, err 20531 } 20532 defer googleapi.CloseBody(res) 20533 if err := googleapi.CheckResponse(res); err != nil { 20534 return nil, err 20535 } 20536 ret := &OrdersCancelTestOrderByCustomerResponse{ 20537 ServerResponse: googleapi.ServerResponse{ 20538 Header: res.Header, 20539 HTTPStatusCode: res.StatusCode, 20540 }, 20541 } 20542 target := &ret 20543 if err := gensupport.DecodeResponse(target, res); err != nil { 20544 return nil, err 20545 } 20546 return ret, nil 20547 // { 20548 // "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", 20549 // "httpMethod": "POST", 20550 // "id": "content.orders.canceltestorderbycustomer", 20551 // "parameterOrder": [ 20552 // "merchantId", 20553 // "orderId" 20554 // ], 20555 // "parameters": { 20556 // "merchantId": { 20557 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20558 // "format": "uint64", 20559 // "location": "path", 20560 // "required": true, 20561 // "type": "string" 20562 // }, 20563 // "orderId": { 20564 // "description": "The ID of the test order to cancel.", 20565 // "location": "path", 20566 // "required": true, 20567 // "type": "string" 20568 // } 20569 // }, 20570 // "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", 20571 // "request": { 20572 // "$ref": "OrdersCancelTestOrderByCustomerRequest" 20573 // }, 20574 // "response": { 20575 // "$ref": "OrdersCancelTestOrderByCustomerResponse" 20576 // }, 20577 // "scopes": [ 20578 // "https://www.googleapis.com/auth/content" 20579 // ] 20580 // } 20581 20582} 20583 20584// method id "content.orders.createtestorder": 20585 20586type OrdersCreatetestorderCall struct { 20587 s *APIService 20588 merchantId uint64 20589 orderscreatetestorderrequest *OrdersCreateTestOrderRequest 20590 urlParams_ gensupport.URLParams 20591 ctx_ context.Context 20592 header_ http.Header 20593} 20594 20595// Createtestorder: Sandbox only. Creates a test order. 20596func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { 20597 c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20598 c.merchantId = merchantId 20599 c.orderscreatetestorderrequest = orderscreatetestorderrequest 20600 return c 20601} 20602 20603// Fields allows partial responses to be retrieved. See 20604// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20605// for more information. 20606func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { 20607 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20608 return c 20609} 20610 20611// Context sets the context to be used in this call's Do method. Any 20612// pending HTTP request will be aborted if the provided context is 20613// canceled. 20614func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { 20615 c.ctx_ = ctx 20616 return c 20617} 20618 20619// Header returns an http.Header that can be modified by the caller to 20620// add HTTP headers to the request. 20621func (c *OrdersCreatetestorderCall) Header() http.Header { 20622 if c.header_ == nil { 20623 c.header_ = make(http.Header) 20624 } 20625 return c.header_ 20626} 20627 20628func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { 20629 reqHeaders := make(http.Header) 20630 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20631 for k, v := range c.header_ { 20632 reqHeaders[k] = v 20633 } 20634 reqHeaders.Set("User-Agent", c.s.userAgent()) 20635 var body io.Reader = nil 20636 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) 20637 if err != nil { 20638 return nil, err 20639 } 20640 reqHeaders.Set("Content-Type", "application/json") 20641 c.urlParams_.Set("alt", alt) 20642 c.urlParams_.Set("prettyPrint", "false") 20643 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") 20644 urls += "?" + c.urlParams_.Encode() 20645 req, err := http.NewRequest("POST", urls, body) 20646 if err != nil { 20647 return nil, err 20648 } 20649 req.Header = reqHeaders 20650 googleapi.Expand(req.URL, map[string]string{ 20651 "merchantId": strconv.FormatUint(c.merchantId, 10), 20652 }) 20653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20654} 20655 20656// Do executes the "content.orders.createtestorder" call. 20657// Exactly one of *OrdersCreateTestOrderResponse or error will be 20658// non-nil. Any non-2xx status code is an error. Response headers are in 20659// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a 20660// response was returned at all) in error.(*googleapi.Error).Header. Use 20661// googleapi.IsNotModified to check whether the returned error was 20662// because http.StatusNotModified was returned. 20663func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { 20664 gensupport.SetOptions(c.urlParams_, opts...) 20665 res, err := c.doRequest("json") 20666 if res != nil && res.StatusCode == http.StatusNotModified { 20667 if res.Body != nil { 20668 res.Body.Close() 20669 } 20670 return nil, &googleapi.Error{ 20671 Code: res.StatusCode, 20672 Header: res.Header, 20673 } 20674 } 20675 if err != nil { 20676 return nil, err 20677 } 20678 defer googleapi.CloseBody(res) 20679 if err := googleapi.CheckResponse(res); err != nil { 20680 return nil, err 20681 } 20682 ret := &OrdersCreateTestOrderResponse{ 20683 ServerResponse: googleapi.ServerResponse{ 20684 Header: res.Header, 20685 HTTPStatusCode: res.StatusCode, 20686 }, 20687 } 20688 target := &ret 20689 if err := gensupport.DecodeResponse(target, res); err != nil { 20690 return nil, err 20691 } 20692 return ret, nil 20693 // { 20694 // "description": "Sandbox only. Creates a test order.", 20695 // "httpMethod": "POST", 20696 // "id": "content.orders.createtestorder", 20697 // "parameterOrder": [ 20698 // "merchantId" 20699 // ], 20700 // "parameters": { 20701 // "merchantId": { 20702 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 20703 // "format": "uint64", 20704 // "location": "path", 20705 // "required": true, 20706 // "type": "string" 20707 // } 20708 // }, 20709 // "path": "{merchantId}/testorders", 20710 // "request": { 20711 // "$ref": "OrdersCreateTestOrderRequest" 20712 // }, 20713 // "response": { 20714 // "$ref": "OrdersCreateTestOrderResponse" 20715 // }, 20716 // "scopes": [ 20717 // "https://www.googleapis.com/auth/content" 20718 // ] 20719 // } 20720 20721} 20722 20723// method id "content.orders.createtestreturn": 20724 20725type OrdersCreatetestreturnCall struct { 20726 s *APIService 20727 merchantId uint64 20728 orderId string 20729 orderscreatetestreturnrequest *OrdersCreateTestReturnRequest 20730 urlParams_ gensupport.URLParams 20731 ctx_ context.Context 20732 header_ http.Header 20733} 20734 20735// Createtestreturn: Sandbox only. Creates a test return. 20736func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { 20737 c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20738 c.merchantId = merchantId 20739 c.orderId = orderId 20740 c.orderscreatetestreturnrequest = orderscreatetestreturnrequest 20741 return c 20742} 20743 20744// Fields allows partial responses to be retrieved. See 20745// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20746// for more information. 20747func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { 20748 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20749 return c 20750} 20751 20752// Context sets the context to be used in this call's Do method. Any 20753// pending HTTP request will be aborted if the provided context is 20754// canceled. 20755func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { 20756 c.ctx_ = ctx 20757 return c 20758} 20759 20760// Header returns an http.Header that can be modified by the caller to 20761// add HTTP headers to the request. 20762func (c *OrdersCreatetestreturnCall) Header() http.Header { 20763 if c.header_ == nil { 20764 c.header_ = make(http.Header) 20765 } 20766 return c.header_ 20767} 20768 20769func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { 20770 reqHeaders := make(http.Header) 20771 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20772 for k, v := range c.header_ { 20773 reqHeaders[k] = v 20774 } 20775 reqHeaders.Set("User-Agent", c.s.userAgent()) 20776 var body io.Reader = nil 20777 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest) 20778 if err != nil { 20779 return nil, err 20780 } 20781 reqHeaders.Set("Content-Type", "application/json") 20782 c.urlParams_.Set("alt", alt) 20783 c.urlParams_.Set("prettyPrint", "false") 20784 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") 20785 urls += "?" + c.urlParams_.Encode() 20786 req, err := http.NewRequest("POST", urls, body) 20787 if err != nil { 20788 return nil, err 20789 } 20790 req.Header = reqHeaders 20791 googleapi.Expand(req.URL, map[string]string{ 20792 "merchantId": strconv.FormatUint(c.merchantId, 10), 20793 "orderId": c.orderId, 20794 }) 20795 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20796} 20797 20798// Do executes the "content.orders.createtestreturn" call. 20799// Exactly one of *OrdersCreateTestReturnResponse or error will be 20800// non-nil. Any non-2xx status code is an error. Response headers are in 20801// either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a 20802// response was returned at all) in error.(*googleapi.Error).Header. Use 20803// googleapi.IsNotModified to check whether the returned error was 20804// because http.StatusNotModified was returned. 20805func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { 20806 gensupport.SetOptions(c.urlParams_, opts...) 20807 res, err := c.doRequest("json") 20808 if res != nil && res.StatusCode == http.StatusNotModified { 20809 if res.Body != nil { 20810 res.Body.Close() 20811 } 20812 return nil, &googleapi.Error{ 20813 Code: res.StatusCode, 20814 Header: res.Header, 20815 } 20816 } 20817 if err != nil { 20818 return nil, err 20819 } 20820 defer googleapi.CloseBody(res) 20821 if err := googleapi.CheckResponse(res); err != nil { 20822 return nil, err 20823 } 20824 ret := &OrdersCreateTestReturnResponse{ 20825 ServerResponse: googleapi.ServerResponse{ 20826 Header: res.Header, 20827 HTTPStatusCode: res.StatusCode, 20828 }, 20829 } 20830 target := &ret 20831 if err := gensupport.DecodeResponse(target, res); err != nil { 20832 return nil, err 20833 } 20834 return ret, nil 20835 // { 20836 // "description": "Sandbox only. Creates a test return.", 20837 // "httpMethod": "POST", 20838 // "id": "content.orders.createtestreturn", 20839 // "parameterOrder": [ 20840 // "merchantId", 20841 // "orderId" 20842 // ], 20843 // "parameters": { 20844 // "merchantId": { 20845 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20846 // "format": "uint64", 20847 // "location": "path", 20848 // "required": true, 20849 // "type": "string" 20850 // }, 20851 // "orderId": { 20852 // "description": "The ID of the order.", 20853 // "location": "path", 20854 // "required": true, 20855 // "type": "string" 20856 // } 20857 // }, 20858 // "path": "{merchantId}/orders/{orderId}/testreturn", 20859 // "request": { 20860 // "$ref": "OrdersCreateTestReturnRequest" 20861 // }, 20862 // "response": { 20863 // "$ref": "OrdersCreateTestReturnResponse" 20864 // }, 20865 // "scopes": [ 20866 // "https://www.googleapis.com/auth/content" 20867 // ] 20868 // } 20869 20870} 20871 20872// method id "content.orders.custombatch": 20873 20874type OrdersCustombatchCall struct { 20875 s *APIService 20876 orderscustombatchrequest *OrdersCustomBatchRequest 20877 urlParams_ gensupport.URLParams 20878 ctx_ context.Context 20879 header_ http.Header 20880} 20881 20882// Custombatch: Retrieves or modifies multiple orders in a single 20883// request. 20884func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall { 20885 c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20886 c.orderscustombatchrequest = orderscustombatchrequest 20887 return c 20888} 20889 20890// Fields allows partial responses to be retrieved. See 20891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20892// for more information. 20893func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall { 20894 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20895 return c 20896} 20897 20898// Context sets the context to be used in this call's Do method. Any 20899// pending HTTP request will be aborted if the provided context is 20900// canceled. 20901func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall { 20902 c.ctx_ = ctx 20903 return c 20904} 20905 20906// Header returns an http.Header that can be modified by the caller to 20907// add HTTP headers to the request. 20908func (c *OrdersCustombatchCall) Header() http.Header { 20909 if c.header_ == nil { 20910 c.header_ = make(http.Header) 20911 } 20912 return c.header_ 20913} 20914 20915func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) { 20916 reqHeaders := make(http.Header) 20917 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20918 for k, v := range c.header_ { 20919 reqHeaders[k] = v 20920 } 20921 reqHeaders.Set("User-Agent", c.s.userAgent()) 20922 var body io.Reader = nil 20923 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest) 20924 if err != nil { 20925 return nil, err 20926 } 20927 reqHeaders.Set("Content-Type", "application/json") 20928 c.urlParams_.Set("alt", alt) 20929 c.urlParams_.Set("prettyPrint", "false") 20930 urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch") 20931 urls += "?" + c.urlParams_.Encode() 20932 req, err := http.NewRequest("POST", urls, body) 20933 if err != nil { 20934 return nil, err 20935 } 20936 req.Header = reqHeaders 20937 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20938} 20939 20940// Do executes the "content.orders.custombatch" call. 20941// Exactly one of *OrdersCustomBatchResponse or error will be non-nil. 20942// Any non-2xx status code is an error. Response headers are in either 20943// *OrdersCustomBatchResponse.ServerResponse.Header or (if a response 20944// was returned at all) in error.(*googleapi.Error).Header. Use 20945// googleapi.IsNotModified to check whether the returned error was 20946// because http.StatusNotModified was returned. 20947func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) { 20948 gensupport.SetOptions(c.urlParams_, opts...) 20949 res, err := c.doRequest("json") 20950 if res != nil && res.StatusCode == http.StatusNotModified { 20951 if res.Body != nil { 20952 res.Body.Close() 20953 } 20954 return nil, &googleapi.Error{ 20955 Code: res.StatusCode, 20956 Header: res.Header, 20957 } 20958 } 20959 if err != nil { 20960 return nil, err 20961 } 20962 defer googleapi.CloseBody(res) 20963 if err := googleapi.CheckResponse(res); err != nil { 20964 return nil, err 20965 } 20966 ret := &OrdersCustomBatchResponse{ 20967 ServerResponse: googleapi.ServerResponse{ 20968 Header: res.Header, 20969 HTTPStatusCode: res.StatusCode, 20970 }, 20971 } 20972 target := &ret 20973 if err := gensupport.DecodeResponse(target, res); err != nil { 20974 return nil, err 20975 } 20976 return ret, nil 20977 // { 20978 // "description": "Retrieves or modifies multiple orders in a single request.", 20979 // "httpMethod": "POST", 20980 // "id": "content.orders.custombatch", 20981 // "path": "orders/batch", 20982 // "request": { 20983 // "$ref": "OrdersCustomBatchRequest" 20984 // }, 20985 // "response": { 20986 // "$ref": "OrdersCustomBatchResponse" 20987 // }, 20988 // "scopes": [ 20989 // "https://www.googleapis.com/auth/content" 20990 // ] 20991 // } 20992 20993} 20994 20995// method id "content.orders.get": 20996 20997type OrdersGetCall struct { 20998 s *APIService 20999 merchantId uint64 21000 orderId string 21001 urlParams_ gensupport.URLParams 21002 ifNoneMatch_ string 21003 ctx_ context.Context 21004 header_ http.Header 21005} 21006 21007// Get: Retrieves an order from your Merchant Center account. 21008func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { 21009 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21010 c.merchantId = merchantId 21011 c.orderId = orderId 21012 return c 21013} 21014 21015// Fields allows partial responses to be retrieved. See 21016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21017// for more information. 21018func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { 21019 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21020 return c 21021} 21022 21023// IfNoneMatch sets the optional parameter which makes the operation 21024// fail if the object's ETag matches the given value. This is useful for 21025// getting updates only after the object has changed since the last 21026// request. Use googleapi.IsNotModified to check whether the response 21027// error from Do is the result of In-None-Match. 21028func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { 21029 c.ifNoneMatch_ = entityTag 21030 return c 21031} 21032 21033// Context sets the context to be used in this call's Do method. Any 21034// pending HTTP request will be aborted if the provided context is 21035// canceled. 21036func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { 21037 c.ctx_ = ctx 21038 return c 21039} 21040 21041// Header returns an http.Header that can be modified by the caller to 21042// add HTTP headers to the request. 21043func (c *OrdersGetCall) Header() http.Header { 21044 if c.header_ == nil { 21045 c.header_ = make(http.Header) 21046 } 21047 return c.header_ 21048} 21049 21050func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { 21051 reqHeaders := make(http.Header) 21052 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21053 for k, v := range c.header_ { 21054 reqHeaders[k] = v 21055 } 21056 reqHeaders.Set("User-Agent", c.s.userAgent()) 21057 if c.ifNoneMatch_ != "" { 21058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21059 } 21060 var body io.Reader = nil 21061 c.urlParams_.Set("alt", alt) 21062 c.urlParams_.Set("prettyPrint", "false") 21063 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") 21064 urls += "?" + c.urlParams_.Encode() 21065 req, err := http.NewRequest("GET", urls, body) 21066 if err != nil { 21067 return nil, err 21068 } 21069 req.Header = reqHeaders 21070 googleapi.Expand(req.URL, map[string]string{ 21071 "merchantId": strconv.FormatUint(c.merchantId, 10), 21072 "orderId": c.orderId, 21073 }) 21074 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21075} 21076 21077// Do executes the "content.orders.get" call. 21078// Exactly one of *Order or error will be non-nil. Any non-2xx status 21079// code is an error. Response headers are in either 21080// *Order.ServerResponse.Header or (if a response was returned at all) 21081// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 21082// check whether the returned error was because http.StatusNotModified 21083// was returned. 21084func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { 21085 gensupport.SetOptions(c.urlParams_, opts...) 21086 res, err := c.doRequest("json") 21087 if res != nil && res.StatusCode == http.StatusNotModified { 21088 if res.Body != nil { 21089 res.Body.Close() 21090 } 21091 return nil, &googleapi.Error{ 21092 Code: res.StatusCode, 21093 Header: res.Header, 21094 } 21095 } 21096 if err != nil { 21097 return nil, err 21098 } 21099 defer googleapi.CloseBody(res) 21100 if err := googleapi.CheckResponse(res); err != nil { 21101 return nil, err 21102 } 21103 ret := &Order{ 21104 ServerResponse: googleapi.ServerResponse{ 21105 Header: res.Header, 21106 HTTPStatusCode: res.StatusCode, 21107 }, 21108 } 21109 target := &ret 21110 if err := gensupport.DecodeResponse(target, res); err != nil { 21111 return nil, err 21112 } 21113 return ret, nil 21114 // { 21115 // "description": "Retrieves an order from your Merchant Center account.", 21116 // "httpMethod": "GET", 21117 // "id": "content.orders.get", 21118 // "parameterOrder": [ 21119 // "merchantId", 21120 // "orderId" 21121 // ], 21122 // "parameters": { 21123 // "merchantId": { 21124 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21125 // "format": "uint64", 21126 // "location": "path", 21127 // "required": true, 21128 // "type": "string" 21129 // }, 21130 // "orderId": { 21131 // "description": "The ID of the order.", 21132 // "location": "path", 21133 // "required": true, 21134 // "type": "string" 21135 // } 21136 // }, 21137 // "path": "{merchantId}/orders/{orderId}", 21138 // "response": { 21139 // "$ref": "Order" 21140 // }, 21141 // "scopes": [ 21142 // "https://www.googleapis.com/auth/content" 21143 // ] 21144 // } 21145 21146} 21147 21148// method id "content.orders.getbymerchantorderid": 21149 21150type OrdersGetbymerchantorderidCall struct { 21151 s *APIService 21152 merchantId uint64 21153 merchantOrderId string 21154 urlParams_ gensupport.URLParams 21155 ifNoneMatch_ string 21156 ctx_ context.Context 21157 header_ http.Header 21158} 21159 21160// Getbymerchantorderid: Retrieves an order using merchant order ID. 21161func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { 21162 c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21163 c.merchantId = merchantId 21164 c.merchantOrderId = merchantOrderId 21165 return c 21166} 21167 21168// Fields allows partial responses to be retrieved. See 21169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21170// for more information. 21171func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { 21172 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21173 return c 21174} 21175 21176// IfNoneMatch sets the optional parameter which makes the operation 21177// fail if the object's ETag matches the given value. This is useful for 21178// getting updates only after the object has changed since the last 21179// request. Use googleapi.IsNotModified to check whether the response 21180// error from Do is the result of In-None-Match. 21181func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { 21182 c.ifNoneMatch_ = entityTag 21183 return c 21184} 21185 21186// Context sets the context to be used in this call's Do method. Any 21187// pending HTTP request will be aborted if the provided context is 21188// canceled. 21189func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { 21190 c.ctx_ = ctx 21191 return c 21192} 21193 21194// Header returns an http.Header that can be modified by the caller to 21195// add HTTP headers to the request. 21196func (c *OrdersGetbymerchantorderidCall) Header() http.Header { 21197 if c.header_ == nil { 21198 c.header_ = make(http.Header) 21199 } 21200 return c.header_ 21201} 21202 21203func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { 21204 reqHeaders := make(http.Header) 21205 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21206 for k, v := range c.header_ { 21207 reqHeaders[k] = v 21208 } 21209 reqHeaders.Set("User-Agent", c.s.userAgent()) 21210 if c.ifNoneMatch_ != "" { 21211 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21212 } 21213 var body io.Reader = nil 21214 c.urlParams_.Set("alt", alt) 21215 c.urlParams_.Set("prettyPrint", "false") 21216 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") 21217 urls += "?" + c.urlParams_.Encode() 21218 req, err := http.NewRequest("GET", urls, body) 21219 if err != nil { 21220 return nil, err 21221 } 21222 req.Header = reqHeaders 21223 googleapi.Expand(req.URL, map[string]string{ 21224 "merchantId": strconv.FormatUint(c.merchantId, 10), 21225 "merchantOrderId": c.merchantOrderId, 21226 }) 21227 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21228} 21229 21230// Do executes the "content.orders.getbymerchantorderid" call. 21231// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be 21232// non-nil. Any non-2xx status code is an error. Response headers are in 21233// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or 21234// (if a response was returned at all) in 21235// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21236// whether the returned error was because http.StatusNotModified was 21237// returned. 21238func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { 21239 gensupport.SetOptions(c.urlParams_, opts...) 21240 res, err := c.doRequest("json") 21241 if res != nil && res.StatusCode == http.StatusNotModified { 21242 if res.Body != nil { 21243 res.Body.Close() 21244 } 21245 return nil, &googleapi.Error{ 21246 Code: res.StatusCode, 21247 Header: res.Header, 21248 } 21249 } 21250 if err != nil { 21251 return nil, err 21252 } 21253 defer googleapi.CloseBody(res) 21254 if err := googleapi.CheckResponse(res); err != nil { 21255 return nil, err 21256 } 21257 ret := &OrdersGetByMerchantOrderIdResponse{ 21258 ServerResponse: googleapi.ServerResponse{ 21259 Header: res.Header, 21260 HTTPStatusCode: res.StatusCode, 21261 }, 21262 } 21263 target := &ret 21264 if err := gensupport.DecodeResponse(target, res); err != nil { 21265 return nil, err 21266 } 21267 return ret, nil 21268 // { 21269 // "description": "Retrieves an order using merchant order ID.", 21270 // "httpMethod": "GET", 21271 // "id": "content.orders.getbymerchantorderid", 21272 // "parameterOrder": [ 21273 // "merchantId", 21274 // "merchantOrderId" 21275 // ], 21276 // "parameters": { 21277 // "merchantId": { 21278 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21279 // "format": "uint64", 21280 // "location": "path", 21281 // "required": true, 21282 // "type": "string" 21283 // }, 21284 // "merchantOrderId": { 21285 // "description": "The merchant order ID to be looked for.", 21286 // "location": "path", 21287 // "required": true, 21288 // "type": "string" 21289 // } 21290 // }, 21291 // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 21292 // "response": { 21293 // "$ref": "OrdersGetByMerchantOrderIdResponse" 21294 // }, 21295 // "scopes": [ 21296 // "https://www.googleapis.com/auth/content" 21297 // ] 21298 // } 21299 21300} 21301 21302// method id "content.orders.gettestordertemplate": 21303 21304type OrdersGettestordertemplateCall struct { 21305 s *APIService 21306 merchantId uint64 21307 templateName string 21308 urlParams_ gensupport.URLParams 21309 ifNoneMatch_ string 21310 ctx_ context.Context 21311 header_ http.Header 21312} 21313 21314// Gettestordertemplate: Sandbox only. Retrieves an order template that 21315// can be used to quickly create a new order in sandbox. 21316func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { 21317 c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21318 c.merchantId = merchantId 21319 c.templateName = templateName 21320 return c 21321} 21322 21323// Country sets the optional parameter "country": The country of the 21324// template to retrieve. Defaults to `US`. 21325func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { 21326 c.urlParams_.Set("country", country) 21327 return c 21328} 21329 21330// Fields allows partial responses to be retrieved. See 21331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21332// for more information. 21333func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { 21334 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21335 return c 21336} 21337 21338// IfNoneMatch sets the optional parameter which makes the operation 21339// fail if the object's ETag matches the given value. This is useful for 21340// getting updates only after the object has changed since the last 21341// request. Use googleapi.IsNotModified to check whether the response 21342// error from Do is the result of In-None-Match. 21343func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { 21344 c.ifNoneMatch_ = entityTag 21345 return c 21346} 21347 21348// Context sets the context to be used in this call's Do method. Any 21349// pending HTTP request will be aborted if the provided context is 21350// canceled. 21351func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { 21352 c.ctx_ = ctx 21353 return c 21354} 21355 21356// Header returns an http.Header that can be modified by the caller to 21357// add HTTP headers to the request. 21358func (c *OrdersGettestordertemplateCall) Header() http.Header { 21359 if c.header_ == nil { 21360 c.header_ = make(http.Header) 21361 } 21362 return c.header_ 21363} 21364 21365func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { 21366 reqHeaders := make(http.Header) 21367 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21368 for k, v := range c.header_ { 21369 reqHeaders[k] = v 21370 } 21371 reqHeaders.Set("User-Agent", c.s.userAgent()) 21372 if c.ifNoneMatch_ != "" { 21373 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21374 } 21375 var body io.Reader = nil 21376 c.urlParams_.Set("alt", alt) 21377 c.urlParams_.Set("prettyPrint", "false") 21378 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") 21379 urls += "?" + c.urlParams_.Encode() 21380 req, err := http.NewRequest("GET", urls, body) 21381 if err != nil { 21382 return nil, err 21383 } 21384 req.Header = reqHeaders 21385 googleapi.Expand(req.URL, map[string]string{ 21386 "merchantId": strconv.FormatUint(c.merchantId, 10), 21387 "templateName": c.templateName, 21388 }) 21389 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21390} 21391 21392// Do executes the "content.orders.gettestordertemplate" call. 21393// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be 21394// non-nil. Any non-2xx status code is an error. Response headers are in 21395// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or 21396// (if a response was returned at all) in 21397// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21398// whether the returned error was because http.StatusNotModified was 21399// returned. 21400func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { 21401 gensupport.SetOptions(c.urlParams_, opts...) 21402 res, err := c.doRequest("json") 21403 if res != nil && res.StatusCode == http.StatusNotModified { 21404 if res.Body != nil { 21405 res.Body.Close() 21406 } 21407 return nil, &googleapi.Error{ 21408 Code: res.StatusCode, 21409 Header: res.Header, 21410 } 21411 } 21412 if err != nil { 21413 return nil, err 21414 } 21415 defer googleapi.CloseBody(res) 21416 if err := googleapi.CheckResponse(res); err != nil { 21417 return nil, err 21418 } 21419 ret := &OrdersGetTestOrderTemplateResponse{ 21420 ServerResponse: googleapi.ServerResponse{ 21421 Header: res.Header, 21422 HTTPStatusCode: res.StatusCode, 21423 }, 21424 } 21425 target := &ret 21426 if err := gensupport.DecodeResponse(target, res); err != nil { 21427 return nil, err 21428 } 21429 return ret, nil 21430 // { 21431 // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", 21432 // "httpMethod": "GET", 21433 // "id": "content.orders.gettestordertemplate", 21434 // "parameterOrder": [ 21435 // "merchantId", 21436 // "templateName" 21437 // ], 21438 // "parameters": { 21439 // "country": { 21440 // "description": "The country of the template to retrieve. Defaults to `US`.", 21441 // "location": "query", 21442 // "type": "string" 21443 // }, 21444 // "merchantId": { 21445 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 21446 // "format": "uint64", 21447 // "location": "path", 21448 // "required": true, 21449 // "type": "string" 21450 // }, 21451 // "templateName": { 21452 // "description": "The name of the template to retrieve.", 21453 // "enum": [ 21454 // "template1", 21455 // "template1a", 21456 // "template1b", 21457 // "template2", 21458 // "template3" 21459 // ], 21460 // "enumDescriptions": [ 21461 // "", 21462 // "", 21463 // "", 21464 // "", 21465 // "" 21466 // ], 21467 // "location": "path", 21468 // "required": true, 21469 // "type": "string" 21470 // } 21471 // }, 21472 // "path": "{merchantId}/testordertemplates/{templateName}", 21473 // "response": { 21474 // "$ref": "OrdersGetTestOrderTemplateResponse" 21475 // }, 21476 // "scopes": [ 21477 // "https://www.googleapis.com/auth/content" 21478 // ] 21479 // } 21480 21481} 21482 21483// method id "content.orders.instorerefundlineitem": 21484 21485type OrdersInstorerefundlineitemCall struct { 21486 s *APIService 21487 merchantId uint64 21488 orderId string 21489 ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest 21490 urlParams_ gensupport.URLParams 21491 ctx_ context.Context 21492 header_ http.Header 21493} 21494 21495// Instorerefundlineitem: Deprecated. Notifies that item return and 21496// refund was handled directly by merchant outside of Google payments 21497// processing (e.g. cash refund done in store). 21498// Note: We recommend calling the returnrefundlineitem method to refund 21499// in-store returns. We will issue the refund directly to the customer. 21500// This helps to prevent possible differences arising between merchant 21501// and Google transaction records. We also recommend having the point of 21502// sale system communicate with Google to ensure that customers do not 21503// receive a double refund by first refunding via Google then via an 21504// in-store return. 21505func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { 21506 c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21507 c.merchantId = merchantId 21508 c.orderId = orderId 21509 c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest 21510 return c 21511} 21512 21513// Fields allows partial responses to be retrieved. See 21514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21515// for more information. 21516func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { 21517 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21518 return c 21519} 21520 21521// Context sets the context to be used in this call's Do method. Any 21522// pending HTTP request will be aborted if the provided context is 21523// canceled. 21524func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { 21525 c.ctx_ = ctx 21526 return c 21527} 21528 21529// Header returns an http.Header that can be modified by the caller to 21530// add HTTP headers to the request. 21531func (c *OrdersInstorerefundlineitemCall) Header() http.Header { 21532 if c.header_ == nil { 21533 c.header_ = make(http.Header) 21534 } 21535 return c.header_ 21536} 21537 21538func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { 21539 reqHeaders := make(http.Header) 21540 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21541 for k, v := range c.header_ { 21542 reqHeaders[k] = v 21543 } 21544 reqHeaders.Set("User-Agent", c.s.userAgent()) 21545 var body io.Reader = nil 21546 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) 21547 if err != nil { 21548 return nil, err 21549 } 21550 reqHeaders.Set("Content-Type", "application/json") 21551 c.urlParams_.Set("alt", alt) 21552 c.urlParams_.Set("prettyPrint", "false") 21553 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") 21554 urls += "?" + c.urlParams_.Encode() 21555 req, err := http.NewRequest("POST", urls, body) 21556 if err != nil { 21557 return nil, err 21558 } 21559 req.Header = reqHeaders 21560 googleapi.Expand(req.URL, map[string]string{ 21561 "merchantId": strconv.FormatUint(c.merchantId, 10), 21562 "orderId": c.orderId, 21563 }) 21564 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21565} 21566 21567// Do executes the "content.orders.instorerefundlineitem" call. 21568// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be 21569// non-nil. Any non-2xx status code is an error. Response headers are in 21570// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or 21571// (if a response was returned at all) in 21572// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21573// whether the returned error was because http.StatusNotModified was 21574// returned. 21575func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { 21576 gensupport.SetOptions(c.urlParams_, opts...) 21577 res, err := c.doRequest("json") 21578 if res != nil && res.StatusCode == http.StatusNotModified { 21579 if res.Body != nil { 21580 res.Body.Close() 21581 } 21582 return nil, &googleapi.Error{ 21583 Code: res.StatusCode, 21584 Header: res.Header, 21585 } 21586 } 21587 if err != nil { 21588 return nil, err 21589 } 21590 defer googleapi.CloseBody(res) 21591 if err := googleapi.CheckResponse(res); err != nil { 21592 return nil, err 21593 } 21594 ret := &OrdersInStoreRefundLineItemResponse{ 21595 ServerResponse: googleapi.ServerResponse{ 21596 Header: res.Header, 21597 HTTPStatusCode: res.StatusCode, 21598 }, 21599 } 21600 target := &ret 21601 if err := gensupport.DecodeResponse(target, res); err != nil { 21602 return nil, err 21603 } 21604 return ret, nil 21605 // { 21606 // "description": "Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).\nNote: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.", 21607 // "httpMethod": "POST", 21608 // "id": "content.orders.instorerefundlineitem", 21609 // "parameterOrder": [ 21610 // "merchantId", 21611 // "orderId" 21612 // ], 21613 // "parameters": { 21614 // "merchantId": { 21615 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21616 // "format": "uint64", 21617 // "location": "path", 21618 // "required": true, 21619 // "type": "string" 21620 // }, 21621 // "orderId": { 21622 // "description": "The ID of the order.", 21623 // "location": "path", 21624 // "required": true, 21625 // "type": "string" 21626 // } 21627 // }, 21628 // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 21629 // "request": { 21630 // "$ref": "OrdersInStoreRefundLineItemRequest" 21631 // }, 21632 // "response": { 21633 // "$ref": "OrdersInStoreRefundLineItemResponse" 21634 // }, 21635 // "scopes": [ 21636 // "https://www.googleapis.com/auth/content" 21637 // ] 21638 // } 21639 21640} 21641 21642// method id "content.orders.list": 21643 21644type OrdersListCall struct { 21645 s *APIService 21646 merchantId uint64 21647 urlParams_ gensupport.URLParams 21648 ifNoneMatch_ string 21649 ctx_ context.Context 21650 header_ http.Header 21651} 21652 21653// List: Lists the orders in your Merchant Center account. 21654func (r *OrdersService) List(merchantId uint64) *OrdersListCall { 21655 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21656 c.merchantId = merchantId 21657 return c 21658} 21659 21660// Acknowledged sets the optional parameter "acknowledged": Obtains 21661// orders that match the acknowledgement status. When set to true, 21662// obtains orders that have been acknowledged. When false, obtains 21663// orders that have not been acknowledged. 21664// We recommend using this filter set to `false`, in conjunction with 21665// the `acknowledge` call, such that only un-acknowledged orders are 21666// returned. 21667func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { 21668 c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) 21669 return c 21670} 21671 21672// MaxResults sets the optional parameter "maxResults": The maximum 21673// number of orders to return in the response, used for paging. The 21674// default value is 25 orders per page, and the maximum allowed value is 21675// 250 orders per page. 21676func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { 21677 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 21678 return c 21679} 21680 21681// OrderBy sets the optional parameter "orderBy": Order results by 21682// placement date in descending or ascending order. 21683// 21684// Acceptable values are: 21685// - placedDateAsc 21686// - placedDateDesc 21687func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { 21688 c.urlParams_.Set("orderBy", orderBy) 21689 return c 21690} 21691 21692// PageToken sets the optional parameter "pageToken": The token returned 21693// by the previous request. 21694func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { 21695 c.urlParams_.Set("pageToken", pageToken) 21696 return c 21697} 21698 21699// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains 21700// orders placed before this date (exclusively), in ISO 8601 format. 21701func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { 21702 c.urlParams_.Set("placedDateEnd", placedDateEnd) 21703 return c 21704} 21705 21706// PlacedDateStart sets the optional parameter "placedDateStart": 21707// Obtains orders placed after this date (inclusively), in ISO 8601 21708// format. 21709func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { 21710 c.urlParams_.Set("placedDateStart", placedDateStart) 21711 return c 21712} 21713 21714// Statuses sets the optional parameter "statuses": Obtains orders that 21715// match any of the specified statuses. Please note that `active` is a 21716// shortcut for `pendingShipment` and `partiallyShipped`, and 21717// `completed` is a shortcut for `shipped`, `partiallyDelivered`, 21718// `delivered`, `partiallyReturned`, `returned`, and `canceled`. 21719// 21720// Possible values: 21721// "active" 21722// "canceled" 21723// "completed" 21724// "delivered" 21725// "inProgress" 21726// "partiallyDelivered" 21727// "partiallyReturned" 21728// "partiallyShipped" 21729// "pendingShipment" 21730// "returned" 21731// "shipped" 21732func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { 21733 c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) 21734 return c 21735} 21736 21737// Fields allows partial responses to be retrieved. See 21738// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21739// for more information. 21740func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { 21741 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21742 return c 21743} 21744 21745// IfNoneMatch sets the optional parameter which makes the operation 21746// fail if the object's ETag matches the given value. This is useful for 21747// getting updates only after the object has changed since the last 21748// request. Use googleapi.IsNotModified to check whether the response 21749// error from Do is the result of In-None-Match. 21750func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { 21751 c.ifNoneMatch_ = entityTag 21752 return c 21753} 21754 21755// Context sets the context to be used in this call's Do method. Any 21756// pending HTTP request will be aborted if the provided context is 21757// canceled. 21758func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { 21759 c.ctx_ = ctx 21760 return c 21761} 21762 21763// Header returns an http.Header that can be modified by the caller to 21764// add HTTP headers to the request. 21765func (c *OrdersListCall) Header() http.Header { 21766 if c.header_ == nil { 21767 c.header_ = make(http.Header) 21768 } 21769 return c.header_ 21770} 21771 21772func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { 21773 reqHeaders := make(http.Header) 21774 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21775 for k, v := range c.header_ { 21776 reqHeaders[k] = v 21777 } 21778 reqHeaders.Set("User-Agent", c.s.userAgent()) 21779 if c.ifNoneMatch_ != "" { 21780 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21781 } 21782 var body io.Reader = nil 21783 c.urlParams_.Set("alt", alt) 21784 c.urlParams_.Set("prettyPrint", "false") 21785 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") 21786 urls += "?" + c.urlParams_.Encode() 21787 req, err := http.NewRequest("GET", urls, body) 21788 if err != nil { 21789 return nil, err 21790 } 21791 req.Header = reqHeaders 21792 googleapi.Expand(req.URL, map[string]string{ 21793 "merchantId": strconv.FormatUint(c.merchantId, 10), 21794 }) 21795 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21796} 21797 21798// Do executes the "content.orders.list" call. 21799// Exactly one of *OrdersListResponse or error will be non-nil. Any 21800// non-2xx status code is an error. Response headers are in either 21801// *OrdersListResponse.ServerResponse.Header or (if a response was 21802// returned at all) in error.(*googleapi.Error).Header. Use 21803// googleapi.IsNotModified to check whether the returned error was 21804// because http.StatusNotModified was returned. 21805func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { 21806 gensupport.SetOptions(c.urlParams_, opts...) 21807 res, err := c.doRequest("json") 21808 if res != nil && res.StatusCode == http.StatusNotModified { 21809 if res.Body != nil { 21810 res.Body.Close() 21811 } 21812 return nil, &googleapi.Error{ 21813 Code: res.StatusCode, 21814 Header: res.Header, 21815 } 21816 } 21817 if err != nil { 21818 return nil, err 21819 } 21820 defer googleapi.CloseBody(res) 21821 if err := googleapi.CheckResponse(res); err != nil { 21822 return nil, err 21823 } 21824 ret := &OrdersListResponse{ 21825 ServerResponse: googleapi.ServerResponse{ 21826 Header: res.Header, 21827 HTTPStatusCode: res.StatusCode, 21828 }, 21829 } 21830 target := &ret 21831 if err := gensupport.DecodeResponse(target, res); err != nil { 21832 return nil, err 21833 } 21834 return ret, nil 21835 // { 21836 // "description": "Lists the orders in your Merchant Center account.", 21837 // "httpMethod": "GET", 21838 // "id": "content.orders.list", 21839 // "parameterOrder": [ 21840 // "merchantId" 21841 // ], 21842 // "parameters": { 21843 // "acknowledged": { 21844 // "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.", 21845 // "location": "query", 21846 // "type": "boolean" 21847 // }, 21848 // "maxResults": { 21849 // "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.", 21850 // "format": "uint32", 21851 // "location": "query", 21852 // "type": "integer" 21853 // }, 21854 // "merchantId": { 21855 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21856 // "format": "uint64", 21857 // "location": "path", 21858 // "required": true, 21859 // "type": "string" 21860 // }, 21861 // "orderBy": { 21862 // "description": "Order results by placement date in descending or ascending order.\n\nAcceptable values are:\n- placedDateAsc\n- placedDateDesc", 21863 // "location": "query", 21864 // "type": "string" 21865 // }, 21866 // "pageToken": { 21867 // "description": "The token returned by the previous request.", 21868 // "location": "query", 21869 // "type": "string" 21870 // }, 21871 // "placedDateEnd": { 21872 // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", 21873 // "location": "query", 21874 // "type": "string" 21875 // }, 21876 // "placedDateStart": { 21877 // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", 21878 // "location": "query", 21879 // "type": "string" 21880 // }, 21881 // "statuses": { 21882 // "description": "Obtains orders that match any of the specified statuses. Please note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`.", 21883 // "enum": [ 21884 // "active", 21885 // "canceled", 21886 // "completed", 21887 // "delivered", 21888 // "inProgress", 21889 // "partiallyDelivered", 21890 // "partiallyReturned", 21891 // "partiallyShipped", 21892 // "pendingShipment", 21893 // "returned", 21894 // "shipped" 21895 // ], 21896 // "enumDescriptions": [ 21897 // "", 21898 // "", 21899 // "", 21900 // "", 21901 // "", 21902 // "", 21903 // "", 21904 // "", 21905 // "", 21906 // "", 21907 // "" 21908 // ], 21909 // "location": "query", 21910 // "repeated": true, 21911 // "type": "string" 21912 // } 21913 // }, 21914 // "path": "{merchantId}/orders", 21915 // "response": { 21916 // "$ref": "OrdersListResponse" 21917 // }, 21918 // "scopes": [ 21919 // "https://www.googleapis.com/auth/content" 21920 // ] 21921 // } 21922 21923} 21924 21925// Pages invokes f for each page of results. 21926// A non-nil error returned from f will halt the iteration. 21927// The provided context supersedes any context provided to the Context method. 21928func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { 21929 c.ctx_ = ctx 21930 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21931 for { 21932 x, err := c.Do() 21933 if err != nil { 21934 return err 21935 } 21936 if err := f(x); err != nil { 21937 return err 21938 } 21939 if x.NextPageToken == "" { 21940 return nil 21941 } 21942 c.PageToken(x.NextPageToken) 21943 } 21944} 21945 21946// method id "content.orders.refund": 21947 21948type OrdersRefundCall struct { 21949 s *APIService 21950 merchantId uint64 21951 orderId string 21952 ordersrefundrequest *OrdersRefundRequest 21953 urlParams_ gensupport.URLParams 21954 ctx_ context.Context 21955 header_ http.Header 21956} 21957 21958// Refund: Deprecated, please use returnRefundLineItem instead. 21959func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall { 21960 c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21961 c.merchantId = merchantId 21962 c.orderId = orderId 21963 c.ordersrefundrequest = ordersrefundrequest 21964 return c 21965} 21966 21967// Fields allows partial responses to be retrieved. See 21968// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21969// for more information. 21970func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall { 21971 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21972 return c 21973} 21974 21975// Context sets the context to be used in this call's Do method. Any 21976// pending HTTP request will be aborted if the provided context is 21977// canceled. 21978func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall { 21979 c.ctx_ = ctx 21980 return c 21981} 21982 21983// Header returns an http.Header that can be modified by the caller to 21984// add HTTP headers to the request. 21985func (c *OrdersRefundCall) Header() http.Header { 21986 if c.header_ == nil { 21987 c.header_ = make(http.Header) 21988 } 21989 return c.header_ 21990} 21991 21992func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) { 21993 reqHeaders := make(http.Header) 21994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21995 for k, v := range c.header_ { 21996 reqHeaders[k] = v 21997 } 21998 reqHeaders.Set("User-Agent", c.s.userAgent()) 21999 var body io.Reader = nil 22000 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest) 22001 if err != nil { 22002 return nil, err 22003 } 22004 reqHeaders.Set("Content-Type", "application/json") 22005 c.urlParams_.Set("alt", alt) 22006 c.urlParams_.Set("prettyPrint", "false") 22007 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund") 22008 urls += "?" + c.urlParams_.Encode() 22009 req, err := http.NewRequest("POST", urls, body) 22010 if err != nil { 22011 return nil, err 22012 } 22013 req.Header = reqHeaders 22014 googleapi.Expand(req.URL, map[string]string{ 22015 "merchantId": strconv.FormatUint(c.merchantId, 10), 22016 "orderId": c.orderId, 22017 }) 22018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22019} 22020 22021// Do executes the "content.orders.refund" call. 22022// Exactly one of *OrdersRefundResponse or error will be non-nil. Any 22023// non-2xx status code is an error. Response headers are in either 22024// *OrdersRefundResponse.ServerResponse.Header or (if a response was 22025// returned at all) in error.(*googleapi.Error).Header. Use 22026// googleapi.IsNotModified to check whether the returned error was 22027// because http.StatusNotModified was returned. 22028func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) { 22029 gensupport.SetOptions(c.urlParams_, opts...) 22030 res, err := c.doRequest("json") 22031 if res != nil && res.StatusCode == http.StatusNotModified { 22032 if res.Body != nil { 22033 res.Body.Close() 22034 } 22035 return nil, &googleapi.Error{ 22036 Code: res.StatusCode, 22037 Header: res.Header, 22038 } 22039 } 22040 if err != nil { 22041 return nil, err 22042 } 22043 defer googleapi.CloseBody(res) 22044 if err := googleapi.CheckResponse(res); err != nil { 22045 return nil, err 22046 } 22047 ret := &OrdersRefundResponse{ 22048 ServerResponse: googleapi.ServerResponse{ 22049 Header: res.Header, 22050 HTTPStatusCode: res.StatusCode, 22051 }, 22052 } 22053 target := &ret 22054 if err := gensupport.DecodeResponse(target, res); err != nil { 22055 return nil, err 22056 } 22057 return ret, nil 22058 // { 22059 // "description": "Deprecated, please use returnRefundLineItem instead.", 22060 // "httpMethod": "POST", 22061 // "id": "content.orders.refund", 22062 // "parameterOrder": [ 22063 // "merchantId", 22064 // "orderId" 22065 // ], 22066 // "parameters": { 22067 // "merchantId": { 22068 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22069 // "format": "uint64", 22070 // "location": "path", 22071 // "required": true, 22072 // "type": "string" 22073 // }, 22074 // "orderId": { 22075 // "description": "The ID of the order to refund.", 22076 // "location": "path", 22077 // "required": true, 22078 // "type": "string" 22079 // } 22080 // }, 22081 // "path": "{merchantId}/orders/{orderId}/refund", 22082 // "request": { 22083 // "$ref": "OrdersRefundRequest" 22084 // }, 22085 // "response": { 22086 // "$ref": "OrdersRefundResponse" 22087 // }, 22088 // "scopes": [ 22089 // "https://www.googleapis.com/auth/content" 22090 // ] 22091 // } 22092 22093} 22094 22095// method id "content.orders.rejectreturnlineitem": 22096 22097type OrdersRejectreturnlineitemCall struct { 22098 s *APIService 22099 merchantId uint64 22100 orderId string 22101 ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest 22102 urlParams_ gensupport.URLParams 22103 ctx_ context.Context 22104 header_ http.Header 22105} 22106 22107// Rejectreturnlineitem: Rejects return on an line item. 22108func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { 22109 c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22110 c.merchantId = merchantId 22111 c.orderId = orderId 22112 c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest 22113 return c 22114} 22115 22116// Fields allows partial responses to be retrieved. See 22117// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22118// for more information. 22119func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { 22120 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22121 return c 22122} 22123 22124// Context sets the context to be used in this call's Do method. Any 22125// pending HTTP request will be aborted if the provided context is 22126// canceled. 22127func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { 22128 c.ctx_ = ctx 22129 return c 22130} 22131 22132// Header returns an http.Header that can be modified by the caller to 22133// add HTTP headers to the request. 22134func (c *OrdersRejectreturnlineitemCall) Header() http.Header { 22135 if c.header_ == nil { 22136 c.header_ = make(http.Header) 22137 } 22138 return c.header_ 22139} 22140 22141func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { 22142 reqHeaders := make(http.Header) 22143 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22144 for k, v := range c.header_ { 22145 reqHeaders[k] = v 22146 } 22147 reqHeaders.Set("User-Agent", c.s.userAgent()) 22148 var body io.Reader = nil 22149 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) 22150 if err != nil { 22151 return nil, err 22152 } 22153 reqHeaders.Set("Content-Type", "application/json") 22154 c.urlParams_.Set("alt", alt) 22155 c.urlParams_.Set("prettyPrint", "false") 22156 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") 22157 urls += "?" + c.urlParams_.Encode() 22158 req, err := http.NewRequest("POST", urls, body) 22159 if err != nil { 22160 return nil, err 22161 } 22162 req.Header = reqHeaders 22163 googleapi.Expand(req.URL, map[string]string{ 22164 "merchantId": strconv.FormatUint(c.merchantId, 10), 22165 "orderId": c.orderId, 22166 }) 22167 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22168} 22169 22170// Do executes the "content.orders.rejectreturnlineitem" call. 22171// Exactly one of *OrdersRejectReturnLineItemResponse or error will be 22172// non-nil. Any non-2xx status code is an error. Response headers are in 22173// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or 22174// (if a response was returned at all) in 22175// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22176// whether the returned error was because http.StatusNotModified was 22177// returned. 22178func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { 22179 gensupport.SetOptions(c.urlParams_, opts...) 22180 res, err := c.doRequest("json") 22181 if res != nil && res.StatusCode == http.StatusNotModified { 22182 if res.Body != nil { 22183 res.Body.Close() 22184 } 22185 return nil, &googleapi.Error{ 22186 Code: res.StatusCode, 22187 Header: res.Header, 22188 } 22189 } 22190 if err != nil { 22191 return nil, err 22192 } 22193 defer googleapi.CloseBody(res) 22194 if err := googleapi.CheckResponse(res); err != nil { 22195 return nil, err 22196 } 22197 ret := &OrdersRejectReturnLineItemResponse{ 22198 ServerResponse: googleapi.ServerResponse{ 22199 Header: res.Header, 22200 HTTPStatusCode: res.StatusCode, 22201 }, 22202 } 22203 target := &ret 22204 if err := gensupport.DecodeResponse(target, res); err != nil { 22205 return nil, err 22206 } 22207 return ret, nil 22208 // { 22209 // "description": "Rejects return on an line item.", 22210 // "httpMethod": "POST", 22211 // "id": "content.orders.rejectreturnlineitem", 22212 // "parameterOrder": [ 22213 // "merchantId", 22214 // "orderId" 22215 // ], 22216 // "parameters": { 22217 // "merchantId": { 22218 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22219 // "format": "uint64", 22220 // "location": "path", 22221 // "required": true, 22222 // "type": "string" 22223 // }, 22224 // "orderId": { 22225 // "description": "The ID of the order.", 22226 // "location": "path", 22227 // "required": true, 22228 // "type": "string" 22229 // } 22230 // }, 22231 // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 22232 // "request": { 22233 // "$ref": "OrdersRejectReturnLineItemRequest" 22234 // }, 22235 // "response": { 22236 // "$ref": "OrdersRejectReturnLineItemResponse" 22237 // }, 22238 // "scopes": [ 22239 // "https://www.googleapis.com/auth/content" 22240 // ] 22241 // } 22242 22243} 22244 22245// method id "content.orders.returnlineitem": 22246 22247type OrdersReturnlineitemCall struct { 22248 s *APIService 22249 merchantId uint64 22250 orderId string 22251 ordersreturnlineitemrequest *OrdersReturnLineItemRequest 22252 urlParams_ gensupport.URLParams 22253 ctx_ context.Context 22254 header_ http.Header 22255} 22256 22257// Returnlineitem: Returns a line item. 22258func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall { 22259 c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22260 c.merchantId = merchantId 22261 c.orderId = orderId 22262 c.ordersreturnlineitemrequest = ordersreturnlineitemrequest 22263 return c 22264} 22265 22266// Fields allows partial responses to be retrieved. See 22267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22268// for more information. 22269func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall { 22270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22271 return c 22272} 22273 22274// Context sets the context to be used in this call's Do method. Any 22275// pending HTTP request will be aborted if the provided context is 22276// canceled. 22277func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall { 22278 c.ctx_ = ctx 22279 return c 22280} 22281 22282// Header returns an http.Header that can be modified by the caller to 22283// add HTTP headers to the request. 22284func (c *OrdersReturnlineitemCall) Header() http.Header { 22285 if c.header_ == nil { 22286 c.header_ = make(http.Header) 22287 } 22288 return c.header_ 22289} 22290 22291func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) { 22292 reqHeaders := make(http.Header) 22293 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22294 for k, v := range c.header_ { 22295 reqHeaders[k] = v 22296 } 22297 reqHeaders.Set("User-Agent", c.s.userAgent()) 22298 var body io.Reader = nil 22299 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest) 22300 if err != nil { 22301 return nil, err 22302 } 22303 reqHeaders.Set("Content-Type", "application/json") 22304 c.urlParams_.Set("alt", alt) 22305 c.urlParams_.Set("prettyPrint", "false") 22306 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem") 22307 urls += "?" + c.urlParams_.Encode() 22308 req, err := http.NewRequest("POST", urls, body) 22309 if err != nil { 22310 return nil, err 22311 } 22312 req.Header = reqHeaders 22313 googleapi.Expand(req.URL, map[string]string{ 22314 "merchantId": strconv.FormatUint(c.merchantId, 10), 22315 "orderId": c.orderId, 22316 }) 22317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22318} 22319 22320// Do executes the "content.orders.returnlineitem" call. 22321// Exactly one of *OrdersReturnLineItemResponse or error will be 22322// non-nil. Any non-2xx status code is an error. Response headers are in 22323// either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a 22324// response was returned at all) in error.(*googleapi.Error).Header. Use 22325// googleapi.IsNotModified to check whether the returned error was 22326// because http.StatusNotModified was returned. 22327func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) { 22328 gensupport.SetOptions(c.urlParams_, opts...) 22329 res, err := c.doRequest("json") 22330 if res != nil && res.StatusCode == http.StatusNotModified { 22331 if res.Body != nil { 22332 res.Body.Close() 22333 } 22334 return nil, &googleapi.Error{ 22335 Code: res.StatusCode, 22336 Header: res.Header, 22337 } 22338 } 22339 if err != nil { 22340 return nil, err 22341 } 22342 defer googleapi.CloseBody(res) 22343 if err := googleapi.CheckResponse(res); err != nil { 22344 return nil, err 22345 } 22346 ret := &OrdersReturnLineItemResponse{ 22347 ServerResponse: googleapi.ServerResponse{ 22348 Header: res.Header, 22349 HTTPStatusCode: res.StatusCode, 22350 }, 22351 } 22352 target := &ret 22353 if err := gensupport.DecodeResponse(target, res); err != nil { 22354 return nil, err 22355 } 22356 return ret, nil 22357 // { 22358 // "description": "Returns a line item.", 22359 // "httpMethod": "POST", 22360 // "id": "content.orders.returnlineitem", 22361 // "parameterOrder": [ 22362 // "merchantId", 22363 // "orderId" 22364 // ], 22365 // "parameters": { 22366 // "merchantId": { 22367 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22368 // "format": "uint64", 22369 // "location": "path", 22370 // "required": true, 22371 // "type": "string" 22372 // }, 22373 // "orderId": { 22374 // "description": "The ID of the order.", 22375 // "location": "path", 22376 // "required": true, 22377 // "type": "string" 22378 // } 22379 // }, 22380 // "path": "{merchantId}/orders/{orderId}/returnLineItem", 22381 // "request": { 22382 // "$ref": "OrdersReturnLineItemRequest" 22383 // }, 22384 // "response": { 22385 // "$ref": "OrdersReturnLineItemResponse" 22386 // }, 22387 // "scopes": [ 22388 // "https://www.googleapis.com/auth/content" 22389 // ] 22390 // } 22391 22392} 22393 22394// method id "content.orders.returnrefundlineitem": 22395 22396type OrdersReturnrefundlineitemCall struct { 22397 s *APIService 22398 merchantId uint64 22399 orderId string 22400 ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest 22401 urlParams_ gensupport.URLParams 22402 ctx_ context.Context 22403 header_ http.Header 22404} 22405 22406// Returnrefundlineitem: Returns and refunds a line item. Note that this 22407// method can only be called on fully shipped orders. 22408func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { 22409 c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22410 c.merchantId = merchantId 22411 c.orderId = orderId 22412 c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest 22413 return c 22414} 22415 22416// Fields allows partial responses to be retrieved. See 22417// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22418// for more information. 22419func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { 22420 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22421 return c 22422} 22423 22424// Context sets the context to be used in this call's Do method. Any 22425// pending HTTP request will be aborted if the provided context is 22426// canceled. 22427func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { 22428 c.ctx_ = ctx 22429 return c 22430} 22431 22432// Header returns an http.Header that can be modified by the caller to 22433// add HTTP headers to the request. 22434func (c *OrdersReturnrefundlineitemCall) Header() http.Header { 22435 if c.header_ == nil { 22436 c.header_ = make(http.Header) 22437 } 22438 return c.header_ 22439} 22440 22441func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { 22442 reqHeaders := make(http.Header) 22443 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22444 for k, v := range c.header_ { 22445 reqHeaders[k] = v 22446 } 22447 reqHeaders.Set("User-Agent", c.s.userAgent()) 22448 var body io.Reader = nil 22449 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) 22450 if err != nil { 22451 return nil, err 22452 } 22453 reqHeaders.Set("Content-Type", "application/json") 22454 c.urlParams_.Set("alt", alt) 22455 c.urlParams_.Set("prettyPrint", "false") 22456 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") 22457 urls += "?" + c.urlParams_.Encode() 22458 req, err := http.NewRequest("POST", urls, body) 22459 if err != nil { 22460 return nil, err 22461 } 22462 req.Header = reqHeaders 22463 googleapi.Expand(req.URL, map[string]string{ 22464 "merchantId": strconv.FormatUint(c.merchantId, 10), 22465 "orderId": c.orderId, 22466 }) 22467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22468} 22469 22470// Do executes the "content.orders.returnrefundlineitem" call. 22471// Exactly one of *OrdersReturnRefundLineItemResponse or error will be 22472// non-nil. Any non-2xx status code is an error. Response headers are in 22473// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or 22474// (if a response was returned at all) in 22475// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22476// whether the returned error was because http.StatusNotModified was 22477// returned. 22478func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { 22479 gensupport.SetOptions(c.urlParams_, opts...) 22480 res, err := c.doRequest("json") 22481 if res != nil && res.StatusCode == http.StatusNotModified { 22482 if res.Body != nil { 22483 res.Body.Close() 22484 } 22485 return nil, &googleapi.Error{ 22486 Code: res.StatusCode, 22487 Header: res.Header, 22488 } 22489 } 22490 if err != nil { 22491 return nil, err 22492 } 22493 defer googleapi.CloseBody(res) 22494 if err := googleapi.CheckResponse(res); err != nil { 22495 return nil, err 22496 } 22497 ret := &OrdersReturnRefundLineItemResponse{ 22498 ServerResponse: googleapi.ServerResponse{ 22499 Header: res.Header, 22500 HTTPStatusCode: res.StatusCode, 22501 }, 22502 } 22503 target := &ret 22504 if err := gensupport.DecodeResponse(target, res); err != nil { 22505 return nil, err 22506 } 22507 return ret, nil 22508 // { 22509 // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.", 22510 // "httpMethod": "POST", 22511 // "id": "content.orders.returnrefundlineitem", 22512 // "parameterOrder": [ 22513 // "merchantId", 22514 // "orderId" 22515 // ], 22516 // "parameters": { 22517 // "merchantId": { 22518 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22519 // "format": "uint64", 22520 // "location": "path", 22521 // "required": true, 22522 // "type": "string" 22523 // }, 22524 // "orderId": { 22525 // "description": "The ID of the order.", 22526 // "location": "path", 22527 // "required": true, 22528 // "type": "string" 22529 // } 22530 // }, 22531 // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", 22532 // "request": { 22533 // "$ref": "OrdersReturnRefundLineItemRequest" 22534 // }, 22535 // "response": { 22536 // "$ref": "OrdersReturnRefundLineItemResponse" 22537 // }, 22538 // "scopes": [ 22539 // "https://www.googleapis.com/auth/content" 22540 // ] 22541 // } 22542 22543} 22544 22545// method id "content.orders.setlineitemmetadata": 22546 22547type OrdersSetlineitemmetadataCall struct { 22548 s *APIService 22549 merchantId uint64 22550 orderId string 22551 orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest 22552 urlParams_ gensupport.URLParams 22553 ctx_ context.Context 22554 header_ http.Header 22555} 22556 22557// Setlineitemmetadata: Sets (or overrides if it already exists) 22558// merchant provided annotations in the form of key-value pairs. A 22559// common use case would be to supply us with additional structured 22560// information about a line item that cannot be provided via other 22561// methods. Submitted key-value pairs can be retrieved as part of the 22562// orders resource. 22563func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { 22564 c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22565 c.merchantId = merchantId 22566 c.orderId = orderId 22567 c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest 22568 return c 22569} 22570 22571// Fields allows partial responses to be retrieved. See 22572// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22573// for more information. 22574func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { 22575 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22576 return c 22577} 22578 22579// Context sets the context to be used in this call's Do method. Any 22580// pending HTTP request will be aborted if the provided context is 22581// canceled. 22582func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { 22583 c.ctx_ = ctx 22584 return c 22585} 22586 22587// Header returns an http.Header that can be modified by the caller to 22588// add HTTP headers to the request. 22589func (c *OrdersSetlineitemmetadataCall) Header() http.Header { 22590 if c.header_ == nil { 22591 c.header_ = make(http.Header) 22592 } 22593 return c.header_ 22594} 22595 22596func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { 22597 reqHeaders := make(http.Header) 22598 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22599 for k, v := range c.header_ { 22600 reqHeaders[k] = v 22601 } 22602 reqHeaders.Set("User-Agent", c.s.userAgent()) 22603 var body io.Reader = nil 22604 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) 22605 if err != nil { 22606 return nil, err 22607 } 22608 reqHeaders.Set("Content-Type", "application/json") 22609 c.urlParams_.Set("alt", alt) 22610 c.urlParams_.Set("prettyPrint", "false") 22611 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") 22612 urls += "?" + c.urlParams_.Encode() 22613 req, err := http.NewRequest("POST", urls, body) 22614 if err != nil { 22615 return nil, err 22616 } 22617 req.Header = reqHeaders 22618 googleapi.Expand(req.URL, map[string]string{ 22619 "merchantId": strconv.FormatUint(c.merchantId, 10), 22620 "orderId": c.orderId, 22621 }) 22622 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22623} 22624 22625// Do executes the "content.orders.setlineitemmetadata" call. 22626// Exactly one of *OrdersSetLineItemMetadataResponse or error will be 22627// non-nil. Any non-2xx status code is an error. Response headers are in 22628// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or 22629// (if a response was returned at all) in 22630// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22631// whether the returned error was because http.StatusNotModified was 22632// returned. 22633func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { 22634 gensupport.SetOptions(c.urlParams_, opts...) 22635 res, err := c.doRequest("json") 22636 if res != nil && res.StatusCode == http.StatusNotModified { 22637 if res.Body != nil { 22638 res.Body.Close() 22639 } 22640 return nil, &googleapi.Error{ 22641 Code: res.StatusCode, 22642 Header: res.Header, 22643 } 22644 } 22645 if err != nil { 22646 return nil, err 22647 } 22648 defer googleapi.CloseBody(res) 22649 if err := googleapi.CheckResponse(res); err != nil { 22650 return nil, err 22651 } 22652 ret := &OrdersSetLineItemMetadataResponse{ 22653 ServerResponse: googleapi.ServerResponse{ 22654 Header: res.Header, 22655 HTTPStatusCode: res.StatusCode, 22656 }, 22657 } 22658 target := &ret 22659 if err := gensupport.DecodeResponse(target, res); err != nil { 22660 return nil, err 22661 } 22662 return ret, nil 22663 // { 22664 // "description": "Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.", 22665 // "httpMethod": "POST", 22666 // "id": "content.orders.setlineitemmetadata", 22667 // "parameterOrder": [ 22668 // "merchantId", 22669 // "orderId" 22670 // ], 22671 // "parameters": { 22672 // "merchantId": { 22673 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22674 // "format": "uint64", 22675 // "location": "path", 22676 // "required": true, 22677 // "type": "string" 22678 // }, 22679 // "orderId": { 22680 // "description": "The ID of the order.", 22681 // "location": "path", 22682 // "required": true, 22683 // "type": "string" 22684 // } 22685 // }, 22686 // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", 22687 // "request": { 22688 // "$ref": "OrdersSetLineItemMetadataRequest" 22689 // }, 22690 // "response": { 22691 // "$ref": "OrdersSetLineItemMetadataResponse" 22692 // }, 22693 // "scopes": [ 22694 // "https://www.googleapis.com/auth/content" 22695 // ] 22696 // } 22697 22698} 22699 22700// method id "content.orders.shiplineitems": 22701 22702type OrdersShiplineitemsCall struct { 22703 s *APIService 22704 merchantId uint64 22705 orderId string 22706 ordersshiplineitemsrequest *OrdersShipLineItemsRequest 22707 urlParams_ gensupport.URLParams 22708 ctx_ context.Context 22709 header_ http.Header 22710} 22711 22712// Shiplineitems: Marks line item(s) as shipped. 22713func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { 22714 c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22715 c.merchantId = merchantId 22716 c.orderId = orderId 22717 c.ordersshiplineitemsrequest = ordersshiplineitemsrequest 22718 return c 22719} 22720 22721// Fields allows partial responses to be retrieved. See 22722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22723// for more information. 22724func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { 22725 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22726 return c 22727} 22728 22729// Context sets the context to be used in this call's Do method. Any 22730// pending HTTP request will be aborted if the provided context is 22731// canceled. 22732func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { 22733 c.ctx_ = ctx 22734 return c 22735} 22736 22737// Header returns an http.Header that can be modified by the caller to 22738// add HTTP headers to the request. 22739func (c *OrdersShiplineitemsCall) Header() http.Header { 22740 if c.header_ == nil { 22741 c.header_ = make(http.Header) 22742 } 22743 return c.header_ 22744} 22745 22746func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { 22747 reqHeaders := make(http.Header) 22748 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22749 for k, v := range c.header_ { 22750 reqHeaders[k] = v 22751 } 22752 reqHeaders.Set("User-Agent", c.s.userAgent()) 22753 var body io.Reader = nil 22754 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) 22755 if err != nil { 22756 return nil, err 22757 } 22758 reqHeaders.Set("Content-Type", "application/json") 22759 c.urlParams_.Set("alt", alt) 22760 c.urlParams_.Set("prettyPrint", "false") 22761 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") 22762 urls += "?" + c.urlParams_.Encode() 22763 req, err := http.NewRequest("POST", urls, body) 22764 if err != nil { 22765 return nil, err 22766 } 22767 req.Header = reqHeaders 22768 googleapi.Expand(req.URL, map[string]string{ 22769 "merchantId": strconv.FormatUint(c.merchantId, 10), 22770 "orderId": c.orderId, 22771 }) 22772 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22773} 22774 22775// Do executes the "content.orders.shiplineitems" call. 22776// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil. 22777// Any non-2xx status code is an error. Response headers are in either 22778// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response 22779// was returned at all) in error.(*googleapi.Error).Header. Use 22780// googleapi.IsNotModified to check whether the returned error was 22781// because http.StatusNotModified was returned. 22782func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { 22783 gensupport.SetOptions(c.urlParams_, opts...) 22784 res, err := c.doRequest("json") 22785 if res != nil && res.StatusCode == http.StatusNotModified { 22786 if res.Body != nil { 22787 res.Body.Close() 22788 } 22789 return nil, &googleapi.Error{ 22790 Code: res.StatusCode, 22791 Header: res.Header, 22792 } 22793 } 22794 if err != nil { 22795 return nil, err 22796 } 22797 defer googleapi.CloseBody(res) 22798 if err := googleapi.CheckResponse(res); err != nil { 22799 return nil, err 22800 } 22801 ret := &OrdersShipLineItemsResponse{ 22802 ServerResponse: googleapi.ServerResponse{ 22803 Header: res.Header, 22804 HTTPStatusCode: res.StatusCode, 22805 }, 22806 } 22807 target := &ret 22808 if err := gensupport.DecodeResponse(target, res); err != nil { 22809 return nil, err 22810 } 22811 return ret, nil 22812 // { 22813 // "description": "Marks line item(s) as shipped.", 22814 // "httpMethod": "POST", 22815 // "id": "content.orders.shiplineitems", 22816 // "parameterOrder": [ 22817 // "merchantId", 22818 // "orderId" 22819 // ], 22820 // "parameters": { 22821 // "merchantId": { 22822 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22823 // "format": "uint64", 22824 // "location": "path", 22825 // "required": true, 22826 // "type": "string" 22827 // }, 22828 // "orderId": { 22829 // "description": "The ID of the order.", 22830 // "location": "path", 22831 // "required": true, 22832 // "type": "string" 22833 // } 22834 // }, 22835 // "path": "{merchantId}/orders/{orderId}/shipLineItems", 22836 // "request": { 22837 // "$ref": "OrdersShipLineItemsRequest" 22838 // }, 22839 // "response": { 22840 // "$ref": "OrdersShipLineItemsResponse" 22841 // }, 22842 // "scopes": [ 22843 // "https://www.googleapis.com/auth/content" 22844 // ] 22845 // } 22846 22847} 22848 22849// method id "content.orders.updatelineitemshippingdetails": 22850 22851type OrdersUpdatelineitemshippingdetailsCall struct { 22852 s *APIService 22853 merchantId uint64 22854 orderId string 22855 ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest 22856 urlParams_ gensupport.URLParams 22857 ctx_ context.Context 22858 header_ http.Header 22859} 22860 22861// Updatelineitemshippingdetails: Updates ship by and delivery by dates 22862// for a line item. 22863func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { 22864 c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22865 c.merchantId = merchantId 22866 c.orderId = orderId 22867 c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest 22868 return c 22869} 22870 22871// Fields allows partial responses to be retrieved. See 22872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22873// for more information. 22874func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { 22875 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22876 return c 22877} 22878 22879// Context sets the context to be used in this call's Do method. Any 22880// pending HTTP request will be aborted if the provided context is 22881// canceled. 22882func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { 22883 c.ctx_ = ctx 22884 return c 22885} 22886 22887// Header returns an http.Header that can be modified by the caller to 22888// add HTTP headers to the request. 22889func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { 22890 if c.header_ == nil { 22891 c.header_ = make(http.Header) 22892 } 22893 return c.header_ 22894} 22895 22896func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { 22897 reqHeaders := make(http.Header) 22898 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22899 for k, v := range c.header_ { 22900 reqHeaders[k] = v 22901 } 22902 reqHeaders.Set("User-Agent", c.s.userAgent()) 22903 var body io.Reader = nil 22904 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) 22905 if err != nil { 22906 return nil, err 22907 } 22908 reqHeaders.Set("Content-Type", "application/json") 22909 c.urlParams_.Set("alt", alt) 22910 c.urlParams_.Set("prettyPrint", "false") 22911 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") 22912 urls += "?" + c.urlParams_.Encode() 22913 req, err := http.NewRequest("POST", urls, body) 22914 if err != nil { 22915 return nil, err 22916 } 22917 req.Header = reqHeaders 22918 googleapi.Expand(req.URL, map[string]string{ 22919 "merchantId": strconv.FormatUint(c.merchantId, 10), 22920 "orderId": c.orderId, 22921 }) 22922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22923} 22924 22925// Do executes the "content.orders.updatelineitemshippingdetails" call. 22926// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error 22927// will be non-nil. Any non-2xx status code is an error. Response 22928// headers are in either 22929// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or 22930// (if a response was returned at all) in 22931// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22932// whether the returned error was because http.StatusNotModified was 22933// returned. 22934func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { 22935 gensupport.SetOptions(c.urlParams_, opts...) 22936 res, err := c.doRequest("json") 22937 if res != nil && res.StatusCode == http.StatusNotModified { 22938 if res.Body != nil { 22939 res.Body.Close() 22940 } 22941 return nil, &googleapi.Error{ 22942 Code: res.StatusCode, 22943 Header: res.Header, 22944 } 22945 } 22946 if err != nil { 22947 return nil, err 22948 } 22949 defer googleapi.CloseBody(res) 22950 if err := googleapi.CheckResponse(res); err != nil { 22951 return nil, err 22952 } 22953 ret := &OrdersUpdateLineItemShippingDetailsResponse{ 22954 ServerResponse: googleapi.ServerResponse{ 22955 Header: res.Header, 22956 HTTPStatusCode: res.StatusCode, 22957 }, 22958 } 22959 target := &ret 22960 if err := gensupport.DecodeResponse(target, res); err != nil { 22961 return nil, err 22962 } 22963 return ret, nil 22964 // { 22965 // "description": "Updates ship by and delivery by dates for a line item.", 22966 // "httpMethod": "POST", 22967 // "id": "content.orders.updatelineitemshippingdetails", 22968 // "parameterOrder": [ 22969 // "merchantId", 22970 // "orderId" 22971 // ], 22972 // "parameters": { 22973 // "merchantId": { 22974 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22975 // "format": "uint64", 22976 // "location": "path", 22977 // "required": true, 22978 // "type": "string" 22979 // }, 22980 // "orderId": { 22981 // "description": "The ID of the order.", 22982 // "location": "path", 22983 // "required": true, 22984 // "type": "string" 22985 // } 22986 // }, 22987 // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 22988 // "request": { 22989 // "$ref": "OrdersUpdateLineItemShippingDetailsRequest" 22990 // }, 22991 // "response": { 22992 // "$ref": "OrdersUpdateLineItemShippingDetailsResponse" 22993 // }, 22994 // "scopes": [ 22995 // "https://www.googleapis.com/auth/content" 22996 // ] 22997 // } 22998 22999} 23000 23001// method id "content.orders.updatemerchantorderid": 23002 23003type OrdersUpdatemerchantorderidCall struct { 23004 s *APIService 23005 merchantId uint64 23006 orderId string 23007 ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest 23008 urlParams_ gensupport.URLParams 23009 ctx_ context.Context 23010 header_ http.Header 23011} 23012 23013// Updatemerchantorderid: Updates the merchant order ID for a given 23014// order. 23015func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { 23016 c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23017 c.merchantId = merchantId 23018 c.orderId = orderId 23019 c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest 23020 return c 23021} 23022 23023// Fields allows partial responses to be retrieved. See 23024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23025// for more information. 23026func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { 23027 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23028 return c 23029} 23030 23031// Context sets the context to be used in this call's Do method. Any 23032// pending HTTP request will be aborted if the provided context is 23033// canceled. 23034func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { 23035 c.ctx_ = ctx 23036 return c 23037} 23038 23039// Header returns an http.Header that can be modified by the caller to 23040// add HTTP headers to the request. 23041func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { 23042 if c.header_ == nil { 23043 c.header_ = make(http.Header) 23044 } 23045 return c.header_ 23046} 23047 23048func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { 23049 reqHeaders := make(http.Header) 23050 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23051 for k, v := range c.header_ { 23052 reqHeaders[k] = v 23053 } 23054 reqHeaders.Set("User-Agent", c.s.userAgent()) 23055 var body io.Reader = nil 23056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) 23057 if err != nil { 23058 return nil, err 23059 } 23060 reqHeaders.Set("Content-Type", "application/json") 23061 c.urlParams_.Set("alt", alt) 23062 c.urlParams_.Set("prettyPrint", "false") 23063 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") 23064 urls += "?" + c.urlParams_.Encode() 23065 req, err := http.NewRequest("POST", urls, body) 23066 if err != nil { 23067 return nil, err 23068 } 23069 req.Header = reqHeaders 23070 googleapi.Expand(req.URL, map[string]string{ 23071 "merchantId": strconv.FormatUint(c.merchantId, 10), 23072 "orderId": c.orderId, 23073 }) 23074 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23075} 23076 23077// Do executes the "content.orders.updatemerchantorderid" call. 23078// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be 23079// non-nil. Any non-2xx status code is an error. Response headers are in 23080// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or 23081// (if a response was returned at all) in 23082// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 23083// whether the returned error was because http.StatusNotModified was 23084// returned. 23085func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { 23086 gensupport.SetOptions(c.urlParams_, opts...) 23087 res, err := c.doRequest("json") 23088 if res != nil && res.StatusCode == http.StatusNotModified { 23089 if res.Body != nil { 23090 res.Body.Close() 23091 } 23092 return nil, &googleapi.Error{ 23093 Code: res.StatusCode, 23094 Header: res.Header, 23095 } 23096 } 23097 if err != nil { 23098 return nil, err 23099 } 23100 defer googleapi.CloseBody(res) 23101 if err := googleapi.CheckResponse(res); err != nil { 23102 return nil, err 23103 } 23104 ret := &OrdersUpdateMerchantOrderIdResponse{ 23105 ServerResponse: googleapi.ServerResponse{ 23106 Header: res.Header, 23107 HTTPStatusCode: res.StatusCode, 23108 }, 23109 } 23110 target := &ret 23111 if err := gensupport.DecodeResponse(target, res); err != nil { 23112 return nil, err 23113 } 23114 return ret, nil 23115 // { 23116 // "description": "Updates the merchant order ID for a given order.", 23117 // "httpMethod": "POST", 23118 // "id": "content.orders.updatemerchantorderid", 23119 // "parameterOrder": [ 23120 // "merchantId", 23121 // "orderId" 23122 // ], 23123 // "parameters": { 23124 // "merchantId": { 23125 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 23126 // "format": "uint64", 23127 // "location": "path", 23128 // "required": true, 23129 // "type": "string" 23130 // }, 23131 // "orderId": { 23132 // "description": "The ID of the order.", 23133 // "location": "path", 23134 // "required": true, 23135 // "type": "string" 23136 // } 23137 // }, 23138 // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 23139 // "request": { 23140 // "$ref": "OrdersUpdateMerchantOrderIdRequest" 23141 // }, 23142 // "response": { 23143 // "$ref": "OrdersUpdateMerchantOrderIdResponse" 23144 // }, 23145 // "scopes": [ 23146 // "https://www.googleapis.com/auth/content" 23147 // ] 23148 // } 23149 23150} 23151 23152// method id "content.orders.updateshipment": 23153 23154type OrdersUpdateshipmentCall struct { 23155 s *APIService 23156 merchantId uint64 23157 orderId string 23158 ordersupdateshipmentrequest *OrdersUpdateShipmentRequest 23159 urlParams_ gensupport.URLParams 23160 ctx_ context.Context 23161 header_ http.Header 23162} 23163 23164// Updateshipment: Updates a shipment's status, carrier, and/or tracking 23165// ID. 23166func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { 23167 c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23168 c.merchantId = merchantId 23169 c.orderId = orderId 23170 c.ordersupdateshipmentrequest = ordersupdateshipmentrequest 23171 return c 23172} 23173 23174// Fields allows partial responses to be retrieved. See 23175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23176// for more information. 23177func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { 23178 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23179 return c 23180} 23181 23182// Context sets the context to be used in this call's Do method. Any 23183// pending HTTP request will be aborted if the provided context is 23184// canceled. 23185func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { 23186 c.ctx_ = ctx 23187 return c 23188} 23189 23190// Header returns an http.Header that can be modified by the caller to 23191// add HTTP headers to the request. 23192func (c *OrdersUpdateshipmentCall) Header() http.Header { 23193 if c.header_ == nil { 23194 c.header_ = make(http.Header) 23195 } 23196 return c.header_ 23197} 23198 23199func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { 23200 reqHeaders := make(http.Header) 23201 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23202 for k, v := range c.header_ { 23203 reqHeaders[k] = v 23204 } 23205 reqHeaders.Set("User-Agent", c.s.userAgent()) 23206 var body io.Reader = nil 23207 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) 23208 if err != nil { 23209 return nil, err 23210 } 23211 reqHeaders.Set("Content-Type", "application/json") 23212 c.urlParams_.Set("alt", alt) 23213 c.urlParams_.Set("prettyPrint", "false") 23214 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") 23215 urls += "?" + c.urlParams_.Encode() 23216 req, err := http.NewRequest("POST", urls, body) 23217 if err != nil { 23218 return nil, err 23219 } 23220 req.Header = reqHeaders 23221 googleapi.Expand(req.URL, map[string]string{ 23222 "merchantId": strconv.FormatUint(c.merchantId, 10), 23223 "orderId": c.orderId, 23224 }) 23225 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23226} 23227 23228// Do executes the "content.orders.updateshipment" call. 23229// Exactly one of *OrdersUpdateShipmentResponse or error will be 23230// non-nil. Any non-2xx status code is an error. Response headers are in 23231// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a 23232// response was returned at all) in error.(*googleapi.Error).Header. Use 23233// googleapi.IsNotModified to check whether the returned error was 23234// because http.StatusNotModified was returned. 23235func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { 23236 gensupport.SetOptions(c.urlParams_, opts...) 23237 res, err := c.doRequest("json") 23238 if res != nil && res.StatusCode == http.StatusNotModified { 23239 if res.Body != nil { 23240 res.Body.Close() 23241 } 23242 return nil, &googleapi.Error{ 23243 Code: res.StatusCode, 23244 Header: res.Header, 23245 } 23246 } 23247 if err != nil { 23248 return nil, err 23249 } 23250 defer googleapi.CloseBody(res) 23251 if err := googleapi.CheckResponse(res); err != nil { 23252 return nil, err 23253 } 23254 ret := &OrdersUpdateShipmentResponse{ 23255 ServerResponse: googleapi.ServerResponse{ 23256 Header: res.Header, 23257 HTTPStatusCode: res.StatusCode, 23258 }, 23259 } 23260 target := &ret 23261 if err := gensupport.DecodeResponse(target, res); err != nil { 23262 return nil, err 23263 } 23264 return ret, nil 23265 // { 23266 // "description": "Updates a shipment's status, carrier, and/or tracking ID.", 23267 // "httpMethod": "POST", 23268 // "id": "content.orders.updateshipment", 23269 // "parameterOrder": [ 23270 // "merchantId", 23271 // "orderId" 23272 // ], 23273 // "parameters": { 23274 // "merchantId": { 23275 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 23276 // "format": "uint64", 23277 // "location": "path", 23278 // "required": true, 23279 // "type": "string" 23280 // }, 23281 // "orderId": { 23282 // "description": "The ID of the order.", 23283 // "location": "path", 23284 // "required": true, 23285 // "type": "string" 23286 // } 23287 // }, 23288 // "path": "{merchantId}/orders/{orderId}/updateShipment", 23289 // "request": { 23290 // "$ref": "OrdersUpdateShipmentRequest" 23291 // }, 23292 // "response": { 23293 // "$ref": "OrdersUpdateShipmentResponse" 23294 // }, 23295 // "scopes": [ 23296 // "https://www.googleapis.com/auth/content" 23297 // ] 23298 // } 23299 23300} 23301 23302// method id "content.pos.custombatch": 23303 23304type PosCustombatchCall struct { 23305 s *APIService 23306 poscustombatchrequest *PosCustomBatchRequest 23307 urlParams_ gensupport.URLParams 23308 ctx_ context.Context 23309 header_ http.Header 23310} 23311 23312// Custombatch: Batches multiple POS-related calls in a single request. 23313func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { 23314 c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23315 c.poscustombatchrequest = poscustombatchrequest 23316 return c 23317} 23318 23319// DryRun sets the optional parameter "dryRun": Flag to simulate a 23320// request like in a live environment. If set to true, dry-run mode 23321// checks the validity of the request and returns errors (if any). 23322func (c *PosCustombatchCall) DryRun(dryRun bool) *PosCustombatchCall { 23323 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23324 return c 23325} 23326 23327// Fields allows partial responses to be retrieved. See 23328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23329// for more information. 23330func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { 23331 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23332 return c 23333} 23334 23335// Context sets the context to be used in this call's Do method. Any 23336// pending HTTP request will be aborted if the provided context is 23337// canceled. 23338func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { 23339 c.ctx_ = ctx 23340 return c 23341} 23342 23343// Header returns an http.Header that can be modified by the caller to 23344// add HTTP headers to the request. 23345func (c *PosCustombatchCall) Header() http.Header { 23346 if c.header_ == nil { 23347 c.header_ = make(http.Header) 23348 } 23349 return c.header_ 23350} 23351 23352func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { 23353 reqHeaders := make(http.Header) 23354 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23355 for k, v := range c.header_ { 23356 reqHeaders[k] = v 23357 } 23358 reqHeaders.Set("User-Agent", c.s.userAgent()) 23359 var body io.Reader = nil 23360 body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest) 23361 if err != nil { 23362 return nil, err 23363 } 23364 reqHeaders.Set("Content-Type", "application/json") 23365 c.urlParams_.Set("alt", alt) 23366 c.urlParams_.Set("prettyPrint", "false") 23367 urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") 23368 urls += "?" + c.urlParams_.Encode() 23369 req, err := http.NewRequest("POST", urls, body) 23370 if err != nil { 23371 return nil, err 23372 } 23373 req.Header = reqHeaders 23374 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23375} 23376 23377// Do executes the "content.pos.custombatch" call. 23378// Exactly one of *PosCustomBatchResponse or error will be non-nil. Any 23379// non-2xx status code is an error. Response headers are in either 23380// *PosCustomBatchResponse.ServerResponse.Header or (if a response was 23381// returned at all) in error.(*googleapi.Error).Header. Use 23382// googleapi.IsNotModified to check whether the returned error was 23383// because http.StatusNotModified was returned. 23384func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { 23385 gensupport.SetOptions(c.urlParams_, opts...) 23386 res, err := c.doRequest("json") 23387 if res != nil && res.StatusCode == http.StatusNotModified { 23388 if res.Body != nil { 23389 res.Body.Close() 23390 } 23391 return nil, &googleapi.Error{ 23392 Code: res.StatusCode, 23393 Header: res.Header, 23394 } 23395 } 23396 if err != nil { 23397 return nil, err 23398 } 23399 defer googleapi.CloseBody(res) 23400 if err := googleapi.CheckResponse(res); err != nil { 23401 return nil, err 23402 } 23403 ret := &PosCustomBatchResponse{ 23404 ServerResponse: googleapi.ServerResponse{ 23405 Header: res.Header, 23406 HTTPStatusCode: res.StatusCode, 23407 }, 23408 } 23409 target := &ret 23410 if err := gensupport.DecodeResponse(target, res); err != nil { 23411 return nil, err 23412 } 23413 return ret, nil 23414 // { 23415 // "description": "Batches multiple POS-related calls in a single request.", 23416 // "httpMethod": "POST", 23417 // "id": "content.pos.custombatch", 23418 // "parameters": { 23419 // "dryRun": { 23420 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 23421 // "location": "query", 23422 // "type": "boolean" 23423 // } 23424 // }, 23425 // "path": "pos/batch", 23426 // "request": { 23427 // "$ref": "PosCustomBatchRequest" 23428 // }, 23429 // "response": { 23430 // "$ref": "PosCustomBatchResponse" 23431 // }, 23432 // "scopes": [ 23433 // "https://www.googleapis.com/auth/content" 23434 // ] 23435 // } 23436 23437} 23438 23439// method id "content.pos.delete": 23440 23441type PosDeleteCall struct { 23442 s *APIService 23443 merchantId uint64 23444 targetMerchantId uint64 23445 storeCode string 23446 urlParams_ gensupport.URLParams 23447 ctx_ context.Context 23448 header_ http.Header 23449} 23450 23451// Delete: Deletes a store for the given merchant. 23452func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { 23453 c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23454 c.merchantId = merchantId 23455 c.targetMerchantId = targetMerchantId 23456 c.storeCode = storeCode 23457 return c 23458} 23459 23460// DryRun sets the optional parameter "dryRun": Flag to simulate a 23461// request like in a live environment. If set to true, dry-run mode 23462// checks the validity of the request and returns errors (if any). 23463func (c *PosDeleteCall) DryRun(dryRun bool) *PosDeleteCall { 23464 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23465 return c 23466} 23467 23468// Fields allows partial responses to be retrieved. See 23469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23470// for more information. 23471func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { 23472 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23473 return c 23474} 23475 23476// Context sets the context to be used in this call's Do method. Any 23477// pending HTTP request will be aborted if the provided context is 23478// canceled. 23479func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { 23480 c.ctx_ = ctx 23481 return c 23482} 23483 23484// Header returns an http.Header that can be modified by the caller to 23485// add HTTP headers to the request. 23486func (c *PosDeleteCall) Header() http.Header { 23487 if c.header_ == nil { 23488 c.header_ = make(http.Header) 23489 } 23490 return c.header_ 23491} 23492 23493func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { 23494 reqHeaders := make(http.Header) 23495 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23496 for k, v := range c.header_ { 23497 reqHeaders[k] = v 23498 } 23499 reqHeaders.Set("User-Agent", c.s.userAgent()) 23500 var body io.Reader = nil 23501 c.urlParams_.Set("alt", alt) 23502 c.urlParams_.Set("prettyPrint", "false") 23503 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23504 urls += "?" + c.urlParams_.Encode() 23505 req, err := http.NewRequest("DELETE", urls, body) 23506 if err != nil { 23507 return nil, err 23508 } 23509 req.Header = reqHeaders 23510 googleapi.Expand(req.URL, map[string]string{ 23511 "merchantId": strconv.FormatUint(c.merchantId, 10), 23512 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23513 "storeCode": c.storeCode, 23514 }) 23515 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23516} 23517 23518// Do executes the "content.pos.delete" call. 23519func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { 23520 gensupport.SetOptions(c.urlParams_, opts...) 23521 res, err := c.doRequest("json") 23522 if err != nil { 23523 return err 23524 } 23525 defer googleapi.CloseBody(res) 23526 if err := googleapi.CheckResponse(res); err != nil { 23527 return err 23528 } 23529 return nil 23530 // { 23531 // "description": "Deletes a store for the given merchant.", 23532 // "httpMethod": "DELETE", 23533 // "id": "content.pos.delete", 23534 // "parameterOrder": [ 23535 // "merchantId", 23536 // "targetMerchantId", 23537 // "storeCode" 23538 // ], 23539 // "parameters": { 23540 // "dryRun": { 23541 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 23542 // "location": "query", 23543 // "type": "boolean" 23544 // }, 23545 // "merchantId": { 23546 // "description": "The ID of the POS or inventory data provider.", 23547 // "format": "uint64", 23548 // "location": "path", 23549 // "required": true, 23550 // "type": "string" 23551 // }, 23552 // "storeCode": { 23553 // "description": "A store code that is unique per merchant.", 23554 // "location": "path", 23555 // "required": true, 23556 // "type": "string" 23557 // }, 23558 // "targetMerchantId": { 23559 // "description": "The ID of the target merchant.", 23560 // "format": "uint64", 23561 // "location": "path", 23562 // "required": true, 23563 // "type": "string" 23564 // } 23565 // }, 23566 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23567 // "scopes": [ 23568 // "https://www.googleapis.com/auth/content" 23569 // ] 23570 // } 23571 23572} 23573 23574// method id "content.pos.get": 23575 23576type PosGetCall struct { 23577 s *APIService 23578 merchantId uint64 23579 targetMerchantId uint64 23580 storeCode string 23581 urlParams_ gensupport.URLParams 23582 ifNoneMatch_ string 23583 ctx_ context.Context 23584 header_ http.Header 23585} 23586 23587// Get: Retrieves information about the given store. 23588func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { 23589 c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23590 c.merchantId = merchantId 23591 c.targetMerchantId = targetMerchantId 23592 c.storeCode = storeCode 23593 return c 23594} 23595 23596// Fields allows partial responses to be retrieved. See 23597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23598// for more information. 23599func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { 23600 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23601 return c 23602} 23603 23604// IfNoneMatch sets the optional parameter which makes the operation 23605// fail if the object's ETag matches the given value. This is useful for 23606// getting updates only after the object has changed since the last 23607// request. Use googleapi.IsNotModified to check whether the response 23608// error from Do is the result of In-None-Match. 23609func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { 23610 c.ifNoneMatch_ = entityTag 23611 return c 23612} 23613 23614// Context sets the context to be used in this call's Do method. Any 23615// pending HTTP request will be aborted if the provided context is 23616// canceled. 23617func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { 23618 c.ctx_ = ctx 23619 return c 23620} 23621 23622// Header returns an http.Header that can be modified by the caller to 23623// add HTTP headers to the request. 23624func (c *PosGetCall) Header() http.Header { 23625 if c.header_ == nil { 23626 c.header_ = make(http.Header) 23627 } 23628 return c.header_ 23629} 23630 23631func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { 23632 reqHeaders := make(http.Header) 23633 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23634 for k, v := range c.header_ { 23635 reqHeaders[k] = v 23636 } 23637 reqHeaders.Set("User-Agent", c.s.userAgent()) 23638 if c.ifNoneMatch_ != "" { 23639 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23640 } 23641 var body io.Reader = nil 23642 c.urlParams_.Set("alt", alt) 23643 c.urlParams_.Set("prettyPrint", "false") 23644 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23645 urls += "?" + c.urlParams_.Encode() 23646 req, err := http.NewRequest("GET", urls, body) 23647 if err != nil { 23648 return nil, err 23649 } 23650 req.Header = reqHeaders 23651 googleapi.Expand(req.URL, map[string]string{ 23652 "merchantId": strconv.FormatUint(c.merchantId, 10), 23653 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23654 "storeCode": c.storeCode, 23655 }) 23656 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23657} 23658 23659// Do executes the "content.pos.get" call. 23660// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23661// code is an error. Response headers are in either 23662// *PosStore.ServerResponse.Header or (if a response was returned at 23663// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23664// to check whether the returned error was because 23665// http.StatusNotModified was returned. 23666func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23667 gensupport.SetOptions(c.urlParams_, opts...) 23668 res, err := c.doRequest("json") 23669 if res != nil && res.StatusCode == http.StatusNotModified { 23670 if res.Body != nil { 23671 res.Body.Close() 23672 } 23673 return nil, &googleapi.Error{ 23674 Code: res.StatusCode, 23675 Header: res.Header, 23676 } 23677 } 23678 if err != nil { 23679 return nil, err 23680 } 23681 defer googleapi.CloseBody(res) 23682 if err := googleapi.CheckResponse(res); err != nil { 23683 return nil, err 23684 } 23685 ret := &PosStore{ 23686 ServerResponse: googleapi.ServerResponse{ 23687 Header: res.Header, 23688 HTTPStatusCode: res.StatusCode, 23689 }, 23690 } 23691 target := &ret 23692 if err := gensupport.DecodeResponse(target, res); err != nil { 23693 return nil, err 23694 } 23695 return ret, nil 23696 // { 23697 // "description": "Retrieves information about the given store.", 23698 // "httpMethod": "GET", 23699 // "id": "content.pos.get", 23700 // "parameterOrder": [ 23701 // "merchantId", 23702 // "targetMerchantId", 23703 // "storeCode" 23704 // ], 23705 // "parameters": { 23706 // "merchantId": { 23707 // "description": "The ID of the POS or inventory data provider.", 23708 // "format": "uint64", 23709 // "location": "path", 23710 // "required": true, 23711 // "type": "string" 23712 // }, 23713 // "storeCode": { 23714 // "description": "A store code that is unique per merchant.", 23715 // "location": "path", 23716 // "required": true, 23717 // "type": "string" 23718 // }, 23719 // "targetMerchantId": { 23720 // "description": "The ID of the target merchant.", 23721 // "format": "uint64", 23722 // "location": "path", 23723 // "required": true, 23724 // "type": "string" 23725 // } 23726 // }, 23727 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23728 // "response": { 23729 // "$ref": "PosStore" 23730 // }, 23731 // "scopes": [ 23732 // "https://www.googleapis.com/auth/content" 23733 // ] 23734 // } 23735 23736} 23737 23738// method id "content.pos.insert": 23739 23740type PosInsertCall struct { 23741 s *APIService 23742 merchantId uint64 23743 targetMerchantId uint64 23744 posstore *PosStore 23745 urlParams_ gensupport.URLParams 23746 ctx_ context.Context 23747 header_ http.Header 23748} 23749 23750// Insert: Creates a store for the given merchant. 23751func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { 23752 c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23753 c.merchantId = merchantId 23754 c.targetMerchantId = targetMerchantId 23755 c.posstore = posstore 23756 return c 23757} 23758 23759// DryRun sets the optional parameter "dryRun": Flag to simulate a 23760// request like in a live environment. If set to true, dry-run mode 23761// checks the validity of the request and returns errors (if any). 23762func (c *PosInsertCall) DryRun(dryRun bool) *PosInsertCall { 23763 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23764 return c 23765} 23766 23767// Fields allows partial responses to be retrieved. See 23768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23769// for more information. 23770func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { 23771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23772 return c 23773} 23774 23775// Context sets the context to be used in this call's Do method. Any 23776// pending HTTP request will be aborted if the provided context is 23777// canceled. 23778func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { 23779 c.ctx_ = ctx 23780 return c 23781} 23782 23783// Header returns an http.Header that can be modified by the caller to 23784// add HTTP headers to the request. 23785func (c *PosInsertCall) Header() http.Header { 23786 if c.header_ == nil { 23787 c.header_ = make(http.Header) 23788 } 23789 return c.header_ 23790} 23791 23792func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { 23793 reqHeaders := make(http.Header) 23794 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23795 for k, v := range c.header_ { 23796 reqHeaders[k] = v 23797 } 23798 reqHeaders.Set("User-Agent", c.s.userAgent()) 23799 var body io.Reader = nil 23800 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore) 23801 if err != nil { 23802 return nil, err 23803 } 23804 reqHeaders.Set("Content-Type", "application/json") 23805 c.urlParams_.Set("alt", alt) 23806 c.urlParams_.Set("prettyPrint", "false") 23807 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 23808 urls += "?" + c.urlParams_.Encode() 23809 req, err := http.NewRequest("POST", urls, body) 23810 if err != nil { 23811 return nil, err 23812 } 23813 req.Header = reqHeaders 23814 googleapi.Expand(req.URL, map[string]string{ 23815 "merchantId": strconv.FormatUint(c.merchantId, 10), 23816 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23817 }) 23818 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23819} 23820 23821// Do executes the "content.pos.insert" call. 23822// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23823// code is an error. Response headers are in either 23824// *PosStore.ServerResponse.Header or (if a response was returned at 23825// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23826// to check whether the returned error was because 23827// http.StatusNotModified was returned. 23828func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23829 gensupport.SetOptions(c.urlParams_, opts...) 23830 res, err := c.doRequest("json") 23831 if res != nil && res.StatusCode == http.StatusNotModified { 23832 if res.Body != nil { 23833 res.Body.Close() 23834 } 23835 return nil, &googleapi.Error{ 23836 Code: res.StatusCode, 23837 Header: res.Header, 23838 } 23839 } 23840 if err != nil { 23841 return nil, err 23842 } 23843 defer googleapi.CloseBody(res) 23844 if err := googleapi.CheckResponse(res); err != nil { 23845 return nil, err 23846 } 23847 ret := &PosStore{ 23848 ServerResponse: googleapi.ServerResponse{ 23849 Header: res.Header, 23850 HTTPStatusCode: res.StatusCode, 23851 }, 23852 } 23853 target := &ret 23854 if err := gensupport.DecodeResponse(target, res); err != nil { 23855 return nil, err 23856 } 23857 return ret, nil 23858 // { 23859 // "description": "Creates a store for the given merchant.", 23860 // "httpMethod": "POST", 23861 // "id": "content.pos.insert", 23862 // "parameterOrder": [ 23863 // "merchantId", 23864 // "targetMerchantId" 23865 // ], 23866 // "parameters": { 23867 // "dryRun": { 23868 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 23869 // "location": "query", 23870 // "type": "boolean" 23871 // }, 23872 // "merchantId": { 23873 // "description": "The ID of the POS or inventory data provider.", 23874 // "format": "uint64", 23875 // "location": "path", 23876 // "required": true, 23877 // "type": "string" 23878 // }, 23879 // "targetMerchantId": { 23880 // "description": "The ID of the target merchant.", 23881 // "format": "uint64", 23882 // "location": "path", 23883 // "required": true, 23884 // "type": "string" 23885 // } 23886 // }, 23887 // "path": "{merchantId}/pos/{targetMerchantId}/store", 23888 // "request": { 23889 // "$ref": "PosStore" 23890 // }, 23891 // "response": { 23892 // "$ref": "PosStore" 23893 // }, 23894 // "scopes": [ 23895 // "https://www.googleapis.com/auth/content" 23896 // ] 23897 // } 23898 23899} 23900 23901// method id "content.pos.inventory": 23902 23903type PosInventoryCall struct { 23904 s *APIService 23905 merchantId uint64 23906 targetMerchantId uint64 23907 posinventoryrequest *PosInventoryRequest 23908 urlParams_ gensupport.URLParams 23909 ctx_ context.Context 23910 header_ http.Header 23911} 23912 23913// Inventory: Submit inventory for the given merchant. 23914func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { 23915 c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23916 c.merchantId = merchantId 23917 c.targetMerchantId = targetMerchantId 23918 c.posinventoryrequest = posinventoryrequest 23919 return c 23920} 23921 23922// DryRun sets the optional parameter "dryRun": Flag to simulate a 23923// request like in a live environment. If set to true, dry-run mode 23924// checks the validity of the request and returns errors (if any). 23925func (c *PosInventoryCall) DryRun(dryRun bool) *PosInventoryCall { 23926 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23927 return c 23928} 23929 23930// Fields allows partial responses to be retrieved. See 23931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23932// for more information. 23933func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { 23934 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23935 return c 23936} 23937 23938// Context sets the context to be used in this call's Do method. Any 23939// pending HTTP request will be aborted if the provided context is 23940// canceled. 23941func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { 23942 c.ctx_ = ctx 23943 return c 23944} 23945 23946// Header returns an http.Header that can be modified by the caller to 23947// add HTTP headers to the request. 23948func (c *PosInventoryCall) Header() http.Header { 23949 if c.header_ == nil { 23950 c.header_ = make(http.Header) 23951 } 23952 return c.header_ 23953} 23954 23955func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { 23956 reqHeaders := make(http.Header) 23957 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23958 for k, v := range c.header_ { 23959 reqHeaders[k] = v 23960 } 23961 reqHeaders.Set("User-Agent", c.s.userAgent()) 23962 var body io.Reader = nil 23963 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest) 23964 if err != nil { 23965 return nil, err 23966 } 23967 reqHeaders.Set("Content-Type", "application/json") 23968 c.urlParams_.Set("alt", alt) 23969 c.urlParams_.Set("prettyPrint", "false") 23970 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") 23971 urls += "?" + c.urlParams_.Encode() 23972 req, err := http.NewRequest("POST", urls, body) 23973 if err != nil { 23974 return nil, err 23975 } 23976 req.Header = reqHeaders 23977 googleapi.Expand(req.URL, map[string]string{ 23978 "merchantId": strconv.FormatUint(c.merchantId, 10), 23979 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23980 }) 23981 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23982} 23983 23984// Do executes the "content.pos.inventory" call. 23985// Exactly one of *PosInventoryResponse or error will be non-nil. Any 23986// non-2xx status code is an error. Response headers are in either 23987// *PosInventoryResponse.ServerResponse.Header or (if a response was 23988// returned at all) in error.(*googleapi.Error).Header. Use 23989// googleapi.IsNotModified to check whether the returned error was 23990// because http.StatusNotModified was returned. 23991func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { 23992 gensupport.SetOptions(c.urlParams_, opts...) 23993 res, err := c.doRequest("json") 23994 if res != nil && res.StatusCode == http.StatusNotModified { 23995 if res.Body != nil { 23996 res.Body.Close() 23997 } 23998 return nil, &googleapi.Error{ 23999 Code: res.StatusCode, 24000 Header: res.Header, 24001 } 24002 } 24003 if err != nil { 24004 return nil, err 24005 } 24006 defer googleapi.CloseBody(res) 24007 if err := googleapi.CheckResponse(res); err != nil { 24008 return nil, err 24009 } 24010 ret := &PosInventoryResponse{ 24011 ServerResponse: googleapi.ServerResponse{ 24012 Header: res.Header, 24013 HTTPStatusCode: res.StatusCode, 24014 }, 24015 } 24016 target := &ret 24017 if err := gensupport.DecodeResponse(target, res); err != nil { 24018 return nil, err 24019 } 24020 return ret, nil 24021 // { 24022 // "description": "Submit inventory for the given merchant.", 24023 // "httpMethod": "POST", 24024 // "id": "content.pos.inventory", 24025 // "parameterOrder": [ 24026 // "merchantId", 24027 // "targetMerchantId" 24028 // ], 24029 // "parameters": { 24030 // "dryRun": { 24031 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 24032 // "location": "query", 24033 // "type": "boolean" 24034 // }, 24035 // "merchantId": { 24036 // "description": "The ID of the POS or inventory data provider.", 24037 // "format": "uint64", 24038 // "location": "path", 24039 // "required": true, 24040 // "type": "string" 24041 // }, 24042 // "targetMerchantId": { 24043 // "description": "The ID of the target merchant.", 24044 // "format": "uint64", 24045 // "location": "path", 24046 // "required": true, 24047 // "type": "string" 24048 // } 24049 // }, 24050 // "path": "{merchantId}/pos/{targetMerchantId}/inventory", 24051 // "request": { 24052 // "$ref": "PosInventoryRequest" 24053 // }, 24054 // "response": { 24055 // "$ref": "PosInventoryResponse" 24056 // }, 24057 // "scopes": [ 24058 // "https://www.googleapis.com/auth/content" 24059 // ] 24060 // } 24061 24062} 24063 24064// method id "content.pos.list": 24065 24066type PosListCall struct { 24067 s *APIService 24068 merchantId uint64 24069 targetMerchantId uint64 24070 urlParams_ gensupport.URLParams 24071 ifNoneMatch_ string 24072 ctx_ context.Context 24073 header_ http.Header 24074} 24075 24076// List: Lists the stores of the target merchant. 24077func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { 24078 c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24079 c.merchantId = merchantId 24080 c.targetMerchantId = targetMerchantId 24081 return c 24082} 24083 24084// Fields allows partial responses to be retrieved. See 24085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24086// for more information. 24087func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { 24088 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24089 return c 24090} 24091 24092// IfNoneMatch sets the optional parameter which makes the operation 24093// fail if the object's ETag matches the given value. This is useful for 24094// getting updates only after the object has changed since the last 24095// request. Use googleapi.IsNotModified to check whether the response 24096// error from Do is the result of In-None-Match. 24097func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { 24098 c.ifNoneMatch_ = entityTag 24099 return c 24100} 24101 24102// Context sets the context to be used in this call's Do method. Any 24103// pending HTTP request will be aborted if the provided context is 24104// canceled. 24105func (c *PosListCall) Context(ctx context.Context) *PosListCall { 24106 c.ctx_ = ctx 24107 return c 24108} 24109 24110// Header returns an http.Header that can be modified by the caller to 24111// add HTTP headers to the request. 24112func (c *PosListCall) Header() http.Header { 24113 if c.header_ == nil { 24114 c.header_ = make(http.Header) 24115 } 24116 return c.header_ 24117} 24118 24119func (c *PosListCall) doRequest(alt string) (*http.Response, error) { 24120 reqHeaders := make(http.Header) 24121 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24122 for k, v := range c.header_ { 24123 reqHeaders[k] = v 24124 } 24125 reqHeaders.Set("User-Agent", c.s.userAgent()) 24126 if c.ifNoneMatch_ != "" { 24127 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24128 } 24129 var body io.Reader = nil 24130 c.urlParams_.Set("alt", alt) 24131 c.urlParams_.Set("prettyPrint", "false") 24132 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 24133 urls += "?" + c.urlParams_.Encode() 24134 req, err := http.NewRequest("GET", urls, body) 24135 if err != nil { 24136 return nil, err 24137 } 24138 req.Header = reqHeaders 24139 googleapi.Expand(req.URL, map[string]string{ 24140 "merchantId": strconv.FormatUint(c.merchantId, 10), 24141 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 24142 }) 24143 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24144} 24145 24146// Do executes the "content.pos.list" call. 24147// Exactly one of *PosListResponse or error will be non-nil. Any non-2xx 24148// status code is an error. Response headers are in either 24149// *PosListResponse.ServerResponse.Header or (if a response was returned 24150// at all) in error.(*googleapi.Error).Header. Use 24151// googleapi.IsNotModified to check whether the returned error was 24152// because http.StatusNotModified was returned. 24153func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { 24154 gensupport.SetOptions(c.urlParams_, opts...) 24155 res, err := c.doRequest("json") 24156 if res != nil && res.StatusCode == http.StatusNotModified { 24157 if res.Body != nil { 24158 res.Body.Close() 24159 } 24160 return nil, &googleapi.Error{ 24161 Code: res.StatusCode, 24162 Header: res.Header, 24163 } 24164 } 24165 if err != nil { 24166 return nil, err 24167 } 24168 defer googleapi.CloseBody(res) 24169 if err := googleapi.CheckResponse(res); err != nil { 24170 return nil, err 24171 } 24172 ret := &PosListResponse{ 24173 ServerResponse: googleapi.ServerResponse{ 24174 Header: res.Header, 24175 HTTPStatusCode: res.StatusCode, 24176 }, 24177 } 24178 target := &ret 24179 if err := gensupport.DecodeResponse(target, res); err != nil { 24180 return nil, err 24181 } 24182 return ret, nil 24183 // { 24184 // "description": "Lists the stores of the target merchant.", 24185 // "httpMethod": "GET", 24186 // "id": "content.pos.list", 24187 // "parameterOrder": [ 24188 // "merchantId", 24189 // "targetMerchantId" 24190 // ], 24191 // "parameters": { 24192 // "merchantId": { 24193 // "description": "The ID of the POS or inventory data provider.", 24194 // "format": "uint64", 24195 // "location": "path", 24196 // "required": true, 24197 // "type": "string" 24198 // }, 24199 // "targetMerchantId": { 24200 // "description": "The ID of the target merchant.", 24201 // "format": "uint64", 24202 // "location": "path", 24203 // "required": true, 24204 // "type": "string" 24205 // } 24206 // }, 24207 // "path": "{merchantId}/pos/{targetMerchantId}/store", 24208 // "response": { 24209 // "$ref": "PosListResponse" 24210 // }, 24211 // "scopes": [ 24212 // "https://www.googleapis.com/auth/content" 24213 // ] 24214 // } 24215 24216} 24217 24218// method id "content.pos.sale": 24219 24220type PosSaleCall struct { 24221 s *APIService 24222 merchantId uint64 24223 targetMerchantId uint64 24224 possalerequest *PosSaleRequest 24225 urlParams_ gensupport.URLParams 24226 ctx_ context.Context 24227 header_ http.Header 24228} 24229 24230// Sale: Submit a sale event for the given merchant. 24231func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { 24232 c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24233 c.merchantId = merchantId 24234 c.targetMerchantId = targetMerchantId 24235 c.possalerequest = possalerequest 24236 return c 24237} 24238 24239// DryRun sets the optional parameter "dryRun": Flag to simulate a 24240// request like in a live environment. If set to true, dry-run mode 24241// checks the validity of the request and returns errors (if any). 24242func (c *PosSaleCall) DryRun(dryRun bool) *PosSaleCall { 24243 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24244 return c 24245} 24246 24247// Fields allows partial responses to be retrieved. See 24248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24249// for more information. 24250func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { 24251 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24252 return c 24253} 24254 24255// Context sets the context to be used in this call's Do method. Any 24256// pending HTTP request will be aborted if the provided context is 24257// canceled. 24258func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { 24259 c.ctx_ = ctx 24260 return c 24261} 24262 24263// Header returns an http.Header that can be modified by the caller to 24264// add HTTP headers to the request. 24265func (c *PosSaleCall) Header() http.Header { 24266 if c.header_ == nil { 24267 c.header_ = make(http.Header) 24268 } 24269 return c.header_ 24270} 24271 24272func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { 24273 reqHeaders := make(http.Header) 24274 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24275 for k, v := range c.header_ { 24276 reqHeaders[k] = v 24277 } 24278 reqHeaders.Set("User-Agent", c.s.userAgent()) 24279 var body io.Reader = nil 24280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest) 24281 if err != nil { 24282 return nil, err 24283 } 24284 reqHeaders.Set("Content-Type", "application/json") 24285 c.urlParams_.Set("alt", alt) 24286 c.urlParams_.Set("prettyPrint", "false") 24287 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") 24288 urls += "?" + c.urlParams_.Encode() 24289 req, err := http.NewRequest("POST", urls, body) 24290 if err != nil { 24291 return nil, err 24292 } 24293 req.Header = reqHeaders 24294 googleapi.Expand(req.URL, map[string]string{ 24295 "merchantId": strconv.FormatUint(c.merchantId, 10), 24296 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 24297 }) 24298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24299} 24300 24301// Do executes the "content.pos.sale" call. 24302// Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx 24303// status code is an error. Response headers are in either 24304// *PosSaleResponse.ServerResponse.Header or (if a response was returned 24305// at all) in error.(*googleapi.Error).Header. Use 24306// googleapi.IsNotModified to check whether the returned error was 24307// because http.StatusNotModified was returned. 24308func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { 24309 gensupport.SetOptions(c.urlParams_, opts...) 24310 res, err := c.doRequest("json") 24311 if res != nil && res.StatusCode == http.StatusNotModified { 24312 if res.Body != nil { 24313 res.Body.Close() 24314 } 24315 return nil, &googleapi.Error{ 24316 Code: res.StatusCode, 24317 Header: res.Header, 24318 } 24319 } 24320 if err != nil { 24321 return nil, err 24322 } 24323 defer googleapi.CloseBody(res) 24324 if err := googleapi.CheckResponse(res); err != nil { 24325 return nil, err 24326 } 24327 ret := &PosSaleResponse{ 24328 ServerResponse: googleapi.ServerResponse{ 24329 Header: res.Header, 24330 HTTPStatusCode: res.StatusCode, 24331 }, 24332 } 24333 target := &ret 24334 if err := gensupport.DecodeResponse(target, res); err != nil { 24335 return nil, err 24336 } 24337 return ret, nil 24338 // { 24339 // "description": "Submit a sale event for the given merchant.", 24340 // "httpMethod": "POST", 24341 // "id": "content.pos.sale", 24342 // "parameterOrder": [ 24343 // "merchantId", 24344 // "targetMerchantId" 24345 // ], 24346 // "parameters": { 24347 // "dryRun": { 24348 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 24349 // "location": "query", 24350 // "type": "boolean" 24351 // }, 24352 // "merchantId": { 24353 // "description": "The ID of the POS or inventory data provider.", 24354 // "format": "uint64", 24355 // "location": "path", 24356 // "required": true, 24357 // "type": "string" 24358 // }, 24359 // "targetMerchantId": { 24360 // "description": "The ID of the target merchant.", 24361 // "format": "uint64", 24362 // "location": "path", 24363 // "required": true, 24364 // "type": "string" 24365 // } 24366 // }, 24367 // "path": "{merchantId}/pos/{targetMerchantId}/sale", 24368 // "request": { 24369 // "$ref": "PosSaleRequest" 24370 // }, 24371 // "response": { 24372 // "$ref": "PosSaleResponse" 24373 // }, 24374 // "scopes": [ 24375 // "https://www.googleapis.com/auth/content" 24376 // ] 24377 // } 24378 24379} 24380 24381// method id "content.products.custombatch": 24382 24383type ProductsCustombatchCall struct { 24384 s *APIService 24385 productscustombatchrequest *ProductsCustomBatchRequest 24386 urlParams_ gensupport.URLParams 24387 ctx_ context.Context 24388 header_ http.Header 24389} 24390 24391// Custombatch: Retrieves, inserts, and deletes multiple products in a 24392// single request. 24393func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { 24394 c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24395 c.productscustombatchrequest = productscustombatchrequest 24396 return c 24397} 24398 24399// DryRun sets the optional parameter "dryRun": Flag to simulate a 24400// request like in a live environment. If set to true, dry-run mode 24401// checks the validity of the request and returns errors (if any). 24402func (c *ProductsCustombatchCall) DryRun(dryRun bool) *ProductsCustombatchCall { 24403 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24404 return c 24405} 24406 24407// Fields allows partial responses to be retrieved. See 24408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24409// for more information. 24410func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { 24411 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24412 return c 24413} 24414 24415// Context sets the context to be used in this call's Do method. Any 24416// pending HTTP request will be aborted if the provided context is 24417// canceled. 24418func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { 24419 c.ctx_ = ctx 24420 return c 24421} 24422 24423// Header returns an http.Header that can be modified by the caller to 24424// add HTTP headers to the request. 24425func (c *ProductsCustombatchCall) Header() http.Header { 24426 if c.header_ == nil { 24427 c.header_ = make(http.Header) 24428 } 24429 return c.header_ 24430} 24431 24432func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { 24433 reqHeaders := make(http.Header) 24434 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24435 for k, v := range c.header_ { 24436 reqHeaders[k] = v 24437 } 24438 reqHeaders.Set("User-Agent", c.s.userAgent()) 24439 var body io.Reader = nil 24440 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest) 24441 if err != nil { 24442 return nil, err 24443 } 24444 reqHeaders.Set("Content-Type", "application/json") 24445 c.urlParams_.Set("alt", alt) 24446 c.urlParams_.Set("prettyPrint", "false") 24447 urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") 24448 urls += "?" + c.urlParams_.Encode() 24449 req, err := http.NewRequest("POST", urls, body) 24450 if err != nil { 24451 return nil, err 24452 } 24453 req.Header = reqHeaders 24454 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24455} 24456 24457// Do executes the "content.products.custombatch" call. 24458// Exactly one of *ProductsCustomBatchResponse or error will be non-nil. 24459// Any non-2xx status code is an error. Response headers are in either 24460// *ProductsCustomBatchResponse.ServerResponse.Header or (if a response 24461// was returned at all) in error.(*googleapi.Error).Header. Use 24462// googleapi.IsNotModified to check whether the returned error was 24463// because http.StatusNotModified was returned. 24464func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { 24465 gensupport.SetOptions(c.urlParams_, opts...) 24466 res, err := c.doRequest("json") 24467 if res != nil && res.StatusCode == http.StatusNotModified { 24468 if res.Body != nil { 24469 res.Body.Close() 24470 } 24471 return nil, &googleapi.Error{ 24472 Code: res.StatusCode, 24473 Header: res.Header, 24474 } 24475 } 24476 if err != nil { 24477 return nil, err 24478 } 24479 defer googleapi.CloseBody(res) 24480 if err := googleapi.CheckResponse(res); err != nil { 24481 return nil, err 24482 } 24483 ret := &ProductsCustomBatchResponse{ 24484 ServerResponse: googleapi.ServerResponse{ 24485 Header: res.Header, 24486 HTTPStatusCode: res.StatusCode, 24487 }, 24488 } 24489 target := &ret 24490 if err := gensupport.DecodeResponse(target, res); err != nil { 24491 return nil, err 24492 } 24493 return ret, nil 24494 // { 24495 // "description": "Retrieves, inserts, and deletes multiple products in a single request.", 24496 // "httpMethod": "POST", 24497 // "id": "content.products.custombatch", 24498 // "parameters": { 24499 // "dryRun": { 24500 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 24501 // "location": "query", 24502 // "type": "boolean" 24503 // } 24504 // }, 24505 // "path": "products/batch", 24506 // "request": { 24507 // "$ref": "ProductsCustomBatchRequest" 24508 // }, 24509 // "response": { 24510 // "$ref": "ProductsCustomBatchResponse" 24511 // }, 24512 // "scopes": [ 24513 // "https://www.googleapis.com/auth/content" 24514 // ] 24515 // } 24516 24517} 24518 24519// method id "content.products.delete": 24520 24521type ProductsDeleteCall struct { 24522 s *APIService 24523 merchantId uint64 24524 productId string 24525 urlParams_ gensupport.URLParams 24526 ctx_ context.Context 24527 header_ http.Header 24528} 24529 24530// Delete: Deletes a product from your Merchant Center account. 24531func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { 24532 c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24533 c.merchantId = merchantId 24534 c.productId = productId 24535 return c 24536} 24537 24538// DryRun sets the optional parameter "dryRun": Flag to simulate a 24539// request like in a live environment. If set to true, dry-run mode 24540// checks the validity of the request and returns errors (if any). 24541func (c *ProductsDeleteCall) DryRun(dryRun bool) *ProductsDeleteCall { 24542 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24543 return c 24544} 24545 24546// Fields allows partial responses to be retrieved. See 24547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24548// for more information. 24549func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { 24550 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24551 return c 24552} 24553 24554// Context sets the context to be used in this call's Do method. Any 24555// pending HTTP request will be aborted if the provided context is 24556// canceled. 24557func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { 24558 c.ctx_ = ctx 24559 return c 24560} 24561 24562// Header returns an http.Header that can be modified by the caller to 24563// add HTTP headers to the request. 24564func (c *ProductsDeleteCall) Header() http.Header { 24565 if c.header_ == nil { 24566 c.header_ = make(http.Header) 24567 } 24568 return c.header_ 24569} 24570 24571func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { 24572 reqHeaders := make(http.Header) 24573 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24574 for k, v := range c.header_ { 24575 reqHeaders[k] = v 24576 } 24577 reqHeaders.Set("User-Agent", c.s.userAgent()) 24578 var body io.Reader = nil 24579 c.urlParams_.Set("alt", alt) 24580 c.urlParams_.Set("prettyPrint", "false") 24581 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24582 urls += "?" + c.urlParams_.Encode() 24583 req, err := http.NewRequest("DELETE", urls, body) 24584 if err != nil { 24585 return nil, err 24586 } 24587 req.Header = reqHeaders 24588 googleapi.Expand(req.URL, map[string]string{ 24589 "merchantId": strconv.FormatUint(c.merchantId, 10), 24590 "productId": c.productId, 24591 }) 24592 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24593} 24594 24595// Do executes the "content.products.delete" call. 24596func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { 24597 gensupport.SetOptions(c.urlParams_, opts...) 24598 res, err := c.doRequest("json") 24599 if err != nil { 24600 return err 24601 } 24602 defer googleapi.CloseBody(res) 24603 if err := googleapi.CheckResponse(res); err != nil { 24604 return err 24605 } 24606 return nil 24607 // { 24608 // "description": "Deletes a product from your Merchant Center account.", 24609 // "httpMethod": "DELETE", 24610 // "id": "content.products.delete", 24611 // "parameterOrder": [ 24612 // "merchantId", 24613 // "productId" 24614 // ], 24615 // "parameters": { 24616 // "dryRun": { 24617 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 24618 // "location": "query", 24619 // "type": "boolean" 24620 // }, 24621 // "merchantId": { 24622 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24623 // "format": "uint64", 24624 // "location": "path", 24625 // "required": true, 24626 // "type": "string" 24627 // }, 24628 // "productId": { 24629 // "description": "The REST ID of the product.", 24630 // "location": "path", 24631 // "required": true, 24632 // "type": "string" 24633 // } 24634 // }, 24635 // "path": "{merchantId}/products/{productId}", 24636 // "scopes": [ 24637 // "https://www.googleapis.com/auth/content" 24638 // ] 24639 // } 24640 24641} 24642 24643// method id "content.products.get": 24644 24645type ProductsGetCall struct { 24646 s *APIService 24647 merchantId uint64 24648 productId string 24649 urlParams_ gensupport.URLParams 24650 ifNoneMatch_ string 24651 ctx_ context.Context 24652 header_ http.Header 24653} 24654 24655// Get: Retrieves a product from your Merchant Center account. 24656func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { 24657 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24658 c.merchantId = merchantId 24659 c.productId = productId 24660 return c 24661} 24662 24663// Fields allows partial responses to be retrieved. See 24664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24665// for more information. 24666func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { 24667 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24668 return c 24669} 24670 24671// IfNoneMatch sets the optional parameter which makes the operation 24672// fail if the object's ETag matches the given value. This is useful for 24673// getting updates only after the object has changed since the last 24674// request. Use googleapi.IsNotModified to check whether the response 24675// error from Do is the result of In-None-Match. 24676func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { 24677 c.ifNoneMatch_ = entityTag 24678 return c 24679} 24680 24681// Context sets the context to be used in this call's Do method. Any 24682// pending HTTP request will be aborted if the provided context is 24683// canceled. 24684func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { 24685 c.ctx_ = ctx 24686 return c 24687} 24688 24689// Header returns an http.Header that can be modified by the caller to 24690// add HTTP headers to the request. 24691func (c *ProductsGetCall) Header() http.Header { 24692 if c.header_ == nil { 24693 c.header_ = make(http.Header) 24694 } 24695 return c.header_ 24696} 24697 24698func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { 24699 reqHeaders := make(http.Header) 24700 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24701 for k, v := range c.header_ { 24702 reqHeaders[k] = v 24703 } 24704 reqHeaders.Set("User-Agent", c.s.userAgent()) 24705 if c.ifNoneMatch_ != "" { 24706 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24707 } 24708 var body io.Reader = nil 24709 c.urlParams_.Set("alt", alt) 24710 c.urlParams_.Set("prettyPrint", "false") 24711 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24712 urls += "?" + c.urlParams_.Encode() 24713 req, err := http.NewRequest("GET", urls, body) 24714 if err != nil { 24715 return nil, err 24716 } 24717 req.Header = reqHeaders 24718 googleapi.Expand(req.URL, map[string]string{ 24719 "merchantId": strconv.FormatUint(c.merchantId, 10), 24720 "productId": c.productId, 24721 }) 24722 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24723} 24724 24725// Do executes the "content.products.get" call. 24726// Exactly one of *Product or error will be non-nil. Any non-2xx status 24727// code is an error. Response headers are in either 24728// *Product.ServerResponse.Header or (if a response was returned at all) 24729// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24730// check whether the returned error was because http.StatusNotModified 24731// was returned. 24732func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { 24733 gensupport.SetOptions(c.urlParams_, opts...) 24734 res, err := c.doRequest("json") 24735 if res != nil && res.StatusCode == http.StatusNotModified { 24736 if res.Body != nil { 24737 res.Body.Close() 24738 } 24739 return nil, &googleapi.Error{ 24740 Code: res.StatusCode, 24741 Header: res.Header, 24742 } 24743 } 24744 if err != nil { 24745 return nil, err 24746 } 24747 defer googleapi.CloseBody(res) 24748 if err := googleapi.CheckResponse(res); err != nil { 24749 return nil, err 24750 } 24751 ret := &Product{ 24752 ServerResponse: googleapi.ServerResponse{ 24753 Header: res.Header, 24754 HTTPStatusCode: res.StatusCode, 24755 }, 24756 } 24757 target := &ret 24758 if err := gensupport.DecodeResponse(target, res); err != nil { 24759 return nil, err 24760 } 24761 return ret, nil 24762 // { 24763 // "description": "Retrieves a product from your Merchant Center account.", 24764 // "httpMethod": "GET", 24765 // "id": "content.products.get", 24766 // "parameterOrder": [ 24767 // "merchantId", 24768 // "productId" 24769 // ], 24770 // "parameters": { 24771 // "merchantId": { 24772 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24773 // "format": "uint64", 24774 // "location": "path", 24775 // "required": true, 24776 // "type": "string" 24777 // }, 24778 // "productId": { 24779 // "description": "The REST ID of the product.", 24780 // "location": "path", 24781 // "required": true, 24782 // "type": "string" 24783 // } 24784 // }, 24785 // "path": "{merchantId}/products/{productId}", 24786 // "response": { 24787 // "$ref": "Product" 24788 // }, 24789 // "scopes": [ 24790 // "https://www.googleapis.com/auth/content" 24791 // ] 24792 // } 24793 24794} 24795 24796// method id "content.products.insert": 24797 24798type ProductsInsertCall struct { 24799 s *APIService 24800 merchantId uint64 24801 product *Product 24802 urlParams_ gensupport.URLParams 24803 ctx_ context.Context 24804 header_ http.Header 24805} 24806 24807// Insert: Uploads a product to your Merchant Center account. If an item 24808// with the same channel, contentLanguage, offerId, and targetCountry 24809// already exists, this method updates that entry. 24810func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { 24811 c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24812 c.merchantId = merchantId 24813 c.product = product 24814 return c 24815} 24816 24817// DryRun sets the optional parameter "dryRun": Flag to simulate a 24818// request like in a live environment. If set to true, dry-run mode 24819// checks the validity of the request and returns errors (if any). 24820func (c *ProductsInsertCall) DryRun(dryRun bool) *ProductsInsertCall { 24821 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24822 return c 24823} 24824 24825// Fields allows partial responses to be retrieved. See 24826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24827// for more information. 24828func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { 24829 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24830 return c 24831} 24832 24833// Context sets the context to be used in this call's Do method. Any 24834// pending HTTP request will be aborted if the provided context is 24835// canceled. 24836func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { 24837 c.ctx_ = ctx 24838 return c 24839} 24840 24841// Header returns an http.Header that can be modified by the caller to 24842// add HTTP headers to the request. 24843func (c *ProductsInsertCall) Header() http.Header { 24844 if c.header_ == nil { 24845 c.header_ = make(http.Header) 24846 } 24847 return c.header_ 24848} 24849 24850func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { 24851 reqHeaders := make(http.Header) 24852 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 24853 for k, v := range c.header_ { 24854 reqHeaders[k] = v 24855 } 24856 reqHeaders.Set("User-Agent", c.s.userAgent()) 24857 var body io.Reader = nil 24858 body, err := googleapi.WithoutDataWrapper.JSONReader(c.product) 24859 if err != nil { 24860 return nil, err 24861 } 24862 reqHeaders.Set("Content-Type", "application/json") 24863 c.urlParams_.Set("alt", alt) 24864 c.urlParams_.Set("prettyPrint", "false") 24865 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 24866 urls += "?" + c.urlParams_.Encode() 24867 req, err := http.NewRequest("POST", urls, body) 24868 if err != nil { 24869 return nil, err 24870 } 24871 req.Header = reqHeaders 24872 googleapi.Expand(req.URL, map[string]string{ 24873 "merchantId": strconv.FormatUint(c.merchantId, 10), 24874 }) 24875 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24876} 24877 24878// Do executes the "content.products.insert" call. 24879// Exactly one of *Product or error will be non-nil. Any non-2xx status 24880// code is an error. Response headers are in either 24881// *Product.ServerResponse.Header or (if a response was returned at all) 24882// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24883// check whether the returned error was because http.StatusNotModified 24884// was returned. 24885func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { 24886 gensupport.SetOptions(c.urlParams_, opts...) 24887 res, err := c.doRequest("json") 24888 if res != nil && res.StatusCode == http.StatusNotModified { 24889 if res.Body != nil { 24890 res.Body.Close() 24891 } 24892 return nil, &googleapi.Error{ 24893 Code: res.StatusCode, 24894 Header: res.Header, 24895 } 24896 } 24897 if err != nil { 24898 return nil, err 24899 } 24900 defer googleapi.CloseBody(res) 24901 if err := googleapi.CheckResponse(res); err != nil { 24902 return nil, err 24903 } 24904 ret := &Product{ 24905 ServerResponse: googleapi.ServerResponse{ 24906 Header: res.Header, 24907 HTTPStatusCode: res.StatusCode, 24908 }, 24909 } 24910 target := &ret 24911 if err := gensupport.DecodeResponse(target, res); err != nil { 24912 return nil, err 24913 } 24914 return ret, nil 24915 // { 24916 // "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.", 24917 // "httpMethod": "POST", 24918 // "id": "content.products.insert", 24919 // "parameterOrder": [ 24920 // "merchantId" 24921 // ], 24922 // "parameters": { 24923 // "dryRun": { 24924 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 24925 // "location": "query", 24926 // "type": "boolean" 24927 // }, 24928 // "merchantId": { 24929 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24930 // "format": "uint64", 24931 // "location": "path", 24932 // "required": true, 24933 // "type": "string" 24934 // } 24935 // }, 24936 // "path": "{merchantId}/products", 24937 // "request": { 24938 // "$ref": "Product" 24939 // }, 24940 // "response": { 24941 // "$ref": "Product" 24942 // }, 24943 // "scopes": [ 24944 // "https://www.googleapis.com/auth/content" 24945 // ] 24946 // } 24947 24948} 24949 24950// method id "content.products.list": 24951 24952type ProductsListCall struct { 24953 s *APIService 24954 merchantId uint64 24955 urlParams_ gensupport.URLParams 24956 ifNoneMatch_ string 24957 ctx_ context.Context 24958 header_ http.Header 24959} 24960 24961// List: Lists the products in your Merchant Center account. The 24962// response might contain fewer items than specified by maxResults. Rely 24963// on nextPageToken to determine if there are more items to be 24964// requested. 24965func (r *ProductsService) List(merchantId uint64) *ProductsListCall { 24966 c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24967 c.merchantId = merchantId 24968 return c 24969} 24970 24971// IncludeInvalidInsertedItems sets the optional parameter 24972// "includeInvalidInsertedItems": Flag to include the invalid inserted 24973// items in the result of the list request. By default the invalid items 24974// are not shown (the default value is false). 24975func (c *ProductsListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductsListCall { 24976 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 24977 return c 24978} 24979 24980// MaxResults sets the optional parameter "maxResults": The maximum 24981// number of products to return in the response, used for paging. 24982func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { 24983 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 24984 return c 24985} 24986 24987// PageToken sets the optional parameter "pageToken": The token returned 24988// by the previous request. 24989func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { 24990 c.urlParams_.Set("pageToken", pageToken) 24991 return c 24992} 24993 24994// Fields allows partial responses to be retrieved. See 24995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24996// for more information. 24997func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { 24998 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24999 return c 25000} 25001 25002// IfNoneMatch sets the optional parameter which makes the operation 25003// fail if the object's ETag matches the given value. This is useful for 25004// getting updates only after the object has changed since the last 25005// request. Use googleapi.IsNotModified to check whether the response 25006// error from Do is the result of In-None-Match. 25007func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { 25008 c.ifNoneMatch_ = entityTag 25009 return c 25010} 25011 25012// Context sets the context to be used in this call's Do method. Any 25013// pending HTTP request will be aborted if the provided context is 25014// canceled. 25015func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { 25016 c.ctx_ = ctx 25017 return c 25018} 25019 25020// Header returns an http.Header that can be modified by the caller to 25021// add HTTP headers to the request. 25022func (c *ProductsListCall) Header() http.Header { 25023 if c.header_ == nil { 25024 c.header_ = make(http.Header) 25025 } 25026 return c.header_ 25027} 25028 25029func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { 25030 reqHeaders := make(http.Header) 25031 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25032 for k, v := range c.header_ { 25033 reqHeaders[k] = v 25034 } 25035 reqHeaders.Set("User-Agent", c.s.userAgent()) 25036 if c.ifNoneMatch_ != "" { 25037 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25038 } 25039 var body io.Reader = nil 25040 c.urlParams_.Set("alt", alt) 25041 c.urlParams_.Set("prettyPrint", "false") 25042 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 25043 urls += "?" + c.urlParams_.Encode() 25044 req, err := http.NewRequest("GET", urls, body) 25045 if err != nil { 25046 return nil, err 25047 } 25048 req.Header = reqHeaders 25049 googleapi.Expand(req.URL, map[string]string{ 25050 "merchantId": strconv.FormatUint(c.merchantId, 10), 25051 }) 25052 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25053} 25054 25055// Do executes the "content.products.list" call. 25056// Exactly one of *ProductsListResponse or error will be non-nil. Any 25057// non-2xx status code is an error. Response headers are in either 25058// *ProductsListResponse.ServerResponse.Header or (if a response was 25059// returned at all) in error.(*googleapi.Error).Header. Use 25060// googleapi.IsNotModified to check whether the returned error was 25061// because http.StatusNotModified was returned. 25062func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { 25063 gensupport.SetOptions(c.urlParams_, opts...) 25064 res, err := c.doRequest("json") 25065 if res != nil && res.StatusCode == http.StatusNotModified { 25066 if res.Body != nil { 25067 res.Body.Close() 25068 } 25069 return nil, &googleapi.Error{ 25070 Code: res.StatusCode, 25071 Header: res.Header, 25072 } 25073 } 25074 if err != nil { 25075 return nil, err 25076 } 25077 defer googleapi.CloseBody(res) 25078 if err := googleapi.CheckResponse(res); err != nil { 25079 return nil, err 25080 } 25081 ret := &ProductsListResponse{ 25082 ServerResponse: googleapi.ServerResponse{ 25083 Header: res.Header, 25084 HTTPStatusCode: res.StatusCode, 25085 }, 25086 } 25087 target := &ret 25088 if err := gensupport.DecodeResponse(target, res); err != nil { 25089 return nil, err 25090 } 25091 return ret, nil 25092 // { 25093 // "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", 25094 // "httpMethod": "GET", 25095 // "id": "content.products.list", 25096 // "parameterOrder": [ 25097 // "merchantId" 25098 // ], 25099 // "parameters": { 25100 // "includeInvalidInsertedItems": { 25101 // "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).", 25102 // "location": "query", 25103 // "type": "boolean" 25104 // }, 25105 // "maxResults": { 25106 // "description": "The maximum number of products to return in the response, used for paging.", 25107 // "format": "uint32", 25108 // "location": "query", 25109 // "type": "integer" 25110 // }, 25111 // "merchantId": { 25112 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 25113 // "format": "uint64", 25114 // "location": "path", 25115 // "required": true, 25116 // "type": "string" 25117 // }, 25118 // "pageToken": { 25119 // "description": "The token returned by the previous request.", 25120 // "location": "query", 25121 // "type": "string" 25122 // } 25123 // }, 25124 // "path": "{merchantId}/products", 25125 // "response": { 25126 // "$ref": "ProductsListResponse" 25127 // }, 25128 // "scopes": [ 25129 // "https://www.googleapis.com/auth/content" 25130 // ] 25131 // } 25132 25133} 25134 25135// Pages invokes f for each page of results. 25136// A non-nil error returned from f will halt the iteration. 25137// The provided context supersedes any context provided to the Context method. 25138func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { 25139 c.ctx_ = ctx 25140 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25141 for { 25142 x, err := c.Do() 25143 if err != nil { 25144 return err 25145 } 25146 if err := f(x); err != nil { 25147 return err 25148 } 25149 if x.NextPageToken == "" { 25150 return nil 25151 } 25152 c.PageToken(x.NextPageToken) 25153 } 25154} 25155 25156// method id "content.productstatuses.custombatch": 25157 25158type ProductstatusesCustombatchCall struct { 25159 s *APIService 25160 productstatusescustombatchrequest *ProductstatusesCustomBatchRequest 25161 urlParams_ gensupport.URLParams 25162 ctx_ context.Context 25163 header_ http.Header 25164} 25165 25166// Custombatch: Gets the statuses of multiple products in a single 25167// request. 25168func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { 25169 c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25170 c.productstatusescustombatchrequest = productstatusescustombatchrequest 25171 return c 25172} 25173 25174// IncludeAttributes sets the optional parameter "includeAttributes": 25175// Flag to include full product data in the results of this request. The 25176// default value is false. 25177func (c *ProductstatusesCustombatchCall) IncludeAttributes(includeAttributes bool) *ProductstatusesCustombatchCall { 25178 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25179 return c 25180} 25181 25182// Fields allows partial responses to be retrieved. See 25183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25184// for more information. 25185func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { 25186 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25187 return c 25188} 25189 25190// Context sets the context to be used in this call's Do method. Any 25191// pending HTTP request will be aborted if the provided context is 25192// canceled. 25193func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { 25194 c.ctx_ = ctx 25195 return c 25196} 25197 25198// Header returns an http.Header that can be modified by the caller to 25199// add HTTP headers to the request. 25200func (c *ProductstatusesCustombatchCall) Header() http.Header { 25201 if c.header_ == nil { 25202 c.header_ = make(http.Header) 25203 } 25204 return c.header_ 25205} 25206 25207func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 25208 reqHeaders := make(http.Header) 25209 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25210 for k, v := range c.header_ { 25211 reqHeaders[k] = v 25212 } 25213 reqHeaders.Set("User-Agent", c.s.userAgent()) 25214 var body io.Reader = nil 25215 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest) 25216 if err != nil { 25217 return nil, err 25218 } 25219 reqHeaders.Set("Content-Type", "application/json") 25220 c.urlParams_.Set("alt", alt) 25221 c.urlParams_.Set("prettyPrint", "false") 25222 urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") 25223 urls += "?" + c.urlParams_.Encode() 25224 req, err := http.NewRequest("POST", urls, body) 25225 if err != nil { 25226 return nil, err 25227 } 25228 req.Header = reqHeaders 25229 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25230} 25231 25232// Do executes the "content.productstatuses.custombatch" call. 25233// Exactly one of *ProductstatusesCustomBatchResponse or error will be 25234// non-nil. Any non-2xx status code is an error. Response headers are in 25235// either *ProductstatusesCustomBatchResponse.ServerResponse.Header or 25236// (if a response was returned at all) in 25237// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25238// whether the returned error was because http.StatusNotModified was 25239// returned. 25240func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { 25241 gensupport.SetOptions(c.urlParams_, opts...) 25242 res, err := c.doRequest("json") 25243 if res != nil && res.StatusCode == http.StatusNotModified { 25244 if res.Body != nil { 25245 res.Body.Close() 25246 } 25247 return nil, &googleapi.Error{ 25248 Code: res.StatusCode, 25249 Header: res.Header, 25250 } 25251 } 25252 if err != nil { 25253 return nil, err 25254 } 25255 defer googleapi.CloseBody(res) 25256 if err := googleapi.CheckResponse(res); err != nil { 25257 return nil, err 25258 } 25259 ret := &ProductstatusesCustomBatchResponse{ 25260 ServerResponse: googleapi.ServerResponse{ 25261 Header: res.Header, 25262 HTTPStatusCode: res.StatusCode, 25263 }, 25264 } 25265 target := &ret 25266 if err := gensupport.DecodeResponse(target, res); err != nil { 25267 return nil, err 25268 } 25269 return ret, nil 25270 // { 25271 // "description": "Gets the statuses of multiple products in a single request.", 25272 // "httpMethod": "POST", 25273 // "id": "content.productstatuses.custombatch", 25274 // "parameters": { 25275 // "includeAttributes": { 25276 // "description": "Flag to include full product data in the results of this request. The default value is false.", 25277 // "location": "query", 25278 // "type": "boolean" 25279 // } 25280 // }, 25281 // "path": "productstatuses/batch", 25282 // "request": { 25283 // "$ref": "ProductstatusesCustomBatchRequest" 25284 // }, 25285 // "response": { 25286 // "$ref": "ProductstatusesCustomBatchResponse" 25287 // }, 25288 // "scopes": [ 25289 // "https://www.googleapis.com/auth/content" 25290 // ] 25291 // } 25292 25293} 25294 25295// method id "content.productstatuses.get": 25296 25297type ProductstatusesGetCall struct { 25298 s *APIService 25299 merchantId uint64 25300 productId string 25301 urlParams_ gensupport.URLParams 25302 ifNoneMatch_ string 25303 ctx_ context.Context 25304 header_ http.Header 25305} 25306 25307// Get: Gets the status of a product from your Merchant Center account. 25308func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { 25309 c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25310 c.merchantId = merchantId 25311 c.productId = productId 25312 return c 25313} 25314 25315// Destinations sets the optional parameter "destinations": If set, only 25316// issues for the specified destinations are returned, otherwise only 25317// issues for the Shopping destination. 25318func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { 25319 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25320 return c 25321} 25322 25323// IncludeAttributes sets the optional parameter "includeAttributes": 25324// Flag to include full product data in the result of this get request. 25325// The default value is false. 25326func (c *ProductstatusesGetCall) IncludeAttributes(includeAttributes bool) *ProductstatusesGetCall { 25327 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25328 return c 25329} 25330 25331// Fields allows partial responses to be retrieved. See 25332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25333// for more information. 25334func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { 25335 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25336 return c 25337} 25338 25339// IfNoneMatch sets the optional parameter which makes the operation 25340// fail if the object's ETag matches the given value. This is useful for 25341// getting updates only after the object has changed since the last 25342// request. Use googleapi.IsNotModified to check whether the response 25343// error from Do is the result of In-None-Match. 25344func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { 25345 c.ifNoneMatch_ = entityTag 25346 return c 25347} 25348 25349// Context sets the context to be used in this call's Do method. Any 25350// pending HTTP request will be aborted if the provided context is 25351// canceled. 25352func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { 25353 c.ctx_ = ctx 25354 return c 25355} 25356 25357// Header returns an http.Header that can be modified by the caller to 25358// add HTTP headers to the request. 25359func (c *ProductstatusesGetCall) Header() http.Header { 25360 if c.header_ == nil { 25361 c.header_ = make(http.Header) 25362 } 25363 return c.header_ 25364} 25365 25366func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { 25367 reqHeaders := make(http.Header) 25368 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25369 for k, v := range c.header_ { 25370 reqHeaders[k] = v 25371 } 25372 reqHeaders.Set("User-Agent", c.s.userAgent()) 25373 if c.ifNoneMatch_ != "" { 25374 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25375 } 25376 var body io.Reader = nil 25377 c.urlParams_.Set("alt", alt) 25378 c.urlParams_.Set("prettyPrint", "false") 25379 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") 25380 urls += "?" + c.urlParams_.Encode() 25381 req, err := http.NewRequest("GET", urls, body) 25382 if err != nil { 25383 return nil, err 25384 } 25385 req.Header = reqHeaders 25386 googleapi.Expand(req.URL, map[string]string{ 25387 "merchantId": strconv.FormatUint(c.merchantId, 10), 25388 "productId": c.productId, 25389 }) 25390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25391} 25392 25393// Do executes the "content.productstatuses.get" call. 25394// Exactly one of *ProductStatus or error will be non-nil. Any non-2xx 25395// status code is an error. Response headers are in either 25396// *ProductStatus.ServerResponse.Header or (if a response was returned 25397// at all) in error.(*googleapi.Error).Header. Use 25398// googleapi.IsNotModified to check whether the returned error was 25399// because http.StatusNotModified was returned. 25400func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { 25401 gensupport.SetOptions(c.urlParams_, opts...) 25402 res, err := c.doRequest("json") 25403 if res != nil && res.StatusCode == http.StatusNotModified { 25404 if res.Body != nil { 25405 res.Body.Close() 25406 } 25407 return nil, &googleapi.Error{ 25408 Code: res.StatusCode, 25409 Header: res.Header, 25410 } 25411 } 25412 if err != nil { 25413 return nil, err 25414 } 25415 defer googleapi.CloseBody(res) 25416 if err := googleapi.CheckResponse(res); err != nil { 25417 return nil, err 25418 } 25419 ret := &ProductStatus{ 25420 ServerResponse: googleapi.ServerResponse{ 25421 Header: res.Header, 25422 HTTPStatusCode: res.StatusCode, 25423 }, 25424 } 25425 target := &ret 25426 if err := gensupport.DecodeResponse(target, res); err != nil { 25427 return nil, err 25428 } 25429 return ret, nil 25430 // { 25431 // "description": "Gets the status of a product from your Merchant Center account.", 25432 // "httpMethod": "GET", 25433 // "id": "content.productstatuses.get", 25434 // "parameterOrder": [ 25435 // "merchantId", 25436 // "productId" 25437 // ], 25438 // "parameters": { 25439 // "destinations": { 25440 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25441 // "location": "query", 25442 // "repeated": true, 25443 // "type": "string" 25444 // }, 25445 // "includeAttributes": { 25446 // "description": "Flag to include full product data in the result of this get request. The default value is false.", 25447 // "location": "query", 25448 // "type": "boolean" 25449 // }, 25450 // "merchantId": { 25451 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 25452 // "format": "uint64", 25453 // "location": "path", 25454 // "required": true, 25455 // "type": "string" 25456 // }, 25457 // "productId": { 25458 // "description": "The REST ID of the product.", 25459 // "location": "path", 25460 // "required": true, 25461 // "type": "string" 25462 // } 25463 // }, 25464 // "path": "{merchantId}/productstatuses/{productId}", 25465 // "response": { 25466 // "$ref": "ProductStatus" 25467 // }, 25468 // "scopes": [ 25469 // "https://www.googleapis.com/auth/content" 25470 // ] 25471 // } 25472 25473} 25474 25475// method id "content.productstatuses.list": 25476 25477type ProductstatusesListCall struct { 25478 s *APIService 25479 merchantId uint64 25480 urlParams_ gensupport.URLParams 25481 ifNoneMatch_ string 25482 ctx_ context.Context 25483 header_ http.Header 25484} 25485 25486// List: Lists the statuses of the products in your Merchant Center 25487// account. 25488func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { 25489 c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25490 c.merchantId = merchantId 25491 return c 25492} 25493 25494// Destinations sets the optional parameter "destinations": If set, only 25495// issues for the specified destinations are returned, otherwise only 25496// issues for the Shopping destination. 25497func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { 25498 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25499 return c 25500} 25501 25502// IncludeAttributes sets the optional parameter "includeAttributes": 25503// Flag to include full product data in the results of the list request. 25504// The default value is false. 25505func (c *ProductstatusesListCall) IncludeAttributes(includeAttributes bool) *ProductstatusesListCall { 25506 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25507 return c 25508} 25509 25510// IncludeInvalidInsertedItems sets the optional parameter 25511// "includeInvalidInsertedItems": Flag to include the invalid inserted 25512// items in the result of the list request. By default the invalid items 25513// are not shown (the default value is false). 25514func (c *ProductstatusesListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductstatusesListCall { 25515 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 25516 return c 25517} 25518 25519// MaxResults sets the optional parameter "maxResults": The maximum 25520// number of product statuses to return in the response, used for 25521// paging. 25522func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { 25523 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 25524 return c 25525} 25526 25527// PageToken sets the optional parameter "pageToken": The token returned 25528// by the previous request. 25529func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { 25530 c.urlParams_.Set("pageToken", pageToken) 25531 return c 25532} 25533 25534// Fields allows partial responses to be retrieved. See 25535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25536// for more information. 25537func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { 25538 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25539 return c 25540} 25541 25542// IfNoneMatch sets the optional parameter which makes the operation 25543// fail if the object's ETag matches the given value. This is useful for 25544// getting updates only after the object has changed since the last 25545// request. Use googleapi.IsNotModified to check whether the response 25546// error from Do is the result of In-None-Match. 25547func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { 25548 c.ifNoneMatch_ = entityTag 25549 return c 25550} 25551 25552// Context sets the context to be used in this call's Do method. Any 25553// pending HTTP request will be aborted if the provided context is 25554// canceled. 25555func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { 25556 c.ctx_ = ctx 25557 return c 25558} 25559 25560// Header returns an http.Header that can be modified by the caller to 25561// add HTTP headers to the request. 25562func (c *ProductstatusesListCall) Header() http.Header { 25563 if c.header_ == nil { 25564 c.header_ = make(http.Header) 25565 } 25566 return c.header_ 25567} 25568 25569func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { 25570 reqHeaders := make(http.Header) 25571 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25572 for k, v := range c.header_ { 25573 reqHeaders[k] = v 25574 } 25575 reqHeaders.Set("User-Agent", c.s.userAgent()) 25576 if c.ifNoneMatch_ != "" { 25577 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25578 } 25579 var body io.Reader = nil 25580 c.urlParams_.Set("alt", alt) 25581 c.urlParams_.Set("prettyPrint", "false") 25582 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") 25583 urls += "?" + c.urlParams_.Encode() 25584 req, err := http.NewRequest("GET", urls, body) 25585 if err != nil { 25586 return nil, err 25587 } 25588 req.Header = reqHeaders 25589 googleapi.Expand(req.URL, map[string]string{ 25590 "merchantId": strconv.FormatUint(c.merchantId, 10), 25591 }) 25592 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25593} 25594 25595// Do executes the "content.productstatuses.list" call. 25596// Exactly one of *ProductstatusesListResponse or error will be non-nil. 25597// Any non-2xx status code is an error. Response headers are in either 25598// *ProductstatusesListResponse.ServerResponse.Header or (if a response 25599// was returned at all) in error.(*googleapi.Error).Header. Use 25600// googleapi.IsNotModified to check whether the returned error was 25601// because http.StatusNotModified was returned. 25602func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { 25603 gensupport.SetOptions(c.urlParams_, opts...) 25604 res, err := c.doRequest("json") 25605 if res != nil && res.StatusCode == http.StatusNotModified { 25606 if res.Body != nil { 25607 res.Body.Close() 25608 } 25609 return nil, &googleapi.Error{ 25610 Code: res.StatusCode, 25611 Header: res.Header, 25612 } 25613 } 25614 if err != nil { 25615 return nil, err 25616 } 25617 defer googleapi.CloseBody(res) 25618 if err := googleapi.CheckResponse(res); err != nil { 25619 return nil, err 25620 } 25621 ret := &ProductstatusesListResponse{ 25622 ServerResponse: googleapi.ServerResponse{ 25623 Header: res.Header, 25624 HTTPStatusCode: res.StatusCode, 25625 }, 25626 } 25627 target := &ret 25628 if err := gensupport.DecodeResponse(target, res); err != nil { 25629 return nil, err 25630 } 25631 return ret, nil 25632 // { 25633 // "description": "Lists the statuses of the products in your Merchant Center account.", 25634 // "httpMethod": "GET", 25635 // "id": "content.productstatuses.list", 25636 // "parameterOrder": [ 25637 // "merchantId" 25638 // ], 25639 // "parameters": { 25640 // "destinations": { 25641 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25642 // "location": "query", 25643 // "repeated": true, 25644 // "type": "string" 25645 // }, 25646 // "includeAttributes": { 25647 // "description": "Flag to include full product data in the results of the list request. The default value is false.", 25648 // "location": "query", 25649 // "type": "boolean" 25650 // }, 25651 // "includeInvalidInsertedItems": { 25652 // "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).", 25653 // "location": "query", 25654 // "type": "boolean" 25655 // }, 25656 // "maxResults": { 25657 // "description": "The maximum number of product statuses to return in the response, used for paging.", 25658 // "format": "uint32", 25659 // "location": "query", 25660 // "type": "integer" 25661 // }, 25662 // "merchantId": { 25663 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 25664 // "format": "uint64", 25665 // "location": "path", 25666 // "required": true, 25667 // "type": "string" 25668 // }, 25669 // "pageToken": { 25670 // "description": "The token returned by the previous request.", 25671 // "location": "query", 25672 // "type": "string" 25673 // } 25674 // }, 25675 // "path": "{merchantId}/productstatuses", 25676 // "response": { 25677 // "$ref": "ProductstatusesListResponse" 25678 // }, 25679 // "scopes": [ 25680 // "https://www.googleapis.com/auth/content" 25681 // ] 25682 // } 25683 25684} 25685 25686// Pages invokes f for each page of results. 25687// A non-nil error returned from f will halt the iteration. 25688// The provided context supersedes any context provided to the Context method. 25689func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { 25690 c.ctx_ = ctx 25691 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25692 for { 25693 x, err := c.Do() 25694 if err != nil { 25695 return err 25696 } 25697 if err := f(x); err != nil { 25698 return err 25699 } 25700 if x.NextPageToken == "" { 25701 return nil 25702 } 25703 c.PageToken(x.NextPageToken) 25704 } 25705} 25706 25707// method id "content.shippingsettings.custombatch": 25708 25709type ShippingsettingsCustombatchCall struct { 25710 s *APIService 25711 shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest 25712 urlParams_ gensupport.URLParams 25713 ctx_ context.Context 25714 header_ http.Header 25715} 25716 25717// Custombatch: Retrieves and updates the shipping settings of multiple 25718// accounts in a single request. 25719func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall { 25720 c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25721 c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest 25722 return c 25723} 25724 25725// DryRun sets the optional parameter "dryRun": Flag to simulate a 25726// request like in a live environment. If set to true, dry-run mode 25727// checks the validity of the request and returns errors (if any). 25728func (c *ShippingsettingsCustombatchCall) DryRun(dryRun bool) *ShippingsettingsCustombatchCall { 25729 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 25730 return c 25731} 25732 25733// Fields allows partial responses to be retrieved. See 25734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25735// for more information. 25736func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall { 25737 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25738 return c 25739} 25740 25741// Context sets the context to be used in this call's Do method. Any 25742// pending HTTP request will be aborted if the provided context is 25743// canceled. 25744func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall { 25745 c.ctx_ = ctx 25746 return c 25747} 25748 25749// Header returns an http.Header that can be modified by the caller to 25750// add HTTP headers to the request. 25751func (c *ShippingsettingsCustombatchCall) Header() http.Header { 25752 if c.header_ == nil { 25753 c.header_ = make(http.Header) 25754 } 25755 return c.header_ 25756} 25757 25758func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 25759 reqHeaders := make(http.Header) 25760 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25761 for k, v := range c.header_ { 25762 reqHeaders[k] = v 25763 } 25764 reqHeaders.Set("User-Agent", c.s.userAgent()) 25765 var body io.Reader = nil 25766 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest) 25767 if err != nil { 25768 return nil, err 25769 } 25770 reqHeaders.Set("Content-Type", "application/json") 25771 c.urlParams_.Set("alt", alt) 25772 c.urlParams_.Set("prettyPrint", "false") 25773 urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch") 25774 urls += "?" + c.urlParams_.Encode() 25775 req, err := http.NewRequest("POST", urls, body) 25776 if err != nil { 25777 return nil, err 25778 } 25779 req.Header = reqHeaders 25780 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25781} 25782 25783// Do executes the "content.shippingsettings.custombatch" call. 25784// Exactly one of *ShippingsettingsCustomBatchResponse or error will be 25785// non-nil. Any non-2xx status code is an error. Response headers are in 25786// either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or 25787// (if a response was returned at all) in 25788// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25789// whether the returned error was because http.StatusNotModified was 25790// returned. 25791func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) { 25792 gensupport.SetOptions(c.urlParams_, opts...) 25793 res, err := c.doRequest("json") 25794 if res != nil && res.StatusCode == http.StatusNotModified { 25795 if res.Body != nil { 25796 res.Body.Close() 25797 } 25798 return nil, &googleapi.Error{ 25799 Code: res.StatusCode, 25800 Header: res.Header, 25801 } 25802 } 25803 if err != nil { 25804 return nil, err 25805 } 25806 defer googleapi.CloseBody(res) 25807 if err := googleapi.CheckResponse(res); err != nil { 25808 return nil, err 25809 } 25810 ret := &ShippingsettingsCustomBatchResponse{ 25811 ServerResponse: googleapi.ServerResponse{ 25812 Header: res.Header, 25813 HTTPStatusCode: res.StatusCode, 25814 }, 25815 } 25816 target := &ret 25817 if err := gensupport.DecodeResponse(target, res); err != nil { 25818 return nil, err 25819 } 25820 return ret, nil 25821 // { 25822 // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", 25823 // "httpMethod": "POST", 25824 // "id": "content.shippingsettings.custombatch", 25825 // "parameters": { 25826 // "dryRun": { 25827 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 25828 // "location": "query", 25829 // "type": "boolean" 25830 // } 25831 // }, 25832 // "path": "shippingsettings/batch", 25833 // "request": { 25834 // "$ref": "ShippingsettingsCustomBatchRequest" 25835 // }, 25836 // "response": { 25837 // "$ref": "ShippingsettingsCustomBatchResponse" 25838 // }, 25839 // "scopes": [ 25840 // "https://www.googleapis.com/auth/content" 25841 // ] 25842 // } 25843 25844} 25845 25846// method id "content.shippingsettings.get": 25847 25848type ShippingsettingsGetCall struct { 25849 s *APIService 25850 merchantId uint64 25851 accountId uint64 25852 urlParams_ gensupport.URLParams 25853 ifNoneMatch_ string 25854 ctx_ context.Context 25855 header_ http.Header 25856} 25857 25858// Get: Retrieves the shipping settings of the account. 25859func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall { 25860 c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25861 c.merchantId = merchantId 25862 c.accountId = accountId 25863 return c 25864} 25865 25866// Fields allows partial responses to be retrieved. See 25867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25868// for more information. 25869func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall { 25870 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25871 return c 25872} 25873 25874// IfNoneMatch sets the optional parameter which makes the operation 25875// fail if the object's ETag matches the given value. This is useful for 25876// getting updates only after the object has changed since the last 25877// request. Use googleapi.IsNotModified to check whether the response 25878// error from Do is the result of In-None-Match. 25879func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall { 25880 c.ifNoneMatch_ = entityTag 25881 return c 25882} 25883 25884// Context sets the context to be used in this call's Do method. Any 25885// pending HTTP request will be aborted if the provided context is 25886// canceled. 25887func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall { 25888 c.ctx_ = ctx 25889 return c 25890} 25891 25892// Header returns an http.Header that can be modified by the caller to 25893// add HTTP headers to the request. 25894func (c *ShippingsettingsGetCall) Header() http.Header { 25895 if c.header_ == nil { 25896 c.header_ = make(http.Header) 25897 } 25898 return c.header_ 25899} 25900 25901func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) { 25902 reqHeaders := make(http.Header) 25903 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 25904 for k, v := range c.header_ { 25905 reqHeaders[k] = v 25906 } 25907 reqHeaders.Set("User-Agent", c.s.userAgent()) 25908 if c.ifNoneMatch_ != "" { 25909 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25910 } 25911 var body io.Reader = nil 25912 c.urlParams_.Set("alt", alt) 25913 c.urlParams_.Set("prettyPrint", "false") 25914 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 25915 urls += "?" + c.urlParams_.Encode() 25916 req, err := http.NewRequest("GET", urls, body) 25917 if err != nil { 25918 return nil, err 25919 } 25920 req.Header = reqHeaders 25921 googleapi.Expand(req.URL, map[string]string{ 25922 "merchantId": strconv.FormatUint(c.merchantId, 10), 25923 "accountId": strconv.FormatUint(c.accountId, 10), 25924 }) 25925 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25926} 25927 25928// Do executes the "content.shippingsettings.get" call. 25929// Exactly one of *ShippingSettings or error will be non-nil. Any 25930// non-2xx status code is an error. Response headers are in either 25931// *ShippingSettings.ServerResponse.Header or (if a response was 25932// returned at all) in error.(*googleapi.Error).Header. Use 25933// googleapi.IsNotModified to check whether the returned error was 25934// because http.StatusNotModified was returned. 25935func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 25936 gensupport.SetOptions(c.urlParams_, opts...) 25937 res, err := c.doRequest("json") 25938 if res != nil && res.StatusCode == http.StatusNotModified { 25939 if res.Body != nil { 25940 res.Body.Close() 25941 } 25942 return nil, &googleapi.Error{ 25943 Code: res.StatusCode, 25944 Header: res.Header, 25945 } 25946 } 25947 if err != nil { 25948 return nil, err 25949 } 25950 defer googleapi.CloseBody(res) 25951 if err := googleapi.CheckResponse(res); err != nil { 25952 return nil, err 25953 } 25954 ret := &ShippingSettings{ 25955 ServerResponse: googleapi.ServerResponse{ 25956 Header: res.Header, 25957 HTTPStatusCode: res.StatusCode, 25958 }, 25959 } 25960 target := &ret 25961 if err := gensupport.DecodeResponse(target, res); err != nil { 25962 return nil, err 25963 } 25964 return ret, nil 25965 // { 25966 // "description": "Retrieves the shipping settings of the account.", 25967 // "httpMethod": "GET", 25968 // "id": "content.shippingsettings.get", 25969 // "parameterOrder": [ 25970 // "merchantId", 25971 // "accountId" 25972 // ], 25973 // "parameters": { 25974 // "accountId": { 25975 // "description": "The ID of the account for which to get/update shipping settings.", 25976 // "format": "uint64", 25977 // "location": "path", 25978 // "required": true, 25979 // "type": "string" 25980 // }, 25981 // "merchantId": { 25982 // "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.", 25983 // "format": "uint64", 25984 // "location": "path", 25985 // "required": true, 25986 // "type": "string" 25987 // } 25988 // }, 25989 // "path": "{merchantId}/shippingsettings/{accountId}", 25990 // "response": { 25991 // "$ref": "ShippingSettings" 25992 // }, 25993 // "scopes": [ 25994 // "https://www.googleapis.com/auth/content" 25995 // ] 25996 // } 25997 25998} 25999 26000// method id "content.shippingsettings.getsupportedcarriers": 26001 26002type ShippingsettingsGetsupportedcarriersCall struct { 26003 s *APIService 26004 merchantId uint64 26005 urlParams_ gensupport.URLParams 26006 ifNoneMatch_ string 26007 ctx_ context.Context 26008 header_ http.Header 26009} 26010 26011// Getsupportedcarriers: Retrieves supported carriers and carrier 26012// services for an account. 26013func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall { 26014 c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26015 c.merchantId = merchantId 26016 return c 26017} 26018 26019// Fields allows partial responses to be retrieved. See 26020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26021// for more information. 26022func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall { 26023 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26024 return c 26025} 26026 26027// IfNoneMatch sets the optional parameter which makes the operation 26028// fail if the object's ETag matches the given value. This is useful for 26029// getting updates only after the object has changed since the last 26030// request. Use googleapi.IsNotModified to check whether the response 26031// error from Do is the result of In-None-Match. 26032func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall { 26033 c.ifNoneMatch_ = entityTag 26034 return c 26035} 26036 26037// Context sets the context to be used in this call's Do method. Any 26038// pending HTTP request will be aborted if the provided context is 26039// canceled. 26040func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall { 26041 c.ctx_ = ctx 26042 return c 26043} 26044 26045// Header returns an http.Header that can be modified by the caller to 26046// add HTTP headers to the request. 26047func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header { 26048 if c.header_ == nil { 26049 c.header_ = make(http.Header) 26050 } 26051 return c.header_ 26052} 26053 26054func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) { 26055 reqHeaders := make(http.Header) 26056 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 26057 for k, v := range c.header_ { 26058 reqHeaders[k] = v 26059 } 26060 reqHeaders.Set("User-Agent", c.s.userAgent()) 26061 if c.ifNoneMatch_ != "" { 26062 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26063 } 26064 var body io.Reader = nil 26065 c.urlParams_.Set("alt", alt) 26066 c.urlParams_.Set("prettyPrint", "false") 26067 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers") 26068 urls += "?" + c.urlParams_.Encode() 26069 req, err := http.NewRequest("GET", urls, body) 26070 if err != nil { 26071 return nil, err 26072 } 26073 req.Header = reqHeaders 26074 googleapi.Expand(req.URL, map[string]string{ 26075 "merchantId": strconv.FormatUint(c.merchantId, 10), 26076 }) 26077 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26078} 26079 26080// Do executes the "content.shippingsettings.getsupportedcarriers" call. 26081// Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error 26082// will be non-nil. Any non-2xx status code is an error. Response 26083// headers are in either 26084// *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header 26085// or (if a response was returned at all) in 26086// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26087// whether the returned error was because http.StatusNotModified was 26088// returned. 26089func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) { 26090 gensupport.SetOptions(c.urlParams_, opts...) 26091 res, err := c.doRequest("json") 26092 if res != nil && res.StatusCode == http.StatusNotModified { 26093 if res.Body != nil { 26094 res.Body.Close() 26095 } 26096 return nil, &googleapi.Error{ 26097 Code: res.StatusCode, 26098 Header: res.Header, 26099 } 26100 } 26101 if err != nil { 26102 return nil, err 26103 } 26104 defer googleapi.CloseBody(res) 26105 if err := googleapi.CheckResponse(res); err != nil { 26106 return nil, err 26107 } 26108 ret := &ShippingsettingsGetSupportedCarriersResponse{ 26109 ServerResponse: googleapi.ServerResponse{ 26110 Header: res.Header, 26111 HTTPStatusCode: res.StatusCode, 26112 }, 26113 } 26114 target := &ret 26115 if err := gensupport.DecodeResponse(target, res); err != nil { 26116 return nil, err 26117 } 26118 return ret, nil 26119 // { 26120 // "description": "Retrieves supported carriers and carrier services for an account.", 26121 // "httpMethod": "GET", 26122 // "id": "content.shippingsettings.getsupportedcarriers", 26123 // "parameterOrder": [ 26124 // "merchantId" 26125 // ], 26126 // "parameters": { 26127 // "merchantId": { 26128 // "description": "The ID of the account for which to retrieve the supported carriers.", 26129 // "format": "uint64", 26130 // "location": "path", 26131 // "required": true, 26132 // "type": "string" 26133 // } 26134 // }, 26135 // "path": "{merchantId}/supportedCarriers", 26136 // "response": { 26137 // "$ref": "ShippingsettingsGetSupportedCarriersResponse" 26138 // }, 26139 // "scopes": [ 26140 // "https://www.googleapis.com/auth/content" 26141 // ] 26142 // } 26143 26144} 26145 26146// method id "content.shippingsettings.getsupportedholidays": 26147 26148type ShippingsettingsGetsupportedholidaysCall struct { 26149 s *APIService 26150 merchantId uint64 26151 urlParams_ gensupport.URLParams 26152 ifNoneMatch_ string 26153 ctx_ context.Context 26154 header_ http.Header 26155} 26156 26157// Getsupportedholidays: Retrieves supported holidays for an account. 26158func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall { 26159 c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26160 c.merchantId = merchantId 26161 return c 26162} 26163 26164// Fields allows partial responses to be retrieved. See 26165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26166// for more information. 26167func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall { 26168 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26169 return c 26170} 26171 26172// IfNoneMatch sets the optional parameter which makes the operation 26173// fail if the object's ETag matches the given value. This is useful for 26174// getting updates only after the object has changed since the last 26175// request. Use googleapi.IsNotModified to check whether the response 26176// error from Do is the result of In-None-Match. 26177func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall { 26178 c.ifNoneMatch_ = entityTag 26179 return c 26180} 26181 26182// Context sets the context to be used in this call's Do method. Any 26183// pending HTTP request will be aborted if the provided context is 26184// canceled. 26185func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall { 26186 c.ctx_ = ctx 26187 return c 26188} 26189 26190// Header returns an http.Header that can be modified by the caller to 26191// add HTTP headers to the request. 26192func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header { 26193 if c.header_ == nil { 26194 c.header_ = make(http.Header) 26195 } 26196 return c.header_ 26197} 26198 26199func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) { 26200 reqHeaders := make(http.Header) 26201 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 26202 for k, v := range c.header_ { 26203 reqHeaders[k] = v 26204 } 26205 reqHeaders.Set("User-Agent", c.s.userAgent()) 26206 if c.ifNoneMatch_ != "" { 26207 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26208 } 26209 var body io.Reader = nil 26210 c.urlParams_.Set("alt", alt) 26211 c.urlParams_.Set("prettyPrint", "false") 26212 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays") 26213 urls += "?" + c.urlParams_.Encode() 26214 req, err := http.NewRequest("GET", urls, body) 26215 if err != nil { 26216 return nil, err 26217 } 26218 req.Header = reqHeaders 26219 googleapi.Expand(req.URL, map[string]string{ 26220 "merchantId": strconv.FormatUint(c.merchantId, 10), 26221 }) 26222 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26223} 26224 26225// Do executes the "content.shippingsettings.getsupportedholidays" call. 26226// Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error 26227// will be non-nil. Any non-2xx status code is an error. Response 26228// headers are in either 26229// *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header 26230// or (if a response was returned at all) in 26231// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26232// whether the returned error was because http.StatusNotModified was 26233// returned. 26234func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) { 26235 gensupport.SetOptions(c.urlParams_, opts...) 26236 res, err := c.doRequest("json") 26237 if res != nil && res.StatusCode == http.StatusNotModified { 26238 if res.Body != nil { 26239 res.Body.Close() 26240 } 26241 return nil, &googleapi.Error{ 26242 Code: res.StatusCode, 26243 Header: res.Header, 26244 } 26245 } 26246 if err != nil { 26247 return nil, err 26248 } 26249 defer googleapi.CloseBody(res) 26250 if err := googleapi.CheckResponse(res); err != nil { 26251 return nil, err 26252 } 26253 ret := &ShippingsettingsGetSupportedHolidaysResponse{ 26254 ServerResponse: googleapi.ServerResponse{ 26255 Header: res.Header, 26256 HTTPStatusCode: res.StatusCode, 26257 }, 26258 } 26259 target := &ret 26260 if err := gensupport.DecodeResponse(target, res); err != nil { 26261 return nil, err 26262 } 26263 return ret, nil 26264 // { 26265 // "description": "Retrieves supported holidays for an account.", 26266 // "httpMethod": "GET", 26267 // "id": "content.shippingsettings.getsupportedholidays", 26268 // "parameterOrder": [ 26269 // "merchantId" 26270 // ], 26271 // "parameters": { 26272 // "merchantId": { 26273 // "description": "The ID of the account for which to retrieve the supported holidays.", 26274 // "format": "uint64", 26275 // "location": "path", 26276 // "required": true, 26277 // "type": "string" 26278 // } 26279 // }, 26280 // "path": "{merchantId}/supportedHolidays", 26281 // "response": { 26282 // "$ref": "ShippingsettingsGetSupportedHolidaysResponse" 26283 // }, 26284 // "scopes": [ 26285 // "https://www.googleapis.com/auth/content" 26286 // ] 26287 // } 26288 26289} 26290 26291// method id "content.shippingsettings.getsupportedpickupservices": 26292 26293type ShippingsettingsGetsupportedpickupservicesCall struct { 26294 s *APIService 26295 merchantId uint64 26296 urlParams_ gensupport.URLParams 26297 ifNoneMatch_ string 26298 ctx_ context.Context 26299 header_ http.Header 26300} 26301 26302// Getsupportedpickupservices: Retrieves supported pickup services for 26303// an account. 26304func (r *ShippingsettingsService) Getsupportedpickupservices(merchantId uint64) *ShippingsettingsGetsupportedpickupservicesCall { 26305 c := &ShippingsettingsGetsupportedpickupservicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26306 c.merchantId = merchantId 26307 return c 26308} 26309 26310// Fields allows partial responses to be retrieved. See 26311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26312// for more information. 26313func (c *ShippingsettingsGetsupportedpickupservicesCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedpickupservicesCall { 26314 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26315 return c 26316} 26317 26318// IfNoneMatch sets the optional parameter which makes the operation 26319// fail if the object's ETag matches the given value. This is useful for 26320// getting updates only after the object has changed since the last 26321// request. Use googleapi.IsNotModified to check whether the response 26322// error from Do is the result of In-None-Match. 26323func (c *ShippingsettingsGetsupportedpickupservicesCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedpickupservicesCall { 26324 c.ifNoneMatch_ = entityTag 26325 return c 26326} 26327 26328// Context sets the context to be used in this call's Do method. Any 26329// pending HTTP request will be aborted if the provided context is 26330// canceled. 26331func (c *ShippingsettingsGetsupportedpickupservicesCall) Context(ctx context.Context) *ShippingsettingsGetsupportedpickupservicesCall { 26332 c.ctx_ = ctx 26333 return c 26334} 26335 26336// Header returns an http.Header that can be modified by the caller to 26337// add HTTP headers to the request. 26338func (c *ShippingsettingsGetsupportedpickupservicesCall) Header() http.Header { 26339 if c.header_ == nil { 26340 c.header_ = make(http.Header) 26341 } 26342 return c.header_ 26343} 26344 26345func (c *ShippingsettingsGetsupportedpickupservicesCall) doRequest(alt string) (*http.Response, error) { 26346 reqHeaders := make(http.Header) 26347 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 26348 for k, v := range c.header_ { 26349 reqHeaders[k] = v 26350 } 26351 reqHeaders.Set("User-Agent", c.s.userAgent()) 26352 if c.ifNoneMatch_ != "" { 26353 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26354 } 26355 var body io.Reader = nil 26356 c.urlParams_.Set("alt", alt) 26357 c.urlParams_.Set("prettyPrint", "false") 26358 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedPickupServices") 26359 urls += "?" + c.urlParams_.Encode() 26360 req, err := http.NewRequest("GET", urls, body) 26361 if err != nil { 26362 return nil, err 26363 } 26364 req.Header = reqHeaders 26365 googleapi.Expand(req.URL, map[string]string{ 26366 "merchantId": strconv.FormatUint(c.merchantId, 10), 26367 }) 26368 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26369} 26370 26371// Do executes the "content.shippingsettings.getsupportedpickupservices" call. 26372// Exactly one of *ShippingsettingsGetSupportedPickupServicesResponse or 26373// error will be non-nil. Any non-2xx status code is an error. Response 26374// headers are in either 26375// *ShippingsettingsGetSupportedPickupServicesResponse.ServerResponse.Hea 26376// der or (if a response was returned at all) in 26377// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26378// whether the returned error was because http.StatusNotModified was 26379// returned. 26380func (c *ShippingsettingsGetsupportedpickupservicesCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedPickupServicesResponse, error) { 26381 gensupport.SetOptions(c.urlParams_, opts...) 26382 res, err := c.doRequest("json") 26383 if res != nil && res.StatusCode == http.StatusNotModified { 26384 if res.Body != nil { 26385 res.Body.Close() 26386 } 26387 return nil, &googleapi.Error{ 26388 Code: res.StatusCode, 26389 Header: res.Header, 26390 } 26391 } 26392 if err != nil { 26393 return nil, err 26394 } 26395 defer googleapi.CloseBody(res) 26396 if err := googleapi.CheckResponse(res); err != nil { 26397 return nil, err 26398 } 26399 ret := &ShippingsettingsGetSupportedPickupServicesResponse{ 26400 ServerResponse: googleapi.ServerResponse{ 26401 Header: res.Header, 26402 HTTPStatusCode: res.StatusCode, 26403 }, 26404 } 26405 target := &ret 26406 if err := gensupport.DecodeResponse(target, res); err != nil { 26407 return nil, err 26408 } 26409 return ret, nil 26410 // { 26411 // "description": "Retrieves supported pickup services for an account.", 26412 // "httpMethod": "GET", 26413 // "id": "content.shippingsettings.getsupportedpickupservices", 26414 // "parameterOrder": [ 26415 // "merchantId" 26416 // ], 26417 // "parameters": { 26418 // "merchantId": { 26419 // "description": "The ID of the account for which to retrieve the supported pickup services.", 26420 // "format": "uint64", 26421 // "location": "path", 26422 // "required": true, 26423 // "type": "string" 26424 // } 26425 // }, 26426 // "path": "{merchantId}/supportedPickupServices", 26427 // "response": { 26428 // "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" 26429 // }, 26430 // "scopes": [ 26431 // "https://www.googleapis.com/auth/content" 26432 // ] 26433 // } 26434 26435} 26436 26437// method id "content.shippingsettings.list": 26438 26439type ShippingsettingsListCall struct { 26440 s *APIService 26441 merchantId uint64 26442 urlParams_ gensupport.URLParams 26443 ifNoneMatch_ string 26444 ctx_ context.Context 26445 header_ http.Header 26446} 26447 26448// List: Lists the shipping settings of the sub-accounts in your 26449// Merchant Center account. 26450func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall { 26451 c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26452 c.merchantId = merchantId 26453 return c 26454} 26455 26456// MaxResults sets the optional parameter "maxResults": The maximum 26457// number of shipping settings to return in the response, used for 26458// paging. 26459func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall { 26460 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 26461 return c 26462} 26463 26464// PageToken sets the optional parameter "pageToken": The token returned 26465// by the previous request. 26466func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall { 26467 c.urlParams_.Set("pageToken", pageToken) 26468 return c 26469} 26470 26471// Fields allows partial responses to be retrieved. See 26472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26473// for more information. 26474func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall { 26475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26476 return c 26477} 26478 26479// IfNoneMatch sets the optional parameter which makes the operation 26480// fail if the object's ETag matches the given value. This is useful for 26481// getting updates only after the object has changed since the last 26482// request. Use googleapi.IsNotModified to check whether the response 26483// error from Do is the result of In-None-Match. 26484func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall { 26485 c.ifNoneMatch_ = entityTag 26486 return c 26487} 26488 26489// Context sets the context to be used in this call's Do method. Any 26490// pending HTTP request will be aborted if the provided context is 26491// canceled. 26492func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall { 26493 c.ctx_ = ctx 26494 return c 26495} 26496 26497// Header returns an http.Header that can be modified by the caller to 26498// add HTTP headers to the request. 26499func (c *ShippingsettingsListCall) Header() http.Header { 26500 if c.header_ == nil { 26501 c.header_ = make(http.Header) 26502 } 26503 return c.header_ 26504} 26505 26506func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) { 26507 reqHeaders := make(http.Header) 26508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 26509 for k, v := range c.header_ { 26510 reqHeaders[k] = v 26511 } 26512 reqHeaders.Set("User-Agent", c.s.userAgent()) 26513 if c.ifNoneMatch_ != "" { 26514 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26515 } 26516 var body io.Reader = nil 26517 c.urlParams_.Set("alt", alt) 26518 c.urlParams_.Set("prettyPrint", "false") 26519 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings") 26520 urls += "?" + c.urlParams_.Encode() 26521 req, err := http.NewRequest("GET", urls, body) 26522 if err != nil { 26523 return nil, err 26524 } 26525 req.Header = reqHeaders 26526 googleapi.Expand(req.URL, map[string]string{ 26527 "merchantId": strconv.FormatUint(c.merchantId, 10), 26528 }) 26529 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26530} 26531 26532// Do executes the "content.shippingsettings.list" call. 26533// Exactly one of *ShippingsettingsListResponse or error will be 26534// non-nil. Any non-2xx status code is an error. Response headers are in 26535// either *ShippingsettingsListResponse.ServerResponse.Header or (if a 26536// response was returned at all) in error.(*googleapi.Error).Header. Use 26537// googleapi.IsNotModified to check whether the returned error was 26538// because http.StatusNotModified was returned. 26539func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) { 26540 gensupport.SetOptions(c.urlParams_, opts...) 26541 res, err := c.doRequest("json") 26542 if res != nil && res.StatusCode == http.StatusNotModified { 26543 if res.Body != nil { 26544 res.Body.Close() 26545 } 26546 return nil, &googleapi.Error{ 26547 Code: res.StatusCode, 26548 Header: res.Header, 26549 } 26550 } 26551 if err != nil { 26552 return nil, err 26553 } 26554 defer googleapi.CloseBody(res) 26555 if err := googleapi.CheckResponse(res); err != nil { 26556 return nil, err 26557 } 26558 ret := &ShippingsettingsListResponse{ 26559 ServerResponse: googleapi.ServerResponse{ 26560 Header: res.Header, 26561 HTTPStatusCode: res.StatusCode, 26562 }, 26563 } 26564 target := &ret 26565 if err := gensupport.DecodeResponse(target, res); err != nil { 26566 return nil, err 26567 } 26568 return ret, nil 26569 // { 26570 // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", 26571 // "httpMethod": "GET", 26572 // "id": "content.shippingsettings.list", 26573 // "parameterOrder": [ 26574 // "merchantId" 26575 // ], 26576 // "parameters": { 26577 // "maxResults": { 26578 // "description": "The maximum number of shipping settings to return in the response, used for paging.", 26579 // "format": "uint32", 26580 // "location": "query", 26581 // "type": "integer" 26582 // }, 26583 // "merchantId": { 26584 // "description": "The ID of the managing account. This must be a multi-client account.", 26585 // "format": "uint64", 26586 // "location": "path", 26587 // "required": true, 26588 // "type": "string" 26589 // }, 26590 // "pageToken": { 26591 // "description": "The token returned by the previous request.", 26592 // "location": "query", 26593 // "type": "string" 26594 // } 26595 // }, 26596 // "path": "{merchantId}/shippingsettings", 26597 // "response": { 26598 // "$ref": "ShippingsettingsListResponse" 26599 // }, 26600 // "scopes": [ 26601 // "https://www.googleapis.com/auth/content" 26602 // ] 26603 // } 26604 26605} 26606 26607// Pages invokes f for each page of results. 26608// A non-nil error returned from f will halt the iteration. 26609// The provided context supersedes any context provided to the Context method. 26610func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error { 26611 c.ctx_ = ctx 26612 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 26613 for { 26614 x, err := c.Do() 26615 if err != nil { 26616 return err 26617 } 26618 if err := f(x); err != nil { 26619 return err 26620 } 26621 if x.NextPageToken == "" { 26622 return nil 26623 } 26624 c.PageToken(x.NextPageToken) 26625 } 26626} 26627 26628// method id "content.shippingsettings.update": 26629 26630type ShippingsettingsUpdateCall struct { 26631 s *APIService 26632 merchantId uint64 26633 accountId uint64 26634 shippingsettings *ShippingSettings 26635 urlParams_ gensupport.URLParams 26636 ctx_ context.Context 26637 header_ http.Header 26638} 26639 26640// Update: Updates the shipping settings of the account. 26641func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall { 26642 c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26643 c.merchantId = merchantId 26644 c.accountId = accountId 26645 c.shippingsettings = shippingsettings 26646 return c 26647} 26648 26649// DryRun sets the optional parameter "dryRun": Flag to simulate a 26650// request like in a live environment. If set to true, dry-run mode 26651// checks the validity of the request and returns errors (if any). 26652func (c *ShippingsettingsUpdateCall) DryRun(dryRun bool) *ShippingsettingsUpdateCall { 26653 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 26654 return c 26655} 26656 26657// Fields allows partial responses to be retrieved. See 26658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26659// for more information. 26660func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall { 26661 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26662 return c 26663} 26664 26665// Context sets the context to be used in this call's Do method. Any 26666// pending HTTP request will be aborted if the provided context is 26667// canceled. 26668func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall { 26669 c.ctx_ = ctx 26670 return c 26671} 26672 26673// Header returns an http.Header that can be modified by the caller to 26674// add HTTP headers to the request. 26675func (c *ShippingsettingsUpdateCall) Header() http.Header { 26676 if c.header_ == nil { 26677 c.header_ = make(http.Header) 26678 } 26679 return c.header_ 26680} 26681 26682func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 26683 reqHeaders := make(http.Header) 26684 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 26685 for k, v := range c.header_ { 26686 reqHeaders[k] = v 26687 } 26688 reqHeaders.Set("User-Agent", c.s.userAgent()) 26689 var body io.Reader = nil 26690 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings) 26691 if err != nil { 26692 return nil, err 26693 } 26694 reqHeaders.Set("Content-Type", "application/json") 26695 c.urlParams_.Set("alt", alt) 26696 c.urlParams_.Set("prettyPrint", "false") 26697 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 26698 urls += "?" + c.urlParams_.Encode() 26699 req, err := http.NewRequest("PUT", urls, body) 26700 if err != nil { 26701 return nil, err 26702 } 26703 req.Header = reqHeaders 26704 googleapi.Expand(req.URL, map[string]string{ 26705 "merchantId": strconv.FormatUint(c.merchantId, 10), 26706 "accountId": strconv.FormatUint(c.accountId, 10), 26707 }) 26708 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26709} 26710 26711// Do executes the "content.shippingsettings.update" call. 26712// Exactly one of *ShippingSettings or error will be non-nil. Any 26713// non-2xx status code is an error. Response headers are in either 26714// *ShippingSettings.ServerResponse.Header or (if a response was 26715// returned at all) in error.(*googleapi.Error).Header. Use 26716// googleapi.IsNotModified to check whether the returned error was 26717// because http.StatusNotModified was returned. 26718func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 26719 gensupport.SetOptions(c.urlParams_, opts...) 26720 res, err := c.doRequest("json") 26721 if res != nil && res.StatusCode == http.StatusNotModified { 26722 if res.Body != nil { 26723 res.Body.Close() 26724 } 26725 return nil, &googleapi.Error{ 26726 Code: res.StatusCode, 26727 Header: res.Header, 26728 } 26729 } 26730 if err != nil { 26731 return nil, err 26732 } 26733 defer googleapi.CloseBody(res) 26734 if err := googleapi.CheckResponse(res); err != nil { 26735 return nil, err 26736 } 26737 ret := &ShippingSettings{ 26738 ServerResponse: googleapi.ServerResponse{ 26739 Header: res.Header, 26740 HTTPStatusCode: res.StatusCode, 26741 }, 26742 } 26743 target := &ret 26744 if err := gensupport.DecodeResponse(target, res); err != nil { 26745 return nil, err 26746 } 26747 return ret, nil 26748 // { 26749 // "description": "Updates the shipping settings of the account.", 26750 // "httpMethod": "PUT", 26751 // "id": "content.shippingsettings.update", 26752 // "parameterOrder": [ 26753 // "merchantId", 26754 // "accountId" 26755 // ], 26756 // "parameters": { 26757 // "accountId": { 26758 // "description": "The ID of the account for which to get/update shipping settings.", 26759 // "format": "uint64", 26760 // "location": "path", 26761 // "required": true, 26762 // "type": "string" 26763 // }, 26764 // "dryRun": { 26765 // "description": "Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any).", 26766 // "location": "query", 26767 // "type": "boolean" 26768 // }, 26769 // "merchantId": { 26770 // "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.", 26771 // "format": "uint64", 26772 // "location": "path", 26773 // "required": true, 26774 // "type": "string" 26775 // } 26776 // }, 26777 // "path": "{merchantId}/shippingsettings/{accountId}", 26778 // "request": { 26779 // "$ref": "ShippingSettings" 26780 // }, 26781 // "response": { 26782 // "$ref": "ShippingSettings" 26783 // }, 26784 // "scopes": [ 26785 // "https://www.googleapis.com/auth/content" 26786 // ] 26787 // } 26788 26789} 26790