1// Copyright 2021 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/v2/ 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://shoppingcontent.googleapis.com/content/v2/" 78const mtlsBasePath = "https://shoppingcontent.mtls.googleapis.com/content/v2/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // Manage your product listings and accounts for Google Shopping 83 ContentScope = "https://www.googleapis.com/auth/content" 84) 85 86// NewService creates a new APIService. 87func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 88 scopesOption := option.WithScopes( 89 "https://www.googleapis.com/auth/content", 90 ) 91 // NOTE: prepend, so we don't override user-specified scopes. 92 opts = append([]option.ClientOption{scopesOption}, opts...) 93 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 94 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 95 client, endpoint, err := htransport.NewClient(ctx, opts...) 96 if err != nil { 97 return nil, err 98 } 99 s, err := New(client) 100 if err != nil { 101 return nil, err 102 } 103 if endpoint != "" { 104 s.BasePath = endpoint 105 } 106 return s, nil 107} 108 109// New creates a new APIService. It uses the provided http.Client for requests. 110// 111// Deprecated: please use NewService instead. 112// To provide a custom HTTP client, use option.WithHTTPClient. 113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 114func New(client *http.Client) (*APIService, error) { 115 if client == nil { 116 return nil, errors.New("client is nil") 117 } 118 s := &APIService{client: client, BasePath: basePath} 119 s.Accounts = NewAccountsService(s) 120 s.Accountstatuses = NewAccountstatusesService(s) 121 s.Accounttax = NewAccounttaxService(s) 122 s.Datafeeds = NewDatafeedsService(s) 123 s.Datafeedstatuses = NewDatafeedstatusesService(s) 124 s.Inventory = NewInventoryService(s) 125 s.Liasettings = NewLiasettingsService(s) 126 s.Orderinvoices = NewOrderinvoicesService(s) 127 s.Orderreports = NewOrderreportsService(s) 128 s.Orderreturns = NewOrderreturnsService(s) 129 s.Orders = NewOrdersService(s) 130 s.Pos = NewPosService(s) 131 s.Products = NewProductsService(s) 132 s.Productstatuses = NewProductstatusesService(s) 133 s.Shippingsettings = NewShippingsettingsService(s) 134 return s, nil 135} 136 137type APIService struct { 138 client *http.Client 139 BasePath string // API endpoint base URL 140 UserAgent string // optional additional User-Agent fragment 141 142 Accounts *AccountsService 143 144 Accountstatuses *AccountstatusesService 145 146 Accounttax *AccounttaxService 147 148 Datafeeds *DatafeedsService 149 150 Datafeedstatuses *DatafeedstatusesService 151 152 Inventory *InventoryService 153 154 Liasettings *LiasettingsService 155 156 Orderinvoices *OrderinvoicesService 157 158 Orderreports *OrderreportsService 159 160 Orderreturns *OrderreturnsService 161 162 Orders *OrdersService 163 164 Pos *PosService 165 166 Products *ProductsService 167 168 Productstatuses *ProductstatusesService 169 170 Shippingsettings *ShippingsettingsService 171} 172 173func (s *APIService) userAgent() string { 174 if s.UserAgent == "" { 175 return googleapi.UserAgent 176 } 177 return googleapi.UserAgent + " " + s.UserAgent 178} 179 180func NewAccountsService(s *APIService) *AccountsService { 181 rs := &AccountsService{s: s} 182 return rs 183} 184 185type AccountsService struct { 186 s *APIService 187} 188 189func NewAccountstatusesService(s *APIService) *AccountstatusesService { 190 rs := &AccountstatusesService{s: s} 191 return rs 192} 193 194type AccountstatusesService struct { 195 s *APIService 196} 197 198func NewAccounttaxService(s *APIService) *AccounttaxService { 199 rs := &AccounttaxService{s: s} 200 return rs 201} 202 203type AccounttaxService struct { 204 s *APIService 205} 206 207func NewDatafeedsService(s *APIService) *DatafeedsService { 208 rs := &DatafeedsService{s: s} 209 return rs 210} 211 212type DatafeedsService struct { 213 s *APIService 214} 215 216func NewDatafeedstatusesService(s *APIService) *DatafeedstatusesService { 217 rs := &DatafeedstatusesService{s: s} 218 return rs 219} 220 221type DatafeedstatusesService struct { 222 s *APIService 223} 224 225func NewInventoryService(s *APIService) *InventoryService { 226 rs := &InventoryService{s: s} 227 return rs 228} 229 230type InventoryService struct { 231 s *APIService 232} 233 234func NewLiasettingsService(s *APIService) *LiasettingsService { 235 rs := &LiasettingsService{s: s} 236 return rs 237} 238 239type LiasettingsService struct { 240 s *APIService 241} 242 243func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { 244 rs := &OrderinvoicesService{s: s} 245 return rs 246} 247 248type OrderinvoicesService struct { 249 s *APIService 250} 251 252func NewOrderreportsService(s *APIService) *OrderreportsService { 253 rs := &OrderreportsService{s: s} 254 return rs 255} 256 257type OrderreportsService struct { 258 s *APIService 259} 260 261func NewOrderreturnsService(s *APIService) *OrderreturnsService { 262 rs := &OrderreturnsService{s: s} 263 return rs 264} 265 266type OrderreturnsService struct { 267 s *APIService 268} 269 270func NewOrdersService(s *APIService) *OrdersService { 271 rs := &OrdersService{s: s} 272 return rs 273} 274 275type OrdersService struct { 276 s *APIService 277} 278 279func NewPosService(s *APIService) *PosService { 280 rs := &PosService{s: s} 281 return rs 282} 283 284type PosService struct { 285 s *APIService 286} 287 288func NewProductsService(s *APIService) *ProductsService { 289 rs := &ProductsService{s: s} 290 return rs 291} 292 293type ProductsService struct { 294 s *APIService 295} 296 297func NewProductstatusesService(s *APIService) *ProductstatusesService { 298 rs := &ProductstatusesService{s: s} 299 return rs 300} 301 302type ProductstatusesService struct { 303 s *APIService 304} 305 306func NewShippingsettingsService(s *APIService) *ShippingsettingsService { 307 rs := &ShippingsettingsService{s: s} 308 return rs 309} 310 311type ShippingsettingsService struct { 312 s *APIService 313} 314 315// Account: Account data. After the creation of a new account it may 316// take a few minutes before it is fully operational. The methods 317// delete, insert, and update require the admin role. 318type Account struct { 319 // AdultContent: Indicates whether the merchant sells adult content. 320 AdultContent bool `json:"adultContent,omitempty"` 321 322 // AdwordsLinks: List of linked AdWords accounts that are active or 323 // pending approval. To create a new link request, add a new link with 324 // status `active` to the list. It will remain in a `pending` state 325 // until approved or rejected either in the AdWords interface or through 326 // the AdWords API. To delete an active link, or to cancel a link 327 // request, remove it from the list. 328 AdwordsLinks []*AccountAdwordsLink `json:"adwordsLinks,omitempty"` 329 330 // BusinessInformation: The business information of the account. 331 BusinessInformation *AccountBusinessInformation `json:"businessInformation,omitempty"` 332 333 // GoogleMyBusinessLink: The GMB account which is linked or in the 334 // process of being linked with the Merchant Center account. 335 GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"` 336 337 // Id: Required for update. Merchant Center account ID. 338 Id uint64 `json:"id,omitempty,string"` 339 340 // Kind: Identifies what kind of resource this is. Value: the fixed 341 // string "content#account" 342 Kind string `json:"kind,omitempty"` 343 344 // Name: Required. Display name for the account. 345 Name string `json:"name,omitempty"` 346 347 // ReviewsUrl: [DEPRECATED] This field is never returned and will be 348 // ignored if provided. 349 ReviewsUrl string `json:"reviewsUrl,omitempty"` 350 351 // SellerId: Client-specific, locally-unique, internal ID for the child 352 // account. 353 SellerId string `json:"sellerId,omitempty"` 354 355 // Users: Users with access to the account. Every account (except for 356 // subaccounts) must have at least one admin user. 357 Users []*AccountUser `json:"users,omitempty"` 358 359 // WebsiteUrl: The merchant's website. 360 WebsiteUrl string `json:"websiteUrl,omitempty"` 361 362 // YoutubeChannelLinks: List of linked YouTube channels that are active 363 // or pending approval. To create a new link request, add a new link 364 // with status `active` to the list. It will remain in a `pending` state 365 // until approved or rejected in the YT Creator Studio interface. To 366 // delete an active link, or to cancel a link request, remove it from 367 // the list. 368 YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"` 369 370 // ServerResponse contains the HTTP response code and headers from the 371 // server. 372 googleapi.ServerResponse `json:"-"` 373 374 // ForceSendFields is a list of field names (e.g. "AdultContent") to 375 // unconditionally include in API requests. By default, fields with 376 // empty or default values are omitted from API requests. However, any 377 // non-pointer, non-interface field appearing in ForceSendFields will be 378 // sent to the server regardless of whether the field is empty or not. 379 // This may be used to include empty fields in Patch requests. 380 ForceSendFields []string `json:"-"` 381 382 // NullFields is a list of field names (e.g. "AdultContent") to include 383 // in API requests with the JSON null value. By default, fields with 384 // empty values are omitted from API requests. However, any field with 385 // an empty value appearing in NullFields will be sent to the server as 386 // null. It is an error if a field in this list has a non-empty value. 387 // This may be used to include null fields in Patch requests. 388 NullFields []string `json:"-"` 389} 390 391func (s *Account) MarshalJSON() ([]byte, error) { 392 type NoMethod Account 393 raw := NoMethod(*s) 394 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 395} 396 397type AccountAddress struct { 398 // Country: CLDR country code (e.g. "US"). This value cannot be set for 399 // a sub-account of an MCA. All MCA sub-accounts inherit the country of 400 // their parent MCA. 401 Country string `json:"country,omitempty"` 402 403 // Locality: City, town or commune. May also include dependent 404 // localities or sublocalities (e.g. neighborhoods or suburbs). 405 Locality string `json:"locality,omitempty"` 406 407 // PostalCode: Postal code or ZIP (e.g. "94043"). 408 PostalCode string `json:"postalCode,omitempty"` 409 410 // Region: Top-level administrative subdivision of the country. For 411 // example, a state like California ("CA") or a province like Quebec 412 // ("QC"). 413 Region string `json:"region,omitempty"` 414 415 // StreetAddress: Street-level part of the address. 416 StreetAddress string `json:"streetAddress,omitempty"` 417 418 // ForceSendFields is a list of field names (e.g. "Country") to 419 // unconditionally include in API requests. By default, fields with 420 // empty or default values are omitted from API requests. However, any 421 // non-pointer, non-interface field appearing in ForceSendFields will be 422 // sent to the server regardless of whether the field is empty or not. 423 // This may be used to include empty fields in Patch requests. 424 ForceSendFields []string `json:"-"` 425 426 // NullFields is a list of field names (e.g. "Country") to include in 427 // API requests with the JSON null value. By default, fields with empty 428 // values are omitted from API requests. However, any field with an 429 // empty value appearing in NullFields will be sent to the server as 430 // null. It is an error if a field in this list has a non-empty value. 431 // This may be used to include null fields in Patch requests. 432 NullFields []string `json:"-"` 433} 434 435func (s *AccountAddress) MarshalJSON() ([]byte, error) { 436 type NoMethod AccountAddress 437 raw := NoMethod(*s) 438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 439} 440 441type AccountAdwordsLink struct { 442 // AdwordsId: Customer ID of the AdWords account. 443 AdwordsId uint64 `json:"adwordsId,omitempty,string"` 444 445 // Status: Status of the link between this Merchant Center account and 446 // the AdWords account. Upon retrieval, it represents the actual status 447 // of the link and can be either `active` if it was approved in Google 448 // AdWords or `pending` if it's pending approval. Upon insertion, it 449 // represents the *intended* status of the link. Re-uploading a link 450 // with status `active` when it's still pending or with status `pending` 451 // when it's already active will have no effect: the status will remain 452 // unchanged. Re-uploading a link with deprecated status `inactive` is 453 // equivalent to not submitting the link at all and will delete the link 454 // if it was active or cancel the link request if it was pending. 455 // Acceptable values are: - "active" - "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 or default values are omitted from API requests. However, any 461 // non-pointer, non-interface field appearing in ForceSendFields will be 462 // sent to the server regardless of whether the field is empty or not. 463 // This may be 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 // KoreanBusinessRegistrationNumber: The 10-digit Korean business 489 // registration number 490 // (https://support.google.com/merchants/answer/9037766) separated with 491 // dashes in the format: XXX-XX-XXXXX. This field will only be updated 492 // if explicitly set. 493 KoreanBusinessRegistrationNumber string `json:"koreanBusinessRegistrationNumber,omitempty"` 494 495 // PhoneNumber: The phone number of the business. 496 PhoneNumber string `json:"phoneNumber,omitempty"` 497 498 // ForceSendFields is a list of field names (e.g. "Address") to 499 // unconditionally include in API requests. By default, fields with 500 // empty or default values are omitted from API requests. However, any 501 // non-pointer, non-interface field appearing in ForceSendFields will be 502 // sent to the server regardless of whether the field is empty or not. 503 // This may be used to include empty fields in Patch requests. 504 ForceSendFields []string `json:"-"` 505 506 // NullFields is a list of field names (e.g. "Address") to include in 507 // API requests with the JSON null value. By default, fields with empty 508 // values are omitted from API requests. However, any field with an 509 // empty value appearing in NullFields will be sent to the server as 510 // null. It is an error if a field in this list has a non-empty value. 511 // This may be used to include null fields in Patch requests. 512 NullFields []string `json:"-"` 513} 514 515func (s *AccountBusinessInformation) MarshalJSON() ([]byte, error) { 516 type NoMethod AccountBusinessInformation 517 raw := NoMethod(*s) 518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 519} 520 521type AccountCustomerService struct { 522 // Email: Customer service email. 523 Email string `json:"email,omitempty"` 524 525 // PhoneNumber: Customer service phone number. 526 PhoneNumber string `json:"phoneNumber,omitempty"` 527 528 // Url: Customer service URL. 529 Url string `json:"url,omitempty"` 530 531 // ForceSendFields is a list of field names (e.g. "Email") to 532 // unconditionally include in API requests. By default, fields with 533 // empty or default values are omitted from API requests. However, any 534 // non-pointer, non-interface field appearing in ForceSendFields will be 535 // sent to the server regardless of whether the field is empty or not. 536 // This may be used to include empty fields in Patch requests. 537 ForceSendFields []string `json:"-"` 538 539 // NullFields is a list of field names (e.g. "Email") to include in API 540 // requests with the JSON null value. By default, fields with empty 541 // values are omitted from API requests. However, any field with an 542 // empty value appearing in NullFields will be sent to the server as 543 // null. It is an error if a field in this list has a non-empty value. 544 // This may be used to include null fields in Patch requests. 545 NullFields []string `json:"-"` 546} 547 548func (s *AccountCustomerService) MarshalJSON() ([]byte, error) { 549 type NoMethod AccountCustomerService 550 raw := NoMethod(*s) 551 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 552} 553 554type AccountGoogleMyBusinessLink struct { 555 // GmbEmail: The GMB email address of which a specific account within a 556 // GMB account. A sample account within a GMB account could be a 557 // business account with set of locations, managed under the GMB 558 // account. 559 GmbEmail string `json:"gmbEmail,omitempty"` 560 561 // Status: Status of the link between this Merchant Center account and 562 // the GMB account. Acceptable values are: - "active" - "pending" 563 Status string `json:"status,omitempty"` 564 565 // ForceSendFields is a list of field names (e.g. "GmbEmail") to 566 // unconditionally include in API requests. By default, fields with 567 // empty or default values are omitted from API requests. However, any 568 // non-pointer, non-interface field appearing in ForceSendFields will be 569 // sent to the server regardless of whether the field is empty or not. 570 // This may be used to include empty fields in Patch requests. 571 ForceSendFields []string `json:"-"` 572 573 // NullFields is a list of field names (e.g. "GmbEmail") to include in 574 // API requests with the JSON null value. By default, fields with empty 575 // values are omitted from API requests. However, any field with an 576 // empty value appearing in NullFields will be sent to the server as 577 // null. It is an error if a field in this list has a non-empty value. 578 // This may be used to include null fields in Patch requests. 579 NullFields []string `json:"-"` 580} 581 582func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) { 583 type NoMethod AccountGoogleMyBusinessLink 584 raw := NoMethod(*s) 585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 586} 587 588type AccountIdentifier struct { 589 // AggregatorId: The aggregator ID, set for aggregators and subaccounts 590 // (in that case, it represents the aggregator of the subaccount). 591 AggregatorId uint64 `json:"aggregatorId,omitempty,string"` 592 593 // MerchantId: The merchant account ID, set for individual accounts and 594 // subaccounts. 595 MerchantId uint64 `json:"merchantId,omitempty,string"` 596 597 // ForceSendFields is a list of field names (e.g. "AggregatorId") to 598 // unconditionally include in API requests. By default, fields with 599 // empty or default values are omitted from API requests. However, any 600 // non-pointer, non-interface field appearing in ForceSendFields will be 601 // sent to the server regardless of whether the field is empty or not. 602 // This may be used to include empty fields in Patch requests. 603 ForceSendFields []string `json:"-"` 604 605 // NullFields is a list of field names (e.g. "AggregatorId") to include 606 // in API requests with the JSON null value. By default, fields with 607 // empty values are omitted from API requests. However, any field with 608 // an empty value appearing in NullFields will be sent to the server as 609 // null. It is an error if a field in this list has a non-empty value. 610 // This may be used to include null fields in Patch requests. 611 NullFields []string `json:"-"` 612} 613 614func (s *AccountIdentifier) MarshalJSON() ([]byte, error) { 615 type NoMethod AccountIdentifier 616 raw := NoMethod(*s) 617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 618} 619 620// AccountStatus: The status of an account, i.e., information about its 621// products, which is computed offline and not returned immediately at 622// insertion time. 623type AccountStatus struct { 624 // AccountId: The ID of the account for which the status is reported. 625 AccountId string `json:"accountId,omitempty"` 626 627 // AccountLevelIssues: A list of account level issues. 628 AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"` 629 630 // DataQualityIssues: DEPRECATED - never populated. 631 DataQualityIssues []*AccountStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 632 633 // Kind: Identifies what kind of resource this is. Value: the fixed 634 // string "content#accountStatus" 635 Kind string `json:"kind,omitempty"` 636 637 // Products: List of product-related data by channel, destination, and 638 // country. Data in this field may be delayed by up to 30 minutes. 639 Products []*AccountStatusProducts `json:"products,omitempty"` 640 641 // WebsiteClaimed: Whether the account's website is claimed or not. 642 WebsiteClaimed bool `json:"websiteClaimed,omitempty"` 643 644 // ServerResponse contains the HTTP response code and headers from the 645 // server. 646 googleapi.ServerResponse `json:"-"` 647 648 // ForceSendFields is a list of field names (e.g. "AccountId") to 649 // unconditionally include in API requests. By default, fields with 650 // empty or default values are omitted from API requests. However, any 651 // non-pointer, non-interface field appearing in ForceSendFields will be 652 // sent to the server regardless of whether the field is empty or not. 653 // This may be used to include empty fields in Patch requests. 654 ForceSendFields []string `json:"-"` 655 656 // NullFields is a list of field names (e.g. "AccountId") to include in 657 // API requests with the JSON null value. By default, fields with empty 658 // values are omitted from API requests. However, any field with an 659 // empty value appearing in NullFields will be sent to the server as 660 // null. It is an error if a field in this list has a non-empty value. 661 // This may be used to include null fields in Patch requests. 662 NullFields []string `json:"-"` 663} 664 665func (s *AccountStatus) MarshalJSON() ([]byte, error) { 666 type NoMethod AccountStatus 667 raw := NoMethod(*s) 668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 669} 670 671type AccountStatusAccountLevelIssue struct { 672 // Country: Country for which this issue is reported. 673 Country string `json:"country,omitempty"` 674 675 // Destination: The destination the issue applies to. If this field is 676 // empty then the issue applies to all available destinations. 677 Destination string `json:"destination,omitempty"` 678 679 // Detail: Additional details about the issue. 680 Detail string `json:"detail,omitempty"` 681 682 // Documentation: The URL of a web page to help resolving this issue. 683 Documentation string `json:"documentation,omitempty"` 684 685 // Id: Issue identifier. 686 Id string `json:"id,omitempty"` 687 688 // Severity: Severity of the issue. Acceptable values are: - 689 // "critical" - "error" - "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 or default values are omitted from API requests. However, any 698 // non-pointer, non-interface field appearing in ForceSendFields will be 699 // sent to the server regardless of whether the field is empty or not. 700 // This may be 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: - "critical" - "error" - 738 // "suggestion" 739 Severity string `json:"severity,omitempty"` 740 741 SubmittedValue string `json:"submittedValue,omitempty"` 742 743 // ForceSendFields is a list of field names (e.g. "Country") to 744 // unconditionally include in API requests. By default, fields with 745 // empty or default values are omitted from API requests. However, any 746 // non-pointer, non-interface field appearing in ForceSendFields will be 747 // sent to the server regardless of whether the field is empty or not. 748 // This may be used to include empty fields in Patch requests. 749 ForceSendFields []string `json:"-"` 750 751 // NullFields is a list of field names (e.g. "Country") to include in 752 // API requests with the JSON null value. By default, fields with empty 753 // values are omitted from API requests. However, any field with an 754 // empty value appearing in NullFields will be sent to the server as 755 // null. It is an error if a field in this list has a non-empty value. 756 // This may be used to include null fields in Patch requests. 757 NullFields []string `json:"-"` 758} 759 760func (s *AccountStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 761 type NoMethod AccountStatusDataQualityIssue 762 raw := NoMethod(*s) 763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 764} 765 766type AccountStatusExampleItem struct { 767 ItemId string `json:"itemId,omitempty"` 768 769 Link string `json:"link,omitempty"` 770 771 SubmittedValue string `json:"submittedValue,omitempty"` 772 773 Title string `json:"title,omitempty"` 774 775 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 776 777 // ForceSendFields is a list of field names (e.g. "ItemId") to 778 // unconditionally include in API requests. By default, fields with 779 // empty or default values are omitted from API requests. However, any 780 // non-pointer, non-interface field appearing in ForceSendFields will be 781 // sent to the server regardless of whether the field is empty or not. 782 // This may be used to include empty fields in Patch requests. 783 ForceSendFields []string `json:"-"` 784 785 // NullFields is a list of field names (e.g. "ItemId") to include in API 786 // requests with the JSON null value. By default, fields with empty 787 // values are omitted from API requests. However, any field with an 788 // empty value appearing in NullFields will be sent to the server as 789 // null. It is an error if a field in this list has a non-empty value. 790 // This may be used to include null fields in Patch requests. 791 NullFields []string `json:"-"` 792} 793 794func (s *AccountStatusExampleItem) MarshalJSON() ([]byte, error) { 795 type NoMethod AccountStatusExampleItem 796 raw := NoMethod(*s) 797 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 798} 799 800type AccountStatusItemLevelIssue struct { 801 // AttributeName: The attribute's name, if the issue is caused by a 802 // single attribute. 803 AttributeName string `json:"attributeName,omitempty"` 804 805 // Code: The error code of the issue. 806 Code string `json:"code,omitempty"` 807 808 // Description: A short issue description in English. 809 Description string `json:"description,omitempty"` 810 811 // Detail: A detailed issue description in English. 812 Detail string `json:"detail,omitempty"` 813 814 // Documentation: The URL of a web page to help with resolving this 815 // issue. 816 Documentation string `json:"documentation,omitempty"` 817 818 // NumItems: Number of items with this issue. 819 NumItems int64 `json:"numItems,omitempty,string"` 820 821 // Resolution: Whether the issue can be resolved by the merchant. 822 Resolution string `json:"resolution,omitempty"` 823 824 // Servability: How this issue affects serving of the offer. 825 Servability string `json:"servability,omitempty"` 826 827 // ForceSendFields is a list of field names (e.g. "AttributeName") to 828 // unconditionally include in API requests. By default, fields with 829 // empty or default values are omitted from API requests. However, any 830 // non-pointer, non-interface field appearing in ForceSendFields will be 831 // sent to the server regardless of whether the field is empty or not. 832 // This may be used to include empty fields in Patch requests. 833 ForceSendFields []string `json:"-"` 834 835 // NullFields is a list of field names (e.g. "AttributeName") to include 836 // in API requests with the JSON null value. By default, fields with 837 // empty values are omitted from API requests. However, any field with 838 // an empty value appearing in NullFields will be sent to the server as 839 // null. It is an error if a field in this list has a non-empty value. 840 // This may be used to include null fields in Patch requests. 841 NullFields []string `json:"-"` 842} 843 844func (s *AccountStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 845 type NoMethod AccountStatusItemLevelIssue 846 raw := NoMethod(*s) 847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 848} 849 850type AccountStatusProducts struct { 851 // Channel: The channel the data applies to. Acceptable values are: - 852 // "local" - "online" 853 Channel string `json:"channel,omitempty"` 854 855 // Country: The country the data applies to. 856 Country string `json:"country,omitempty"` 857 858 // Destination: The destination the data applies to. 859 Destination string `json:"destination,omitempty"` 860 861 // ItemLevelIssues: List of item-level issues. 862 ItemLevelIssues []*AccountStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 863 864 // Statistics: Aggregated product statistics. 865 Statistics *AccountStatusStatistics `json:"statistics,omitempty"` 866 867 // ForceSendFields is a list of field names (e.g. "Channel") to 868 // unconditionally include in API requests. By default, fields with 869 // empty or default values are omitted from API requests. However, any 870 // non-pointer, non-interface field appearing in ForceSendFields will be 871 // sent to the server regardless of whether the field is empty or not. 872 // This may be used to include empty fields in Patch requests. 873 ForceSendFields []string `json:"-"` 874 875 // NullFields is a list of field names (e.g. "Channel") to include in 876 // API requests with the JSON null value. By default, fields with empty 877 // values are omitted from API requests. However, any field with an 878 // empty value appearing in NullFields will be sent to the server as 879 // null. It is an error if a field in this list has a non-empty value. 880 // This may be used to include null fields in Patch requests. 881 NullFields []string `json:"-"` 882} 883 884func (s *AccountStatusProducts) MarshalJSON() ([]byte, error) { 885 type NoMethod AccountStatusProducts 886 raw := NoMethod(*s) 887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 888} 889 890type AccountStatusStatistics struct { 891 // Active: Number of active offers. 892 Active int64 `json:"active,omitempty,string"` 893 894 // Disapproved: Number of disapproved offers. 895 Disapproved int64 `json:"disapproved,omitempty,string"` 896 897 // Expiring: Number of expiring offers. 898 Expiring int64 `json:"expiring,omitempty,string"` 899 900 // Pending: Number of pending offers. 901 Pending int64 `json:"pending,omitempty,string"` 902 903 // ForceSendFields is a list of field names (e.g. "Active") to 904 // unconditionally include in API requests. By default, fields with 905 // empty or default values are omitted from API requests. However, any 906 // non-pointer, non-interface field appearing in ForceSendFields will be 907 // sent to the server regardless of whether the field is empty or not. 908 // This may be used to include empty fields in Patch requests. 909 ForceSendFields []string `json:"-"` 910 911 // NullFields is a list of field names (e.g. "Active") to include in API 912 // requests with the JSON null value. By default, fields with empty 913 // values are omitted from API requests. However, any field with an 914 // empty value appearing in NullFields will be sent to the server as 915 // null. It is an error if a field in this list has a non-empty value. 916 // This may be used to include null fields in Patch requests. 917 NullFields []string `json:"-"` 918} 919 920func (s *AccountStatusStatistics) MarshalJSON() ([]byte, error) { 921 type NoMethod AccountStatusStatistics 922 raw := NoMethod(*s) 923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 924} 925 926// AccountTax: The tax settings of a merchant account. All methods 927// require the admin role. 928type AccountTax struct { 929 // AccountId: Required. The ID of the account to which these account tax 930 // settings belong. 931 AccountId uint64 `json:"accountId,omitempty,string"` 932 933 // Kind: Identifies what kind of resource this is. Value: the fixed 934 // string "content#accountTax". 935 Kind string `json:"kind,omitempty"` 936 937 // Rules: Tax rules. Updating the tax rules will enable US taxes (not 938 // reversible). Defining no rules is equivalent to not charging tax at 939 // all. 940 Rules []*AccountTaxTaxRule `json:"rules,omitempty"` 941 942 // ServerResponse contains the HTTP response code and headers from the 943 // server. 944 googleapi.ServerResponse `json:"-"` 945 946 // ForceSendFields is a list of field names (e.g. "AccountId") to 947 // unconditionally include in API requests. By default, fields with 948 // empty or default values are omitted from API requests. However, any 949 // non-pointer, non-interface field appearing in ForceSendFields will be 950 // sent to the server regardless of whether the field is empty or not. 951 // This may be used to include empty fields in Patch requests. 952 ForceSendFields []string `json:"-"` 953 954 // NullFields is a list of field names (e.g. "AccountId") to include in 955 // API requests with the JSON null value. By default, fields with empty 956 // values are omitted from API requests. However, any field with an 957 // empty value appearing in NullFields will be sent to the server as 958 // null. It is an error if a field in this list has a non-empty value. 959 // This may be used to include null fields in Patch requests. 960 NullFields []string `json:"-"` 961} 962 963func (s *AccountTax) MarshalJSON() ([]byte, error) { 964 type NoMethod AccountTax 965 raw := NoMethod(*s) 966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 967} 968 969// AccountTaxTaxRule: Tax calculation rule to apply in a state or 970// province (USA only). 971type AccountTaxTaxRule struct { 972 // Country: Country code in which tax is applicable. 973 Country string `json:"country,omitempty"` 974 975 // LocationId: Required. State (or province) is which the tax is 976 // applicable, described by its location ID (also called criteria ID). 977 LocationId uint64 `json:"locationId,omitempty,string"` 978 979 // RatePercent: Explicit tax rate in percent, represented as a floating 980 // point number without the percentage character. Must not be negative. 981 RatePercent string `json:"ratePercent,omitempty"` 982 983 // ShippingTaxed: If true, shipping charges are also taxed. 984 ShippingTaxed bool `json:"shippingTaxed,omitempty"` 985 986 // UseGlobalRate: Whether the tax rate is taken from a global tax table 987 // or specified explicitly. 988 UseGlobalRate bool `json:"useGlobalRate,omitempty"` 989 990 // ForceSendFields is a list of field names (e.g. "Country") to 991 // unconditionally include in API requests. By default, fields with 992 // empty or default values are omitted from API requests. However, any 993 // non-pointer, non-interface field appearing in ForceSendFields will be 994 // sent to the server regardless of whether the field is empty or not. 995 // This may be used to include empty fields in Patch requests. 996 ForceSendFields []string `json:"-"` 997 998 // NullFields is a list of field names (e.g. "Country") to include in 999 // API requests with the JSON null value. By default, fields with empty 1000 // values are omitted from API requests. However, any field with an 1001 // empty value appearing in NullFields will be sent to the server as 1002 // null. It is an error if a field in this list has a non-empty value. 1003 // This may be used to include null fields in Patch requests. 1004 NullFields []string `json:"-"` 1005} 1006 1007func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) { 1008 type NoMethod AccountTaxTaxRule 1009 raw := NoMethod(*s) 1010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1011} 1012 1013type AccountUser struct { 1014 // Admin: Whether user is an admin. 1015 Admin *bool `json:"admin,omitempty"` 1016 1017 // EmailAddress: User's email address. 1018 EmailAddress string `json:"emailAddress,omitempty"` 1019 1020 // OrderManager: Whether user is an order manager. 1021 OrderManager bool `json:"orderManager,omitempty"` 1022 1023 // PaymentsAnalyst: Whether user can access payment statements. 1024 PaymentsAnalyst bool `json:"paymentsAnalyst,omitempty"` 1025 1026 // PaymentsManager: Whether user can manage payment settings. 1027 PaymentsManager bool `json:"paymentsManager,omitempty"` 1028 1029 // ForceSendFields is a list of field names (e.g. "Admin") to 1030 // unconditionally include in API requests. By default, fields with 1031 // empty or default values are omitted from API requests. However, any 1032 // non-pointer, non-interface field appearing in ForceSendFields will be 1033 // sent to the server regardless of whether the field is empty or not. 1034 // This may be used to include empty fields in Patch requests. 1035 ForceSendFields []string `json:"-"` 1036 1037 // NullFields is a list of field names (e.g. "Admin") to include in API 1038 // requests with the JSON null value. By default, fields with empty 1039 // values are omitted from API requests. However, any field with an 1040 // empty value appearing in NullFields will be sent to the server as 1041 // null. It is an error if a field in this list has a non-empty value. 1042 // This may be used to include null fields in Patch requests. 1043 NullFields []string `json:"-"` 1044} 1045 1046func (s *AccountUser) MarshalJSON() ([]byte, error) { 1047 type NoMethod AccountUser 1048 raw := NoMethod(*s) 1049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1050} 1051 1052type AccountYouTubeChannelLink struct { 1053 // ChannelId: Channel ID. 1054 ChannelId string `json:"channelId,omitempty"` 1055 1056 // Status: Status of the link between this Merchant Center account and 1057 // the YouTube channel. Upon retrieval, it represents the actual status 1058 // of the link and can be either `active` if it was approved in YT 1059 // Creator Studio or `pending` if it's pending approval. Upon insertion, 1060 // it represents the *intended* status of the link. Re-uploading a link 1061 // with status `active` when it's still pending or with status `pending` 1062 // when it's already active will have no effect: the status will remain 1063 // unchanged. Re-uploading a link with deprecated status `inactive` is 1064 // equivalent to not submitting the link at all and will delete the link 1065 // if it was active or cancel the link request if it was pending. 1066 Status string `json:"status,omitempty"` 1067 1068 // ForceSendFields is a list of field names (e.g. "ChannelId") to 1069 // unconditionally include in API requests. By default, fields with 1070 // empty or default values are omitted from API requests. However, any 1071 // non-pointer, non-interface field appearing in ForceSendFields will be 1072 // sent to the server regardless of whether the field is empty or not. 1073 // This may be used to include empty fields in Patch requests. 1074 ForceSendFields []string `json:"-"` 1075 1076 // NullFields is a list of field names (e.g. "ChannelId") to include in 1077 // API requests with the JSON null value. By default, fields with empty 1078 // values are omitted from API requests. However, any field with an 1079 // empty value appearing in NullFields will be sent to the server as 1080 // null. It is an error if a field in this list has a non-empty value. 1081 // This may be used to include null fields in Patch requests. 1082 NullFields []string `json:"-"` 1083} 1084 1085func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) { 1086 type NoMethod AccountYouTubeChannelLink 1087 raw := NoMethod(*s) 1088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1089} 1090 1091type AccountsAuthInfoResponse struct { 1092 // AccountIdentifiers: The account identifiers corresponding to the 1093 // authenticated user. - For an individual account: only the merchant ID 1094 // is defined - For an aggregator: only the aggregator ID is defined - 1095 // For a subaccount of an MCA: both the merchant ID and the aggregator 1096 // ID are defined. 1097 AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"` 1098 1099 // Kind: Identifies what kind of resource this is. Value: the fixed 1100 // string "content#accountsAuthInfoResponse". 1101 Kind string `json:"kind,omitempty"` 1102 1103 // ServerResponse contains the HTTP response code and headers from the 1104 // server. 1105 googleapi.ServerResponse `json:"-"` 1106 1107 // ForceSendFields is a list of field names (e.g. "AccountIdentifiers") 1108 // to unconditionally include in API requests. By default, fields with 1109 // empty or default values are omitted from API requests. However, any 1110 // non-pointer, non-interface field appearing in ForceSendFields will be 1111 // sent to the server regardless of whether the field is empty or not. 1112 // This may be used to include empty fields in Patch requests. 1113 ForceSendFields []string `json:"-"` 1114 1115 // NullFields is a list of field names (e.g. "AccountIdentifiers") to 1116 // include in API requests with the JSON null value. By default, fields 1117 // with empty values are omitted from API requests. However, any field 1118 // with an empty value appearing in NullFields will be sent to the 1119 // server as null. It is an error if a field in this list has a 1120 // non-empty value. This may be used to include null fields in Patch 1121 // requests. 1122 NullFields []string `json:"-"` 1123} 1124 1125func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) { 1126 type NoMethod AccountsAuthInfoResponse 1127 raw := NoMethod(*s) 1128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1129} 1130 1131type AccountsClaimWebsiteResponse struct { 1132 // Kind: Identifies what kind of resource this is. Value: the fixed 1133 // string "content#accountsClaimWebsiteResponse". 1134 Kind string `json:"kind,omitempty"` 1135 1136 // ServerResponse contains the HTTP response code and headers from the 1137 // server. 1138 googleapi.ServerResponse `json:"-"` 1139 1140 // ForceSendFields is a list of field names (e.g. "Kind") to 1141 // unconditionally include in API requests. By default, fields with 1142 // empty or default values are omitted from API requests. However, any 1143 // non-pointer, non-interface field appearing in ForceSendFields will be 1144 // sent to the server regardless of whether the field is empty or not. 1145 // This may be used to include empty fields in Patch requests. 1146 ForceSendFields []string `json:"-"` 1147 1148 // NullFields is a list of field names (e.g. "Kind") to include in API 1149 // requests with the JSON null value. By default, fields with empty 1150 // values are omitted from API requests. However, any field with an 1151 // empty value appearing in NullFields will be sent to the server as 1152 // null. It is an error if a field in this list has a non-empty value. 1153 // This may be used to include null fields in Patch requests. 1154 NullFields []string `json:"-"` 1155} 1156 1157func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) { 1158 type NoMethod AccountsClaimWebsiteResponse 1159 raw := NoMethod(*s) 1160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1161} 1162 1163type AccountsCustomBatchRequest struct { 1164 // Entries: The request entries to be processed in the batch. 1165 Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"` 1166 1167 // ForceSendFields is a list of field names (e.g. "Entries") to 1168 // unconditionally include in API requests. By default, fields with 1169 // empty or default values are omitted from API requests. However, any 1170 // non-pointer, non-interface field appearing in ForceSendFields will be 1171 // sent to the server regardless of whether the field is empty or not. 1172 // This may be used to include empty fields in Patch requests. 1173 ForceSendFields []string `json:"-"` 1174 1175 // NullFields is a list of field names (e.g. "Entries") to include in 1176 // API requests with the JSON null value. By default, fields with empty 1177 // values are omitted from API requests. However, any field with an 1178 // empty value appearing in NullFields will be sent to the server as 1179 // null. It is an error if a field in this list has a non-empty value. 1180 // This may be used to include null fields in Patch requests. 1181 NullFields []string `json:"-"` 1182} 1183 1184func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) { 1185 type NoMethod AccountsCustomBatchRequest 1186 raw := NoMethod(*s) 1187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1188} 1189 1190// AccountsCustomBatchRequestEntry: A batch entry encoding a single 1191// non-batch accounts request. 1192type AccountsCustomBatchRequestEntry struct { 1193 // Account: The account to create or update. Only defined if the method 1194 // is `insert` or `update`. 1195 Account *Account `json:"account,omitempty"` 1196 1197 // AccountId: The ID of the targeted account. Only defined if the method 1198 // is not `insert`. 1199 AccountId uint64 `json:"accountId,omitempty,string"` 1200 1201 // BatchId: An entry ID, unique within the batch request. 1202 BatchId int64 `json:"batchId,omitempty"` 1203 1204 // Force: Whether the account should be deleted if the account has 1205 // offers. Only applicable if the method is `delete`. 1206 Force bool `json:"force,omitempty"` 1207 1208 // LabelIds: Label IDs for the 'updatelabels' request. 1209 LabelIds googleapi.Uint64s `json:"labelIds,omitempty"` 1210 1211 // LinkRequest: Details about the `link` request. 1212 LinkRequest *AccountsCustomBatchRequestEntryLinkRequest `json:"linkRequest,omitempty"` 1213 1214 // MerchantId: The ID of the managing account. 1215 MerchantId uint64 `json:"merchantId,omitempty,string"` 1216 1217 // Method: The method of the batch entry. Acceptable values are: - 1218 // "claimWebsite" - "delete" - "get" - "insert" - "link" - 1219 // "update" 1220 Method string `json:"method,omitempty"` 1221 1222 // Overwrite: Only applicable if the method is `claimwebsite`. Indicates 1223 // whether or not to take the claim from another account in case there 1224 // is a conflict. 1225 Overwrite bool `json:"overwrite,omitempty"` 1226 1227 // ForceSendFields is a list of field names (e.g. "Account") to 1228 // unconditionally include in API requests. By default, fields with 1229 // empty or default values are omitted from API requests. However, any 1230 // non-pointer, non-interface field appearing in ForceSendFields will be 1231 // sent to the server regardless of whether the field is empty or not. 1232 // This may be used to include empty fields in Patch requests. 1233 ForceSendFields []string `json:"-"` 1234 1235 // NullFields is a list of field names (e.g. "Account") to include in 1236 // API requests with the JSON null value. By default, fields with empty 1237 // values are omitted from API requests. However, any field with an 1238 // empty value appearing in NullFields will be sent to the server as 1239 // null. It is an error if a field in this list has a non-empty value. 1240 // This may be used to include null fields in Patch requests. 1241 NullFields []string `json:"-"` 1242} 1243 1244func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1245 type NoMethod AccountsCustomBatchRequestEntry 1246 raw := NoMethod(*s) 1247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1248} 1249 1250type AccountsCustomBatchRequestEntryLinkRequest struct { 1251 // Action: Action to perform for this link. The "request" action is 1252 // only available to select merchants. Acceptable values are: - 1253 // "approve" - "remove" - "request" 1254 Action string `json:"action,omitempty"` 1255 1256 // LinkType: Type of the link between the two accounts. Acceptable 1257 // values are: - "channelPartner" - "eCommercePlatform" 1258 LinkType string `json:"linkType,omitempty"` 1259 1260 // LinkedAccountId: The ID of the linked account. 1261 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1262 1263 // ForceSendFields is a list of field names (e.g. "Action") to 1264 // unconditionally include in API requests. By default, fields with 1265 // empty or default values are omitted from API requests. However, any 1266 // non-pointer, non-interface field appearing in ForceSendFields will be 1267 // sent to the server regardless of whether the field is empty or not. 1268 // This may be used to include empty fields in Patch requests. 1269 ForceSendFields []string `json:"-"` 1270 1271 // NullFields is a list of field names (e.g. "Action") to include in API 1272 // requests with the JSON null value. By default, fields with empty 1273 // values are omitted from API requests. However, any field with an 1274 // empty value appearing in NullFields will be sent to the server as 1275 // null. It is an error if a field in this list has a non-empty value. 1276 // This may be used to include null fields in Patch requests. 1277 NullFields []string `json:"-"` 1278} 1279 1280func (s *AccountsCustomBatchRequestEntryLinkRequest) MarshalJSON() ([]byte, error) { 1281 type NoMethod AccountsCustomBatchRequestEntryLinkRequest 1282 raw := NoMethod(*s) 1283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1284} 1285 1286type AccountsCustomBatchResponse struct { 1287 // Entries: The result of the execution of the batch requests. 1288 Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"` 1289 1290 // Kind: Identifies what kind of resource this is. Value: the fixed 1291 // string "content#accountsCustomBatchResponse". 1292 Kind string `json:"kind,omitempty"` 1293 1294 // ServerResponse contains the HTTP response code and headers from the 1295 // server. 1296 googleapi.ServerResponse `json:"-"` 1297 1298 // ForceSendFields is a list of field names (e.g. "Entries") to 1299 // unconditionally include in API requests. By default, fields with 1300 // empty or default values are omitted from API requests. However, any 1301 // non-pointer, non-interface field appearing in ForceSendFields will be 1302 // sent to the server regardless of whether the field is empty or not. 1303 // This may be used to include empty fields in Patch requests. 1304 ForceSendFields []string `json:"-"` 1305 1306 // NullFields is a list of field names (e.g. "Entries") to include in 1307 // API requests with the JSON null value. By default, fields with empty 1308 // values are omitted from API requests. However, any field with an 1309 // empty value appearing in NullFields will be sent to the server as 1310 // null. It is an error if a field in this list has a non-empty value. 1311 // This may be used to include null fields in Patch requests. 1312 NullFields []string `json:"-"` 1313} 1314 1315func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) { 1316 type NoMethod AccountsCustomBatchResponse 1317 raw := NoMethod(*s) 1318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1319} 1320 1321// AccountsCustomBatchResponseEntry: A batch entry encoding a single 1322// non-batch accounts response. 1323type AccountsCustomBatchResponseEntry struct { 1324 // Account: The retrieved, created, or updated account. Not defined if 1325 // the method was `delete`, `claimwebsite` or `link`. 1326 Account *Account `json:"account,omitempty"` 1327 1328 // BatchId: The ID of the request entry this entry responds to. 1329 BatchId int64 `json:"batchId,omitempty"` 1330 1331 // Errors: A list of errors defined if and only if the request failed. 1332 Errors *Errors `json:"errors,omitempty"` 1333 1334 // Kind: Identifies what kind of resource this is. Value: the fixed 1335 // string "content#accountsCustomBatchResponseEntry" 1336 Kind string `json:"kind,omitempty"` 1337 1338 // LinkStatus: Deprecated. This field is never set. Acceptable values 1339 // are: - "active" - "inactive" - "pending" 1340 LinkStatus string `json:"linkStatus,omitempty"` 1341 1342 // ForceSendFields is a list of field names (e.g. "Account") to 1343 // unconditionally include in API requests. By default, fields with 1344 // empty or default values are omitted from API requests. However, any 1345 // non-pointer, non-interface field appearing in ForceSendFields will be 1346 // sent to the server regardless of whether the field is empty or not. 1347 // This may be used to include empty fields in Patch requests. 1348 ForceSendFields []string `json:"-"` 1349 1350 // NullFields is a list of field names (e.g. "Account") to include in 1351 // API requests with the JSON null value. By default, fields with empty 1352 // values are omitted from API requests. However, any field with an 1353 // empty value appearing in NullFields will be sent to the server as 1354 // null. It is an error if a field in this list has a non-empty value. 1355 // This may be used to include null fields in Patch requests. 1356 NullFields []string `json:"-"` 1357} 1358 1359func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1360 type NoMethod AccountsCustomBatchResponseEntry 1361 raw := NoMethod(*s) 1362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1363} 1364 1365type AccountsLinkRequest struct { 1366 // Action: Action to perform for this link. The "request" action is 1367 // only available to select merchants. Acceptable values are: - 1368 // "approve" - "remove" - "request" 1369 Action string `json:"action,omitempty"` 1370 1371 // LinkType: Type of the link between the two accounts. Acceptable 1372 // values are: - "channelPartner" - "eCommercePlatform" 1373 LinkType string `json:"linkType,omitempty"` 1374 1375 // LinkedAccountId: The ID of the linked account. 1376 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1377 1378 // ForceSendFields is a list of field names (e.g. "Action") to 1379 // unconditionally include in API requests. By default, fields with 1380 // empty or default values are omitted from API requests. However, any 1381 // non-pointer, non-interface field appearing in ForceSendFields will be 1382 // sent to the server regardless of whether the field is empty or not. 1383 // This may be used to include empty fields in Patch requests. 1384 ForceSendFields []string `json:"-"` 1385 1386 // NullFields is a list of field names (e.g. "Action") to include in API 1387 // requests with the JSON null value. By default, fields with empty 1388 // values are omitted from API requests. However, any field with an 1389 // empty value appearing in NullFields will be sent to the server as 1390 // null. It is an error if a field in this list has a non-empty value. 1391 // This may be used to include null fields in Patch requests. 1392 NullFields []string `json:"-"` 1393} 1394 1395func (s *AccountsLinkRequest) MarshalJSON() ([]byte, error) { 1396 type NoMethod AccountsLinkRequest 1397 raw := NoMethod(*s) 1398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1399} 1400 1401type AccountsLinkResponse struct { 1402 // Kind: Identifies what kind of resource this is. Value: the fixed 1403 // string "content#accountsLinkResponse". 1404 Kind string `json:"kind,omitempty"` 1405 1406 // ServerResponse contains the HTTP response code and headers from the 1407 // server. 1408 googleapi.ServerResponse `json:"-"` 1409 1410 // ForceSendFields is a list of field names (e.g. "Kind") to 1411 // unconditionally include in API requests. By default, fields with 1412 // empty or default values are omitted from API requests. However, any 1413 // non-pointer, non-interface field appearing in ForceSendFields will be 1414 // sent to the server regardless of whether the field is empty or not. 1415 // This may be used to include empty fields in Patch requests. 1416 ForceSendFields []string `json:"-"` 1417 1418 // NullFields is a list of field names (e.g. "Kind") to include in API 1419 // requests with the JSON null value. By default, fields with empty 1420 // values are omitted from API requests. However, any field with an 1421 // empty value appearing in NullFields will be sent to the server as 1422 // null. It is an error if a field in this list has a non-empty value. 1423 // This may be used to include null fields in Patch requests. 1424 NullFields []string `json:"-"` 1425} 1426 1427func (s *AccountsLinkResponse) MarshalJSON() ([]byte, error) { 1428 type NoMethod AccountsLinkResponse 1429 raw := NoMethod(*s) 1430 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1431} 1432 1433type AccountsListResponse struct { 1434 // Kind: Identifies what kind of resource this is. Value: the fixed 1435 // string "content#accountsListResponse". 1436 Kind string `json:"kind,omitempty"` 1437 1438 // NextPageToken: The token for the retrieval of the next page of 1439 // accounts. 1440 NextPageToken string `json:"nextPageToken,omitempty"` 1441 1442 Resources []*Account `json:"resources,omitempty"` 1443 1444 // ServerResponse contains the HTTP response code and headers from the 1445 // server. 1446 googleapi.ServerResponse `json:"-"` 1447 1448 // ForceSendFields is a list of field names (e.g. "Kind") to 1449 // unconditionally include in API requests. By default, fields with 1450 // empty or default values are omitted from API requests. However, any 1451 // non-pointer, non-interface field appearing in ForceSendFields will be 1452 // sent to the server regardless of whether the field is empty or not. 1453 // This may be used to include empty fields in Patch requests. 1454 ForceSendFields []string `json:"-"` 1455 1456 // NullFields is a list of field names (e.g. "Kind") to include in API 1457 // requests with the JSON null value. By default, fields with empty 1458 // values are omitted from API requests. However, any field with an 1459 // empty value appearing in NullFields will be sent to the server as 1460 // null. It is an error if a field in this list has a non-empty value. 1461 // This may be used to include null fields in Patch requests. 1462 NullFields []string `json:"-"` 1463} 1464 1465func (s *AccountsListResponse) MarshalJSON() ([]byte, error) { 1466 type NoMethod AccountsListResponse 1467 raw := NoMethod(*s) 1468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1469} 1470 1471type AccountstatusesCustomBatchRequest struct { 1472 // Entries: The request entries to be processed in the batch. 1473 Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 1474 1475 // ForceSendFields is a list of field names (e.g. "Entries") to 1476 // unconditionally include in API requests. By default, fields with 1477 // empty or default values are omitted from API requests. However, any 1478 // non-pointer, non-interface field appearing in ForceSendFields will be 1479 // sent to the server regardless of whether the field is empty or not. 1480 // This may be used to include empty fields in Patch requests. 1481 ForceSendFields []string `json:"-"` 1482 1483 // NullFields is a list of field names (e.g. "Entries") to include in 1484 // API 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 *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 1493 type NoMethod AccountstatusesCustomBatchRequest 1494 raw := NoMethod(*s) 1495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1496} 1497 1498// AccountstatusesCustomBatchRequestEntry: A batch entry encoding a 1499// single non-batch accountstatuses request. 1500type AccountstatusesCustomBatchRequestEntry struct { 1501 // AccountId: The ID of the (sub-)account whose status to get. 1502 AccountId uint64 `json:"accountId,omitempty,string"` 1503 1504 // BatchId: An entry ID, unique within the batch request. 1505 BatchId int64 `json:"batchId,omitempty"` 1506 1507 // Destinations: If set, only issues for the specified destinations are 1508 // returned, otherwise only issues for the Shopping destination. 1509 Destinations []string `json:"destinations,omitempty"` 1510 1511 // MerchantId: The ID of the managing account. 1512 MerchantId uint64 `json:"merchantId,omitempty,string"` 1513 1514 // Method: The method of the batch entry. Acceptable values are: - 1515 // "get" 1516 Method string `json:"method,omitempty"` 1517 1518 // ForceSendFields is a list of field names (e.g. "AccountId") to 1519 // unconditionally include in API requests. By default, fields with 1520 // empty or default values are omitted from API requests. However, any 1521 // non-pointer, non-interface field appearing in ForceSendFields will be 1522 // sent to the server regardless of whether the field is empty or not. 1523 // This may be used to include empty fields in Patch requests. 1524 ForceSendFields []string `json:"-"` 1525 1526 // NullFields is a list of field names (e.g. "AccountId") to include in 1527 // API requests with the JSON null value. By default, fields with empty 1528 // values are omitted from API requests. However, any field with an 1529 // empty value appearing in NullFields will be sent to the server as 1530 // null. It is an error if a field in this list has a non-empty value. 1531 // This may be used to include null fields in Patch requests. 1532 NullFields []string `json:"-"` 1533} 1534 1535func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1536 type NoMethod AccountstatusesCustomBatchRequestEntry 1537 raw := NoMethod(*s) 1538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1539} 1540 1541type AccountstatusesCustomBatchResponse struct { 1542 // Entries: The result of the execution of the batch requests. 1543 Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 1544 1545 // Kind: Identifies what kind of resource this is. Value: the fixed 1546 // string "content#accountstatusesCustomBatchResponse". 1547 Kind string `json:"kind,omitempty"` 1548 1549 // ServerResponse contains the HTTP response code and headers from the 1550 // server. 1551 googleapi.ServerResponse `json:"-"` 1552 1553 // ForceSendFields is a list of field names (e.g. "Entries") to 1554 // unconditionally include in API requests. By default, fields with 1555 // empty or default values are omitted from API requests. However, any 1556 // non-pointer, non-interface field appearing in ForceSendFields will be 1557 // sent to the server regardless of whether the field is empty or not. 1558 // This may be used to include empty fields in Patch requests. 1559 ForceSendFields []string `json:"-"` 1560 1561 // NullFields is a list of field names (e.g. "Entries") to include in 1562 // API requests with the JSON null value. By default, fields with empty 1563 // values are omitted from API requests. However, any field with an 1564 // empty value appearing in NullFields will be sent to the server as 1565 // null. It is an error if a field in this list has a non-empty value. 1566 // This may be used to include null fields in Patch requests. 1567 NullFields []string `json:"-"` 1568} 1569 1570func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 1571 type NoMethod AccountstatusesCustomBatchResponse 1572 raw := NoMethod(*s) 1573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1574} 1575 1576// AccountstatusesCustomBatchResponseEntry: A batch entry encoding a 1577// single non-batch accountstatuses response. 1578type AccountstatusesCustomBatchResponseEntry struct { 1579 // AccountStatus: The requested account status. Defined if and only if 1580 // the request was successful. 1581 AccountStatus *AccountStatus `json:"accountStatus,omitempty"` 1582 1583 // BatchId: The ID of the request entry this entry responds to. 1584 BatchId int64 `json:"batchId,omitempty"` 1585 1586 // Errors: A list of errors defined if and only if the request failed. 1587 Errors *Errors `json:"errors,omitempty"` 1588 1589 // ForceSendFields is a list of field names (e.g. "AccountStatus") to 1590 // unconditionally include in API requests. By default, fields with 1591 // empty or default values are omitted from API requests. However, any 1592 // non-pointer, non-interface field appearing in ForceSendFields will be 1593 // sent to the server regardless of whether the field is empty or not. 1594 // This may be used to include empty fields in Patch requests. 1595 ForceSendFields []string `json:"-"` 1596 1597 // NullFields is a list of field names (e.g. "AccountStatus") to include 1598 // in API requests with the JSON null value. By default, fields with 1599 // empty values are omitted from API requests. However, any field with 1600 // an empty value appearing in NullFields will be sent to the server as 1601 // null. It is an error if a field in this list has a non-empty value. 1602 // This may be used to include null fields in Patch requests. 1603 NullFields []string `json:"-"` 1604} 1605 1606func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1607 type NoMethod AccountstatusesCustomBatchResponseEntry 1608 raw := NoMethod(*s) 1609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1610} 1611 1612type AccountstatusesListResponse struct { 1613 // Kind: Identifies what kind of resource this is. Value: the fixed 1614 // string "content#accountstatusesListResponse". 1615 Kind string `json:"kind,omitempty"` 1616 1617 // NextPageToken: The token for the retrieval of the next page of 1618 // account statuses. 1619 NextPageToken string `json:"nextPageToken,omitempty"` 1620 1621 Resources []*AccountStatus `json:"resources,omitempty"` 1622 1623 // ServerResponse contains the HTTP response code and headers from the 1624 // server. 1625 googleapi.ServerResponse `json:"-"` 1626 1627 // ForceSendFields is a list of field names (e.g. "Kind") to 1628 // unconditionally include in API requests. By default, fields with 1629 // empty or default values are omitted from API requests. However, any 1630 // non-pointer, non-interface field appearing in ForceSendFields will be 1631 // sent to the server regardless of whether the field is empty or not. 1632 // This may be used to include empty fields in Patch requests. 1633 ForceSendFields []string `json:"-"` 1634 1635 // NullFields is a list of field names (e.g. "Kind") to include in API 1636 // requests with the JSON null value. By default, fields with empty 1637 // values are omitted from API requests. However, any field with an 1638 // empty value appearing in NullFields will be sent to the server as 1639 // null. It is an error if a field in this list has a non-empty value. 1640 // This may be used to include null fields in Patch requests. 1641 NullFields []string `json:"-"` 1642} 1643 1644func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) { 1645 type NoMethod AccountstatusesListResponse 1646 raw := NoMethod(*s) 1647 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1648} 1649 1650type AccounttaxCustomBatchRequest struct { 1651 // Entries: The request entries to be processed in the batch. 1652 Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"` 1653 1654 // ForceSendFields is a list of field names (e.g. "Entries") to 1655 // unconditionally include in API requests. By default, fields with 1656 // empty or default values are omitted from API requests. However, any 1657 // non-pointer, non-interface field appearing in ForceSendFields will be 1658 // sent to the server regardless of whether the field is empty or not. 1659 // This may be used to include empty fields in Patch requests. 1660 ForceSendFields []string `json:"-"` 1661 1662 // NullFields is a list of field names (e.g. "Entries") to include in 1663 // API requests with the JSON null value. By default, fields with empty 1664 // values are omitted from API requests. However, any field with an 1665 // empty value appearing in NullFields will be sent to the server as 1666 // null. It is an error if a field in this list has a non-empty value. 1667 // This may be used to include null fields in Patch requests. 1668 NullFields []string `json:"-"` 1669} 1670 1671func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) { 1672 type NoMethod AccounttaxCustomBatchRequest 1673 raw := NoMethod(*s) 1674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1675} 1676 1677// AccounttaxCustomBatchRequestEntry: A batch entry encoding a single 1678// non-batch accounttax request. 1679type AccounttaxCustomBatchRequestEntry struct { 1680 // AccountId: The ID of the account for which to get/update account tax 1681 // settings. 1682 AccountId uint64 `json:"accountId,omitempty,string"` 1683 1684 // AccountTax: The account tax settings to update. Only defined if the 1685 // method is `update`. 1686 AccountTax *AccountTax `json:"accountTax,omitempty"` 1687 1688 // BatchId: An entry ID, unique within the batch request. 1689 BatchId int64 `json:"batchId,omitempty"` 1690 1691 // MerchantId: The ID of the managing account. 1692 MerchantId uint64 `json:"merchantId,omitempty,string"` 1693 1694 // Method: The method of the batch entry. Acceptable values are: - 1695 // "get" - "update" 1696 Method string `json:"method,omitempty"` 1697 1698 // ForceSendFields is a list of field names (e.g. "AccountId") to 1699 // unconditionally include in API requests. By default, fields with 1700 // empty or default values are omitted from API requests. However, any 1701 // non-pointer, non-interface field appearing in ForceSendFields will be 1702 // sent to the server regardless of whether the field is empty or not. 1703 // This may be used to include empty fields in Patch requests. 1704 ForceSendFields []string `json:"-"` 1705 1706 // NullFields is a list of field names (e.g. "AccountId") to include in 1707 // API requests with the JSON null value. By default, fields with empty 1708 // values are omitted from API requests. However, any field with an 1709 // empty value appearing in NullFields will be sent to the server as 1710 // null. It is an error if a field in this list has a non-empty value. 1711 // This may be used to include null fields in Patch requests. 1712 NullFields []string `json:"-"` 1713} 1714 1715func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1716 type NoMethod AccounttaxCustomBatchRequestEntry 1717 raw := NoMethod(*s) 1718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1719} 1720 1721type AccounttaxCustomBatchResponse struct { 1722 // Entries: The result of the execution of the batch requests. 1723 Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"` 1724 1725 // Kind: Identifies what kind of resource this is. Value: the fixed 1726 // string "content#accounttaxCustomBatchResponse". 1727 Kind string `json:"kind,omitempty"` 1728 1729 // ServerResponse contains the HTTP response code and headers from the 1730 // server. 1731 googleapi.ServerResponse `json:"-"` 1732 1733 // ForceSendFields is a list of field names (e.g. "Entries") to 1734 // unconditionally include in API requests. By default, fields with 1735 // empty or default values are omitted from API requests. However, any 1736 // non-pointer, non-interface field appearing in ForceSendFields will be 1737 // sent to the server regardless of whether the field is empty or not. 1738 // This may be used to include empty fields in Patch requests. 1739 ForceSendFields []string `json:"-"` 1740 1741 // NullFields is a list of field names (e.g. "Entries") to include in 1742 // API requests with the JSON null value. By default, fields with empty 1743 // values are omitted from API requests. However, any field with an 1744 // empty value appearing in NullFields will be sent to the server as 1745 // null. It is an error if a field in this list has a non-empty value. 1746 // This may be used to include null fields in Patch requests. 1747 NullFields []string `json:"-"` 1748} 1749 1750func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) { 1751 type NoMethod AccounttaxCustomBatchResponse 1752 raw := NoMethod(*s) 1753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1754} 1755 1756// AccounttaxCustomBatchResponseEntry: A batch entry encoding a single 1757// non-batch accounttax response. 1758type AccounttaxCustomBatchResponseEntry struct { 1759 // AccountTax: The retrieved or updated account tax settings. 1760 AccountTax *AccountTax `json:"accountTax,omitempty"` 1761 1762 // BatchId: The ID of the request entry this entry responds to. 1763 BatchId int64 `json:"batchId,omitempty"` 1764 1765 // Errors: A list of errors defined if and only if the request failed. 1766 Errors *Errors `json:"errors,omitempty"` 1767 1768 // Kind: Identifies what kind of resource this is. Value: the fixed 1769 // string "content#accounttaxCustomBatchResponseEntry" 1770 Kind string `json:"kind,omitempty"` 1771 1772 // ForceSendFields is a list of field names (e.g. "AccountTax") to 1773 // unconditionally include in API requests. By default, fields with 1774 // empty or default values are omitted from API requests. However, any 1775 // non-pointer, non-interface field appearing in ForceSendFields will be 1776 // sent to the server regardless of whether the field is empty or not. 1777 // This may be used to include empty fields in Patch requests. 1778 ForceSendFields []string `json:"-"` 1779 1780 // NullFields is a list of field names (e.g. "AccountTax") to include in 1781 // API requests with the JSON null value. By default, fields with empty 1782 // values are omitted from API requests. However, any field with an 1783 // empty value appearing in NullFields will be sent to the server as 1784 // null. It is an error if a field in this list has a non-empty value. 1785 // This may be used to include null fields in Patch requests. 1786 NullFields []string `json:"-"` 1787} 1788 1789func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1790 type NoMethod AccounttaxCustomBatchResponseEntry 1791 raw := NoMethod(*s) 1792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1793} 1794 1795type AccounttaxListResponse struct { 1796 // Kind: Identifies what kind of resource this is. Value: the fixed 1797 // string "content#accounttaxListResponse". 1798 Kind string `json:"kind,omitempty"` 1799 1800 // NextPageToken: The token for the retrieval of the next page of 1801 // account tax settings. 1802 NextPageToken string `json:"nextPageToken,omitempty"` 1803 1804 Resources []*AccountTax `json:"resources,omitempty"` 1805 1806 // ServerResponse contains the HTTP response code and headers from the 1807 // server. 1808 googleapi.ServerResponse `json:"-"` 1809 1810 // ForceSendFields is a list of field names (e.g. "Kind") to 1811 // unconditionally include in API requests. By default, fields with 1812 // empty or default values are omitted from API requests. However, any 1813 // non-pointer, non-interface field appearing in ForceSendFields will be 1814 // sent to the server regardless of whether the field is empty or not. 1815 // This may be used to include empty fields in Patch requests. 1816 ForceSendFields []string `json:"-"` 1817 1818 // NullFields is a list of field names (e.g. "Kind") to include in API 1819 // requests with the JSON null value. By default, fields with empty 1820 // values are omitted from API requests. However, any field with an 1821 // empty value appearing in NullFields will be sent to the server as 1822 // null. It is an error if a field in this list has a non-empty value. 1823 // This may be used to include null fields in Patch requests. 1824 NullFields []string `json:"-"` 1825} 1826 1827func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) { 1828 type NoMethod AccounttaxListResponse 1829 raw := NoMethod(*s) 1830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1831} 1832 1833type Amount struct { 1834 // Pretax: [required] Value before taxes. 1835 Pretax *Price `json:"pretax,omitempty"` 1836 1837 // Tax: [required] Tax value. 1838 Tax *Price `json:"tax,omitempty"` 1839 1840 // ForceSendFields is a list of field names (e.g. "Pretax") to 1841 // unconditionally include in API requests. By default, fields with 1842 // empty or default values are omitted from API requests. However, any 1843 // non-pointer, non-interface field appearing in ForceSendFields will be 1844 // sent to the server regardless of whether the field is empty or not. 1845 // This may be used to include empty fields in Patch requests. 1846 ForceSendFields []string `json:"-"` 1847 1848 // NullFields is a list of field names (e.g. "Pretax") to include in API 1849 // requests with the JSON null value. By default, fields with empty 1850 // values are omitted from API requests. However, any field with an 1851 // empty value appearing in NullFields will be sent to the server as 1852 // null. It is an error if a field in this list has a non-empty value. 1853 // This may be used to include null fields in Patch requests. 1854 NullFields []string `json:"-"` 1855} 1856 1857func (s *Amount) MarshalJSON() ([]byte, error) { 1858 type NoMethod Amount 1859 raw := NoMethod(*s) 1860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1861} 1862 1863type BusinessDayConfig struct { 1864 // BusinessDays: Regular business days, such as '"monday"'. May not be 1865 // empty. 1866 BusinessDays []string `json:"businessDays,omitempty"` 1867 1868 // ForceSendFields is a list of field names (e.g. "BusinessDays") to 1869 // unconditionally include in API requests. By default, fields with 1870 // empty or default values are omitted from API requests. However, any 1871 // non-pointer, non-interface field appearing in ForceSendFields will be 1872 // sent to the server regardless of whether the field is empty or not. 1873 // This may be used to include empty fields in Patch requests. 1874 ForceSendFields []string `json:"-"` 1875 1876 // NullFields is a list of field names (e.g. "BusinessDays") to include 1877 // in API requests with the JSON null value. By default, fields with 1878 // empty values are omitted from API requests. However, any field with 1879 // an empty value appearing in NullFields will be sent to the server as 1880 // null. It is an error if a field in this list has a non-empty value. 1881 // This may be used to include null fields in Patch requests. 1882 NullFields []string `json:"-"` 1883} 1884 1885func (s *BusinessDayConfig) MarshalJSON() ([]byte, error) { 1886 type NoMethod BusinessDayConfig 1887 raw := NoMethod(*s) 1888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1889} 1890 1891type CarrierRate struct { 1892 // CarrierName: Carrier service, such as "UPS" or "Fedex". The list 1893 // of supported carriers can be retrieved via the `getSupportedCarriers` 1894 // method. Required. 1895 CarrierName string `json:"carrierName,omitempty"` 1896 1897 // CarrierService: Carrier service, such as "ground" or "2 days". 1898 // The list of supported services for a carrier can be retrieved via the 1899 // `getSupportedCarriers` method. Required. 1900 CarrierService string `json:"carrierService,omitempty"` 1901 1902 // FlatAdjustment: Additive shipping rate modifier. Can be negative. For 1903 // example `{ "value": "1", "currency" : "USD" }` adds $1 to the rate, 1904 // `{ "value": "-3", "currency" : "USD" }` removes $3 from the rate. 1905 // Optional. 1906 FlatAdjustment *Price `json:"flatAdjustment,omitempty"` 1907 1908 // Name: Name of the carrier rate. Must be unique per rate group. 1909 // Required. 1910 Name string `json:"name,omitempty"` 1911 1912 // OriginPostalCode: Shipping origin for this carrier rate. Required. 1913 OriginPostalCode string `json:"originPostalCode,omitempty"` 1914 1915 // PercentageAdjustment: Multiplicative shipping rate modifier as a 1916 // number in decimal notation. Can be negative. For example "5.4" 1917 // increases the rate by 5.4%, "-3" decreases the rate by 3%. 1918 // Optional. 1919 PercentageAdjustment string `json:"percentageAdjustment,omitempty"` 1920 1921 // ForceSendFields is a list of field names (e.g. "CarrierName") to 1922 // unconditionally include in API requests. By default, fields with 1923 // empty or default values are omitted from API requests. However, any 1924 // non-pointer, non-interface field appearing in ForceSendFields will be 1925 // sent to the server regardless of whether the field is empty or not. 1926 // This may be used to include empty fields in Patch requests. 1927 ForceSendFields []string `json:"-"` 1928 1929 // NullFields is a list of field names (e.g. "CarrierName") to include 1930 // in API requests with the JSON null value. By default, fields with 1931 // empty values are omitted from API requests. However, any field with 1932 // an empty value appearing in NullFields will be sent to the server as 1933 // null. It is an error if a field in this list has a non-empty value. 1934 // This may be used to include null fields in Patch requests. 1935 NullFields []string `json:"-"` 1936} 1937 1938func (s *CarrierRate) MarshalJSON() ([]byte, error) { 1939 type NoMethod CarrierRate 1940 raw := NoMethod(*s) 1941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1942} 1943 1944type CarriersCarrier struct { 1945 // Country: The CLDR country code of the carrier (e.g., "US"). Always 1946 // present. 1947 Country string `json:"country,omitempty"` 1948 1949 // EddServices: A list of services supported for EDD (Estimated Delivery 1950 // Date) calculation. This is the list of valid values for 1951 // WarehouseBasedDeliveryTime.carrierService. 1952 EddServices []string `json:"eddServices,omitempty"` 1953 1954 // Name: The name of the carrier (e.g., "UPS"). Always present. 1955 Name string `json:"name,omitempty"` 1956 1957 // Services: A list of supported services (e.g., "ground") for that 1958 // carrier. Contains at least one service. This is the list of valid 1959 // values for CarrierRate.carrierService. 1960 Services []string `json:"services,omitempty"` 1961 1962 // ForceSendFields is a list of field names (e.g. "Country") to 1963 // unconditionally include in API requests. By default, fields with 1964 // empty or default values are omitted from API requests. However, any 1965 // non-pointer, non-interface field appearing in ForceSendFields will be 1966 // sent to the server regardless of whether the field is empty or not. 1967 // This may be used to include empty fields in Patch requests. 1968 ForceSendFields []string `json:"-"` 1969 1970 // NullFields is a list of field names (e.g. "Country") to include in 1971 // API requests with the JSON null value. By default, fields with empty 1972 // values are omitted from API requests. However, any field with an 1973 // empty value appearing in NullFields will be sent to the server as 1974 // null. It is an error if a field in this list has a non-empty value. 1975 // This may be used to include null fields in Patch requests. 1976 NullFields []string `json:"-"` 1977} 1978 1979func (s *CarriersCarrier) MarshalJSON() ([]byte, error) { 1980 type NoMethod CarriersCarrier 1981 raw := NoMethod(*s) 1982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1983} 1984 1985type CustomAttribute struct { 1986 // Name: The name of the attribute. Underscores will be replaced by 1987 // spaces upon insertion. 1988 Name string `json:"name,omitempty"` 1989 1990 // Type: The type of the attribute. Acceptable values are: - "boolean" 1991 // - "datetimerange" - "float" - "group" - "int" - "price" - 1992 // "text" - "time" - "url" 1993 Type string `json:"type,omitempty"` 1994 1995 // Unit: Free-form unit of the attribute. Unit can only be used for 1996 // values of type int, float, or price. 1997 Unit string `json:"unit,omitempty"` 1998 1999 // Value: The value of the attribute. 2000 Value string `json:"value,omitempty"` 2001 2002 // ForceSendFields is a list of field names (e.g. "Name") to 2003 // unconditionally include in API requests. By default, fields with 2004 // empty or default values are omitted from API requests. However, any 2005 // non-pointer, non-interface field appearing in ForceSendFields will be 2006 // sent to the server regardless of whether the field is empty or not. 2007 // This may be used to include empty fields in Patch requests. 2008 ForceSendFields []string `json:"-"` 2009 2010 // NullFields is a list of field names (e.g. "Name") to include in API 2011 // requests with the JSON null value. By default, fields with empty 2012 // values are omitted from API requests. However, any field with an 2013 // empty value appearing in NullFields will be sent to the server as 2014 // null. It is an error if a field in this list has a non-empty value. 2015 // This may be used to include null fields in Patch requests. 2016 NullFields []string `json:"-"` 2017} 2018 2019func (s *CustomAttribute) MarshalJSON() ([]byte, error) { 2020 type NoMethod CustomAttribute 2021 raw := NoMethod(*s) 2022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2023} 2024 2025type CustomGroup struct { 2026 // Attributes: The sub-attributes. 2027 Attributes []*CustomAttribute `json:"attributes,omitempty"` 2028 2029 // Name: The name of the group. Underscores will be replaced by spaces 2030 // upon insertion. 2031 Name string `json:"name,omitempty"` 2032 2033 // ForceSendFields is a list of field names (e.g. "Attributes") to 2034 // unconditionally include in API requests. By default, fields with 2035 // empty or default values are omitted from API requests. However, any 2036 // non-pointer, non-interface field appearing in ForceSendFields will be 2037 // sent to the server regardless of whether the field is empty or not. 2038 // This may be used to include empty fields in Patch requests. 2039 ForceSendFields []string `json:"-"` 2040 2041 // NullFields is a list of field names (e.g. "Attributes") to include in 2042 // API requests with the JSON null value. By default, fields with empty 2043 // values are omitted from API requests. However, any field with an 2044 // empty value appearing in NullFields will be sent to the server as 2045 // null. It is an error if a field in this list has a non-empty value. 2046 // This may be used to include null fields in Patch requests. 2047 NullFields []string `json:"-"` 2048} 2049 2050func (s *CustomGroup) MarshalJSON() ([]byte, error) { 2051 type NoMethod CustomGroup 2052 raw := NoMethod(*s) 2053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2054} 2055 2056type CustomerReturnReason struct { 2057 // Description: Description of the reason. 2058 Description string `json:"description,omitempty"` 2059 2060 // ReasonCode: Code of the return reason. Acceptable values are: - 2061 // "betterPriceFound" - "changedMind" - "damagedOrDefectiveItem" - 2062 // "didNotMatchDescription" - "doesNotFit" - "expiredItem" - 2063 // "incorrectItemReceived" - "noLongerNeeded" - "notSpecified" - 2064 // "orderedWrongItem" - "other" - "qualityNotExpected" - 2065 // "receivedTooLate" - "undeliverable" 2066 ReasonCode string `json:"reasonCode,omitempty"` 2067 2068 // ForceSendFields is a list of field names (e.g. "Description") to 2069 // unconditionally include in API requests. By default, fields with 2070 // empty or default values are omitted from API requests. However, any 2071 // non-pointer, non-interface field appearing in ForceSendFields will be 2072 // sent to the server regardless of whether the field is empty or not. 2073 // This may be used to include empty fields in Patch requests. 2074 ForceSendFields []string `json:"-"` 2075 2076 // NullFields is a list of field names (e.g. "Description") to include 2077 // in API requests with the JSON null value. By default, fields with 2078 // empty values are omitted from API requests. However, any field with 2079 // an empty value appearing in NullFields will be sent to the server as 2080 // null. It is an error if a field in this list has a non-empty value. 2081 // This may be used to include null fields in Patch requests. 2082 NullFields []string `json:"-"` 2083} 2084 2085func (s *CustomerReturnReason) MarshalJSON() ([]byte, error) { 2086 type NoMethod CustomerReturnReason 2087 raw := NoMethod(*s) 2088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2089} 2090 2091type CutoffTime struct { 2092 // Hour: Hour of the cutoff time until which an order has to be placed 2093 // to be processed in the same day. Required. 2094 Hour int64 `json:"hour,omitempty"` 2095 2096 // Minute: Minute of the cutoff time until which an order has to be 2097 // placed to be processed in the same day. Required. 2098 Minute int64 `json:"minute,omitempty"` 2099 2100 // Timezone: Timezone identifier for the cutoff time. A list of 2101 // identifiers can be found in the AdWords API documentation. E.g. 2102 // "Europe/Zurich". Required. 2103 Timezone string `json:"timezone,omitempty"` 2104 2105 // ForceSendFields is a list of field names (e.g. "Hour") to 2106 // unconditionally include in API requests. By default, fields with 2107 // empty or default values are omitted from API requests. However, any 2108 // non-pointer, non-interface field appearing in ForceSendFields will be 2109 // sent to the server regardless of whether the field is empty or not. 2110 // This may be used to include empty fields in Patch requests. 2111 ForceSendFields []string `json:"-"` 2112 2113 // NullFields is a list of field names (e.g. "Hour") to include in API 2114 // requests with the JSON null value. By default, fields with empty 2115 // values are omitted from API requests. However, any field with an 2116 // empty value appearing in NullFields will be sent to the server as 2117 // null. It is an error if a field in this list has a non-empty value. 2118 // This may be used to include null fields in Patch requests. 2119 NullFields []string `json:"-"` 2120} 2121 2122func (s *CutoffTime) MarshalJSON() ([]byte, error) { 2123 type NoMethod CutoffTime 2124 raw := NoMethod(*s) 2125 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2126} 2127 2128// Datafeed: Datafeed configuration data. 2129type Datafeed struct { 2130 // AttributeLanguage: The two-letter ISO 639-1 language in which the 2131 // attributes are defined in the data feed. 2132 AttributeLanguage string `json:"attributeLanguage,omitempty"` 2133 2134 // ContentLanguage: [DEPRECATED] Please use targets[].language instead. 2135 // The two-letter ISO 639-1 language of the items in the feed. Must be a 2136 // valid language for `targetCountry`. 2137 ContentLanguage string `json:"contentLanguage,omitempty"` 2138 2139 // ContentType: Required. The type of data feed. For product inventory 2140 // feeds, only feeds for local stores, not online stores, are supported. 2141 // Acceptable values are: - "local products" - "product inventory" - 2142 // "products" 2143 ContentType string `json:"contentType,omitempty"` 2144 2145 // FetchSchedule: Fetch schedule for the feed file. 2146 FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"` 2147 2148 // FileName: Required. The filename of the feed. All feeds must have a 2149 // unique file name. 2150 FileName string `json:"fileName,omitempty"` 2151 2152 // Format: Format of the feed file. 2153 Format *DatafeedFormat `json:"format,omitempty"` 2154 2155 // Id: Required for update. The ID of the data feed. 2156 Id int64 `json:"id,omitempty,string"` 2157 2158 // IntendedDestinations: [DEPRECATED] Please use 2159 // targets[].includedDestinations instead. The list of intended 2160 // destinations (corresponds to checked check boxes in Merchant Center). 2161 IntendedDestinations []string `json:"intendedDestinations,omitempty"` 2162 2163 // Kind: Identifies what kind of resource this is. Value: the fixed 2164 // string "content#datafeed" 2165 Kind string `json:"kind,omitempty"` 2166 2167 // Name: Required for insert. A descriptive name of the data feed. 2168 Name string `json:"name,omitempty"` 2169 2170 // TargetCountry: [DEPRECATED] Please use targets[].country instead. The 2171 // country where the items in the feed will be included in the search 2172 // index, represented as a CLDR territory code. 2173 TargetCountry string `json:"targetCountry,omitempty"` 2174 2175 // Targets: The targets this feed should apply to (country, language, 2176 // destinations). 2177 Targets []*DatafeedTarget `json:"targets,omitempty"` 2178 2179 // ServerResponse contains the HTTP response code and headers from the 2180 // server. 2181 googleapi.ServerResponse `json:"-"` 2182 2183 // ForceSendFields is a list of field names (e.g. "AttributeLanguage") 2184 // to unconditionally include in API requests. By default, fields with 2185 // empty or default values are omitted from API requests. However, any 2186 // non-pointer, non-interface field appearing in ForceSendFields will be 2187 // sent to the server regardless of whether the field is empty or not. 2188 // This may be used to include empty fields in Patch requests. 2189 ForceSendFields []string `json:"-"` 2190 2191 // NullFields is a list of field names (e.g. "AttributeLanguage") to 2192 // include in API requests with the JSON null value. By default, fields 2193 // with empty values are omitted from API requests. However, any field 2194 // with an empty value appearing in NullFields will be sent to the 2195 // server as null. It is an error if a field in this list has a 2196 // non-empty value. This may be used to include null fields in Patch 2197 // requests. 2198 NullFields []string `json:"-"` 2199} 2200 2201func (s *Datafeed) MarshalJSON() ([]byte, error) { 2202 type NoMethod Datafeed 2203 raw := NoMethod(*s) 2204 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2205} 2206 2207// DatafeedFetchSchedule: The required fields vary based on the 2208// frequency of fetching. For a monthly fetch schedule, day_of_month and 2209// hour are required. For a weekly fetch schedule, weekday and hour are 2210// required. For a daily fetch schedule, only hour is required. 2211type DatafeedFetchSchedule struct { 2212 // DayOfMonth: The day of the month the feed file should be fetched 2213 // (1-31). 2214 DayOfMonth int64 `json:"dayOfMonth,omitempty"` 2215 2216 // FetchUrl: The URL where the feed file can be fetched. Google Merchant 2217 // Center will support automatic scheduled uploads using the HTTP, 2218 // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid 2219 // link using one of those four protocols. 2220 FetchUrl string `json:"fetchUrl,omitempty"` 2221 2222 // Hour: The hour of the day the feed file should be fetched (0-23). 2223 Hour int64 `json:"hour,omitempty"` 2224 2225 // MinuteOfHour: The minute of the hour the feed file should be fetched 2226 // (0-59). Read-only. 2227 MinuteOfHour int64 `json:"minuteOfHour,omitempty"` 2228 2229 // Password: An optional password for fetch_url. 2230 Password string `json:"password,omitempty"` 2231 2232 // Paused: Whether the scheduled fetch is paused or not. 2233 Paused bool `json:"paused,omitempty"` 2234 2235 // TimeZone: Time zone used for schedule. UTC by default. E.g., 2236 // "America/Los_Angeles". 2237 TimeZone string `json:"timeZone,omitempty"` 2238 2239 // Username: An optional user name for fetch_url. 2240 Username string `json:"username,omitempty"` 2241 2242 // Weekday: The day of the week the feed file should be fetched. 2243 // Acceptable values are: - "monday" - "tuesday" - "wednesday" - 2244 // "thursday" - "friday" - "saturday" - "sunday" 2245 Weekday string `json:"weekday,omitempty"` 2246 2247 // ForceSendFields is a list of field names (e.g. "DayOfMonth") to 2248 // unconditionally include in API requests. By default, fields with 2249 // empty or default values are omitted from API requests. However, any 2250 // non-pointer, non-interface field appearing in ForceSendFields will be 2251 // sent to the server regardless of whether the field is empty or not. 2252 // This may be used to include empty fields in Patch requests. 2253 ForceSendFields []string `json:"-"` 2254 2255 // NullFields is a list of field names (e.g. "DayOfMonth") to include in 2256 // API requests with the JSON null value. By default, fields with empty 2257 // values are omitted from API requests. However, any field with an 2258 // empty value appearing in NullFields will be sent to the server as 2259 // null. It is an error if a field in this list has a non-empty value. 2260 // This may be used to include null fields in Patch requests. 2261 NullFields []string `json:"-"` 2262} 2263 2264func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) { 2265 type NoMethod DatafeedFetchSchedule 2266 raw := NoMethod(*s) 2267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2268} 2269 2270type DatafeedFormat struct { 2271 // ColumnDelimiter: Delimiter for the separation of values in a 2272 // delimiter-separated values feed. If not specified, the delimiter will 2273 // be auto-detected. Ignored for non-DSV data feeds. Acceptable values 2274 // are: - "pipe" - "tab" - "tilde" 2275 ColumnDelimiter string `json:"columnDelimiter,omitempty"` 2276 2277 // FileEncoding: Character encoding scheme of the data feed. If not 2278 // specified, the encoding will be auto-detected. Acceptable values are: 2279 // - "latin-1" - "utf-16be" - "utf-16le" - "utf-8" - 2280 // "windows-1252" 2281 FileEncoding string `json:"fileEncoding,omitempty"` 2282 2283 // QuotingMode: Specifies how double quotes are interpreted. If not 2284 // specified, the mode will be auto-detected. Ignored for non-DSV data 2285 // feeds. Acceptable values are: - "normal character" - "value 2286 // quoting" 2287 QuotingMode string `json:"quotingMode,omitempty"` 2288 2289 // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to 2290 // unconditionally include in API requests. By default, fields with 2291 // empty or default values are omitted from API requests. However, any 2292 // non-pointer, non-interface field appearing in ForceSendFields will be 2293 // sent to the server regardless of whether the field is empty or not. 2294 // This may be used to include empty fields in Patch requests. 2295 ForceSendFields []string `json:"-"` 2296 2297 // NullFields is a list of field names (e.g. "ColumnDelimiter") to 2298 // include in API requests with the JSON null value. By default, fields 2299 // with empty values are omitted from API requests. However, any field 2300 // with an empty value appearing in NullFields will be sent to the 2301 // server as null. It is an error if a field in this list has a 2302 // non-empty value. This may be used to include null fields in Patch 2303 // requests. 2304 NullFields []string `json:"-"` 2305} 2306 2307func (s *DatafeedFormat) MarshalJSON() ([]byte, error) { 2308 type NoMethod DatafeedFormat 2309 raw := NoMethod(*s) 2310 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2311} 2312 2313// DatafeedStatus: The status of a datafeed, i.e., the result of the 2314// last retrieval of the datafeed computed asynchronously when the feed 2315// processing is finished. 2316type DatafeedStatus struct { 2317 // Country: The country for which the status is reported, represented as 2318 // a CLDR territory code. 2319 Country string `json:"country,omitempty"` 2320 2321 // DatafeedId: The ID of the feed for which the status is reported. 2322 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2323 2324 // Errors: The list of errors occurring in the feed. 2325 Errors []*DatafeedStatusError `json:"errors,omitempty"` 2326 2327 // ItemsTotal: The number of items in the feed that were processed. 2328 ItemsTotal uint64 `json:"itemsTotal,omitempty,string"` 2329 2330 // ItemsValid: The number of items in the feed that were valid. 2331 ItemsValid uint64 `json:"itemsValid,omitempty,string"` 2332 2333 // Kind: Identifies what kind of resource this is. Value: the fixed 2334 // string "content#datafeedStatus" 2335 Kind string `json:"kind,omitempty"` 2336 2337 // Language: The two-letter ISO 639-1 language for which the status is 2338 // reported. 2339 Language string `json:"language,omitempty"` 2340 2341 // LastUploadDate: The last date at which the feed was uploaded. 2342 LastUploadDate string `json:"lastUploadDate,omitempty"` 2343 2344 // ProcessingStatus: The processing status of the feed. Acceptable 2345 // values are: - ""failure": The feed could not be processed or all 2346 // items had errors." - "in progress": The feed is being processed. - 2347 // "none": The feed has not yet been processed. For example, a feed 2348 // that has never been uploaded will have this processing status. - 2349 // "success": The feed was processed successfully, though some items 2350 // might have had errors. 2351 ProcessingStatus string `json:"processingStatus,omitempty"` 2352 2353 // Warnings: The list of errors occurring in the feed. 2354 Warnings []*DatafeedStatusError `json:"warnings,omitempty"` 2355 2356 // ServerResponse contains the HTTP response code and headers from the 2357 // server. 2358 googleapi.ServerResponse `json:"-"` 2359 2360 // ForceSendFields is a list of field names (e.g. "Country") to 2361 // unconditionally include in API requests. By default, fields with 2362 // empty or default values are omitted from API requests. However, any 2363 // non-pointer, non-interface field appearing in ForceSendFields will be 2364 // sent to the server regardless of whether the field is empty or not. 2365 // This may be used to include empty fields in Patch requests. 2366 ForceSendFields []string `json:"-"` 2367 2368 // NullFields is a list of field names (e.g. "Country") to include in 2369 // API requests with the JSON null value. By default, fields with empty 2370 // values are omitted from API requests. However, any field with an 2371 // empty value appearing in NullFields will be sent to the server as 2372 // null. It is an error if a field in this list has a non-empty value. 2373 // This may be used to include null fields in Patch requests. 2374 NullFields []string `json:"-"` 2375} 2376 2377func (s *DatafeedStatus) MarshalJSON() ([]byte, error) { 2378 type NoMethod DatafeedStatus 2379 raw := NoMethod(*s) 2380 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2381} 2382 2383// DatafeedStatusError: An error occurring in the feed, like "invalid 2384// price". 2385type DatafeedStatusError struct { 2386 // Code: The code of the error, e.g., "validation/invalid_value". 2387 Code string `json:"code,omitempty"` 2388 2389 // Count: The number of occurrences of the error in the feed. 2390 Count uint64 `json:"count,omitempty,string"` 2391 2392 // Examples: A list of example occurrences of the error, grouped by 2393 // product. 2394 Examples []*DatafeedStatusExample `json:"examples,omitempty"` 2395 2396 // Message: The error message, e.g., "Invalid price". 2397 Message string `json:"message,omitempty"` 2398 2399 // ForceSendFields is a list of field names (e.g. "Code") to 2400 // unconditionally include in API requests. By default, fields with 2401 // empty or default values are omitted from API requests. However, any 2402 // non-pointer, non-interface field appearing in ForceSendFields will be 2403 // sent to the server regardless of whether the field is empty or not. 2404 // This may be used to include empty fields in Patch requests. 2405 ForceSendFields []string `json:"-"` 2406 2407 // NullFields is a list of field names (e.g. "Code") to include in API 2408 // requests with the JSON null value. By default, fields with empty 2409 // values are omitted from API requests. However, any field with an 2410 // empty value appearing in NullFields will be sent to the server as 2411 // null. It is an error if a field in this list has a non-empty value. 2412 // This may be used to include null fields in Patch requests. 2413 NullFields []string `json:"-"` 2414} 2415 2416func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) { 2417 type NoMethod DatafeedStatusError 2418 raw := NoMethod(*s) 2419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2420} 2421 2422// DatafeedStatusExample: An example occurrence for a particular error. 2423type DatafeedStatusExample struct { 2424 // ItemId: The ID of the example item. 2425 ItemId string `json:"itemId,omitempty"` 2426 2427 // LineNumber: Line number in the data feed where the example is found. 2428 LineNumber uint64 `json:"lineNumber,omitempty,string"` 2429 2430 // Value: The problematic value. 2431 Value string `json:"value,omitempty"` 2432 2433 // ForceSendFields is a list of field names (e.g. "ItemId") to 2434 // unconditionally include in API requests. By default, fields with 2435 // empty or default values are omitted from API requests. However, any 2436 // non-pointer, non-interface field appearing in ForceSendFields will be 2437 // sent to the server regardless of whether the field is empty or not. 2438 // This may be used to include empty fields in Patch requests. 2439 ForceSendFields []string `json:"-"` 2440 2441 // NullFields is a list of field names (e.g. "ItemId") to include in API 2442 // requests with the JSON null value. By default, fields with empty 2443 // values are omitted from API requests. However, any field with an 2444 // empty value appearing in NullFields will be sent to the server as 2445 // null. It is an error if a field in this list has a non-empty value. 2446 // This may be used to include null fields in Patch requests. 2447 NullFields []string `json:"-"` 2448} 2449 2450func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) { 2451 type NoMethod DatafeedStatusExample 2452 raw := NoMethod(*s) 2453 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2454} 2455 2456type DatafeedTarget struct { 2457 // Country: The country where the items in the feed will be included in 2458 // the search index, represented as a CLDR territory code. 2459 Country string `json:"country,omitempty"` 2460 2461 // ExcludedDestinations: The list of destinations to exclude for this 2462 // target (corresponds to unchecked check boxes in Merchant Center). 2463 ExcludedDestinations []string `json:"excludedDestinations,omitempty"` 2464 2465 // IncludedDestinations: The list of destinations to include for this 2466 // target (corresponds to checked check boxes in Merchant Center). 2467 // Default destinations are always included unless provided in 2468 // `excludedDestinations`. List of supported destinations (if available 2469 // to the account): - DisplayAds - Shopping - ShoppingActions - 2470 // SurfacesAcrossGoogle 2471 IncludedDestinations []string `json:"includedDestinations,omitempty"` 2472 2473 // Language: The two-letter ISO 639-1 language of the items in the feed. 2474 // Must be a valid language for `targets[].country`. 2475 Language string `json:"language,omitempty"` 2476 2477 // ForceSendFields is a list of field names (e.g. "Country") to 2478 // unconditionally include in API requests. By default, fields with 2479 // empty or default values are omitted from API requests. However, any 2480 // non-pointer, non-interface field appearing in ForceSendFields will be 2481 // sent to the server regardless of whether the field is empty or not. 2482 // This may be used to include empty fields in Patch requests. 2483 ForceSendFields []string `json:"-"` 2484 2485 // NullFields is a list of field names (e.g. "Country") to include in 2486 // API requests with the JSON null value. By default, fields with empty 2487 // values are omitted from API requests. However, any field with an 2488 // empty value appearing in NullFields will be sent to the server as 2489 // null. It is an error if a field in this list has a non-empty value. 2490 // This may be used to include null fields in Patch requests. 2491 NullFields []string `json:"-"` 2492} 2493 2494func (s *DatafeedTarget) MarshalJSON() ([]byte, error) { 2495 type NoMethod DatafeedTarget 2496 raw := NoMethod(*s) 2497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2498} 2499 2500type DatafeedsCustomBatchRequest struct { 2501 // Entries: The request entries to be processed in the batch. 2502 Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"` 2503 2504 // ForceSendFields is a list of field names (e.g. "Entries") to 2505 // unconditionally include in API requests. By default, fields with 2506 // empty or default values are omitted from API requests. However, any 2507 // non-pointer, non-interface field appearing in ForceSendFields will be 2508 // sent to the server regardless of whether the field is empty or not. 2509 // This may be used to include empty fields in Patch requests. 2510 ForceSendFields []string `json:"-"` 2511 2512 // NullFields is a list of field names (e.g. "Entries") to include in 2513 // API requests with the JSON null value. By default, fields with empty 2514 // values are omitted from API requests. However, any field with an 2515 // empty value appearing in NullFields will be sent to the server as 2516 // null. It is an error if a field in this list has a non-empty value. 2517 // This may be used to include null fields in Patch requests. 2518 NullFields []string `json:"-"` 2519} 2520 2521func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) { 2522 type NoMethod DatafeedsCustomBatchRequest 2523 raw := NoMethod(*s) 2524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2525} 2526 2527// DatafeedsCustomBatchRequestEntry: A batch entry encoding a single 2528// non-batch datafeeds request. 2529type DatafeedsCustomBatchRequestEntry struct { 2530 // BatchId: An entry ID, unique within the batch request. 2531 BatchId int64 `json:"batchId,omitempty"` 2532 2533 // Datafeed: The data feed to insert. 2534 Datafeed *Datafeed `json:"datafeed,omitempty"` 2535 2536 // DatafeedId: The ID of the data feed to get, delete or fetch. 2537 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2538 2539 // MerchantId: The ID of the managing account. 2540 MerchantId uint64 `json:"merchantId,omitempty,string"` 2541 2542 // Method: The method of the batch entry. Acceptable values are: - 2543 // "delete" - "fetchNow" - "get" - "insert" - "update" 2544 Method string `json:"method,omitempty"` 2545 2546 // ForceSendFields is a list of field names (e.g. "BatchId") to 2547 // unconditionally include in API requests. By default, fields with 2548 // empty or default values are omitted from API requests. However, any 2549 // non-pointer, non-interface field appearing in ForceSendFields will be 2550 // sent to the server regardless of whether the field is empty or not. 2551 // This may be used to include empty fields in Patch requests. 2552 ForceSendFields []string `json:"-"` 2553 2554 // NullFields is a list of field names (e.g. "BatchId") to include in 2555 // API requests with the JSON null value. By default, fields with empty 2556 // values are omitted from API requests. However, any field with an 2557 // empty value appearing in NullFields will be sent to the server as 2558 // null. It is an error if a field in this list has a non-empty value. 2559 // This may be used to include null fields in Patch requests. 2560 NullFields []string `json:"-"` 2561} 2562 2563func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2564 type NoMethod DatafeedsCustomBatchRequestEntry 2565 raw := NoMethod(*s) 2566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2567} 2568 2569type DatafeedsCustomBatchResponse struct { 2570 // Entries: The result of the execution of the batch requests. 2571 Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"` 2572 2573 // Kind: Identifies what kind of resource this is. Value: the fixed 2574 // string "content#datafeedsCustomBatchResponse". 2575 Kind string `json:"kind,omitempty"` 2576 2577 // ServerResponse contains the HTTP response code and headers from the 2578 // server. 2579 googleapi.ServerResponse `json:"-"` 2580 2581 // ForceSendFields is a list of field names (e.g. "Entries") to 2582 // unconditionally include in API requests. By default, fields with 2583 // empty or default values are omitted from API requests. However, any 2584 // non-pointer, non-interface field appearing in ForceSendFields will be 2585 // sent to the server regardless of whether the field is empty or not. 2586 // This may be used to include empty fields in Patch requests. 2587 ForceSendFields []string `json:"-"` 2588 2589 // NullFields is a list of field names (e.g. "Entries") to include in 2590 // API requests with the JSON null value. By default, fields with empty 2591 // values are omitted from API requests. However, any field with an 2592 // empty value appearing in NullFields will be sent to the server as 2593 // null. It is an error if a field in this list has a non-empty value. 2594 // This may be used to include null fields in Patch requests. 2595 NullFields []string `json:"-"` 2596} 2597 2598func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) { 2599 type NoMethod DatafeedsCustomBatchResponse 2600 raw := NoMethod(*s) 2601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2602} 2603 2604// DatafeedsCustomBatchResponseEntry: A batch entry encoding a single 2605// non-batch datafeeds response. 2606type DatafeedsCustomBatchResponseEntry struct { 2607 // BatchId: The ID of the request entry this entry responds to. 2608 BatchId int64 `json:"batchId,omitempty"` 2609 2610 // Datafeed: The requested data feed. Defined if and only if the request 2611 // was successful. 2612 Datafeed *Datafeed `json:"datafeed,omitempty"` 2613 2614 // Errors: A list of errors defined if and only if the request failed. 2615 Errors *Errors `json:"errors,omitempty"` 2616 2617 // ForceSendFields is a list of field names (e.g. "BatchId") to 2618 // unconditionally include in API requests. By default, fields with 2619 // empty or default values are omitted from API requests. However, any 2620 // non-pointer, non-interface field appearing in ForceSendFields will be 2621 // sent to the server regardless of whether the field is empty or not. 2622 // This may be used to include empty fields in Patch requests. 2623 ForceSendFields []string `json:"-"` 2624 2625 // NullFields is a list of field names (e.g. "BatchId") to include in 2626 // API requests with the JSON null value. By default, fields with empty 2627 // values are omitted from API requests. However, any field with an 2628 // empty value appearing in NullFields will be sent to the server as 2629 // null. It is an error if a field in this list has a non-empty value. 2630 // This may be used to include null fields in Patch requests. 2631 NullFields []string `json:"-"` 2632} 2633 2634func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2635 type NoMethod DatafeedsCustomBatchResponseEntry 2636 raw := NoMethod(*s) 2637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2638} 2639 2640type DatafeedsFetchNowResponse struct { 2641 // Kind: Identifies what kind of resource this is. Value: the fixed 2642 // string "content#datafeedsFetchNowResponse". 2643 Kind string `json:"kind,omitempty"` 2644 2645 // ServerResponse contains the HTTP response code and headers from the 2646 // server. 2647 googleapi.ServerResponse `json:"-"` 2648 2649 // ForceSendFields is a list of field names (e.g. "Kind") to 2650 // unconditionally include in API requests. By default, fields with 2651 // empty or default values are omitted from API requests. However, any 2652 // non-pointer, non-interface field appearing in ForceSendFields will be 2653 // sent to the server regardless of whether the field is empty or not. 2654 // This may be used to include empty fields in Patch requests. 2655 ForceSendFields []string `json:"-"` 2656 2657 // NullFields is a list of field names (e.g. "Kind") to include in API 2658 // requests with the JSON null value. By default, fields with empty 2659 // values are omitted from API requests. However, any field with an 2660 // empty value appearing in NullFields will be sent to the server as 2661 // null. It is an error if a field in this list has a non-empty value. 2662 // This may be used to include null fields in Patch requests. 2663 NullFields []string `json:"-"` 2664} 2665 2666func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) { 2667 type NoMethod DatafeedsFetchNowResponse 2668 raw := NoMethod(*s) 2669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2670} 2671 2672type DatafeedsListResponse struct { 2673 // Kind: Identifies what kind of resource this is. Value: the fixed 2674 // string "content#datafeedsListResponse". 2675 Kind string `json:"kind,omitempty"` 2676 2677 // NextPageToken: The token for the retrieval of the next page of 2678 // datafeeds. 2679 NextPageToken string `json:"nextPageToken,omitempty"` 2680 2681 Resources []*Datafeed `json:"resources,omitempty"` 2682 2683 // ServerResponse contains the HTTP response code and headers from the 2684 // server. 2685 googleapi.ServerResponse `json:"-"` 2686 2687 // ForceSendFields is a list of field names (e.g. "Kind") to 2688 // unconditionally include in API requests. By default, fields with 2689 // empty or default values are omitted from API requests. However, any 2690 // non-pointer, non-interface field appearing in ForceSendFields will be 2691 // sent to the server regardless of whether the field is empty or not. 2692 // This may be used to include empty fields in Patch requests. 2693 ForceSendFields []string `json:"-"` 2694 2695 // NullFields is a list of field names (e.g. "Kind") to include in API 2696 // requests with the JSON null value. By default, fields with empty 2697 // values are omitted from API requests. However, any field with an 2698 // empty value appearing in NullFields will be sent to the server as 2699 // null. It is an error if a field in this list has a non-empty value. 2700 // This may be used to include null fields in Patch requests. 2701 NullFields []string `json:"-"` 2702} 2703 2704func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) { 2705 type NoMethod DatafeedsListResponse 2706 raw := NoMethod(*s) 2707 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2708} 2709 2710type DatafeedstatusesCustomBatchRequest struct { 2711 // Entries: The request entries to be processed in the batch. 2712 Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 2713 2714 // ForceSendFields is a list of field names (e.g. "Entries") to 2715 // unconditionally include in API requests. By default, fields with 2716 // empty or default values are omitted from API requests. However, any 2717 // non-pointer, non-interface field appearing in ForceSendFields will be 2718 // sent to the server regardless of whether the field is empty or not. 2719 // This may be used to include empty fields in Patch requests. 2720 ForceSendFields []string `json:"-"` 2721 2722 // NullFields is a list of field names (e.g. "Entries") to include in 2723 // API requests with the JSON null value. By default, fields with empty 2724 // values are omitted from API requests. However, any field with an 2725 // empty value appearing in NullFields will be sent to the server as 2726 // null. It is an error if a field in this list has a non-empty value. 2727 // This may be used to include null fields in Patch requests. 2728 NullFields []string `json:"-"` 2729} 2730 2731func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 2732 type NoMethod DatafeedstatusesCustomBatchRequest 2733 raw := NoMethod(*s) 2734 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2735} 2736 2737// DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a 2738// single non-batch datafeedstatuses request. 2739type DatafeedstatusesCustomBatchRequestEntry struct { 2740 // BatchId: An entry ID, unique within the batch request. 2741 BatchId int64 `json:"batchId,omitempty"` 2742 2743 // Country: The country for which to get the datafeed status. If this 2744 // parameter is provided then language must also be provided. Note that 2745 // for multi-target datafeeds this parameter is required. 2746 Country string `json:"country,omitempty"` 2747 2748 // DatafeedId: The ID of the data feed to get. 2749 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2750 2751 // Language: The language for which to get the datafeed status. If this 2752 // parameter is provided then country must also be provided. Note that 2753 // for multi-target datafeeds this parameter is required. 2754 Language string `json:"language,omitempty"` 2755 2756 // MerchantId: The ID of the managing account. 2757 MerchantId uint64 `json:"merchantId,omitempty,string"` 2758 2759 // Method: The method of the batch entry. Acceptable values are: - 2760 // "get" 2761 Method string `json:"method,omitempty"` 2762 2763 // ForceSendFields is a list of field names (e.g. "BatchId") to 2764 // unconditionally include in API requests. By default, fields with 2765 // empty or default values are omitted from API requests. However, any 2766 // non-pointer, non-interface field appearing in ForceSendFields will be 2767 // sent to the server regardless of whether the field is empty or not. 2768 // This may be used to include empty fields in Patch requests. 2769 ForceSendFields []string `json:"-"` 2770 2771 // NullFields is a list of field names (e.g. "BatchId") to include in 2772 // API requests with the JSON null value. By default, fields with empty 2773 // values are omitted from API requests. However, any field with an 2774 // empty value appearing in NullFields will be sent to the server as 2775 // null. It is an error if a field in this list has a non-empty value. 2776 // This may be used to include null fields in Patch requests. 2777 NullFields []string `json:"-"` 2778} 2779 2780func (s *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2781 type NoMethod DatafeedstatusesCustomBatchRequestEntry 2782 raw := NoMethod(*s) 2783 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2784} 2785 2786type DatafeedstatusesCustomBatchResponse struct { 2787 // Entries: The result of the execution of the batch requests. 2788 Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 2789 2790 // Kind: Identifies what kind of resource this is. Value: the fixed 2791 // string "content#datafeedstatusesCustomBatchResponse". 2792 Kind string `json:"kind,omitempty"` 2793 2794 // ServerResponse contains the HTTP response code and headers from the 2795 // server. 2796 googleapi.ServerResponse `json:"-"` 2797 2798 // ForceSendFields is a list of field names (e.g. "Entries") to 2799 // unconditionally include in API requests. By default, fields with 2800 // empty or default values are omitted from API requests. However, any 2801 // non-pointer, non-interface field appearing in ForceSendFields will be 2802 // sent to the server regardless of whether the field is empty or not. 2803 // This may be used to include empty fields in Patch requests. 2804 ForceSendFields []string `json:"-"` 2805 2806 // NullFields is a list of field names (e.g. "Entries") to include in 2807 // API requests with the JSON null value. By default, fields with empty 2808 // values are omitted from API requests. However, any field with an 2809 // empty value appearing in NullFields will be sent to the server as 2810 // null. It is an error if a field in this list has a non-empty value. 2811 // This may be used to include null fields in Patch requests. 2812 NullFields []string `json:"-"` 2813} 2814 2815func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 2816 type NoMethod DatafeedstatusesCustomBatchResponse 2817 raw := NoMethod(*s) 2818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2819} 2820 2821// DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a 2822// single non-batch datafeedstatuses response. 2823type DatafeedstatusesCustomBatchResponseEntry struct { 2824 // BatchId: The ID of the request entry this entry responds to. 2825 BatchId int64 `json:"batchId,omitempty"` 2826 2827 // DatafeedStatus: The requested data feed status. Defined if and only 2828 // if the request was successful. 2829 DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"` 2830 2831 // Errors: A list of errors defined if and only if the request failed. 2832 Errors *Errors `json:"errors,omitempty"` 2833 2834 // ForceSendFields is a list of field names (e.g. "BatchId") to 2835 // unconditionally include in API requests. By default, fields with 2836 // empty or default values are omitted from API requests. However, any 2837 // non-pointer, non-interface field appearing in ForceSendFields will be 2838 // sent to the server regardless of whether the field is empty or not. 2839 // This may be used to include empty fields in Patch requests. 2840 ForceSendFields []string `json:"-"` 2841 2842 // NullFields is a list of field names (e.g. "BatchId") to include in 2843 // API requests with the JSON null value. By default, fields with empty 2844 // values are omitted from API requests. However, any field with an 2845 // empty value appearing in NullFields will be sent to the server as 2846 // null. It is an error if a field in this list has a non-empty value. 2847 // This may be used to include null fields in Patch requests. 2848 NullFields []string `json:"-"` 2849} 2850 2851func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2852 type NoMethod DatafeedstatusesCustomBatchResponseEntry 2853 raw := NoMethod(*s) 2854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2855} 2856 2857type DatafeedstatusesListResponse struct { 2858 // Kind: Identifies what kind of resource this is. Value: the fixed 2859 // string "content#datafeedstatusesListResponse". 2860 Kind string `json:"kind,omitempty"` 2861 2862 // NextPageToken: The token for the retrieval of the next page of 2863 // datafeed statuses. 2864 NextPageToken string `json:"nextPageToken,omitempty"` 2865 2866 Resources []*DatafeedStatus `json:"resources,omitempty"` 2867 2868 // ServerResponse contains the HTTP response code and headers from the 2869 // server. 2870 googleapi.ServerResponse `json:"-"` 2871 2872 // ForceSendFields is a list of field names (e.g. "Kind") to 2873 // unconditionally include in API requests. By default, fields with 2874 // empty or default values are omitted from API requests. However, any 2875 // non-pointer, non-interface field appearing in ForceSendFields will be 2876 // sent to the server regardless of whether the field is empty or not. 2877 // This may be used to include empty fields in Patch requests. 2878 ForceSendFields []string `json:"-"` 2879 2880 // NullFields is a list of field names (e.g. "Kind") to include in API 2881 // requests with the JSON null value. By default, fields with empty 2882 // values are omitted from API requests. However, any field with an 2883 // empty value appearing in NullFields will be sent to the server as 2884 // null. It is an error if a field in this list has a non-empty value. 2885 // This may be used to include null fields in Patch requests. 2886 NullFields []string `json:"-"` 2887} 2888 2889func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) { 2890 type NoMethod DatafeedstatusesListResponse 2891 raw := NoMethod(*s) 2892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2893} 2894 2895type DeliveryTime struct { 2896 // CutoffTime: Business days cutoff time definition. If not configured 2897 // the cutoff time will be defaulted to 8AM PST. 2898 CutoffTime *CutoffTime `json:"cutoffTime,omitempty"` 2899 2900 // HandlingBusinessDayConfig: The business days during which orders can 2901 // be handled. If not provided, Monday to Friday business days will be 2902 // assumed. 2903 HandlingBusinessDayConfig *BusinessDayConfig `json:"handlingBusinessDayConfig,omitempty"` 2904 2905 // HolidayCutoffs: Holiday cutoff definitions. If configured, they 2906 // specify order cutoff times for holiday-specific shipping. 2907 HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"` 2908 2909 // MaxHandlingTimeInDays: Maximum number of business days spent before 2910 // an order is shipped. 0 means same day shipped, 1 means next day 2911 // shipped. Must be greater than or equal to `minHandlingTimeInDays`. 2912 MaxHandlingTimeInDays int64 `json:"maxHandlingTimeInDays,omitempty"` 2913 2914 // MaxTransitTimeInDays: Maximum number of business days that is spent 2915 // in transit. 0 means same day delivery, 1 means next day delivery. 2916 // Must be greater than or equal to `minTransitTimeInDays`. 2917 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 2918 2919 // MinHandlingTimeInDays: Minimum number of business days spent before 2920 // an order is shipped. 0 means same day shipped, 1 means next day 2921 // shipped. 2922 MinHandlingTimeInDays int64 `json:"minHandlingTimeInDays,omitempty"` 2923 2924 // MinTransitTimeInDays: Minimum number of business days that is spent 2925 // in transit. 0 means same day delivery, 1 means next day delivery. 2926 // Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be 2927 // set, but not both. 2928 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 2929 2930 // TransitBusinessDayConfig: The business days during which orders can 2931 // be in-transit. If not provided, Monday to Friday business days will 2932 // be assumed. 2933 TransitBusinessDayConfig *BusinessDayConfig `json:"transitBusinessDayConfig,omitempty"` 2934 2935 // TransitTimeTable: Transit time table, number of business days spent 2936 // in transit based on row and column dimensions. Either 2937 // `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but 2938 // not both. 2939 TransitTimeTable *TransitTable `json:"transitTimeTable,omitempty"` 2940 2941 // WarehouseBasedDeliveryTimes: Indicates that the delivery time should 2942 // be calculated per warehouse (shipping origin location) based on the 2943 // settings of the selected carrier. When set, no other transit time 2944 // related field in DeliveryTime should be set. 2945 WarehouseBasedDeliveryTimes []*WarehouseBasedDeliveryTime `json:"warehouseBasedDeliveryTimes,omitempty"` 2946 2947 // ForceSendFields is a list of field names (e.g. "CutoffTime") to 2948 // unconditionally include in API requests. By default, fields with 2949 // empty or default values are omitted from API requests. However, any 2950 // non-pointer, non-interface field appearing in ForceSendFields will be 2951 // sent to the server regardless of whether the field is empty or not. 2952 // This may be used to include empty fields in Patch requests. 2953 ForceSendFields []string `json:"-"` 2954 2955 // NullFields is a list of field names (e.g. "CutoffTime") to include in 2956 // API requests with the JSON null value. By default, fields with empty 2957 // values are omitted from API requests. However, any field with an 2958 // empty value appearing in NullFields will be sent to the server as 2959 // null. It is an error if a field in this list has a non-empty value. 2960 // This may be used to include null fields in Patch requests. 2961 NullFields []string `json:"-"` 2962} 2963 2964func (s *DeliveryTime) MarshalJSON() ([]byte, error) { 2965 type NoMethod DeliveryTime 2966 raw := NoMethod(*s) 2967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2968} 2969 2970// Error: An error returned by the API. 2971type Error struct { 2972 // Domain: The domain of the error. 2973 Domain string `json:"domain,omitempty"` 2974 2975 // Message: A description of the error. 2976 Message string `json:"message,omitempty"` 2977 2978 // Reason: The error code. 2979 Reason string `json:"reason,omitempty"` 2980 2981 // ForceSendFields is a list of field names (e.g. "Domain") to 2982 // unconditionally include in API requests. By default, fields with 2983 // empty or default values are omitted from API requests. However, any 2984 // non-pointer, non-interface field appearing in ForceSendFields will be 2985 // sent to the server regardless of whether the field is empty or not. 2986 // This may be used to include empty fields in Patch requests. 2987 ForceSendFields []string `json:"-"` 2988 2989 // NullFields is a list of field names (e.g. "Domain") to include in API 2990 // requests with the JSON null value. By default, fields with empty 2991 // values are omitted from API requests. However, any field with an 2992 // empty value appearing in NullFields will be sent to the server as 2993 // null. It is an error if a field in this list has a non-empty value. 2994 // This may be used to include null fields in Patch requests. 2995 NullFields []string `json:"-"` 2996} 2997 2998func (s *Error) MarshalJSON() ([]byte, error) { 2999 type NoMethod Error 3000 raw := NoMethod(*s) 3001 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3002} 3003 3004// Errors: A list of errors returned by a failed batch entry. 3005type Errors struct { 3006 // Code: The HTTP status of the first error in `errors`. 3007 Code int64 `json:"code,omitempty"` 3008 3009 // Errors: A list of errors. 3010 Errors []*Error `json:"errors,omitempty"` 3011 3012 // Message: The message of the first error in `errors`. 3013 Message string `json:"message,omitempty"` 3014 3015 // ForceSendFields is a list of field names (e.g. "Code") to 3016 // unconditionally include in API requests. By default, fields with 3017 // empty or default values are omitted from API requests. However, any 3018 // non-pointer, non-interface field appearing in ForceSendFields will be 3019 // sent to the server regardless of whether the field is empty or not. 3020 // This may be used to include empty fields in Patch requests. 3021 ForceSendFields []string `json:"-"` 3022 3023 // NullFields is a list of field names (e.g. "Code") to include in API 3024 // requests with the JSON null value. By default, fields with empty 3025 // values are omitted from API requests. However, any field with an 3026 // empty value appearing in NullFields will be sent to the server as 3027 // null. It is an error if a field in this list has a non-empty value. 3028 // This may be used to include null fields in Patch requests. 3029 NullFields []string `json:"-"` 3030} 3031 3032func (s *Errors) MarshalJSON() ([]byte, error) { 3033 type NoMethod Errors 3034 raw := NoMethod(*s) 3035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3036} 3037 3038type GmbAccounts struct { 3039 // AccountId: The ID of the Merchant Center account. 3040 AccountId uint64 `json:"accountId,omitempty,string"` 3041 3042 // GmbAccounts: A list of GMB accounts which are available to the 3043 // merchant. 3044 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 3045 3046 // ForceSendFields is a list of field names (e.g. "AccountId") to 3047 // unconditionally include in API requests. By default, fields with 3048 // empty or default values are omitted from API requests. However, any 3049 // non-pointer, non-interface field appearing in ForceSendFields will be 3050 // sent to the server regardless of whether the field is empty or not. 3051 // This may be used to include empty fields in Patch requests. 3052 ForceSendFields []string `json:"-"` 3053 3054 // NullFields is a list of field names (e.g. "AccountId") to include in 3055 // API requests with the JSON null value. By default, fields with empty 3056 // values are omitted from API requests. However, any field with an 3057 // empty value appearing in NullFields will be sent to the server as 3058 // null. It is an error if a field in this list has a non-empty value. 3059 // This may be used to include null fields in Patch requests. 3060 NullFields []string `json:"-"` 3061} 3062 3063func (s *GmbAccounts) MarshalJSON() ([]byte, error) { 3064 type NoMethod GmbAccounts 3065 raw := NoMethod(*s) 3066 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3067} 3068 3069type GmbAccountsGmbAccount struct { 3070 // Email: The email which identifies the GMB account. 3071 Email string `json:"email,omitempty"` 3072 3073 // ListingCount: Number of listings under this account. 3074 ListingCount uint64 `json:"listingCount,omitempty,string"` 3075 3076 // Name: The name of the GMB account. 3077 Name string `json:"name,omitempty"` 3078 3079 // Type: The type of the GMB account (User or Business). 3080 Type string `json:"type,omitempty"` 3081 3082 // ForceSendFields is a list of field names (e.g. "Email") to 3083 // unconditionally include in API requests. By default, fields with 3084 // empty or default values are omitted from API requests. However, any 3085 // non-pointer, non-interface field appearing in ForceSendFields will be 3086 // sent to the server regardless of whether the field is empty or not. 3087 // This may be used to include empty fields in Patch requests. 3088 ForceSendFields []string `json:"-"` 3089 3090 // NullFields is a list of field names (e.g. "Email") to include in API 3091 // requests with the JSON null value. By default, fields with empty 3092 // values are omitted from API requests. However, any field with an 3093 // empty value appearing in NullFields will be sent to the server as 3094 // null. It is an error if a field in this list has a non-empty value. 3095 // This may be used to include null fields in Patch requests. 3096 NullFields []string `json:"-"` 3097} 3098 3099func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) { 3100 type NoMethod GmbAccountsGmbAccount 3101 raw := NoMethod(*s) 3102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3103} 3104 3105// Headers: A non-empty list of row or column headers for a table. 3106// Exactly one of `prices`, `weights`, `numItems`, 3107// `postalCodeGroupNames`, or `location` must be set. 3108type Headers struct { 3109 // Locations: A list of location ID sets. Must be non-empty. Can only be 3110 // set if all other fields are not set. 3111 Locations []*LocationIdSet `json:"locations,omitempty"` 3112 3113 // NumberOfItems: A list of inclusive number of items upper bounds. The 3114 // last value can be "infinity". For example `["10", "50", 3115 // "infinity"]` represents the headers "<= 10 items", "<= 50 items", and 3116 // "> 50 items". Must be non-empty. Can only be set if all other fields 3117 // are not set. 3118 NumberOfItems []string `json:"numberOfItems,omitempty"` 3119 3120 // PostalCodeGroupNames: A list of postal group names. The last value 3121 // can be "all other locations". Example: `["zone 1", "zone 2", "all 3122 // other locations"]`. The referred postal code groups must match the 3123 // delivery country of the service. Must be non-empty. Can only be set 3124 // if all other fields are not set. 3125 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 3126 3127 // Prices: A list of inclusive order price upper bounds. The last 3128 // price's value can be "infinity". For example `[{"value": "10", 3129 // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": 3130 // "infinity", "currency": "USD"}]` represents the headers "<= $10", "<= 3131 // $500", and "> $500". All prices within a service must have the same 3132 // currency. Must be non-empty. Can only be set if all other fields are 3133 // not set. 3134 Prices []*Price `json:"prices,omitempty"` 3135 3136 // Weights: A list of inclusive order weight upper bounds. The last 3137 // weight's value can be "infinity". For example `[{"value": "10", 3138 // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", 3139 // "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 3140 // 50kg". All weights within a service must have the same unit. Must be 3141 // non-empty. Can only be set if all other fields are not set. 3142 Weights []*Weight `json:"weights,omitempty"` 3143 3144 // ForceSendFields is a list of field names (e.g. "Locations") to 3145 // unconditionally include in API requests. By default, fields with 3146 // empty or default values are omitted from API requests. However, any 3147 // non-pointer, non-interface field appearing in ForceSendFields will be 3148 // sent to the server regardless of whether the field is empty or not. 3149 // This may be used to include empty fields in Patch requests. 3150 ForceSendFields []string `json:"-"` 3151 3152 // NullFields is a list of field names (e.g. "Locations") to include in 3153 // API requests with the JSON null value. By default, fields with empty 3154 // values are omitted from API requests. However, any field with an 3155 // empty value appearing in NullFields will be sent to the server as 3156 // null. It is an error if a field in this list has a non-empty value. 3157 // This may be used to include null fields in Patch requests. 3158 NullFields []string `json:"-"` 3159} 3160 3161func (s *Headers) MarshalJSON() ([]byte, error) { 3162 type NoMethod Headers 3163 raw := NoMethod(*s) 3164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3165} 3166 3167type HolidayCutoff struct { 3168 // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g. 3169 // "2016-11-29" for 29th November 2016. Required. 3170 DeadlineDate string `json:"deadlineDate,omitempty"` 3171 3172 // DeadlineHour: Hour of the day on the deadline date until which the 3173 // order has to be placed to qualify for the delivery guarantee. 3174 // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. 3175 // Required. 3176 DeadlineHour int64 `json:"deadlineHour,omitempty"` 3177 3178 // DeadlineTimezone: Timezone identifier for the deadline hour. A list 3179 // of identifiers can be found in the AdWords API documentation. E.g. 3180 // "Europe/Zurich". Required. 3181 DeadlineTimezone string `json:"deadlineTimezone,omitempty"` 3182 3183 // HolidayId: Unique identifier for the holiday. Required. 3184 HolidayId string `json:"holidayId,omitempty"` 3185 3186 // VisibleFromDate: Date on which the deadline will become visible to 3187 // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October 3188 // 2016. Required. 3189 VisibleFromDate string `json:"visibleFromDate,omitempty"` 3190 3191 // ForceSendFields is a list of field names (e.g. "DeadlineDate") to 3192 // unconditionally include in API requests. By default, fields with 3193 // empty or default values are omitted from API requests. However, any 3194 // non-pointer, non-interface field appearing in ForceSendFields will be 3195 // sent to the server regardless of whether the field is empty or not. 3196 // This may be used to include empty fields in Patch requests. 3197 ForceSendFields []string `json:"-"` 3198 3199 // NullFields is a list of field names (e.g. "DeadlineDate") to include 3200 // in API requests with the JSON null value. By default, fields with 3201 // empty values are omitted from API requests. However, any field with 3202 // an empty value appearing in NullFields will be sent to the server as 3203 // null. It is an error if a field in this list has a non-empty value. 3204 // This may be used to include null fields in Patch requests. 3205 NullFields []string `json:"-"` 3206} 3207 3208func (s *HolidayCutoff) MarshalJSON() ([]byte, error) { 3209 type NoMethod HolidayCutoff 3210 raw := NoMethod(*s) 3211 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3212} 3213 3214type HolidaysHoliday struct { 3215 // CountryCode: The CLDR territory code of the country in which the 3216 // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can 3217 // only be configured in a shipping settings service with matching 3218 // delivery country. Always present. 3219 CountryCode string `json:"countryCode,omitempty"` 3220 3221 // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for 3222 // Christmas 2016. Always present. 3223 Date string `json:"date,omitempty"` 3224 3225 // DeliveryGuaranteeDate: Date on which the order has to arrive at the 3226 // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December 3227 // 2016. Always present. 3228 DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"` 3229 3230 // DeliveryGuaranteeHour: Hour of the day in the delivery location's 3231 // timezone on the guaranteed delivery date by which the order has to 3232 // arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 3233 // 12 (noon), 13, ..., 23. Always present. 3234 DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"` 3235 3236 // Id: Unique identifier for the holiday to be used when configuring 3237 // holiday cutoffs. Always present. 3238 Id string `json:"id,omitempty"` 3239 3240 // Type: The holiday type. Always present. Acceptable values are: - 3241 // "Christmas" - "Easter" - "Father's Day" - "Halloween" - 3242 // "Independence Day (USA)" - "Mother's Day" - "Thanksgiving" - 3243 // "Valentine's Day" 3244 Type string `json:"type,omitempty"` 3245 3246 // ForceSendFields is a list of field names (e.g. "CountryCode") to 3247 // unconditionally include in API requests. By default, fields with 3248 // empty or default values are omitted from API requests. However, any 3249 // non-pointer, non-interface field appearing in ForceSendFields will be 3250 // sent to the server regardless of whether the field is empty or not. 3251 // This may be used to include empty fields in Patch requests. 3252 ForceSendFields []string `json:"-"` 3253 3254 // NullFields is a list of field names (e.g. "CountryCode") to include 3255 // in API requests with the JSON null value. By default, fields with 3256 // empty values are omitted from API requests. However, any field with 3257 // an empty value appearing in NullFields will be sent to the server as 3258 // null. It is an error if a field in this list has a non-empty value. 3259 // This may be used to include null fields in Patch requests. 3260 NullFields []string `json:"-"` 3261} 3262 3263func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { 3264 type NoMethod HolidaysHoliday 3265 raw := NoMethod(*s) 3266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3267} 3268 3269type Installment struct { 3270 // Amount: The amount the buyer has to pay per month. 3271 Amount *Price `json:"amount,omitempty"` 3272 3273 // Months: The number of installments the buyer has to pay. 3274 Months int64 `json:"months,omitempty,string"` 3275 3276 // ForceSendFields is a list of field names (e.g. "Amount") to 3277 // unconditionally include in API requests. By default, fields with 3278 // empty or default values are omitted from API requests. However, any 3279 // non-pointer, non-interface field appearing in ForceSendFields will be 3280 // sent to the server regardless of whether the field is empty or not. 3281 // This may be used to include empty fields in Patch requests. 3282 ForceSendFields []string `json:"-"` 3283 3284 // NullFields is a list of field names (e.g. "Amount") to include in API 3285 // requests with the JSON null value. By default, fields with empty 3286 // values are omitted from API requests. However, any field with an 3287 // empty value appearing in NullFields will be sent to the server as 3288 // null. It is an error if a field in this list has a non-empty value. 3289 // This may be used to include null fields in Patch requests. 3290 NullFields []string `json:"-"` 3291} 3292 3293func (s *Installment) MarshalJSON() ([]byte, error) { 3294 type NoMethod Installment 3295 raw := NoMethod(*s) 3296 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3297} 3298 3299type Inventory struct { 3300 // Availability: The availability of the product. Acceptable values are: 3301 // - "in stock" - "out of stock" - "preorder" 3302 Availability string `json:"availability,omitempty"` 3303 3304 // CustomLabel0: Custom label 0 for custom grouping of items in a 3305 // Shopping campaign. Only supported for online products. 3306 CustomLabel0 string `json:"customLabel0,omitempty"` 3307 3308 // CustomLabel1: Custom label 1 for custom grouping of items in a 3309 // Shopping campaign. Only supported for online products. 3310 CustomLabel1 string `json:"customLabel1,omitempty"` 3311 3312 // CustomLabel2: Custom label 2 for custom grouping of items in a 3313 // Shopping campaign. Only supported for online products. 3314 CustomLabel2 string `json:"customLabel2,omitempty"` 3315 3316 // CustomLabel3: Custom label 3 for custom grouping of items in a 3317 // Shopping campaign. Only supported for online products. 3318 CustomLabel3 string `json:"customLabel3,omitempty"` 3319 3320 // CustomLabel4: Custom label 3 for custom grouping of items in a 3321 // Shopping campaign. Only supported for online products. 3322 CustomLabel4 string `json:"customLabel4,omitempty"` 3323 3324 // Installment: Number and amount of installments to pay for an item. 3325 // Brazil only. 3326 Installment *Installment `json:"installment,omitempty"` 3327 3328 // InstoreProductLocation: The instore product location. Supported only 3329 // for local products. 3330 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3331 3332 // Kind: Identifies what kind of resource this is. Value: the fixed 3333 // string "content#inventory" 3334 Kind string `json:"kind,omitempty"` 3335 3336 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3337 // item. Japan only. 3338 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3339 3340 // Pickup: Store pickup information. Only supported for local inventory. 3341 // Not setting `pickup` means "don't update" while setting it to the 3342 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3343 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3344 // supported". 3345 Pickup *InventoryPickup `json:"pickup,omitempty"` 3346 3347 // Price: The price of the product. 3348 Price *Price `json:"price,omitempty"` 3349 3350 // Quantity: The quantity of the product. Must be equal to or greater 3351 // than zero. Supported only for local products. 3352 Quantity int64 `json:"quantity,omitempty"` 3353 3354 // SalePrice: The sale price of the product. Mandatory if 3355 // `sale_price_effective_date` is defined. 3356 SalePrice *Price `json:"salePrice,omitempty"` 3357 3358 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3359 // 8601 dates separated by a space, comma, or slash. Both dates might be 3360 // specified as 'null' if undecided. 3361 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3362 3363 // SellOnGoogleQuantity: The quantity of the product that is available 3364 // for selling on Google. Supported only for online products. 3365 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3366 3367 // ForceSendFields is a list of field names (e.g. "Availability") to 3368 // unconditionally include in API requests. By default, fields with 3369 // empty or default values are omitted from API requests. However, any 3370 // non-pointer, non-interface field appearing in ForceSendFields will be 3371 // sent to the server regardless of whether the field is empty or not. 3372 // This may be used to include empty fields in Patch requests. 3373 ForceSendFields []string `json:"-"` 3374 3375 // NullFields is a list of field names (e.g. "Availability") to include 3376 // in API requests with the JSON null value. By default, fields with 3377 // empty values are omitted from API requests. However, any field with 3378 // an empty value appearing in NullFields will be sent to the server as 3379 // null. It is an error if a field in this list has a non-empty value. 3380 // This may be used to include null fields in Patch requests. 3381 NullFields []string `json:"-"` 3382} 3383 3384func (s *Inventory) MarshalJSON() ([]byte, error) { 3385 type NoMethod Inventory 3386 raw := NoMethod(*s) 3387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3388} 3389 3390type InventoryCustomBatchRequest struct { 3391 // Entries: The request entries to be processed in the batch. 3392 Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"` 3393 3394 // ForceSendFields is a list of field names (e.g. "Entries") to 3395 // unconditionally include in API requests. By default, fields with 3396 // empty or default values are omitted from API requests. However, any 3397 // non-pointer, non-interface field appearing in ForceSendFields will be 3398 // sent to the server regardless of whether the field is empty or not. 3399 // This may be used to include empty fields in Patch requests. 3400 ForceSendFields []string `json:"-"` 3401 3402 // NullFields is a list of field names (e.g. "Entries") to include in 3403 // API requests with the JSON null value. By default, fields with empty 3404 // values are omitted from API requests. However, any field with an 3405 // empty value appearing in NullFields will be sent to the server as 3406 // null. It is an error if a field in this list has a non-empty value. 3407 // This may be used to include null fields in Patch requests. 3408 NullFields []string `json:"-"` 3409} 3410 3411func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { 3412 type NoMethod InventoryCustomBatchRequest 3413 raw := NoMethod(*s) 3414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3415} 3416 3417// InventoryCustomBatchRequestEntry: A batch entry encoding a single 3418// non-batch inventory request. 3419type InventoryCustomBatchRequestEntry struct { 3420 // BatchId: An entry ID, unique within the batch request. 3421 BatchId int64 `json:"batchId,omitempty"` 3422 3423 // Inventory: Price and availability of the product. 3424 Inventory *Inventory `json:"inventory,omitempty"` 3425 3426 // MerchantId: The ID of the managing account. 3427 MerchantId uint64 `json:"merchantId,omitempty,string"` 3428 3429 // ProductId: The ID of the product for which to update price and 3430 // availability. 3431 ProductId string `json:"productId,omitempty"` 3432 3433 // StoreCode: The code of the store for which to update price and 3434 // availability. Use `online` to update price and availability of an 3435 // online product. 3436 StoreCode string `json:"storeCode,omitempty"` 3437 3438 // ForceSendFields is a list of field names (e.g. "BatchId") to 3439 // unconditionally include in API requests. By default, fields with 3440 // empty or default values are omitted from API requests. However, any 3441 // non-pointer, non-interface field appearing in ForceSendFields will be 3442 // sent to the server regardless of whether the field is empty or not. 3443 // This may be used to include empty fields in Patch requests. 3444 ForceSendFields []string `json:"-"` 3445 3446 // NullFields is a list of field names (e.g. "BatchId") to include in 3447 // API requests with the JSON null value. By default, fields with empty 3448 // values are omitted from API requests. However, any field with an 3449 // empty value appearing in NullFields will be sent to the server as 3450 // null. It is an error if a field in this list has a non-empty value. 3451 // This may be used to include null fields in Patch requests. 3452 NullFields []string `json:"-"` 3453} 3454 3455func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 3456 type NoMethod InventoryCustomBatchRequestEntry 3457 raw := NoMethod(*s) 3458 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3459} 3460 3461type InventoryCustomBatchResponse struct { 3462 // Entries: The result of the execution of the batch requests. 3463 Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"` 3464 3465 // Kind: Identifies what kind of resource this is. Value: the fixed 3466 // string "content#inventoryCustomBatchResponse". 3467 Kind string `json:"kind,omitempty"` 3468 3469 // ServerResponse contains the HTTP response code and headers from the 3470 // server. 3471 googleapi.ServerResponse `json:"-"` 3472 3473 // ForceSendFields is a list of field names (e.g. "Entries") to 3474 // unconditionally include in API requests. By default, fields with 3475 // empty or default values are omitted from API requests. However, any 3476 // non-pointer, non-interface field appearing in ForceSendFields will be 3477 // sent to the server regardless of whether the field is empty or not. 3478 // This may be used to include empty fields in Patch requests. 3479 ForceSendFields []string `json:"-"` 3480 3481 // NullFields is a list of field names (e.g. "Entries") to include in 3482 // API requests with the JSON null value. By default, fields with empty 3483 // values are omitted from API requests. However, any field with an 3484 // empty value appearing in NullFields will be sent to the server as 3485 // null. It is an error if a field in this list has a non-empty value. 3486 // This may be used to include null fields in Patch requests. 3487 NullFields []string `json:"-"` 3488} 3489 3490func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { 3491 type NoMethod InventoryCustomBatchResponse 3492 raw := NoMethod(*s) 3493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3494} 3495 3496// InventoryCustomBatchResponseEntry: A batch entry encoding a single 3497// non-batch inventory response. 3498type InventoryCustomBatchResponseEntry struct { 3499 // BatchId: The ID of the request entry this entry responds to. 3500 BatchId int64 `json:"batchId,omitempty"` 3501 3502 // Errors: A list of errors defined if and only if the request failed. 3503 Errors *Errors `json:"errors,omitempty"` 3504 3505 // Kind: Identifies what kind of resource this is. Value: the fixed 3506 // string "content#inventoryCustomBatchResponseEntry" 3507 Kind string `json:"kind,omitempty"` 3508 3509 // ForceSendFields is a list of field names (e.g. "BatchId") to 3510 // unconditionally include in API requests. By default, fields with 3511 // empty or default values are omitted from API requests. However, any 3512 // non-pointer, non-interface field appearing in ForceSendFields will be 3513 // sent to the server regardless of whether the field is empty or not. 3514 // This may be used to include empty fields in Patch requests. 3515 ForceSendFields []string `json:"-"` 3516 3517 // NullFields is a list of field names (e.g. "BatchId") to include in 3518 // API requests with the JSON null value. By default, fields with empty 3519 // values are omitted from API requests. However, any field with an 3520 // empty value appearing in NullFields will be sent to the server as 3521 // null. It is an error if a field in this list has a non-empty value. 3522 // This may be used to include null fields in Patch requests. 3523 NullFields []string `json:"-"` 3524} 3525 3526func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 3527 type NoMethod InventoryCustomBatchResponseEntry 3528 raw := NoMethod(*s) 3529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3530} 3531 3532type InventoryPickup struct { 3533 // PickupMethod: Whether store pickup is available for this offer and 3534 // whether the pickup option should be shown as buy, reserve, or not 3535 // supported. Only supported for local inventory. Unless the value is 3536 // "not supported", must be submitted together with `pickupSla`. 3537 // Acceptable values are: - "buy" - "not supported" - "reserve" - 3538 // "ship to store" 3539 PickupMethod string `json:"pickupMethod,omitempty"` 3540 3541 // PickupSla: The expected date that an order will be ready for pickup, 3542 // relative to when the order is placed. Only supported for local 3543 // inventory. Must be submitted together with `pickupMethod`. Acceptable 3544 // values are: - "five day" - "four day" - "multi day" - "multi 3545 // week" - "next day" - "same day" - "seven day" - "six day" - 3546 // "three day" - "two day" 3547 PickupSla string `json:"pickupSla,omitempty"` 3548 3549 // ForceSendFields is a list of field names (e.g. "PickupMethod") to 3550 // unconditionally include in API requests. By default, fields with 3551 // empty or default values are omitted from API requests. However, any 3552 // non-pointer, non-interface field appearing in ForceSendFields will be 3553 // sent to the server regardless of whether the field is empty or not. 3554 // This may be used to include empty fields in Patch requests. 3555 ForceSendFields []string `json:"-"` 3556 3557 // NullFields is a list of field names (e.g. "PickupMethod") to include 3558 // in API requests with the JSON null value. By default, fields with 3559 // empty values are omitted from API requests. However, any field with 3560 // an empty value appearing in NullFields will be sent to the server as 3561 // null. It is an error if a field in this list has a non-empty value. 3562 // This may be used to include null fields in Patch requests. 3563 NullFields []string `json:"-"` 3564} 3565 3566func (s *InventoryPickup) MarshalJSON() ([]byte, error) { 3567 type NoMethod InventoryPickup 3568 raw := NoMethod(*s) 3569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3570} 3571 3572type InventorySetRequest struct { 3573 // Availability: The availability of the product. Acceptable values are: 3574 // - "in stock" - "out of stock" - "preorder" 3575 Availability string `json:"availability,omitempty"` 3576 3577 // CustomLabel0: Custom label 0 for custom grouping of items in a 3578 // Shopping campaign. Only supported for online products. 3579 CustomLabel0 string `json:"customLabel0,omitempty"` 3580 3581 // CustomLabel1: Custom label 1 for custom grouping of items in a 3582 // Shopping campaign. Only supported for online products. 3583 CustomLabel1 string `json:"customLabel1,omitempty"` 3584 3585 // CustomLabel2: Custom label 2 for custom grouping of items in a 3586 // Shopping campaign. Only supported for online products. 3587 CustomLabel2 string `json:"customLabel2,omitempty"` 3588 3589 // CustomLabel3: Custom label 3 for custom grouping of items in a 3590 // Shopping campaign. Only supported for online products. 3591 CustomLabel3 string `json:"customLabel3,omitempty"` 3592 3593 // CustomLabel4: Custom label 3 for custom grouping of items in a 3594 // Shopping campaign. Only supported for online products. 3595 CustomLabel4 string `json:"customLabel4,omitempty"` 3596 3597 // Installment: Number and amount of installments to pay for an item. 3598 // Brazil only. 3599 Installment *Installment `json:"installment,omitempty"` 3600 3601 // InstoreProductLocation: The instore product location. Supported only 3602 // for local products. 3603 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3604 3605 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3606 // item. Japan only. 3607 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3608 3609 // Pickup: Store pickup information. Only supported for local inventory. 3610 // Not setting `pickup` means "don't update" while setting it to the 3611 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3612 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3613 // supported". 3614 Pickup *InventoryPickup `json:"pickup,omitempty"` 3615 3616 // Price: The price of the product. 3617 Price *Price `json:"price,omitempty"` 3618 3619 // Quantity: The quantity of the product. Must be equal to or greater 3620 // than zero. Supported only for local products. 3621 Quantity int64 `json:"quantity,omitempty"` 3622 3623 // SalePrice: The sale price of the product. Mandatory if 3624 // `sale_price_effective_date` is defined. 3625 SalePrice *Price `json:"salePrice,omitempty"` 3626 3627 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3628 // 8601 dates separated by a space, comma, or slash. Both dates might be 3629 // specified as 'null' if undecided. 3630 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3631 3632 // SellOnGoogleQuantity: The quantity of the product that is available 3633 // for selling on Google. Supported only for online products. 3634 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3635 3636 // ForceSendFields is a list of field names (e.g. "Availability") to 3637 // unconditionally include in API requests. By default, fields with 3638 // empty or default values are omitted from API requests. However, any 3639 // non-pointer, non-interface field appearing in ForceSendFields will be 3640 // sent to the server regardless of whether the field is empty or not. 3641 // This may be used to include empty fields in Patch requests. 3642 ForceSendFields []string `json:"-"` 3643 3644 // NullFields is a list of field names (e.g. "Availability") to include 3645 // in API requests with the JSON null value. By default, fields with 3646 // empty values are omitted from API requests. However, any field with 3647 // an empty value appearing in NullFields will be sent to the server as 3648 // null. It is an error if a field in this list has a non-empty value. 3649 // This may be used to include null fields in Patch requests. 3650 NullFields []string `json:"-"` 3651} 3652 3653func (s *InventorySetRequest) MarshalJSON() ([]byte, error) { 3654 type NoMethod InventorySetRequest 3655 raw := NoMethod(*s) 3656 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3657} 3658 3659type InventorySetResponse struct { 3660 // Kind: Identifies what kind of resource this is. Value: the fixed 3661 // string "content#inventorySetResponse". 3662 Kind string `json:"kind,omitempty"` 3663 3664 // ServerResponse contains the HTTP response code and headers from the 3665 // server. 3666 googleapi.ServerResponse `json:"-"` 3667 3668 // ForceSendFields is a list of field names (e.g. "Kind") to 3669 // unconditionally include in API requests. By default, fields with 3670 // empty or default values are omitted from API requests. However, any 3671 // non-pointer, non-interface field appearing in ForceSendFields will be 3672 // sent to the server regardless of whether the field is empty or not. 3673 // This may be used to include empty fields in Patch requests. 3674 ForceSendFields []string `json:"-"` 3675 3676 // NullFields is a list of field names (e.g. "Kind") to include in API 3677 // requests with the JSON null value. By default, fields with empty 3678 // values are omitted from API requests. However, any field with an 3679 // empty value appearing in NullFields will be sent to the server as 3680 // null. It is an error if a field in this list has a non-empty value. 3681 // This may be used to include null fields in Patch requests. 3682 NullFields []string `json:"-"` 3683} 3684 3685func (s *InventorySetResponse) MarshalJSON() ([]byte, error) { 3686 type NoMethod InventorySetResponse 3687 raw := NoMethod(*s) 3688 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3689} 3690 3691type InvoiceSummary struct { 3692 // AdditionalChargeSummaries: Summary of the total amounts of the 3693 // additional charges. 3694 AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` 3695 3696 // CustomerBalance: Deprecated. 3697 CustomerBalance *Amount `json:"customerBalance,omitempty"` 3698 3699 // GoogleBalance: Deprecated. 3700 GoogleBalance *Amount `json:"googleBalance,omitempty"` 3701 3702 // MerchantBalance: Deprecated. 3703 MerchantBalance *Amount `json:"merchantBalance,omitempty"` 3704 3705 // ProductTotal: [required] Total price for the product. 3706 ProductTotal *Amount `json:"productTotal,omitempty"` 3707 3708 // PromotionSummaries: Deprecated. 3709 PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` 3710 3711 // ForceSendFields is a list of field names (e.g. 3712 // "AdditionalChargeSummaries") to unconditionally include in API 3713 // requests. By default, fields with empty or default values are omitted 3714 // from API requests. However, any non-pointer, non-interface field 3715 // appearing in ForceSendFields will be sent to the server regardless of 3716 // whether the field is empty or not. This may be used to include empty 3717 // fields in Patch requests. 3718 ForceSendFields []string `json:"-"` 3719 3720 // NullFields is a list of field names (e.g. 3721 // "AdditionalChargeSummaries") to include in API requests with the JSON 3722 // null value. By default, fields with empty values are omitted from API 3723 // requests. However, any field with an empty value appearing in 3724 // NullFields will be sent to the server as null. It is an error if a 3725 // field in this list has a non-empty value. This may be used to include 3726 // null fields in Patch requests. 3727 NullFields []string `json:"-"` 3728} 3729 3730func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { 3731 type NoMethod InvoiceSummary 3732 raw := NoMethod(*s) 3733 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3734} 3735 3736type InvoiceSummaryAdditionalChargeSummary struct { 3737 // TotalAmount: [required] Total additional charge for this type. 3738 TotalAmount *Amount `json:"totalAmount,omitempty"` 3739 3740 // Type: [required] Type of the additional charge. Acceptable values 3741 // are: - "shipping" 3742 Type string `json:"type,omitempty"` 3743 3744 // ForceSendFields is a list of field names (e.g. "TotalAmount") to 3745 // unconditionally include in API requests. By default, fields with 3746 // empty or default values are omitted from API requests. However, any 3747 // non-pointer, non-interface field appearing in ForceSendFields will be 3748 // sent to the server regardless of whether the field is empty or not. 3749 // This may be used to include empty fields in Patch requests. 3750 ForceSendFields []string `json:"-"` 3751 3752 // NullFields is a list of field names (e.g. "TotalAmount") to include 3753 // in API requests with the JSON null value. By default, fields with 3754 // empty values are omitted from API requests. However, any field with 3755 // an empty value appearing in NullFields will be sent to the server as 3756 // null. It is an error if a field in this list has a non-empty value. 3757 // This may be used to include null fields in Patch requests. 3758 NullFields []string `json:"-"` 3759} 3760 3761func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { 3762 type NoMethod InvoiceSummaryAdditionalChargeSummary 3763 raw := NoMethod(*s) 3764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3765} 3766 3767type LiaAboutPageSettings struct { 3768 // Status: The status of the verification process for the About page. 3769 // Acceptable values are: - "active" - "inactive" - "pending" 3770 Status string `json:"status,omitempty"` 3771 3772 // Url: The URL for the About page. 3773 Url string `json:"url,omitempty"` 3774 3775 // ForceSendFields is a list of field names (e.g. "Status") to 3776 // unconditionally include in API requests. By default, fields with 3777 // empty or default values are omitted from API requests. However, any 3778 // non-pointer, non-interface field appearing in ForceSendFields will be 3779 // sent to the server regardless of whether the field is empty or not. 3780 // This may be used to include empty fields in Patch requests. 3781 ForceSendFields []string `json:"-"` 3782 3783 // NullFields is a list of field names (e.g. "Status") 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 *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { 3793 type NoMethod LiaAboutPageSettings 3794 raw := NoMethod(*s) 3795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3796} 3797 3798type LiaCountrySettings struct { 3799 // About: The settings for the About page. 3800 About *LiaAboutPageSettings `json:"about,omitempty"` 3801 3802 // Country: Required. CLDR country code (e.g. "US"). 3803 Country string `json:"country,omitempty"` 3804 3805 // HostedLocalStorefrontActive: The status of the "Merchant hosted local 3806 // storefront" feature. 3807 HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` 3808 3809 // Inventory: LIA inventory verification settings. 3810 Inventory *LiaInventorySettings `json:"inventory,omitempty"` 3811 3812 // OnDisplayToOrder: LIA "On Display To Order" settings. 3813 OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` 3814 3815 // PosDataProvider: The POS data provider linked with this country. 3816 PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"` 3817 3818 // StorePickupActive: The status of the "Store pickup" feature. 3819 StorePickupActive bool `json:"storePickupActive,omitempty"` 3820 3821 // ForceSendFields is a list of field names (e.g. "About") to 3822 // unconditionally include in API requests. By default, fields with 3823 // empty or default values are omitted from API requests. However, any 3824 // non-pointer, non-interface field appearing in ForceSendFields will be 3825 // sent to the server regardless of whether the field is empty or not. 3826 // This may be used to include empty fields in Patch requests. 3827 ForceSendFields []string `json:"-"` 3828 3829 // NullFields is a list of field names (e.g. "About") to include in API 3830 // requests with the JSON null value. By default, fields with empty 3831 // values are omitted from API requests. However, any field with an 3832 // empty value appearing in NullFields will be sent to the server as 3833 // null. It is an error if a field in this list has a non-empty value. 3834 // This may be used to include null fields in Patch requests. 3835 NullFields []string `json:"-"` 3836} 3837 3838func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { 3839 type NoMethod LiaCountrySettings 3840 raw := NoMethod(*s) 3841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3842} 3843 3844type LiaInventorySettings struct { 3845 // InventoryVerificationContactEmail: The email of the contact for the 3846 // inventory verification process. 3847 InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` 3848 3849 // InventoryVerificationContactName: The name of the contact for the 3850 // inventory verification process. 3851 InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` 3852 3853 // InventoryVerificationContactStatus: The status of the verification 3854 // contact. Acceptable values are: - "active" - "inactive" - 3855 // "pending" 3856 InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` 3857 3858 // Status: The status of the inventory verification process. Acceptable 3859 // values are: - "active" - "inactive" - "pending" 3860 Status string `json:"status,omitempty"` 3861 3862 // ForceSendFields is a list of field names (e.g. 3863 // "InventoryVerificationContactEmail") to unconditionally include in 3864 // API requests. By default, fields with empty or default values are 3865 // omitted from API requests. However, any non-pointer, non-interface 3866 // field appearing in ForceSendFields will be sent to the server 3867 // regardless of whether the field is empty or not. This may be used to 3868 // include empty fields in Patch requests. 3869 ForceSendFields []string `json:"-"` 3870 3871 // NullFields is a list of field names (e.g. 3872 // "InventoryVerificationContactEmail") to include in API requests with 3873 // the JSON null value. By default, fields with empty values are omitted 3874 // from API requests. However, any field with an empty value appearing 3875 // in NullFields will be sent to the server as null. It is an error if a 3876 // field in this list has a non-empty value. This may be used to include 3877 // null fields in Patch requests. 3878 NullFields []string `json:"-"` 3879} 3880 3881func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { 3882 type NoMethod LiaInventorySettings 3883 raw := NoMethod(*s) 3884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3885} 3886 3887type LiaOnDisplayToOrderSettings struct { 3888 // ShippingCostPolicyUrl: Shipping cost and policy URL. 3889 ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` 3890 3891 // Status: The status of the ?On display to order? feature. Acceptable 3892 // values are: - "active" - "inactive" - "pending" 3893 Status string `json:"status,omitempty"` 3894 3895 // ForceSendFields is a list of field names (e.g. 3896 // "ShippingCostPolicyUrl") to unconditionally include in API requests. 3897 // By default, fields with empty or default values are omitted from API 3898 // requests. However, any non-pointer, non-interface field appearing in 3899 // ForceSendFields will be sent to the server regardless of whether the 3900 // field is empty or not. This may be used to include empty fields in 3901 // Patch requests. 3902 ForceSendFields []string `json:"-"` 3903 3904 // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to 3905 // include in API requests with the JSON null value. By default, fields 3906 // with empty values are omitted from API requests. However, any field 3907 // with an empty value appearing in NullFields will be sent to the 3908 // server as null. It is an error if a field in this list has a 3909 // non-empty value. This may be used to include null fields in Patch 3910 // requests. 3911 NullFields []string `json:"-"` 3912} 3913 3914func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { 3915 type NoMethod LiaOnDisplayToOrderSettings 3916 raw := NoMethod(*s) 3917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3918} 3919 3920type LiaPosDataProvider struct { 3921 // PosDataProviderId: The ID of the POS data provider. 3922 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 3923 3924 // PosExternalAccountId: The account ID by which this merchant is known 3925 // to the POS data provider. 3926 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 3927 3928 // ForceSendFields is a list of field names (e.g. "PosDataProviderId") 3929 // to unconditionally include in API requests. By default, fields with 3930 // empty or default values are omitted from API requests. However, any 3931 // non-pointer, non-interface field appearing in ForceSendFields will be 3932 // sent to the server regardless of whether the field is empty or not. 3933 // This may be used to include empty fields in Patch requests. 3934 ForceSendFields []string `json:"-"` 3935 3936 // NullFields is a list of field names (e.g. "PosDataProviderId") to 3937 // include in API requests with the JSON null value. By default, fields 3938 // with empty values are omitted from API requests. However, any field 3939 // with an empty value appearing in NullFields will be sent to the 3940 // server as null. It is an error if a field in this list has a 3941 // non-empty value. This may be used to include null fields in Patch 3942 // requests. 3943 NullFields []string `json:"-"` 3944} 3945 3946func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) { 3947 type NoMethod LiaPosDataProvider 3948 raw := NoMethod(*s) 3949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3950} 3951 3952// LiaSettings: Local Inventory ads (LIA) settings. All methods except 3953// listposdataproviders require the admin role. 3954type LiaSettings struct { 3955 // AccountId: The ID of the account to which these LIA settings belong. 3956 // Ignored upon update, always present in get request responses. 3957 AccountId uint64 `json:"accountId,omitempty,string"` 3958 3959 // CountrySettings: The LIA settings for each country. 3960 CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` 3961 3962 // Kind: Identifies what kind of resource this is. Value: the fixed 3963 // string "content#liaSettings" 3964 Kind string `json:"kind,omitempty"` 3965 3966 // ServerResponse contains the HTTP response code and headers from the 3967 // server. 3968 googleapi.ServerResponse `json:"-"` 3969 3970 // ForceSendFields is a list of field names (e.g. "AccountId") to 3971 // unconditionally include in API requests. By default, fields with 3972 // empty or default values are omitted from API requests. However, any 3973 // non-pointer, non-interface field appearing in ForceSendFields will be 3974 // sent to the server regardless of whether the field is empty or not. 3975 // This may be used to include empty fields in Patch requests. 3976 ForceSendFields []string `json:"-"` 3977 3978 // NullFields is a list of field names (e.g. "AccountId") to include in 3979 // API requests with the JSON null value. By default, fields with empty 3980 // values are omitted from API requests. However, any field with an 3981 // empty value appearing in NullFields will be sent to the server as 3982 // null. It is an error if a field in this list has a non-empty value. 3983 // This may be used to include null fields in Patch requests. 3984 NullFields []string `json:"-"` 3985} 3986 3987func (s *LiaSettings) MarshalJSON() ([]byte, error) { 3988 type NoMethod LiaSettings 3989 raw := NoMethod(*s) 3990 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3991} 3992 3993type LiasettingsCustomBatchRequest struct { 3994 // Entries: The request entries to be processed in the batch. 3995 Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` 3996 3997 // ForceSendFields is a list of field names (e.g. "Entries") to 3998 // unconditionally include in API requests. By default, fields with 3999 // empty or default values are omitted from API requests. However, any 4000 // non-pointer, non-interface field appearing in ForceSendFields will be 4001 // sent to the server regardless of whether the field is empty or not. 4002 // This may be used to include empty fields in Patch requests. 4003 ForceSendFields []string `json:"-"` 4004 4005 // NullFields is a list of field names (e.g. "Entries") to include in 4006 // API requests with the JSON null value. By default, fields with empty 4007 // values are omitted from API requests. However, any field with an 4008 // empty value appearing in NullFields will be sent to the server as 4009 // null. It is an error if a field in this list has a non-empty value. 4010 // This may be used to include null fields in Patch requests. 4011 NullFields []string `json:"-"` 4012} 4013 4014func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 4015 type NoMethod LiasettingsCustomBatchRequest 4016 raw := NoMethod(*s) 4017 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4018} 4019 4020type LiasettingsCustomBatchRequestEntry struct { 4021 // AccountId: The ID of the account for which to get/update account LIA 4022 // settings. 4023 AccountId uint64 `json:"accountId,omitempty,string"` 4024 4025 // BatchId: An entry ID, unique within the batch request. 4026 BatchId int64 `json:"batchId,omitempty"` 4027 4028 // ContactEmail: Inventory validation contact email. Required only for 4029 // SetInventoryValidationContact. 4030 ContactEmail string `json:"contactEmail,omitempty"` 4031 4032 // ContactName: Inventory validation contact name. Required only for 4033 // SetInventoryValidationContact. 4034 ContactName string `json:"contactName,omitempty"` 4035 4036 // Country: The country code. Required only for 4037 // RequestInventoryVerification. 4038 Country string `json:"country,omitempty"` 4039 4040 // GmbEmail: The GMB account. Required only for RequestGmbAccess. 4041 GmbEmail string `json:"gmbEmail,omitempty"` 4042 4043 // LiaSettings: The account Lia settings to update. Only defined if the 4044 // method is `update`. 4045 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4046 4047 // MerchantId: The ID of the managing account. 4048 MerchantId uint64 `json:"merchantId,omitempty,string"` 4049 4050 // Method: The method of the batch entry. Acceptable values are: - 4051 // "get" - "getAccessibleGmbAccounts" - "requestGmbAccess" - 4052 // "requestInventoryVerification" - 4053 // "setInventoryVerificationContact" - "update" 4054 Method string `json:"method,omitempty"` 4055 4056 // PosDataProviderId: The ID of POS data provider. Required only for 4057 // SetPosProvider. 4058 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 4059 4060 // PosExternalAccountId: The account ID by which this merchant is known 4061 // to the POS provider. 4062 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 4063 4064 // ForceSendFields is a list of field names (e.g. "AccountId") to 4065 // unconditionally include in API requests. By default, fields with 4066 // empty or default values are omitted from API requests. However, any 4067 // non-pointer, non-interface field appearing in ForceSendFields will be 4068 // sent to the server regardless of whether the field is empty or not. 4069 // This may be used to include empty fields in Patch requests. 4070 ForceSendFields []string `json:"-"` 4071 4072 // NullFields is a list of field names (e.g. "AccountId") to include in 4073 // API requests with the JSON null value. By default, fields with empty 4074 // values are omitted from API requests. However, any field with an 4075 // empty value appearing in NullFields will be sent to the server as 4076 // null. It is an error if a field in this list has a non-empty value. 4077 // This may be used to include null fields in Patch requests. 4078 NullFields []string `json:"-"` 4079} 4080 4081func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 4082 type NoMethod LiasettingsCustomBatchRequestEntry 4083 raw := NoMethod(*s) 4084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4085} 4086 4087type LiasettingsCustomBatchResponse struct { 4088 // Entries: The result of the execution of the batch requests. 4089 Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` 4090 4091 // Kind: Identifies what kind of resource this is. Value: the fixed 4092 // string "content#liasettingsCustomBatchResponse". 4093 Kind string `json:"kind,omitempty"` 4094 4095 // ServerResponse contains the HTTP response code and headers from the 4096 // server. 4097 googleapi.ServerResponse `json:"-"` 4098 4099 // ForceSendFields is a list of field names (e.g. "Entries") to 4100 // unconditionally include in API requests. By default, fields with 4101 // empty or default values are omitted from API requests. However, any 4102 // non-pointer, non-interface field appearing in ForceSendFields will be 4103 // sent to the server regardless of whether the field is empty or not. 4104 // This may be used to include empty fields in Patch requests. 4105 ForceSendFields []string `json:"-"` 4106 4107 // NullFields is a list of field names (e.g. "Entries") to include in 4108 // API requests with the JSON null value. By default, fields with empty 4109 // values are omitted from API requests. However, any field with an 4110 // empty value appearing in NullFields will be sent to the server as 4111 // null. It is an error if a field in this list has a non-empty value. 4112 // This may be used to include null fields in Patch requests. 4113 NullFields []string `json:"-"` 4114} 4115 4116func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 4117 type NoMethod LiasettingsCustomBatchResponse 4118 raw := NoMethod(*s) 4119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4120} 4121 4122type LiasettingsCustomBatchResponseEntry struct { 4123 // BatchId: The ID of the request entry to which this entry responds. 4124 BatchId int64 `json:"batchId,omitempty"` 4125 4126 // Errors: A list of errors defined if, and only if, the request failed. 4127 Errors *Errors `json:"errors,omitempty"` 4128 4129 // GmbAccounts: The list of accessible GMB accounts. 4130 GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` 4131 4132 // Kind: Identifies what kind of resource this is. Value: the fixed 4133 // string "content#liasettingsCustomBatchResponseEntry" 4134 Kind string `json:"kind,omitempty"` 4135 4136 // LiaSettings: The retrieved or updated Lia settings. 4137 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4138 4139 // PosDataProviders: The list of POS data providers. 4140 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4141 4142 // ForceSendFields is a list of field names (e.g. "BatchId") to 4143 // unconditionally include in API requests. By default, fields with 4144 // empty or default values are omitted from API requests. However, any 4145 // non-pointer, non-interface field appearing in ForceSendFields will be 4146 // sent to the server regardless of whether the field is empty or not. 4147 // This may be used to include empty fields in Patch requests. 4148 ForceSendFields []string `json:"-"` 4149 4150 // NullFields is a list of field names (e.g. "BatchId") to include in 4151 // API requests with the JSON null value. By default, fields with empty 4152 // values are omitted from API requests. However, any field with an 4153 // empty value appearing in NullFields will be sent to the server as 4154 // null. It is an error if a field in this list has a non-empty value. 4155 // This may be used to include null fields in Patch requests. 4156 NullFields []string `json:"-"` 4157} 4158 4159func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 4160 type NoMethod LiasettingsCustomBatchResponseEntry 4161 raw := NoMethod(*s) 4162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4163} 4164 4165type LiasettingsGetAccessibleGmbAccountsResponse struct { 4166 // AccountId: The ID of the Merchant Center account. 4167 AccountId uint64 `json:"accountId,omitempty,string"` 4168 4169 // GmbAccounts: A list of GMB accounts which are available to the 4170 // merchant. 4171 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 4172 4173 // Kind: Identifies what kind of resource this is. Value: the fixed 4174 // string "content#liasettingsGetAccessibleGmbAccountsResponse". 4175 Kind string `json:"kind,omitempty"` 4176 4177 // ServerResponse contains the HTTP response code and headers from the 4178 // server. 4179 googleapi.ServerResponse `json:"-"` 4180 4181 // ForceSendFields is a list of field names (e.g. "AccountId") to 4182 // unconditionally include in API requests. By default, fields with 4183 // empty or default values are omitted from API requests. However, any 4184 // non-pointer, non-interface field appearing in ForceSendFields will be 4185 // sent to the server regardless of whether the field is empty or not. 4186 // This may be used to include empty fields in Patch requests. 4187 ForceSendFields []string `json:"-"` 4188 4189 // NullFields is a list of field names (e.g. "AccountId") to include in 4190 // API requests with the JSON null value. By default, fields with empty 4191 // values are omitted from API requests. However, any field with an 4192 // empty value appearing in NullFields will be sent to the server as 4193 // null. It is an error if a field in this list has a non-empty value. 4194 // This may be used to include null fields in Patch requests. 4195 NullFields []string `json:"-"` 4196} 4197 4198func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { 4199 type NoMethod LiasettingsGetAccessibleGmbAccountsResponse 4200 raw := NoMethod(*s) 4201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4202} 4203 4204type LiasettingsListPosDataProvidersResponse struct { 4205 // Kind: Identifies what kind of resource this is. Value: the fixed 4206 // string "content#liasettingsListPosDataProvidersResponse". 4207 Kind string `json:"kind,omitempty"` 4208 4209 // PosDataProviders: The list of POS data providers for each eligible 4210 // country 4211 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4212 4213 // ServerResponse contains the HTTP response code and headers from the 4214 // server. 4215 googleapi.ServerResponse `json:"-"` 4216 4217 // ForceSendFields is a list of field names (e.g. "Kind") to 4218 // unconditionally include in API requests. By default, fields with 4219 // empty or default values are omitted from API requests. However, any 4220 // non-pointer, non-interface field appearing in ForceSendFields will be 4221 // sent to the server regardless of whether the field is empty or not. 4222 // This may be used to include empty fields in Patch requests. 4223 ForceSendFields []string `json:"-"` 4224 4225 // NullFields is a list of field names (e.g. "Kind") to include in API 4226 // requests with the JSON null value. By default, fields with empty 4227 // values are omitted from API requests. However, any field with an 4228 // empty value appearing in NullFields will be sent to the server as 4229 // null. It is an error if a field in this list has a non-empty value. 4230 // This may be used to include null fields in Patch requests. 4231 NullFields []string `json:"-"` 4232} 4233 4234func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) { 4235 type NoMethod LiasettingsListPosDataProvidersResponse 4236 raw := NoMethod(*s) 4237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4238} 4239 4240type LiasettingsListResponse struct { 4241 // Kind: Identifies what kind of resource this is. Value: the fixed 4242 // string "content#liasettingsListResponse". 4243 Kind string `json:"kind,omitempty"` 4244 4245 // NextPageToken: The token for the retrieval of the next page of LIA 4246 // settings. 4247 NextPageToken string `json:"nextPageToken,omitempty"` 4248 4249 Resources []*LiaSettings `json:"resources,omitempty"` 4250 4251 // ServerResponse contains the HTTP response code and headers from the 4252 // server. 4253 googleapi.ServerResponse `json:"-"` 4254 4255 // ForceSendFields is a list of field names (e.g. "Kind") to 4256 // unconditionally include in API requests. By default, fields with 4257 // empty or default values are omitted from API requests. However, any 4258 // non-pointer, non-interface field appearing in ForceSendFields will be 4259 // sent to the server regardless of whether the field is empty or not. 4260 // This may be used to include empty fields in Patch requests. 4261 ForceSendFields []string `json:"-"` 4262 4263 // NullFields is a list of field names (e.g. "Kind") to include in API 4264 // requests with the JSON null value. By default, fields with empty 4265 // values are omitted from API requests. However, any field with an 4266 // empty value appearing in NullFields will be sent to the server as 4267 // null. It is an error if a field in this list has a non-empty value. 4268 // This may be used to include null fields in Patch requests. 4269 NullFields []string `json:"-"` 4270} 4271 4272func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) { 4273 type NoMethod LiasettingsListResponse 4274 raw := NoMethod(*s) 4275 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4276} 4277 4278type LiasettingsRequestGmbAccessResponse struct { 4279 // Kind: Identifies what kind of resource this is. Value: the fixed 4280 // string "content#liasettingsRequestGmbAccessResponse". 4281 Kind string `json:"kind,omitempty"` 4282 4283 // ServerResponse contains the HTTP response code and headers from the 4284 // server. 4285 googleapi.ServerResponse `json:"-"` 4286 4287 // ForceSendFields is a list of field names (e.g. "Kind") to 4288 // unconditionally include in API requests. By default, fields with 4289 // empty or default values are omitted from API requests. However, any 4290 // non-pointer, non-interface field appearing in ForceSendFields will be 4291 // sent to the server regardless of whether the field is empty or not. 4292 // This may be used to include empty fields in Patch requests. 4293 ForceSendFields []string `json:"-"` 4294 4295 // NullFields is a list of field names (e.g. "Kind") to include in API 4296 // requests with the JSON null value. By default, fields with empty 4297 // values are omitted from API requests. However, any field with an 4298 // empty value appearing in NullFields will be sent to the server as 4299 // null. It is an error if a field in this list has a non-empty value. 4300 // This may be used to include null fields in Patch requests. 4301 NullFields []string `json:"-"` 4302} 4303 4304func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { 4305 type NoMethod LiasettingsRequestGmbAccessResponse 4306 raw := NoMethod(*s) 4307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4308} 4309 4310type LiasettingsRequestInventoryVerificationResponse struct { 4311 // Kind: Identifies what kind of resource this is. Value: the fixed 4312 // string "content#liasettingsRequestInventoryVerificationResponse". 4313 Kind string `json:"kind,omitempty"` 4314 4315 // ServerResponse contains the HTTP response code and headers from the 4316 // server. 4317 googleapi.ServerResponse `json:"-"` 4318 4319 // ForceSendFields is a list of field names (e.g. "Kind") to 4320 // unconditionally include in API requests. By default, fields with 4321 // empty or default values are omitted from API requests. However, any 4322 // non-pointer, non-interface field appearing in ForceSendFields will be 4323 // sent to the server regardless of whether the field is empty or not. 4324 // This may be used to include empty fields in Patch requests. 4325 ForceSendFields []string `json:"-"` 4326 4327 // NullFields is a list of field names (e.g. "Kind") to include in API 4328 // requests with the JSON null value. By default, fields with empty 4329 // values are omitted from API requests. However, any field with an 4330 // empty value appearing in NullFields will be sent to the server as 4331 // null. It is an error if a field in this list has a non-empty value. 4332 // This may be used to include null fields in Patch requests. 4333 NullFields []string `json:"-"` 4334} 4335 4336func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { 4337 type NoMethod LiasettingsRequestInventoryVerificationResponse 4338 raw := NoMethod(*s) 4339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4340} 4341 4342type LiasettingsSetInventoryVerificationContactResponse struct { 4343 // Kind: Identifies what kind of resource this is. Value: the fixed 4344 // string "content#liasettingsSetInventoryVerificationContactResponse". 4345 Kind string `json:"kind,omitempty"` 4346 4347 // ServerResponse contains the HTTP response code and headers from the 4348 // server. 4349 googleapi.ServerResponse `json:"-"` 4350 4351 // ForceSendFields is a list of field names (e.g. "Kind") to 4352 // unconditionally include in API requests. By default, fields with 4353 // empty or default values are omitted from API requests. However, any 4354 // non-pointer, non-interface field appearing in ForceSendFields will be 4355 // sent to the server regardless of whether the field is empty or not. 4356 // This may be used to include empty fields in Patch requests. 4357 ForceSendFields []string `json:"-"` 4358 4359 // NullFields is a list of field names (e.g. "Kind") to include in API 4360 // requests with the JSON null value. By default, fields with empty 4361 // values are omitted from API requests. However, any field with an 4362 // empty value appearing in NullFields will be sent to the server as 4363 // null. It is an error if a field in this list has a non-empty value. 4364 // This may be used to include null fields in Patch requests. 4365 NullFields []string `json:"-"` 4366} 4367 4368func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { 4369 type NoMethod LiasettingsSetInventoryVerificationContactResponse 4370 raw := NoMethod(*s) 4371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4372} 4373 4374type LiasettingsSetPosDataProviderResponse struct { 4375 // Kind: Identifies what kind of resource this is. Value: the fixed 4376 // string "content#liasettingsSetPosDataProviderResponse". 4377 Kind string `json:"kind,omitempty"` 4378 4379 // ServerResponse contains the HTTP response code and headers from the 4380 // server. 4381 googleapi.ServerResponse `json:"-"` 4382 4383 // ForceSendFields is a list of field names (e.g. "Kind") to 4384 // unconditionally include in API requests. By default, fields with 4385 // empty or default values are omitted from API requests. However, any 4386 // non-pointer, non-interface field appearing in ForceSendFields will be 4387 // sent to the server regardless of whether the field is empty or not. 4388 // This may be used to include empty fields in Patch requests. 4389 ForceSendFields []string `json:"-"` 4390 4391 // NullFields is a list of field names (e.g. "Kind") to include in API 4392 // requests with the JSON null value. By default, fields with empty 4393 // values are omitted from API requests. However, any field with an 4394 // empty value appearing in NullFields will be sent to the server as 4395 // null. It is an error if a field in this list has a non-empty value. 4396 // This may be used to include null fields in Patch requests. 4397 NullFields []string `json:"-"` 4398} 4399 4400func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) { 4401 type NoMethod LiasettingsSetPosDataProviderResponse 4402 raw := NoMethod(*s) 4403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4404} 4405 4406type LocationIdSet struct { 4407 // LocationIds: A non-empty list of location IDs. They must all be of 4408 // the same location type (e.g., state). 4409 LocationIds []string `json:"locationIds,omitempty"` 4410 4411 // ForceSendFields is a list of field names (e.g. "LocationIds") to 4412 // unconditionally include in API requests. By default, fields with 4413 // empty or default values are omitted from API requests. However, any 4414 // non-pointer, non-interface field appearing in ForceSendFields will be 4415 // sent to the server regardless of whether the field is empty or not. 4416 // This may be used to include empty fields in Patch requests. 4417 ForceSendFields []string `json:"-"` 4418 4419 // NullFields is a list of field names (e.g. "LocationIds") to include 4420 // in API requests with the JSON null value. By default, fields with 4421 // empty values are omitted from API requests. However, any field with 4422 // an empty value appearing in NullFields will be sent to the server as 4423 // null. It is an error if a field in this list has a non-empty value. 4424 // This may be used to include null fields in Patch requests. 4425 NullFields []string `json:"-"` 4426} 4427 4428func (s *LocationIdSet) MarshalJSON() ([]byte, error) { 4429 type NoMethod LocationIdSet 4430 raw := NoMethod(*s) 4431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4432} 4433 4434type LoyaltyPoints struct { 4435 // Name: Name of loyalty points program. It is recommended to limit the 4436 // name to 12 full-width characters or 24 Roman characters. 4437 Name string `json:"name,omitempty"` 4438 4439 // PointsValue: The retailer's loyalty points in absolute value. 4440 PointsValue int64 `json:"pointsValue,omitempty,string"` 4441 4442 // Ratio: The ratio of a point when converted to currency. Google 4443 // assumes currency based on Merchant Center settings. If ratio is left 4444 // out, it defaults to 1.0. 4445 Ratio float64 `json:"ratio,omitempty"` 4446 4447 // ForceSendFields is a list of field names (e.g. "Name") to 4448 // unconditionally include in API requests. By default, fields with 4449 // empty or default values are omitted from API requests. However, any 4450 // non-pointer, non-interface field appearing in ForceSendFields will be 4451 // sent to the server regardless of whether the field is empty or not. 4452 // This may be used to include empty fields in Patch requests. 4453 ForceSendFields []string `json:"-"` 4454 4455 // NullFields is a list of field names (e.g. "Name") to include in API 4456 // requests with the JSON null value. By default, fields with empty 4457 // values are omitted from API requests. However, any field with an 4458 // empty value appearing in NullFields will be sent to the server as 4459 // null. It is an error if a field in this list has a non-empty value. 4460 // This may be used to include null fields in Patch requests. 4461 NullFields []string `json:"-"` 4462} 4463 4464func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) { 4465 type NoMethod LoyaltyPoints 4466 raw := NoMethod(*s) 4467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4468} 4469 4470func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { 4471 type NoMethod LoyaltyPoints 4472 var s1 struct { 4473 Ratio gensupport.JSONFloat64 `json:"ratio"` 4474 *NoMethod 4475 } 4476 s1.NoMethod = (*NoMethod)(s) 4477 if err := json.Unmarshal(data, &s1); err != nil { 4478 return err 4479 } 4480 s.Ratio = float64(s1.Ratio) 4481 return nil 4482} 4483 4484// MerchantOrderReturn: Order return. Production access (all methods) 4485// requires the order manager role. Sandbox access does not. 4486type MerchantOrderReturn struct { 4487 // CreationDate: The date of creation of the return, in ISO 8601 format. 4488 CreationDate string `json:"creationDate,omitempty"` 4489 4490 // MerchantOrderId: Merchant defined order ID. 4491 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4492 4493 // OrderId: Google order ID. 4494 OrderId string `json:"orderId,omitempty"` 4495 4496 // OrderReturnId: Order return ID generated by Google. 4497 OrderReturnId string `json:"orderReturnId,omitempty"` 4498 4499 // ReturnItems: Items of the return. 4500 ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` 4501 4502 // ReturnShipments: Shipments of the return. 4503 ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` 4504 4505 // ServerResponse contains the HTTP response code and headers from the 4506 // server. 4507 googleapi.ServerResponse `json:"-"` 4508 4509 // ForceSendFields is a list of field names (e.g. "CreationDate") to 4510 // unconditionally include in API requests. By default, fields with 4511 // empty or default values are omitted from API requests. However, any 4512 // non-pointer, non-interface field appearing in ForceSendFields will be 4513 // sent to the server regardless of whether the field is empty or not. 4514 // This may be used to include empty fields in Patch requests. 4515 ForceSendFields []string `json:"-"` 4516 4517 // NullFields is a list of field names (e.g. "CreationDate") to include 4518 // in API requests with the JSON null value. By default, fields with 4519 // empty values are omitted from API requests. However, any field with 4520 // an empty value appearing in NullFields will be sent to the server as 4521 // null. It is an error if a field in this list has a non-empty value. 4522 // This may be used to include null fields in Patch requests. 4523 NullFields []string `json:"-"` 4524} 4525 4526func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) { 4527 type NoMethod MerchantOrderReturn 4528 raw := NoMethod(*s) 4529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4530} 4531 4532type MerchantOrderReturnItem struct { 4533 // CustomerReturnReason: The reason that the customer chooses to return 4534 // an item. 4535 CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` 4536 4537 // ItemId: Product level item ID. If the returned items are of the same 4538 // product, they will have the same ID. 4539 ItemId string `json:"itemId,omitempty"` 4540 4541 // MerchantReturnReason: The reason that merchant chooses to accept a 4542 // return item. 4543 MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` 4544 4545 // Product: Product data from the time of the order placement. 4546 Product *OrderLineItemProduct `json:"product,omitempty"` 4547 4548 // ReturnShipmentIds: IDs of the return shipments that this return item 4549 // belongs to. 4550 ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` 4551 4552 // State: State of the item. Acceptable values are: - "canceled" - 4553 // "new" - "received" - "refunded" - "rejected" 4554 State string `json:"state,omitempty"` 4555 4556 // ForceSendFields is a list of field names (e.g. 4557 // "CustomerReturnReason") to unconditionally include in API requests. 4558 // By default, fields with empty or default values are omitted from API 4559 // requests. However, any non-pointer, non-interface field appearing in 4560 // ForceSendFields will be sent to the server regardless of whether the 4561 // field is empty or not. This may be used to include empty fields in 4562 // Patch requests. 4563 ForceSendFields []string `json:"-"` 4564 4565 // NullFields is a list of field names (e.g. "CustomerReturnReason") to 4566 // include in API requests with the JSON null value. By default, fields 4567 // with empty values are omitted from API requests. However, any field 4568 // with an empty value appearing in NullFields will be sent to the 4569 // server as null. It is an error if a field in this list has a 4570 // non-empty value. This may be used to include null fields in Patch 4571 // requests. 4572 NullFields []string `json:"-"` 4573} 4574 4575func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { 4576 type NoMethod MerchantOrderReturnItem 4577 raw := NoMethod(*s) 4578 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4579} 4580 4581type MinimumOrderValueTable struct { 4582 StoreCodeSetWithMovs []*MinimumOrderValueTableStoreCodeSetWithMov `json:"storeCodeSetWithMovs,omitempty"` 4583 4584 // ForceSendFields is a list of field names (e.g. 4585 // "StoreCodeSetWithMovs") to unconditionally include in API requests. 4586 // By default, fields with empty or default values are omitted from API 4587 // requests. However, any non-pointer, non-interface field appearing in 4588 // ForceSendFields will be sent to the server regardless of whether the 4589 // field is empty or not. This may be used to include empty fields in 4590 // Patch requests. 4591 ForceSendFields []string `json:"-"` 4592 4593 // NullFields is a list of field names (e.g. "StoreCodeSetWithMovs") to 4594 // include in API requests with the JSON null value. By default, fields 4595 // with empty values are omitted from API requests. However, any field 4596 // with an empty value appearing in NullFields will be sent to the 4597 // server as null. It is an error if a field in this list has a 4598 // non-empty value. This may be used to include null fields in Patch 4599 // requests. 4600 NullFields []string `json:"-"` 4601} 4602 4603func (s *MinimumOrderValueTable) MarshalJSON() ([]byte, error) { 4604 type NoMethod MinimumOrderValueTable 4605 raw := NoMethod(*s) 4606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4607} 4608 4609// MinimumOrderValueTableStoreCodeSetWithMov: A list of store code sets 4610// sharing the same minimum order value. At least two sets are required 4611// and the last one must be empty, which signifies 'MOV for all other 4612// stores'. Each store code can only appear once across all the sets. 4613// All prices within a service must have the same currency. 4614type MinimumOrderValueTableStoreCodeSetWithMov struct { 4615 // StoreCodes: A list of unique store codes or empty for the catch all. 4616 StoreCodes []string `json:"storeCodes,omitempty"` 4617 4618 // Value: The minimum order value for the given stores. 4619 Value *Price `json:"value,omitempty"` 4620 4621 // ForceSendFields is a list of field names (e.g. "StoreCodes") to 4622 // unconditionally include in API requests. By default, fields with 4623 // empty or default values are omitted from API requests. However, any 4624 // non-pointer, non-interface field appearing in ForceSendFields will be 4625 // sent to the server regardless of whether the field is empty or not. 4626 // This may be used to include empty fields in Patch requests. 4627 ForceSendFields []string `json:"-"` 4628 4629 // NullFields is a list of field names (e.g. "StoreCodes") to include in 4630 // API requests with the JSON null value. By default, fields with empty 4631 // values are omitted from API requests. However, any field with an 4632 // empty value appearing in NullFields will be sent to the server as 4633 // null. It is an error if a field in this list has a non-empty value. 4634 // This may be used to include null fields in Patch requests. 4635 NullFields []string `json:"-"` 4636} 4637 4638func (s *MinimumOrderValueTableStoreCodeSetWithMov) MarshalJSON() ([]byte, error) { 4639 type NoMethod MinimumOrderValueTableStoreCodeSetWithMov 4640 raw := NoMethod(*s) 4641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4642} 4643 4644// Order: Order. Production access (all methods) requires the order 4645// manager role. Sandbox access does not. 4646type Order struct { 4647 // Acknowledged: Whether the order was acknowledged. 4648 Acknowledged bool `json:"acknowledged,omitempty"` 4649 4650 // ChannelType: Deprecated. Acceptable values are: - "googleExpress" - 4651 // "purchasesOnGoogle" 4652 ChannelType string `json:"channelType,omitempty"` 4653 4654 // Customer: The details of the customer who placed the order. 4655 Customer *OrderCustomer `json:"customer,omitempty"` 4656 4657 // DeliveryDetails: Delivery details for shipments of type `delivery`. 4658 DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` 4659 4660 // Id: The REST ID of the order. Globally unique. 4661 Id string `json:"id,omitempty"` 4662 4663 // Kind: Identifies what kind of resource this is. Value: the fixed 4664 // string "content#order" 4665 Kind string `json:"kind,omitempty"` 4666 4667 // LineItems: Line items that are ordered. 4668 LineItems []*OrderLineItem `json:"lineItems,omitempty"` 4669 4670 MerchantId uint64 `json:"merchantId,omitempty,string"` 4671 4672 // MerchantOrderId: Merchant-provided ID of the order. 4673 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4674 4675 // NetAmount: The net amount for the order. For example, if an order was 4676 // originally for a grand total of $100 and a refund was issued for $20, 4677 // the net amount will be $80. 4678 NetAmount *Price `json:"netAmount,omitempty"` 4679 4680 // PaymentMethod: The details of the payment method. 4681 PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"` 4682 4683 // PaymentStatus: The status of the payment. Acceptable values are: - 4684 // "paymentCaptured" - "paymentRejected" - "paymentSecured" - 4685 // "pendingAuthorization" 4686 PaymentStatus string `json:"paymentStatus,omitempty"` 4687 4688 // PickupDetails: Pickup details for shipments of type `pickup`. 4689 PickupDetails *OrderPickupDetails `json:"pickupDetails,omitempty"` 4690 4691 // PlacedDate: The date when the order was placed, in ISO 8601 format. 4692 PlacedDate string `json:"placedDate,omitempty"` 4693 4694 // Promotions: The details of the merchant provided promotions applied 4695 // to the order. To determine which promotions apply to which products, 4696 // check the `Promotions[].Benefits[].OfferIds` field against the 4697 // `LineItems[].Product.OfferId` field for each promotion. If a 4698 // promotion is applied to more than 1 `offerId`, divide the discount 4699 // value by the number of affected offers to determine how much discount 4700 // to apply to each `offerId`. Examples: 1. To calculate the line item 4701 // level discount for a single specific item: For each promotion, 4702 // subtract the `Promotions[].Benefits[].Discount.value` amount from the 4703 // `LineItems[].Price.value`. 2. To calculate the line item level 4704 // discount for multiple quantity of a specific item: For each 4705 // promotion, divide the `Promotions[].Benefits[].Discount.value` by the 4706 // quantity of products and substract it from 4707 // `LineItems[].Product.Price.value` for each quantity item. Only 1 4708 // promotion can be applied to an offerId in a given order. To refund an 4709 // item which had a promotion applied to it, make sure to refund the 4710 // amount after first subtracting the promotion discount from the item 4711 // price. More details about the program are here. 4712 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 4713 4714 // Refunds: Refunds for the order. 4715 Refunds []*OrderRefund `json:"refunds,omitempty"` 4716 4717 // Shipments: Shipments of the order. 4718 Shipments []*OrderShipment `json:"shipments,omitempty"` 4719 4720 // ShippingCost: The total cost of shipping for all items. 4721 ShippingCost *Price `json:"shippingCost,omitempty"` 4722 4723 // ShippingCostTax: The tax for the total shipping cost. 4724 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 4725 4726 // ShippingOption: Deprecated. Shipping details are provided with line 4727 // items instead. Acceptable values are: - "economy" - "expedited" - 4728 // "oneDay" - "sameDay" - "standard" - "twoDay" 4729 ShippingOption string `json:"shippingOption,omitempty"` 4730 4731 // Status: The status of the order. Acceptable values are: - 4732 // "canceled" - "delivered" - "inProgress" - 4733 // "partiallyDelivered" - "partiallyReturned" - "partiallyShipped" 4734 // - "pendingShipment" - "returned" - "shipped" 4735 Status string `json:"status,omitempty"` 4736 4737 // TaxCollector: The party responsible for collecting and remitting 4738 // taxes. Acceptable values are: - "marketplaceFacilitator" - 4739 // "merchant" 4740 TaxCollector string `json:"taxCollector,omitempty"` 4741 4742 // ServerResponse contains the HTTP response code and headers from the 4743 // server. 4744 googleapi.ServerResponse `json:"-"` 4745 4746 // ForceSendFields is a list of field names (e.g. "Acknowledged") to 4747 // unconditionally include in API requests. By default, fields with 4748 // empty or default values are omitted from API requests. However, any 4749 // non-pointer, non-interface field appearing in ForceSendFields will be 4750 // sent to the server regardless of whether the field is empty or not. 4751 // This may be used to include empty fields in Patch requests. 4752 ForceSendFields []string `json:"-"` 4753 4754 // NullFields is a list of field names (e.g. "Acknowledged") to include 4755 // in API requests with the JSON null value. By default, fields with 4756 // empty values are omitted from API requests. However, any field with 4757 // an empty value appearing in NullFields will be sent to the server as 4758 // null. It is an error if a field in this list has a non-empty value. 4759 // This may be used to include null fields in Patch requests. 4760 NullFields []string `json:"-"` 4761} 4762 4763func (s *Order) MarshalJSON() ([]byte, error) { 4764 type NoMethod Order 4765 raw := NoMethod(*s) 4766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4767} 4768 4769type OrderAddress struct { 4770 // Country: CLDR country code (e.g. "US"). 4771 Country string `json:"country,omitempty"` 4772 4773 // FullAddress: Strings representing the lines of the printed label for 4774 // mailing the order, for example: John Smith 1600 Amphitheatre Parkway 4775 // Mountain View, CA, 94043 United States 4776 FullAddress []string `json:"fullAddress,omitempty"` 4777 4778 // IsPostOfficeBox: Whether the address is a post office box. 4779 IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` 4780 4781 // Locality: City, town or commune. May also include dependent 4782 // localities or sublocalities (e.g. neighborhoods or suburbs). 4783 Locality string `json:"locality,omitempty"` 4784 4785 // PostalCode: Postal Code or ZIP (e.g. "94043"). 4786 PostalCode string `json:"postalCode,omitempty"` 4787 4788 // RecipientName: Name of the recipient. 4789 RecipientName string `json:"recipientName,omitempty"` 4790 4791 // Region: Top-level administrative subdivision of the country. For 4792 // example, a state like California ("CA") or a province like Quebec 4793 // ("QC"). 4794 Region string `json:"region,omitempty"` 4795 4796 // StreetAddress: Street-level part of the address. 4797 StreetAddress []string `json:"streetAddress,omitempty"` 4798 4799 // ForceSendFields is a list of field names (e.g. "Country") to 4800 // unconditionally include in API requests. By default, fields with 4801 // empty or default values are omitted from API requests. However, any 4802 // non-pointer, non-interface field appearing in ForceSendFields will be 4803 // sent to the server regardless of whether the field is empty or not. 4804 // This may be used to include empty fields in Patch requests. 4805 ForceSendFields []string `json:"-"` 4806 4807 // NullFields is a list of field names (e.g. "Country") to include in 4808 // API requests with the JSON null value. By default, fields with empty 4809 // values are omitted from API requests. However, any field with an 4810 // empty value appearing in NullFields will be sent to the server as 4811 // null. It is an error if a field in this list has a non-empty value. 4812 // This may be used to include null fields in Patch requests. 4813 NullFields []string `json:"-"` 4814} 4815 4816func (s *OrderAddress) MarshalJSON() ([]byte, error) { 4817 type NoMethod OrderAddress 4818 raw := NoMethod(*s) 4819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4820} 4821 4822type OrderCancellation struct { 4823 // Actor: The actor that created the cancellation. Acceptable values 4824 // are: - "customer" - "googleBot" - "googleCustomerService" - 4825 // "googlePayments" - "googleSabre" - "merchant" 4826 Actor string `json:"actor,omitempty"` 4827 4828 // CreationDate: Date on which the cancellation has been created, in ISO 4829 // 8601 format. 4830 CreationDate string `json:"creationDate,omitempty"` 4831 4832 // Quantity: The quantity that was canceled. 4833 Quantity int64 `json:"quantity,omitempty"` 4834 4835 // Reason: The reason for the cancellation. Orders that are canceled 4836 // with a noInventory reason will lead to the removal of the product 4837 // from Buy on Google until you make an update to that product. This 4838 // will not affect your Shopping ads. Acceptable values are: - 4839 // "autoPostInternal" - "autoPostInvalidBillingAddress" - 4840 // "autoPostNoInventory" - "autoPostPriceError" - 4841 // "autoPostUndeliverableShippingAddress" - "couponAbuse" - 4842 // "customerCanceled" - "customerInitiatedCancel" - 4843 // "customerSupportRequested" - "failToPushOrderGoogleError" - 4844 // "failToPushOrderMerchantError" - 4845 // "failToPushOrderMerchantFulfillmentError" - 4846 // "failToPushOrderToMerchant" - 4847 // "failToPushOrderToMerchantOutOfStock" - "invalidCoupon" - 4848 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 4849 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 4850 // "paymentDeclined" - "priceError" - "returnRefundAbuse" - 4851 // "shippingPriceError" - "taxError" - 4852 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 4853 Reason string `json:"reason,omitempty"` 4854 4855 // ReasonText: The explanation of the reason. 4856 ReasonText string `json:"reasonText,omitempty"` 4857 4858 // ForceSendFields is a list of field names (e.g. "Actor") to 4859 // unconditionally include in API requests. By default, fields with 4860 // empty or default values are omitted from API requests. However, any 4861 // non-pointer, non-interface field appearing in ForceSendFields will be 4862 // sent to the server regardless of whether the field is empty or not. 4863 // This may be used to include empty fields in Patch requests. 4864 ForceSendFields []string `json:"-"` 4865 4866 // NullFields is a list of field names (e.g. "Actor") to include in API 4867 // requests with the JSON null value. By default, fields with empty 4868 // values are omitted from API requests. However, any field with an 4869 // empty value appearing in NullFields will be sent to the server as 4870 // null. It is an error if a field in this list has a non-empty value. 4871 // This may be used to include null fields in Patch requests. 4872 NullFields []string `json:"-"` 4873} 4874 4875func (s *OrderCancellation) MarshalJSON() ([]byte, error) { 4876 type NoMethod OrderCancellation 4877 raw := NoMethod(*s) 4878 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4879} 4880 4881type OrderCustomer struct { 4882 // Email: Deprecated. 4883 Email string `json:"email,omitempty"` 4884 4885 // ExplicitMarketingPreference: Deprecated. Please use 4886 // marketingRightsInfo instead. 4887 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 4888 4889 // FullName: Full name of the customer. 4890 FullName string `json:"fullName,omitempty"` 4891 4892 // InvoiceReceivingEmail: Email address for the merchant to send 4893 // value-added tax or invoice documentation of the order. Only the last 4894 // document sent is made available to the customer. For more 4895 // information, see About automated VAT invoicing for Buy on Google. 4896 InvoiceReceivingEmail string `json:"invoiceReceivingEmail,omitempty"` 4897 4898 // MarketingRightsInfo: Customer's marketing preferences. Contains the 4899 // marketing opt-in information that is current at the time that the 4900 // merchant call. User preference selections can change from one order 4901 // to the next so preferences must be checked with every order. 4902 MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 4903 4904 // ForceSendFields is a list of field names (e.g. "Email") to 4905 // unconditionally include in API requests. By default, fields with 4906 // empty or default values are omitted from API requests. However, any 4907 // non-pointer, non-interface field appearing in ForceSendFields will be 4908 // sent to the server regardless of whether the field is empty or not. 4909 // This may be used to include empty fields in Patch requests. 4910 ForceSendFields []string `json:"-"` 4911 4912 // NullFields is a list of field names (e.g. "Email") to include in API 4913 // requests with the JSON null value. By default, fields with empty 4914 // values are omitted from API requests. However, any field with an 4915 // empty value appearing in NullFields will be sent to the server as 4916 // null. It is an error if a field in this list has a non-empty value. 4917 // This may be used to include null fields in Patch requests. 4918 NullFields []string `json:"-"` 4919} 4920 4921func (s *OrderCustomer) MarshalJSON() ([]byte, error) { 4922 type NoMethod OrderCustomer 4923 raw := NoMethod(*s) 4924 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4925} 4926 4927type OrderCustomerMarketingRightsInfo struct { 4928 // ExplicitMarketingPreference: Last known customer selection regarding 4929 // marketing preferences. In certain cases this selection might not be 4930 // known, so this field would be empty. If a customer selected `granted` 4931 // in their most recent order, they can be subscribed to marketing 4932 // emails. Customers who have chosen `denied` must not be subscribed, or 4933 // must be unsubscribed if already opted-in. Acceptable values are: - 4934 // "denied" - "granted" 4935 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 4936 4937 // LastUpdatedTimestamp: Timestamp when last time marketing preference 4938 // was updated. Could be empty, if user wasn't offered a selection yet. 4939 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 4940 4941 // MarketingEmailAddress: Email address that can be used for marketing 4942 // purposes. The field may be empty even if 4943 // `explicitMarketingPreference` is 'granted'. This happens when 4944 // retrieving an old order from the customer who deleted their account. 4945 MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` 4946 4947 // ForceSendFields is a list of field names (e.g. 4948 // "ExplicitMarketingPreference") to unconditionally include in API 4949 // requests. By default, fields with empty or default values are omitted 4950 // from API requests. However, any non-pointer, non-interface field 4951 // appearing in ForceSendFields will be sent to the server regardless of 4952 // whether the field is empty or not. This may be used to include empty 4953 // fields in Patch requests. 4954 ForceSendFields []string `json:"-"` 4955 4956 // NullFields is a list of field names (e.g. 4957 // "ExplicitMarketingPreference") to include in API requests with the 4958 // JSON null value. By default, fields with empty values are omitted 4959 // from API requests. However, any field with an empty value appearing 4960 // in NullFields will be sent to the server as null. It is an error if a 4961 // field in this list has a non-empty value. This may be used to include 4962 // null fields in Patch requests. 4963 NullFields []string `json:"-"` 4964} 4965 4966func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 4967 type NoMethod OrderCustomerMarketingRightsInfo 4968 raw := NoMethod(*s) 4969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4970} 4971 4972type OrderDeliveryDetails struct { 4973 // Address: The delivery address 4974 Address *OrderAddress `json:"address,omitempty"` 4975 4976 // PhoneNumber: The phone number of the person receiving the delivery. 4977 PhoneNumber string `json:"phoneNumber,omitempty"` 4978 4979 // ForceSendFields is a list of field names (e.g. "Address") to 4980 // unconditionally include in API requests. By default, fields with 4981 // empty or default values are omitted from API requests. However, any 4982 // non-pointer, non-interface field appearing in ForceSendFields will be 4983 // sent to the server regardless of whether the field is empty or not. 4984 // This may be used to include empty fields in Patch requests. 4985 ForceSendFields []string `json:"-"` 4986 4987 // NullFields is a list of field names (e.g. "Address") to include in 4988 // API requests with the JSON null value. By default, fields with empty 4989 // values are omitted from API requests. However, any field with an 4990 // empty value appearing in NullFields will be sent to the server as 4991 // null. It is an error if a field in this list has a non-empty value. 4992 // This may be used to include null fields in Patch requests. 4993 NullFields []string `json:"-"` 4994} 4995 4996func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) { 4997 type NoMethod OrderDeliveryDetails 4998 raw := NoMethod(*s) 4999 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5000} 5001 5002type OrderLegacyPromotion struct { 5003 Benefits []*OrderLegacyPromotionBenefit `json:"benefits,omitempty"` 5004 5005 // EffectiveDates: The date and time frame when the promotion is active 5006 // and ready for validation review. Note that the promotion live time 5007 // may be delayed for a few hours due to the validation review. Start 5008 // date and end date are separated by a forward slash (/). The start 5009 // date is specified by the format (YYYY-MM-DD), followed by the letter 5010 // ?T?, the time of the day when the sale starts (in Greenwich Mean 5011 // Time, GMT), followed by an expression of the time zone for the sale. 5012 // The end date is in the same format. 5013 EffectiveDates string `json:"effectiveDates,omitempty"` 5014 5015 // GenericRedemptionCode: Optional. The text code that corresponds to 5016 // the promotion when applied on the retailer?s website. 5017 GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` 5018 5019 // Id: The unique ID of the promotion. 5020 Id string `json:"id,omitempty"` 5021 5022 // LongTitle: The full title of the promotion. 5023 LongTitle string `json:"longTitle,omitempty"` 5024 5025 // ProductApplicability: Whether the promotion is applicable to all 5026 // products or only specific products. Acceptable values are: - 5027 // "allProducts" - "specificProducts" 5028 ProductApplicability string `json:"productApplicability,omitempty"` 5029 5030 // RedemptionChannel: Indicates that the promotion is valid online. 5031 // Acceptable values are: - "online" 5032 RedemptionChannel string `json:"redemptionChannel,omitempty"` 5033 5034 // ForceSendFields is a list of field names (e.g. "Benefits") to 5035 // unconditionally include in API requests. By default, fields with 5036 // empty or default values are omitted from API requests. However, any 5037 // non-pointer, non-interface field appearing in ForceSendFields will be 5038 // sent to the server regardless of whether the field is empty or not. 5039 // This may be used to include empty fields in Patch requests. 5040 ForceSendFields []string `json:"-"` 5041 5042 // NullFields is a list of field names (e.g. "Benefits") to include in 5043 // API requests with the JSON null value. By default, fields with empty 5044 // values are omitted from API requests. However, any field with an 5045 // empty value appearing in NullFields will be sent to the server as 5046 // null. It is an error if a field in this list has a non-empty value. 5047 // This may be used to include null fields in Patch requests. 5048 NullFields []string `json:"-"` 5049} 5050 5051func (s *OrderLegacyPromotion) MarshalJSON() ([]byte, error) { 5052 type NoMethod OrderLegacyPromotion 5053 raw := NoMethod(*s) 5054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5055} 5056 5057type OrderLegacyPromotionBenefit struct { 5058 // Discount: The discount in the order price when the promotion is 5059 // applied. 5060 Discount *Price `json:"discount,omitempty"` 5061 5062 // OfferIds: The OfferId(s) that were purchased in this order and map to 5063 // this specific benefit of the promotion. 5064 OfferIds []string `json:"offerIds,omitempty"` 5065 5066 // SubType: Further describes the benefit of the promotion. Note that we 5067 // will expand on this enumeration as we support new promotion 5068 // sub-types. Acceptable values are: - "buyMGetMoneyOff" - 5069 // "buyMGetNMoneyOff" - "buyMGetNPercentOff" - "buyMGetPercentOff" 5070 // - "freeGift" - "freeGiftWithItemId" - "freeGiftWithValue" - 5071 // "freeOvernightShipping" - "freeShipping" - "freeTwoDayShipping" 5072 // - "moneyOff" - "percentageOff" - "rewardPoints" - "salePrice" 5073 SubType string `json:"subType,omitempty"` 5074 5075 // TaxImpact: The impact on tax when the promotion is applied. 5076 TaxImpact *Price `json:"taxImpact,omitempty"` 5077 5078 // Type: Describes whether the promotion applies to products (e.g. 20% 5079 // off) or to shipping (e.g. Free Shipping). Acceptable values are: - 5080 // "product" - "shipping" 5081 Type string `json:"type,omitempty"` 5082 5083 // ForceSendFields is a list of field names (e.g. "Discount") to 5084 // unconditionally include in API requests. By default, fields with 5085 // empty or default values are omitted from API requests. However, any 5086 // non-pointer, non-interface field appearing in ForceSendFields will be 5087 // sent to the server regardless of whether the field is empty or not. 5088 // This may be used to include empty fields in Patch requests. 5089 ForceSendFields []string `json:"-"` 5090 5091 // NullFields is a list of field names (e.g. "Discount") to include in 5092 // API requests with the JSON null value. By default, fields with empty 5093 // values are omitted from API requests. However, any field with an 5094 // empty value appearing in NullFields will be sent to the server as 5095 // null. It is an error if a field in this list has a non-empty value. 5096 // This may be used to include null fields in Patch requests. 5097 NullFields []string `json:"-"` 5098} 5099 5100func (s *OrderLegacyPromotionBenefit) MarshalJSON() ([]byte, error) { 5101 type NoMethod OrderLegacyPromotionBenefit 5102 raw := NoMethod(*s) 5103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5104} 5105 5106type OrderLineItem struct { 5107 // Annotations: Annotations that are attached to the line item. 5108 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 5109 5110 // Cancellations: Cancellations of the line item. 5111 Cancellations []*OrderCancellation `json:"cancellations,omitempty"` 5112 5113 // Id: The ID of the line item. 5114 Id string `json:"id,omitempty"` 5115 5116 // Price: Total price for the line item. For example, if two items for 5117 // $10 are purchased, the total price will be $20. 5118 Price *Price `json:"price,omitempty"` 5119 5120 // Product: Product data as seen by customer from the time of the order 5121 // placement. Note that certain attributes values (e.g. title or gtin) 5122 // might be reformatted and no longer match values submitted via product 5123 // feed. 5124 Product *OrderLineItemProduct `json:"product,omitempty"` 5125 5126 // QuantityCanceled: Number of items canceled. 5127 QuantityCanceled int64 `json:"quantityCanceled,omitempty"` 5128 5129 // QuantityDelivered: Number of items delivered. 5130 QuantityDelivered int64 `json:"quantityDelivered,omitempty"` 5131 5132 // QuantityOrdered: Number of items ordered. 5133 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 5134 5135 // QuantityPending: Number of items pending. 5136 QuantityPending int64 `json:"quantityPending,omitempty"` 5137 5138 // QuantityReadyForPickup: Number of items ready for pickup. 5139 QuantityReadyForPickup int64 `json:"quantityReadyForPickup,omitempty"` 5140 5141 // QuantityReturned: Number of items returned. 5142 QuantityReturned int64 `json:"quantityReturned,omitempty"` 5143 5144 // QuantityShipped: Number of items shipped. 5145 QuantityShipped int64 `json:"quantityShipped,omitempty"` 5146 5147 // ReturnInfo: Details of the return policy for the line item. 5148 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 5149 5150 // Returns: Returns of the line item. 5151 Returns []*OrderReturn `json:"returns,omitempty"` 5152 5153 // ShippingDetails: Details of the requested shipping for the line item. 5154 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 5155 5156 // Tax: Total tax amount for the line item. For example, if two items 5157 // are purchased, and each have a cost tax of $2, the total tax amount 5158 // will be $4. 5159 Tax *Price `json:"tax,omitempty"` 5160 5161 // ForceSendFields is a list of field names (e.g. "Annotations") to 5162 // unconditionally include in API requests. By default, fields with 5163 // empty or default values are omitted from API requests. However, any 5164 // non-pointer, non-interface field appearing in ForceSendFields will be 5165 // sent to the server regardless of whether the field is empty or not. 5166 // This may be used to include empty fields in Patch requests. 5167 ForceSendFields []string `json:"-"` 5168 5169 // NullFields is a list of field names (e.g. "Annotations") to include 5170 // in API requests with the JSON null value. By default, fields with 5171 // empty values are omitted from API requests. However, any field with 5172 // an empty value appearing in NullFields will be sent to the server as 5173 // null. It is an error if a field in this list has a non-empty value. 5174 // This may be used to include null fields in Patch requests. 5175 NullFields []string `json:"-"` 5176} 5177 5178func (s *OrderLineItem) MarshalJSON() ([]byte, error) { 5179 type NoMethod OrderLineItem 5180 raw := NoMethod(*s) 5181 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5182} 5183 5184type OrderLineItemProduct struct { 5185 // Brand: Brand of the item. 5186 Brand string `json:"brand,omitempty"` 5187 5188 // Channel: The item's channel (online or local). Acceptable values are: 5189 // - "local" - "online" 5190 Channel string `json:"channel,omitempty"` 5191 5192 // Condition: Condition or state of the item. Acceptable values are: - 5193 // "new" - "refurbished" - "used" 5194 Condition string `json:"condition,omitempty"` 5195 5196 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 5197 ContentLanguage string `json:"contentLanguage,omitempty"` 5198 5199 // Fees: Associated fees at order creation time. 5200 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 5201 5202 // Gtin: Global Trade Item Number (GTIN) of the item. 5203 Gtin string `json:"gtin,omitempty"` 5204 5205 // Id: The REST ID of the product. 5206 Id string `json:"id,omitempty"` 5207 5208 // ImageLink: URL of an image of the item. 5209 ImageLink string `json:"imageLink,omitempty"` 5210 5211 // ItemGroupId: Shared identifier for all variants of the same product. 5212 ItemGroupId string `json:"itemGroupId,omitempty"` 5213 5214 // Mpn: Manufacturer Part Number (MPN) of the item. 5215 Mpn string `json:"mpn,omitempty"` 5216 5217 // OfferId: An identifier of the item. 5218 OfferId string `json:"offerId,omitempty"` 5219 5220 // Price: Price of the item. 5221 Price *Price `json:"price,omitempty"` 5222 5223 // ShownImage: URL to the cached image shown to the user when order was 5224 // placed. 5225 ShownImage string `json:"shownImage,omitempty"` 5226 5227 // TargetCountry: The CLDR territory // code of the target country of 5228 // the product. 5229 TargetCountry string `json:"targetCountry,omitempty"` 5230 5231 // Title: The title of the product. 5232 Title string `json:"title,omitempty"` 5233 5234 // VariantAttributes: Variant attributes for the item. These are 5235 // dimensions of the product, such as color, gender, material, pattern, 5236 // and size. You can find a comprehensive list of variant attributes 5237 // here. 5238 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 5239 5240 // ForceSendFields is a list of field names (e.g. "Brand") to 5241 // unconditionally include in API requests. By default, fields with 5242 // empty or default values are omitted from API requests. However, any 5243 // non-pointer, non-interface field appearing in ForceSendFields will be 5244 // sent to the server regardless of whether the field is empty or not. 5245 // This may be used to include empty fields in Patch requests. 5246 ForceSendFields []string `json:"-"` 5247 5248 // NullFields is a list of field names (e.g. "Brand") to include in API 5249 // 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 *OrderLineItemProduct) MarshalJSON() ([]byte, error) { 5258 type NoMethod OrderLineItemProduct 5259 raw := NoMethod(*s) 5260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5261} 5262 5263type OrderLineItemProductFee struct { 5264 // Amount: Amount of the fee. 5265 Amount *Price `json:"amount,omitempty"` 5266 5267 // Name: Name of the fee. 5268 Name string `json:"name,omitempty"` 5269 5270 // ForceSendFields is a list of field names (e.g. "Amount") to 5271 // unconditionally include in API requests. By default, fields with 5272 // empty or default values are omitted from API requests. However, any 5273 // non-pointer, non-interface field appearing in ForceSendFields will be 5274 // sent to the server regardless of whether the field is empty or not. 5275 // This may be used to include empty fields in Patch requests. 5276 ForceSendFields []string `json:"-"` 5277 5278 // NullFields is a list of field names (e.g. "Amount") to include in API 5279 // requests with the JSON null value. By default, fields with empty 5280 // values are omitted from API requests. However, any field with an 5281 // empty value appearing in NullFields will be sent to the server as 5282 // null. It is an error if a field in this list has a non-empty value. 5283 // This may be used to include null fields in Patch requests. 5284 NullFields []string `json:"-"` 5285} 5286 5287func (s *OrderLineItemProductFee) MarshalJSON() ([]byte, error) { 5288 type NoMethod OrderLineItemProductFee 5289 raw := NoMethod(*s) 5290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5291} 5292 5293type OrderLineItemProductVariantAttribute struct { 5294 // Dimension: The dimension of the variant. 5295 Dimension string `json:"dimension,omitempty"` 5296 5297 // Value: The value for the dimension. 5298 Value string `json:"value,omitempty"` 5299 5300 // ForceSendFields is a list of field names (e.g. "Dimension") to 5301 // unconditionally include in API requests. By default, fields with 5302 // empty or default values are omitted from API requests. However, any 5303 // non-pointer, non-interface field appearing in ForceSendFields will be 5304 // sent to the server regardless of whether the field is empty or not. 5305 // This may be used to include empty fields in Patch requests. 5306 ForceSendFields []string `json:"-"` 5307 5308 // NullFields is a list of field names (e.g. "Dimension") to include in 5309 // API requests with the JSON null value. By default, fields with empty 5310 // values are omitted from API requests. However, any field with an 5311 // empty value appearing in NullFields will be sent to the server as 5312 // null. It is an error if a field in this list has a non-empty value. 5313 // This may be used to include null fields in Patch requests. 5314 NullFields []string `json:"-"` 5315} 5316 5317func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { 5318 type NoMethod OrderLineItemProductVariantAttribute 5319 raw := NoMethod(*s) 5320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5321} 5322 5323type OrderLineItemReturnInfo struct { 5324 // DaysToReturn: Required. How many days later the item can be returned. 5325 DaysToReturn int64 `json:"daysToReturn,omitempty"` 5326 5327 // IsReturnable: Required. Whether the item is returnable. 5328 IsReturnable bool `json:"isReturnable,omitempty"` 5329 5330 // PolicyUrl: Required. URL of the item return policy. 5331 PolicyUrl string `json:"policyUrl,omitempty"` 5332 5333 // ForceSendFields is a list of field names (e.g. "DaysToReturn") to 5334 // unconditionally include in API requests. By default, fields with 5335 // empty or default values are omitted from API requests. However, any 5336 // non-pointer, non-interface field appearing in ForceSendFields will be 5337 // sent to the server regardless of whether the field is empty or not. 5338 // This may be used to include empty fields in Patch requests. 5339 ForceSendFields []string `json:"-"` 5340 5341 // NullFields is a list of field names (e.g. "DaysToReturn") to include 5342 // in API requests with the JSON null value. By default, fields with 5343 // empty values are omitted from API requests. However, any field with 5344 // an empty value appearing in NullFields will be sent to the server as 5345 // null. It is an error if a field in this list has a non-empty value. 5346 // This may be used to include null fields in Patch requests. 5347 NullFields []string `json:"-"` 5348} 5349 5350func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { 5351 type NoMethod OrderLineItemReturnInfo 5352 raw := NoMethod(*s) 5353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5354} 5355 5356type OrderLineItemShippingDetails struct { 5357 // DeliverByDate: Required. The delivery by date, in ISO 8601 format. 5358 DeliverByDate string `json:"deliverByDate,omitempty"` 5359 5360 // Method: Required. Details of the shipping method. 5361 Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` 5362 5363 // ShipByDate: Required. The ship by date, in ISO 8601 format. 5364 ShipByDate string `json:"shipByDate,omitempty"` 5365 5366 // Type: Type of shipment. Indicates whether `deliveryDetails` or 5367 // `pickupDetails` is applicable for this shipment. Acceptable values 5368 // are: - "delivery" - "pickup" 5369 Type string `json:"type,omitempty"` 5370 5371 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 5372 // unconditionally include in API requests. By default, fields with 5373 // empty or default values are omitted from API requests. However, any 5374 // non-pointer, non-interface field appearing in ForceSendFields will be 5375 // sent to the server regardless of whether the field is empty or not. 5376 // This may be used to include empty fields in Patch requests. 5377 ForceSendFields []string `json:"-"` 5378 5379 // NullFields is a list of field names (e.g. "DeliverByDate") to include 5380 // in API requests with the JSON null value. By default, fields with 5381 // empty values are omitted from API requests. However, any field with 5382 // an empty value appearing in NullFields will be sent to the server as 5383 // null. It is an error if a field in this list has a non-empty value. 5384 // This may be used to include null fields in Patch requests. 5385 NullFields []string `json:"-"` 5386} 5387 5388func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { 5389 type NoMethod OrderLineItemShippingDetails 5390 raw := NoMethod(*s) 5391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5392} 5393 5394type OrderLineItemShippingDetailsMethod struct { 5395 // Carrier: The carrier for the shipping. Optional. See 5396 // `shipments[].carrier` for a list of acceptable values. 5397 Carrier string `json:"carrier,omitempty"` 5398 5399 // MaxDaysInTransit: Required. Maximum transit time. 5400 MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` 5401 5402 // MethodName: Required. The name of the shipping method. 5403 MethodName string `json:"methodName,omitempty"` 5404 5405 // MinDaysInTransit: Required. Minimum transit time. 5406 MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` 5407 5408 // ForceSendFields is a list of field names (e.g. "Carrier") to 5409 // unconditionally include in API requests. By default, fields with 5410 // empty or default values are omitted from API requests. However, any 5411 // non-pointer, non-interface field appearing in ForceSendFields will be 5412 // sent to the server regardless of whether the field is empty or not. 5413 // This may be used to include empty fields in Patch requests. 5414 ForceSendFields []string `json:"-"` 5415 5416 // NullFields is a list of field names (e.g. "Carrier") to include in 5417 // API requests with the JSON null value. By default, fields with empty 5418 // values are omitted from API requests. However, any field with an 5419 // empty value appearing in NullFields will be sent to the server as 5420 // null. It is an error if a field in this list has a non-empty value. 5421 // This may be used to include null fields in Patch requests. 5422 NullFields []string `json:"-"` 5423} 5424 5425func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { 5426 type NoMethod OrderLineItemShippingDetailsMethod 5427 raw := NoMethod(*s) 5428 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5429} 5430 5431type OrderMerchantProvidedAnnotation struct { 5432 // Key: Key for additional merchant provided (as key-value pairs) 5433 // annotation about the line item. 5434 Key string `json:"key,omitempty"` 5435 5436 // Value: Value for additional merchant provided (as key-value pairs) 5437 // annotation about the line item. 5438 Value string `json:"value,omitempty"` 5439 5440 // ForceSendFields is a list of field names (e.g. "Key") to 5441 // unconditionally include in API requests. By default, fields with 5442 // empty or default values are omitted from API requests. However, any 5443 // non-pointer, non-interface field appearing in ForceSendFields will be 5444 // sent to the server regardless of whether the field is empty or not. 5445 // This may be used to include empty fields in Patch requests. 5446 ForceSendFields []string `json:"-"` 5447 5448 // NullFields is a list of field names (e.g. "Key") to include in API 5449 // requests with the JSON null value. By default, fields with empty 5450 // values are omitted from API requests. However, any field with an 5451 // empty value appearing in NullFields will be sent to the server as 5452 // null. It is an error if a field in this list has a non-empty value. 5453 // This may be used to include null fields in Patch requests. 5454 NullFields []string `json:"-"` 5455} 5456 5457func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { 5458 type NoMethod OrderMerchantProvidedAnnotation 5459 raw := NoMethod(*s) 5460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5461} 5462 5463type OrderPaymentMethod struct { 5464 // BillingAddress: The billing address. 5465 BillingAddress *OrderAddress `json:"billingAddress,omitempty"` 5466 5467 // ExpirationMonth: The card expiration month (January = 1, February = 2 5468 // etc.). 5469 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 5470 5471 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 5472 ExpirationYear int64 `json:"expirationYear,omitempty"` 5473 5474 // LastFourDigits: The last four digits of the card number. 5475 LastFourDigits string `json:"lastFourDigits,omitempty"` 5476 5477 // PhoneNumber: The billing phone number. 5478 PhoneNumber string `json:"phoneNumber,omitempty"` 5479 5480 // Type: The type of instrument. Acceptable values are: - "AMEX" - 5481 // "DISCOVER" - "JCB" - "MASTERCARD" - "UNIONPAY" - "VISA" - 5482 // "" 5483 Type string `json:"type,omitempty"` 5484 5485 // ForceSendFields is a list of field names (e.g. "BillingAddress") to 5486 // unconditionally include in API requests. By default, fields with 5487 // empty or default values are omitted from API requests. However, any 5488 // non-pointer, non-interface field appearing in ForceSendFields will be 5489 // sent to the server regardless of whether the field is empty or not. 5490 // This may be used to include empty fields in Patch requests. 5491 ForceSendFields []string `json:"-"` 5492 5493 // NullFields is a list of field names (e.g. "BillingAddress") to 5494 // include in API requests with the JSON null value. By default, fields 5495 // with empty values are omitted from API requests. However, any field 5496 // with an empty value appearing in NullFields will be sent to the 5497 // server as null. It is an error if a field in this list has a 5498 // non-empty value. This may be used to include null fields in Patch 5499 // requests. 5500 NullFields []string `json:"-"` 5501} 5502 5503func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) { 5504 type NoMethod OrderPaymentMethod 5505 raw := NoMethod(*s) 5506 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5507} 5508 5509type OrderPickupDetails struct { 5510 // Address: Address of the pickup location where the shipment should be 5511 // sent. Note that `recipientName` in the address is the name of the 5512 // business at the pickup location. 5513 Address *OrderAddress `json:"address,omitempty"` 5514 5515 // Collectors: Collectors authorized to pick up shipment from the pickup 5516 // location. 5517 Collectors []*OrderPickupDetailsCollector `json:"collectors,omitempty"` 5518 5519 // LocationId: ID of the pickup location. 5520 LocationId string `json:"locationId,omitempty"` 5521 5522 // ForceSendFields is a list of field names (e.g. "Address") to 5523 // unconditionally include in API requests. By default, fields with 5524 // empty or default values are omitted from API requests. However, any 5525 // non-pointer, non-interface field appearing in ForceSendFields will be 5526 // sent to the server regardless of whether the field is empty or not. 5527 // This may be used to include empty fields in Patch requests. 5528 ForceSendFields []string `json:"-"` 5529 5530 // NullFields is a list of field names (e.g. "Address") to include in 5531 // API requests with the JSON null value. By default, fields with empty 5532 // values are omitted from API requests. However, any field with an 5533 // empty value appearing in NullFields will be sent to the server as 5534 // null. It is an error if a field in this list has a non-empty value. 5535 // This may be used to include null fields in Patch requests. 5536 NullFields []string `json:"-"` 5537} 5538 5539func (s *OrderPickupDetails) MarshalJSON() ([]byte, error) { 5540 type NoMethod OrderPickupDetails 5541 raw := NoMethod(*s) 5542 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5543} 5544 5545type OrderPickupDetailsCollector struct { 5546 // Name: Name of the person picking up the shipment. 5547 Name string `json:"name,omitempty"` 5548 5549 // PhoneNumber: Phone number of the person picking up the shipment. 5550 PhoneNumber string `json:"phoneNumber,omitempty"` 5551 5552 // ForceSendFields is a list of field names (e.g. "Name") to 5553 // unconditionally include in API requests. By default, fields with 5554 // empty or default values are omitted from API requests. However, any 5555 // non-pointer, non-interface field appearing in ForceSendFields will be 5556 // sent to the server regardless of whether the field is empty or not. 5557 // This may be used to include empty fields in Patch requests. 5558 ForceSendFields []string `json:"-"` 5559 5560 // NullFields is a list of field names (e.g. "Name") to include in API 5561 // requests with the JSON null value. By default, fields with empty 5562 // values are omitted from API requests. However, any field with an 5563 // empty value appearing in NullFields will be sent to the server as 5564 // null. It is an error if a field in this list has a non-empty value. 5565 // This may be used to include null fields in Patch requests. 5566 NullFields []string `json:"-"` 5567} 5568 5569func (s *OrderPickupDetailsCollector) MarshalJSON() ([]byte, error) { 5570 type NoMethod OrderPickupDetailsCollector 5571 raw := NoMethod(*s) 5572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5573} 5574 5575type OrderRefund struct { 5576 // Actor: The actor that created the refund. Acceptable values are: - 5577 // "customer" - "googleBot" - "googleCustomerService" - 5578 // "googlePayments" - "googleSabre" - "merchant" 5579 Actor string `json:"actor,omitempty"` 5580 5581 // Amount: The amount that is refunded. 5582 Amount *Price `json:"amount,omitempty"` 5583 5584 // CreationDate: Date on which the item has been created, in ISO 8601 5585 // format. 5586 CreationDate string `json:"creationDate,omitempty"` 5587 5588 // Reason: The reason for the refund. Acceptable values are: - 5589 // "adjustment" - "autoPostInternal" - 5590 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 5591 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 5592 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 5593 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 5594 // - "customerSupportRequested" - "deliveredLateByCarrier" - 5595 // "deliveredTooLate" - "expiredItem" - 5596 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 5597 // "failToPushOrderMerchantFulfillmentError" - 5598 // "failToPushOrderToMerchant" - 5599 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 5600 // "invalidCoupon" - "lateShipmentCredit" - 5601 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 5602 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 5603 // "paymentDeclined" - "priceAdjustment" - "priceError" - 5604 // "productArrivedDamaged" - "productNotAsDescribed" - 5605 // "promoReallocation" - "qualityNotAsExpected" - 5606 // "returnRefundAbuse" - "shippingCostAdjustment" - 5607 // "shippingPriceError" - "taxAdjustment" - "taxError" - 5608 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 5609 // "wrongProductShipped" 5610 Reason string `json:"reason,omitempty"` 5611 5612 // ReasonText: The explanation of the reason. 5613 ReasonText string `json:"reasonText,omitempty"` 5614 5615 // ForceSendFields is a list of field names (e.g. "Actor") to 5616 // unconditionally include in API requests. By default, fields with 5617 // empty or default values are omitted from API requests. However, any 5618 // non-pointer, non-interface field appearing in ForceSendFields will be 5619 // sent to the server regardless of whether the field is empty or not. 5620 // This may be used to include empty fields in Patch requests. 5621 ForceSendFields []string `json:"-"` 5622 5623 // NullFields is a list of field names (e.g. "Actor") to include in API 5624 // requests with the JSON null value. By default, fields with empty 5625 // values are omitted from API requests. However, any field with an 5626 // empty value appearing in NullFields will be sent to the server as 5627 // null. It is an error if a field in this list has a non-empty value. 5628 // This may be used to include null fields in Patch requests. 5629 NullFields []string `json:"-"` 5630} 5631 5632func (s *OrderRefund) MarshalJSON() ([]byte, error) { 5633 type NoMethod OrderRefund 5634 raw := NoMethod(*s) 5635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5636} 5637 5638// OrderReportDisbursement: Order disbursement. All methods require the 5639// payment analyst role. 5640type OrderReportDisbursement struct { 5641 // DisbursementAmount: The disbursement amount. 5642 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5643 5644 // DisbursementCreationDate: The disbursement date, in ISO 8601 format. 5645 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5646 5647 // DisbursementDate: The date the disbursement was initiated, in ISO 5648 // 8601 format. 5649 DisbursementDate string `json:"disbursementDate,omitempty"` 5650 5651 // DisbursementId: The ID of the disbursement. 5652 DisbursementId string `json:"disbursementId,omitempty"` 5653 5654 // MerchantId: The ID of the managing account. 5655 MerchantId uint64 `json:"merchantId,omitempty,string"` 5656 5657 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5658 // to unconditionally include in API requests. By default, fields with 5659 // empty or default values are omitted from API requests. However, any 5660 // non-pointer, non-interface field appearing in ForceSendFields will be 5661 // sent to the server regardless of whether the field is empty or not. 5662 // This may be used to include empty fields in Patch requests. 5663 ForceSendFields []string `json:"-"` 5664 5665 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5666 // include in API requests with the JSON null value. By default, fields 5667 // with empty values are omitted from API requests. However, any field 5668 // with an empty value appearing in NullFields will be sent to the 5669 // server as null. It is an error if a field in this list has a 5670 // non-empty value. This may be used to include null fields in Patch 5671 // requests. 5672 NullFields []string `json:"-"` 5673} 5674 5675func (s *OrderReportDisbursement) MarshalJSON() ([]byte, error) { 5676 type NoMethod OrderReportDisbursement 5677 raw := NoMethod(*s) 5678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5679} 5680 5681type OrderReportTransaction struct { 5682 // DisbursementAmount: The disbursement amount. 5683 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5684 5685 // DisbursementCreationDate: The date the disbursement was created, in 5686 // ISO 8601 format. 5687 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5688 5689 // DisbursementDate: The date the disbursement was initiated, in ISO 5690 // 8601 format. 5691 DisbursementDate string `json:"disbursementDate,omitempty"` 5692 5693 // DisbursementId: The ID of the disbursement. 5694 DisbursementId string `json:"disbursementId,omitempty"` 5695 5696 // MerchantId: The ID of the managing account. 5697 MerchantId uint64 `json:"merchantId,omitempty,string"` 5698 5699 // MerchantOrderId: Merchant-provided ID of the order. 5700 MerchantOrderId string `json:"merchantOrderId,omitempty"` 5701 5702 // OrderId: The ID of the order. 5703 OrderId string `json:"orderId,omitempty"` 5704 5705 // ProductAmount: Total amount for the items. 5706 ProductAmount *Amount `json:"productAmount,omitempty"` 5707 5708 // ProductAmountWithRemittedTax: Total amount with remitted tax for the 5709 // items. 5710 ProductAmountWithRemittedTax *ProductAmount `json:"productAmountWithRemittedTax,omitempty"` 5711 5712 // TransactionDate: The date of the transaction, in ISO 8601 format. 5713 TransactionDate string `json:"transactionDate,omitempty"` 5714 5715 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5716 // to unconditionally include in API requests. By default, fields with 5717 // empty or default values are omitted from API requests. However, any 5718 // non-pointer, non-interface field appearing in ForceSendFields will be 5719 // sent to the server regardless of whether the field is empty or not. 5720 // This may be used to include empty fields in Patch requests. 5721 ForceSendFields []string `json:"-"` 5722 5723 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5724 // include in API requests with the JSON null value. By default, fields 5725 // with empty values are omitted from API requests. However, any field 5726 // with an empty value appearing in NullFields will be sent to the 5727 // server as null. It is an error if a field in this list has a 5728 // non-empty value. This may be used to include null fields in Patch 5729 // requests. 5730 NullFields []string `json:"-"` 5731} 5732 5733func (s *OrderReportTransaction) MarshalJSON() ([]byte, error) { 5734 type NoMethod OrderReportTransaction 5735 raw := NoMethod(*s) 5736 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5737} 5738 5739type OrderReturn struct { 5740 // Actor: The actor that created the refund. Acceptable values are: - 5741 // "customer" - "googleBot" - "googleCustomerService" - 5742 // "googlePayments" - "googleSabre" - "merchant" 5743 Actor string `json:"actor,omitempty"` 5744 5745 // CreationDate: Date on which the item has been created, in ISO 8601 5746 // format. 5747 CreationDate string `json:"creationDate,omitempty"` 5748 5749 // Quantity: Quantity that is returned. 5750 Quantity int64 `json:"quantity,omitempty"` 5751 5752 // Reason: The reason for the return. Acceptable values are: - 5753 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 5754 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 5755 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 5756 // - "productNotAsDescribed" - "qualityNotAsExpected" - 5757 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 5758 // "wrongProductShipped" 5759 Reason string `json:"reason,omitempty"` 5760 5761 // ReasonText: The explanation of the reason. 5762 ReasonText string `json:"reasonText,omitempty"` 5763 5764 // ForceSendFields is a list of field names (e.g. "Actor") to 5765 // unconditionally include in API requests. By default, fields with 5766 // empty or default values are omitted from API requests. However, any 5767 // non-pointer, non-interface field appearing in ForceSendFields will be 5768 // sent to the server regardless of whether the field is empty or not. 5769 // This may be used to include empty fields in Patch requests. 5770 ForceSendFields []string `json:"-"` 5771 5772 // NullFields is a list of field names (e.g. "Actor") to include in API 5773 // requests with the JSON null value. By default, fields with empty 5774 // values are omitted from API requests. However, any field with an 5775 // empty value appearing in NullFields will be sent to the server as 5776 // null. It is an error if a field in this list has a non-empty value. 5777 // This may be used to include null fields in Patch requests. 5778 NullFields []string `json:"-"` 5779} 5780 5781func (s *OrderReturn) MarshalJSON() ([]byte, error) { 5782 type NoMethod OrderReturn 5783 raw := NoMethod(*s) 5784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5785} 5786 5787type OrderShipment struct { 5788 // Carrier: The carrier handling the shipment. For supported carriers, 5789 // Google includes the carrier name and tracking URL in emails to 5790 // customers. For select supported carriers, Google also automatically 5791 // updates the shipment status based on the provided shipment ID. 5792 // *Note:* You can also use unsupported carriers, but emails to 5793 // customers will not include the carrier name or tracking URL, and 5794 // there will be no automatic order status updates. Supported carriers 5795 // for US are: - "ups" (United Parcel Service) *automatic status 5796 // updates* - "usps" (United States Postal Service) *automatic status 5797 // updates* - "fedex" (FedEx) *automatic status updates * - "dhl" 5798 // (DHL eCommerce) *automatic status updates* (US only) - "ontrac" 5799 // (OnTrac) *automatic status updates * - "dhl express" (DHL Express) 5800 // - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" 5801 // (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United 5802 // Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd 5803 // logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china 5804 // post" (China Post) - "china ems" (China Post Express Mail Service) 5805 // - "singapore post" (Singapore Post) - "pos malaysia" (Pos 5806 // Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - 5807 // "eub" (ePacket) - "chukou1" (Chukou1 Logistics) - "bestex" 5808 // (Best Express) - "canada post" (Canada Post) - "purolator" 5809 // (Purolator) - "canpar" (Canpar) - "india post" (India Post) - 5810 // "blue dart" (Blue Dart) - "delhivery" (Delhivery) - "dtdc" 5811 // (DTDC) - "tpc india" (TPC India) Supported carriers for FR are: - 5812 // "la poste" (La Poste) *automatic status updates * - "colissimo" 5813 // (Colissimo by La Poste) *automatic status updates* - "ups" (United 5814 // Parcel Service) *automatic status updates * - "chronopost" 5815 // (Chronopost by La Poste) - "gls" (General Logistics Systems France) 5816 // - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - 5817 // "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" 5818 // (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) - "aramex" 5819 // (Aramex) 5820 Carrier string `json:"carrier,omitempty"` 5821 5822 // CreationDate: Date on which the shipment has been created, in ISO 5823 // 8601 format. 5824 CreationDate string `json:"creationDate,omitempty"` 5825 5826 // DeliveryDate: Date on which the shipment has been delivered, in ISO 5827 // 8601 format. Present only if `status` is `delivered` 5828 DeliveryDate string `json:"deliveryDate,omitempty"` 5829 5830 // Id: The ID of the shipment. 5831 Id string `json:"id,omitempty"` 5832 5833 // LineItems: The line items that are shipped. 5834 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 5835 5836 // ScheduledDeliveryDetails: Delivery details of the shipment if 5837 // scheduling is needed. 5838 ScheduledDeliveryDetails *OrderShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` 5839 5840 // Status: The status of the shipment. Acceptable values are: - 5841 // "delivered" - "readyForPickup" - "shipped" - "undeliverable" 5842 Status string `json:"status,omitempty"` 5843 5844 // TrackingId: The tracking ID for the shipment. 5845 TrackingId string `json:"trackingId,omitempty"` 5846 5847 // ForceSendFields is a list of field names (e.g. "Carrier") to 5848 // unconditionally include in API requests. By default, fields with 5849 // empty or default values are omitted from API requests. However, any 5850 // non-pointer, non-interface field appearing in ForceSendFields will be 5851 // sent to the server regardless of whether the field is empty or not. 5852 // This may be used to include empty fields in Patch requests. 5853 ForceSendFields []string `json:"-"` 5854 5855 // NullFields is a list of field names (e.g. "Carrier") to include in 5856 // API requests with the JSON null value. By default, fields with empty 5857 // values are omitted from API requests. However, any field with an 5858 // empty value appearing in NullFields will be sent to the server as 5859 // null. It is an error if a field in this list has a non-empty value. 5860 // This may be used to include null fields in Patch requests. 5861 NullFields []string `json:"-"` 5862} 5863 5864func (s *OrderShipment) MarshalJSON() ([]byte, error) { 5865 type NoMethod OrderShipment 5866 raw := NoMethod(*s) 5867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5868} 5869 5870type OrderShipmentLineItemShipment struct { 5871 // LineItemId: The ID of the line item that is shipped. This value is 5872 // assigned by Google when an order is created. Either lineItemId or 5873 // productId is required. 5874 LineItemId string `json:"lineItemId,omitempty"` 5875 5876 // ProductId: The ID of the product to ship. This is the REST ID used in 5877 // the products service. Either lineItemId or productId is required. 5878 ProductId string `json:"productId,omitempty"` 5879 5880 // Quantity: The quantity that is shipped. 5881 Quantity int64 `json:"quantity,omitempty"` 5882 5883 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5884 // unconditionally include in API requests. By default, fields with 5885 // empty or default values are omitted from API requests. However, any 5886 // non-pointer, non-interface field appearing in ForceSendFields will be 5887 // sent to the server regardless of whether the field is empty or not. 5888 // This may be used to include empty fields in Patch requests. 5889 ForceSendFields []string `json:"-"` 5890 5891 // NullFields is a list of field names (e.g. "LineItemId") to include in 5892 // API requests with the JSON null value. By default, fields with empty 5893 // values are omitted from API requests. However, any field with an 5894 // empty value appearing in NullFields will be sent to the server as 5895 // null. It is an error if a field in this list has a non-empty value. 5896 // This may be used to include null fields in Patch requests. 5897 NullFields []string `json:"-"` 5898} 5899 5900func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { 5901 type NoMethod OrderShipmentLineItemShipment 5902 raw := NoMethod(*s) 5903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5904} 5905 5906type OrderShipmentScheduledDeliveryDetails struct { 5907 // CarrierPhoneNumber: The phone number of the carrier fulfilling the 5908 // delivery. The phone number is formatted as the international notation 5909 // in ITU-T Recommendation E.123 (e.g., "+41 44 668 1800"). 5910 CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` 5911 5912 // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 5913 // 8601 format. 5914 ScheduledDate string `json:"scheduledDate,omitempty"` 5915 5916 // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") 5917 // to unconditionally include in API requests. By default, fields with 5918 // empty or default values are omitted from API requests. However, any 5919 // non-pointer, non-interface field appearing in ForceSendFields will be 5920 // sent to the server regardless of whether the field is empty or not. 5921 // This may be used to include empty fields in Patch requests. 5922 ForceSendFields []string `json:"-"` 5923 5924 // NullFields is a list of field names (e.g. "CarrierPhoneNumber") to 5925 // include in API requests with the JSON null value. By default, fields 5926 // with empty values are omitted from API requests. However, any field 5927 // with an empty value appearing in NullFields will be sent to the 5928 // server as null. It is an error if a field in this list has a 5929 // non-empty value. This may be used to include null fields in Patch 5930 // requests. 5931 NullFields []string `json:"-"` 5932} 5933 5934func (s *OrderShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { 5935 type NoMethod OrderShipmentScheduledDeliveryDetails 5936 raw := NoMethod(*s) 5937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5938} 5939 5940type OrderinvoicesCreateChargeInvoiceRequest struct { 5941 // InvoiceId: [required] The ID of the invoice. 5942 InvoiceId string `json:"invoiceId,omitempty"` 5943 5944 // InvoiceSummary: [required] Invoice summary. 5945 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 5946 5947 // LineItemInvoices: [required] Invoice details per line item. 5948 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 5949 5950 // OperationId: [required] The ID of the operation, unique across all 5951 // operations for a given order. 5952 OperationId string `json:"operationId,omitempty"` 5953 5954 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 5955 // by the merchant in the `shipLineItems` method and is used to group 5956 // multiple line items that have the same kind of shipping charges. 5957 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 5958 5959 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 5960 // unconditionally include in API requests. By default, fields with 5961 // empty or default values are omitted from API requests. However, any 5962 // non-pointer, non-interface field appearing in ForceSendFields will be 5963 // sent to the server regardless of whether the field is empty or not. 5964 // This may be used to include empty fields in Patch requests. 5965 ForceSendFields []string `json:"-"` 5966 5967 // NullFields is a list of field names (e.g. "InvoiceId") to include in 5968 // API requests with the JSON null value. By default, fields with empty 5969 // values are omitted from API requests. However, any field with an 5970 // empty value appearing in NullFields will be sent to the server as 5971 // null. It is an error if a field in this list has a non-empty value. 5972 // This may be used to include null fields in Patch requests. 5973 NullFields []string `json:"-"` 5974} 5975 5976func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { 5977 type NoMethod OrderinvoicesCreateChargeInvoiceRequest 5978 raw := NoMethod(*s) 5979 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5980} 5981 5982type OrderinvoicesCreateChargeInvoiceResponse struct { 5983 // ExecutionStatus: The status of the execution. Acceptable values are: 5984 // - "duplicate" - "executed" 5985 ExecutionStatus string `json:"executionStatus,omitempty"` 5986 5987 // Kind: Identifies what kind of resource this is. Value: the fixed 5988 // string "content#orderinvoicesCreateChargeInvoiceResponse". 5989 Kind string `json:"kind,omitempty"` 5990 5991 // ServerResponse contains the HTTP response code and headers from the 5992 // server. 5993 googleapi.ServerResponse `json:"-"` 5994 5995 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5996 // unconditionally include in API requests. By default, fields with 5997 // empty or default values are omitted from API requests. However, any 5998 // non-pointer, non-interface field appearing in ForceSendFields will be 5999 // sent to the server regardless of whether the field is empty or not. 6000 // This may be used to include empty fields in Patch requests. 6001 ForceSendFields []string `json:"-"` 6002 6003 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6004 // include in API requests with the JSON null value. By default, fields 6005 // with empty values are omitted from API requests. However, any field 6006 // with an empty value appearing in NullFields will be sent to the 6007 // server as null. It is an error if a field in this list has a 6008 // non-empty value. This may be used to include null fields in Patch 6009 // requests. 6010 NullFields []string `json:"-"` 6011} 6012 6013func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { 6014 type NoMethod OrderinvoicesCreateChargeInvoiceResponse 6015 raw := NoMethod(*s) 6016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6017} 6018 6019type OrderinvoicesCreateRefundInvoiceRequest struct { 6020 // InvoiceId: [required] The ID of the invoice. 6021 InvoiceId string `json:"invoiceId,omitempty"` 6022 6023 // OperationId: [required] The ID of the operation, unique across all 6024 // operations for a given order. 6025 OperationId string `json:"operationId,omitempty"` 6026 6027 // RefundOnlyOption: Option to create a refund-only invoice. Exactly one 6028 // of `refundOnlyOption` or `returnOption` must be provided. 6029 RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` 6030 6031 // ReturnOption: Option to create an invoice for a refund and mark all 6032 // items within the invoice as returned. Exactly one of 6033 // `refundOnlyOption` or `returnOption` must be provided. 6034 ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` 6035 6036 // ShipmentInvoices: Invoice details for different shipment groups. 6037 ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` 6038 6039 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 6040 // unconditionally include in API requests. By default, fields with 6041 // empty or default values are omitted from API requests. However, any 6042 // non-pointer, non-interface field appearing in ForceSendFields will be 6043 // sent to the server regardless of whether the field is empty or not. 6044 // This may be used to include empty fields in Patch requests. 6045 ForceSendFields []string `json:"-"` 6046 6047 // NullFields is a list of field names (e.g. "InvoiceId") to include in 6048 // API requests with the JSON null value. By default, fields with empty 6049 // values are omitted from API requests. However, any field with an 6050 // empty value appearing in NullFields will be sent to the server as 6051 // null. It is an error if a field in this list has a non-empty value. 6052 // This may be used to include null fields in Patch requests. 6053 NullFields []string `json:"-"` 6054} 6055 6056func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { 6057 type NoMethod OrderinvoicesCreateRefundInvoiceRequest 6058 raw := NoMethod(*s) 6059 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6060} 6061 6062type OrderinvoicesCreateRefundInvoiceResponse struct { 6063 // ExecutionStatus: The status of the execution. Acceptable values are: 6064 // - "duplicate" - "executed" 6065 ExecutionStatus string `json:"executionStatus,omitempty"` 6066 6067 // Kind: Identifies what kind of resource this is. Value: the fixed 6068 // string "content#orderinvoicesCreateRefundInvoiceResponse". 6069 Kind string `json:"kind,omitempty"` 6070 6071 // ServerResponse contains the HTTP response code and headers from the 6072 // server. 6073 googleapi.ServerResponse `json:"-"` 6074 6075 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6076 // unconditionally include in API requests. By default, fields with 6077 // empty or default values are omitted from API requests. However, any 6078 // non-pointer, non-interface field appearing in ForceSendFields will be 6079 // sent to the server regardless of whether the field is empty or not. 6080 // This may be used to include empty fields in Patch requests. 6081 ForceSendFields []string `json:"-"` 6082 6083 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6084 // include in API requests with the JSON null value. By default, fields 6085 // with empty values are omitted from API requests. However, any field 6086 // with an empty value appearing in NullFields will be sent to the 6087 // server as null. It is an error if a field in this list has a 6088 // non-empty value. This may be used to include null fields in Patch 6089 // requests. 6090 NullFields []string `json:"-"` 6091} 6092 6093func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { 6094 type NoMethod OrderinvoicesCreateRefundInvoiceResponse 6095 raw := NoMethod(*s) 6096 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6097} 6098 6099type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { 6100 // Description: Optional description of the refund reason. 6101 Description string `json:"description,omitempty"` 6102 6103 // Reason: [required] Reason for the refund. Acceptable values are: - 6104 // "adjustment" - "autoPostInternal" - 6105 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 6106 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 6107 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 6108 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 6109 // - "customerSupportRequested" - "deliveredLateByCarrier" - 6110 // "deliveredTooLate" - "expiredItem" - 6111 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 6112 // "failToPushOrderMerchantFulfillmentError" - 6113 // "failToPushOrderToMerchant" - 6114 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 6115 // "invalidCoupon" - "lateShipmentCredit" - 6116 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 6117 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 6118 // "paymentDeclined" - "priceAdjustment" - "priceError" - 6119 // "productArrivedDamaged" - "productNotAsDescribed" - 6120 // "promoReallocation" - "qualityNotAsExpected" - 6121 // "returnRefundAbuse" - "shippingCostAdjustment" - 6122 // "shippingPriceError" - "taxAdjustment" - "taxError" - 6123 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 6124 // "wrongProductShipped" 6125 Reason string `json:"reason,omitempty"` 6126 6127 // ForceSendFields is a list of field names (e.g. "Description") to 6128 // unconditionally include in API requests. By default, fields with 6129 // empty or default values are omitted from API requests. However, any 6130 // non-pointer, non-interface field appearing in ForceSendFields will be 6131 // sent to the server regardless of whether the field is empty or not. 6132 // This may be used to include empty fields in Patch requests. 6133 ForceSendFields []string `json:"-"` 6134 6135 // NullFields is a list of field names (e.g. "Description") to include 6136 // in API requests with the JSON null value. By default, fields with 6137 // empty values are omitted from API requests. However, any field with 6138 // an empty value appearing in NullFields will be sent to the server as 6139 // null. It is an error if a field in this list has a non-empty value. 6140 // This may be used to include null fields in Patch requests. 6141 NullFields []string `json:"-"` 6142} 6143 6144func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { 6145 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption 6146 raw := NoMethod(*s) 6147 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6148} 6149 6150type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { 6151 // Description: Optional description of the return reason. 6152 Description string `json:"description,omitempty"` 6153 6154 // Reason: [required] Reason for the return. Acceptable values are: - 6155 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 6156 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 6157 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 6158 // - "productNotAsDescribed" - "qualityNotAsExpected" - 6159 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 6160 // "wrongProductShipped" 6161 Reason string `json:"reason,omitempty"` 6162 6163 // ForceSendFields is a list of field names (e.g. "Description") to 6164 // unconditionally include in API requests. By default, fields with 6165 // empty or default values are omitted from API requests. However, any 6166 // non-pointer, non-interface field appearing in ForceSendFields will be 6167 // sent to the server regardless of whether the field is empty or not. 6168 // This may be used to include empty fields in Patch requests. 6169 ForceSendFields []string `json:"-"` 6170 6171 // NullFields is a list of field names (e.g. "Description") to include 6172 // in API requests with the JSON null value. By default, fields with 6173 // empty values are omitted from API requests. However, any field with 6174 // an empty value appearing in NullFields will be sent to the server as 6175 // null. It is an error if a field in this list has a non-empty value. 6176 // This may be used to include null fields in Patch requests. 6177 NullFields []string `json:"-"` 6178} 6179 6180func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { 6181 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption 6182 raw := NoMethod(*s) 6183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6184} 6185 6186type OrderreportsListDisbursementsResponse struct { 6187 // Disbursements: The list of disbursements. 6188 Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"` 6189 6190 // Kind: Identifies what kind of resource this is. Value: the fixed 6191 // string "content#orderreportsListDisbursementsResponse". 6192 Kind string `json:"kind,omitempty"` 6193 6194 // NextPageToken: The token for the retrieval of the next page of 6195 // disbursements. 6196 NextPageToken string `json:"nextPageToken,omitempty"` 6197 6198 // ServerResponse contains the HTTP response code and headers from the 6199 // server. 6200 googleapi.ServerResponse `json:"-"` 6201 6202 // ForceSendFields is a list of field names (e.g. "Disbursements") to 6203 // unconditionally include in API requests. By default, fields with 6204 // empty or default values are omitted from API requests. However, any 6205 // non-pointer, non-interface field appearing in ForceSendFields will be 6206 // sent to the server regardless of whether the field is empty or not. 6207 // This may be used to include empty fields in Patch requests. 6208 ForceSendFields []string `json:"-"` 6209 6210 // NullFields is a list of field names (e.g. "Disbursements") to include 6211 // in API requests with the JSON null value. By default, fields with 6212 // empty values are omitted from API requests. However, any field with 6213 // an empty value appearing in NullFields will be sent to the server as 6214 // null. It is an error if a field in this list has a non-empty value. 6215 // This may be used to include null fields in Patch requests. 6216 NullFields []string `json:"-"` 6217} 6218 6219func (s *OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) { 6220 type NoMethod OrderreportsListDisbursementsResponse 6221 raw := NoMethod(*s) 6222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6223} 6224 6225type OrderreportsListTransactionsResponse struct { 6226 // Kind: Identifies what kind of resource this is. Value: the fixed 6227 // string "content#orderreportsListTransactionsResponse". 6228 Kind string `json:"kind,omitempty"` 6229 6230 // NextPageToken: The token for the retrieval of the next page of 6231 // transactions. 6232 NextPageToken string `json:"nextPageToken,omitempty"` 6233 6234 // Transactions: The list of transactions. 6235 Transactions []*OrderReportTransaction `json:"transactions,omitempty"` 6236 6237 // ServerResponse contains the HTTP response code and headers from the 6238 // server. 6239 googleapi.ServerResponse `json:"-"` 6240 6241 // ForceSendFields is a list of field names (e.g. "Kind") to 6242 // unconditionally include in API requests. By default, fields with 6243 // empty or default values are omitted from API requests. However, any 6244 // non-pointer, non-interface field appearing in ForceSendFields will be 6245 // sent to the server regardless of whether the field is empty or not. 6246 // This may be used to include empty fields in Patch requests. 6247 ForceSendFields []string `json:"-"` 6248 6249 // NullFields is a list of field names (e.g. "Kind") to include in API 6250 // requests with the JSON null value. By default, fields with empty 6251 // values are omitted from API requests. However, any field with an 6252 // empty value appearing in NullFields will be sent to the server as 6253 // null. It is an error if a field in this list has a non-empty value. 6254 // This may be used to include null fields in Patch requests. 6255 NullFields []string `json:"-"` 6256} 6257 6258func (s *OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) { 6259 type NoMethod OrderreportsListTransactionsResponse 6260 raw := NoMethod(*s) 6261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6262} 6263 6264type OrderreturnsListResponse struct { 6265 // Kind: Identifies what kind of resource this is. Value: the fixed 6266 // string "content#orderreturnsListResponse". 6267 Kind string `json:"kind,omitempty"` 6268 6269 // NextPageToken: The token for the retrieval of the next page of 6270 // returns. 6271 NextPageToken string `json:"nextPageToken,omitempty"` 6272 6273 Resources []*MerchantOrderReturn `json:"resources,omitempty"` 6274 6275 // ServerResponse contains the HTTP response code and headers from the 6276 // server. 6277 googleapi.ServerResponse `json:"-"` 6278 6279 // ForceSendFields is a list of field names (e.g. "Kind") to 6280 // unconditionally include in API requests. By default, fields with 6281 // empty or default values are omitted from API requests. However, any 6282 // non-pointer, non-interface field appearing in ForceSendFields will be 6283 // sent to the server regardless of whether the field is empty or not. 6284 // This may be used to include empty fields in Patch requests. 6285 ForceSendFields []string `json:"-"` 6286 6287 // NullFields is a list of field names (e.g. "Kind") to include in API 6288 // requests with the JSON null value. By default, fields with empty 6289 // values are omitted from API requests. However, any field with an 6290 // empty value appearing in NullFields will be sent to the server as 6291 // null. It is an error if a field in this list has a non-empty value. 6292 // This may be used to include null fields in Patch requests. 6293 NullFields []string `json:"-"` 6294} 6295 6296func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) { 6297 type NoMethod OrderreturnsListResponse 6298 raw := NoMethod(*s) 6299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6300} 6301 6302type OrdersAcknowledgeRequest struct { 6303 // OperationId: The ID of the operation. Unique across all operations 6304 // for a given order. 6305 OperationId string `json:"operationId,omitempty"` 6306 6307 // ForceSendFields is a list of field names (e.g. "OperationId") to 6308 // unconditionally include in API requests. By default, fields with 6309 // empty or default values are omitted from API requests. However, any 6310 // non-pointer, non-interface field appearing in ForceSendFields will be 6311 // sent to the server regardless of whether the field is empty or not. 6312 // This may be used to include empty fields in Patch requests. 6313 ForceSendFields []string `json:"-"` 6314 6315 // NullFields is a list of field names (e.g. "OperationId") to include 6316 // in API requests with the JSON null value. By default, fields with 6317 // empty values are omitted from API requests. However, any field with 6318 // an 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 *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { 6325 type NoMethod OrdersAcknowledgeRequest 6326 raw := NoMethod(*s) 6327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6328} 6329 6330type OrdersAcknowledgeResponse struct { 6331 // ExecutionStatus: The status of the execution. Acceptable values are: 6332 // - "duplicate" - "executed" 6333 ExecutionStatus string `json:"executionStatus,omitempty"` 6334 6335 // Kind: Identifies what kind of resource this is. Value: the fixed 6336 // string "content#ordersAcknowledgeResponse". 6337 Kind string `json:"kind,omitempty"` 6338 6339 // ServerResponse contains the HTTP response code and headers from the 6340 // server. 6341 googleapi.ServerResponse `json:"-"` 6342 6343 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6344 // unconditionally include in API requests. By default, fields with 6345 // empty or default values are omitted from API requests. However, any 6346 // non-pointer, non-interface field appearing in ForceSendFields will be 6347 // sent to the server regardless of whether the field is empty or not. 6348 // This may be used to include empty fields in Patch requests. 6349 ForceSendFields []string `json:"-"` 6350 6351 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6352 // include in API requests with the JSON null value. By default, fields 6353 // with empty values are omitted from API requests. However, any field 6354 // with an empty value appearing in NullFields will be sent to the 6355 // server as null. It is an error if a field in this list has a 6356 // non-empty value. This may be used to include null fields in Patch 6357 // requests. 6358 NullFields []string `json:"-"` 6359} 6360 6361func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { 6362 type NoMethod OrdersAcknowledgeResponse 6363 raw := NoMethod(*s) 6364 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6365} 6366 6367type OrdersAdvanceTestOrderResponse struct { 6368 // Kind: Identifies what kind of resource this is. Value: the fixed 6369 // string "content#ordersAdvanceTestOrderResponse". 6370 Kind string `json:"kind,omitempty"` 6371 6372 // ServerResponse contains the HTTP response code and headers from the 6373 // server. 6374 googleapi.ServerResponse `json:"-"` 6375 6376 // ForceSendFields is a list of field names (e.g. "Kind") to 6377 // unconditionally include in API requests. By default, fields with 6378 // empty or default values are omitted from API requests. However, any 6379 // non-pointer, non-interface field appearing in ForceSendFields will be 6380 // sent to the server regardless of whether the field is empty or not. 6381 // This may be used to include empty fields in Patch requests. 6382 ForceSendFields []string `json:"-"` 6383 6384 // NullFields is a list of field names (e.g. "Kind") to include in API 6385 // requests with the JSON null value. By default, fields with empty 6386 // values are omitted from API requests. However, any field with an 6387 // empty value appearing in NullFields will be sent to the server as 6388 // null. It is an error if a field in this list has a non-empty value. 6389 // This may be used to include null fields in Patch requests. 6390 NullFields []string `json:"-"` 6391} 6392 6393func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { 6394 type NoMethod OrdersAdvanceTestOrderResponse 6395 raw := NoMethod(*s) 6396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6397} 6398 6399type OrdersCancelLineItemRequest struct { 6400 // Amount: Deprecated. Please use amountPretax and amountTax instead. 6401 Amount *Price `json:"amount,omitempty"` 6402 6403 // AmountPretax: Amount to refund for the cancelation. Optional. If not 6404 // set, Google will calculate the default based on the price and tax of 6405 // the items involved. The amount must not be larger than the net amount 6406 // left on the order. 6407 AmountPretax *Price `json:"amountPretax,omitempty"` 6408 6409 // AmountTax: Tax amount that corresponds to cancellation amount in 6410 // amountPretax. Optional, but if filled, then amountPretax must be set. 6411 // Calculated automatically if not provided. 6412 AmountTax *Price `json:"amountTax,omitempty"` 6413 6414 // LineItemId: The ID of the line item to cancel. Either lineItemId or 6415 // productId is required. 6416 LineItemId string `json:"lineItemId,omitempty"` 6417 6418 // OperationId: The ID of the operation. Unique across all operations 6419 // for a given order. 6420 OperationId string `json:"operationId,omitempty"` 6421 6422 // ProductId: The ID of the product to cancel. This is the REST ID used 6423 // in the products service. Either lineItemId or productId is required. 6424 ProductId string `json:"productId,omitempty"` 6425 6426 // Quantity: The quantity to cancel. 6427 Quantity int64 `json:"quantity,omitempty"` 6428 6429 // Reason: The reason for the cancellation. Acceptable values are: - 6430 // "customerInitiatedCancel" - "invalidCoupon" - 6431 // "malformedShippingAddress" - "noInventory" - "other" - 6432 // "priceError" - "shippingPriceError" - "taxError" - 6433 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6434 Reason string `json:"reason,omitempty"` 6435 6436 // ReasonText: The explanation of the reason. 6437 ReasonText string `json:"reasonText,omitempty"` 6438 6439 // ForceSendFields is a list of field names (e.g. "Amount") to 6440 // unconditionally include in API requests. By default, fields with 6441 // empty or default values are omitted from API requests. However, any 6442 // non-pointer, non-interface field appearing in ForceSendFields will be 6443 // sent to the server regardless of whether the field is empty or not. 6444 // This may be used to include empty fields in Patch requests. 6445 ForceSendFields []string `json:"-"` 6446 6447 // NullFields is a list of field names (e.g. "Amount") to include in API 6448 // requests with the JSON null value. By default, fields with empty 6449 // values are omitted from API requests. However, any field with an 6450 // empty value appearing in NullFields will be sent to the server as 6451 // null. It is an error if a field in this list has a non-empty value. 6452 // This may be used to include null fields in Patch requests. 6453 NullFields []string `json:"-"` 6454} 6455 6456func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { 6457 type NoMethod OrdersCancelLineItemRequest 6458 raw := NoMethod(*s) 6459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6460} 6461 6462type OrdersCancelLineItemResponse struct { 6463 // ExecutionStatus: The status of the execution. Acceptable values are: 6464 // - "duplicate" - "executed" 6465 ExecutionStatus string `json:"executionStatus,omitempty"` 6466 6467 // Kind: Identifies what kind of resource this is. Value: the fixed 6468 // string "content#ordersCancelLineItemResponse". 6469 Kind string `json:"kind,omitempty"` 6470 6471 // ServerResponse contains the HTTP response code and headers from the 6472 // server. 6473 googleapi.ServerResponse `json:"-"` 6474 6475 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6476 // unconditionally include in API requests. By default, fields with 6477 // empty or default values are omitted from API requests. However, any 6478 // non-pointer, non-interface field appearing in ForceSendFields will be 6479 // sent to the server regardless of whether the field is empty or not. 6480 // This may be used to include empty fields in Patch requests. 6481 ForceSendFields []string `json:"-"` 6482 6483 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6484 // include in API requests with the JSON null value. By default, fields 6485 // with empty values are omitted from API requests. However, any field 6486 // with an empty value appearing in NullFields will be sent to the 6487 // server as null. It is an error if a field in this list has a 6488 // non-empty value. This may be used to include null fields in Patch 6489 // requests. 6490 NullFields []string `json:"-"` 6491} 6492 6493func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { 6494 type NoMethod OrdersCancelLineItemResponse 6495 raw := NoMethod(*s) 6496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6497} 6498 6499type OrdersCancelRequest struct { 6500 // OperationId: The ID of the operation. Unique across all operations 6501 // for a given order. 6502 OperationId string `json:"operationId,omitempty"` 6503 6504 // Reason: The reason for the cancellation. Acceptable values are: - 6505 // "customerInitiatedCancel" - "invalidCoupon" - 6506 // "malformedShippingAddress" - "noInventory" - "other" - 6507 // "priceError" - "shippingPriceError" - "taxError" - 6508 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6509 Reason string `json:"reason,omitempty"` 6510 6511 // ReasonText: The explanation of the reason. 6512 ReasonText string `json:"reasonText,omitempty"` 6513 6514 // ForceSendFields is a list of field names (e.g. "OperationId") to 6515 // unconditionally include in API requests. By default, fields with 6516 // empty or default values are omitted from API requests. However, any 6517 // non-pointer, non-interface field appearing in ForceSendFields will be 6518 // sent to the server regardless of whether the field is empty or not. 6519 // This may be used to include empty fields in Patch requests. 6520 ForceSendFields []string `json:"-"` 6521 6522 // NullFields is a list of field names (e.g. "OperationId") to include 6523 // in API requests with the JSON null value. By default, fields with 6524 // empty values are omitted from API requests. However, any field with 6525 // an empty value appearing in NullFields will be sent to the server as 6526 // null. It is an error if a field in this list has a non-empty value. 6527 // This may be used to include null fields in Patch requests. 6528 NullFields []string `json:"-"` 6529} 6530 6531func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) { 6532 type NoMethod OrdersCancelRequest 6533 raw := NoMethod(*s) 6534 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6535} 6536 6537type OrdersCancelResponse struct { 6538 // ExecutionStatus: The status of the execution. Acceptable values are: 6539 // - "duplicate" - "executed" 6540 ExecutionStatus string `json:"executionStatus,omitempty"` 6541 6542 // Kind: Identifies what kind of resource this is. Value: the fixed 6543 // string "content#ordersCancelResponse". 6544 Kind string `json:"kind,omitempty"` 6545 6546 // ServerResponse contains the HTTP response code and headers from the 6547 // server. 6548 googleapi.ServerResponse `json:"-"` 6549 6550 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6551 // unconditionally include in API requests. By default, fields with 6552 // empty or default values are omitted from API requests. However, any 6553 // non-pointer, non-interface field appearing in ForceSendFields will be 6554 // sent to the server regardless of whether the field is empty or not. 6555 // This may be used to include empty fields in Patch requests. 6556 ForceSendFields []string `json:"-"` 6557 6558 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6559 // include in API requests with the JSON null value. By default, fields 6560 // with empty values are omitted from API requests. However, any field 6561 // with an empty value appearing in NullFields will be sent to the 6562 // server as null. It is an error if a field in this list has a 6563 // non-empty value. This may be used to include null fields in Patch 6564 // requests. 6565 NullFields []string `json:"-"` 6566} 6567 6568func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) { 6569 type NoMethod OrdersCancelResponse 6570 raw := NoMethod(*s) 6571 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6572} 6573 6574type OrdersCancelTestOrderByCustomerRequest struct { 6575 // Reason: The reason for the cancellation. Acceptable values are: - 6576 // "changedMind" - "orderedWrongItem" - "other" 6577 Reason string `json:"reason,omitempty"` 6578 6579 // ForceSendFields is a list of field names (e.g. "Reason") to 6580 // unconditionally include in API requests. By default, fields with 6581 // empty or default values are omitted from API requests. However, any 6582 // non-pointer, non-interface field appearing in ForceSendFields will be 6583 // sent to the server regardless of whether the field is empty or not. 6584 // This may be used to include empty fields in Patch requests. 6585 ForceSendFields []string `json:"-"` 6586 6587 // NullFields is a list of field names (e.g. "Reason") to include in API 6588 // requests with the JSON null value. By default, fields with empty 6589 // values are omitted from API requests. However, any field with an 6590 // empty value appearing in NullFields will be sent to the server as 6591 // null. It is an error if a field in this list has a non-empty value. 6592 // This may be used to include null fields in Patch requests. 6593 NullFields []string `json:"-"` 6594} 6595 6596func (s *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { 6597 type NoMethod OrdersCancelTestOrderByCustomerRequest 6598 raw := NoMethod(*s) 6599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6600} 6601 6602type OrdersCancelTestOrderByCustomerResponse struct { 6603 // Kind: Identifies what kind of resource this is. Value: the fixed 6604 // string "content#ordersCancelTestOrderByCustomerResponse". 6605 Kind string `json:"kind,omitempty"` 6606 6607 // ServerResponse contains the HTTP response code and headers from the 6608 // server. 6609 googleapi.ServerResponse `json:"-"` 6610 6611 // ForceSendFields is a list of field names (e.g. "Kind") to 6612 // unconditionally include in API requests. By default, fields with 6613 // empty or default values are omitted from API requests. However, any 6614 // non-pointer, non-interface field appearing in ForceSendFields will be 6615 // sent to the server regardless of whether the field is empty or not. 6616 // This may be used to include empty fields in Patch requests. 6617 ForceSendFields []string `json:"-"` 6618 6619 // NullFields is a list of field names (e.g. "Kind") to include in API 6620 // requests with the JSON null value. By default, fields with empty 6621 // values are omitted from API requests. However, any field with an 6622 // empty value appearing in NullFields will be sent to the server as 6623 // null. It is an error if a field in this list has a non-empty value. 6624 // This may be used to include null fields in Patch requests. 6625 NullFields []string `json:"-"` 6626} 6627 6628func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { 6629 type NoMethod OrdersCancelTestOrderByCustomerResponse 6630 raw := NoMethod(*s) 6631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6632} 6633 6634type OrdersCreateTestOrderRequest struct { 6635 // Country: The CLDR territory code of the country of the test order to 6636 // create. Affects the currency and addresses of orders created via 6637 // `template_name`, or the addresses of orders created via `test_order`. 6638 // Acceptable values are: - "US" - "FR" Defaults to `US`. 6639 Country string `json:"country,omitempty"` 6640 6641 // TemplateName: The test order template to use. Specify as an 6642 // alternative to `testOrder` as a shortcut for retrieving a template 6643 // and then creating an order using that template. Acceptable values 6644 // are: - "template1" - "template1a" - "template1b" - 6645 // "template2" - "template3" 6646 TemplateName string `json:"templateName,omitempty"` 6647 6648 // TestOrder: The test order to create. 6649 TestOrder *TestOrder `json:"testOrder,omitempty"` 6650 6651 // ForceSendFields is a list of field names (e.g. "Country") to 6652 // unconditionally include in API requests. By default, fields with 6653 // empty or default values are omitted from API requests. However, any 6654 // non-pointer, non-interface field appearing in ForceSendFields will be 6655 // sent to the server regardless of whether the field is empty or not. 6656 // This may be used to include empty fields in Patch requests. 6657 ForceSendFields []string `json:"-"` 6658 6659 // NullFields is a list of field names (e.g. "Country") to include in 6660 // API requests with the JSON null value. By default, fields with empty 6661 // values are omitted from API requests. However, any field with an 6662 // empty value appearing in NullFields will be sent to the server as 6663 // null. It is an error if a field in this list has a non-empty value. 6664 // This may be used to include null fields in Patch requests. 6665 NullFields []string `json:"-"` 6666} 6667 6668func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { 6669 type NoMethod OrdersCreateTestOrderRequest 6670 raw := NoMethod(*s) 6671 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6672} 6673 6674type OrdersCreateTestOrderResponse struct { 6675 // Kind: Identifies what kind of resource this is. Value: the fixed 6676 // string "content#ordersCreateTestOrderResponse". 6677 Kind string `json:"kind,omitempty"` 6678 6679 // OrderId: The ID of the newly created test order. 6680 OrderId string `json:"orderId,omitempty"` 6681 6682 // ServerResponse contains the HTTP response code and headers from the 6683 // server. 6684 googleapi.ServerResponse `json:"-"` 6685 6686 // ForceSendFields is a list of field names (e.g. "Kind") to 6687 // unconditionally include in API requests. By default, fields with 6688 // empty or default values are omitted from API requests. However, any 6689 // non-pointer, non-interface field appearing in ForceSendFields will be 6690 // sent to the server regardless of whether the field is empty or not. 6691 // This may be used to include empty fields in Patch requests. 6692 ForceSendFields []string `json:"-"` 6693 6694 // NullFields is a list of field names (e.g. "Kind") to include in API 6695 // requests with the JSON null value. By default, fields with empty 6696 // values are omitted from API requests. However, any field with an 6697 // empty value appearing in NullFields will be sent to the server as 6698 // null. It is an error if a field in this list has a non-empty value. 6699 // This may be used to include null fields in Patch requests. 6700 NullFields []string `json:"-"` 6701} 6702 6703func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { 6704 type NoMethod OrdersCreateTestOrderResponse 6705 raw := NoMethod(*s) 6706 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6707} 6708 6709type OrdersCreateTestReturnRequest struct { 6710 // Items: Returned items. 6711 Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` 6712 6713 // ForceSendFields is a list of field names (e.g. "Items") to 6714 // unconditionally include in API requests. By default, fields with 6715 // empty or default values are omitted from API requests. However, any 6716 // non-pointer, non-interface field appearing in ForceSendFields will be 6717 // sent to the server regardless of whether the field is empty or not. 6718 // This may be used to include empty fields in Patch requests. 6719 ForceSendFields []string `json:"-"` 6720 6721 // NullFields is a list of field names (e.g. "Items") to include in API 6722 // requests with the JSON null value. By default, fields with empty 6723 // values are omitted from API requests. However, any field with an 6724 // empty value appearing in NullFields will be sent to the server as 6725 // null. It is an error if a field in this list has a non-empty value. 6726 // This may be used to include null fields in Patch requests. 6727 NullFields []string `json:"-"` 6728} 6729 6730func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { 6731 type NoMethod OrdersCreateTestReturnRequest 6732 raw := NoMethod(*s) 6733 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6734} 6735 6736type OrdersCreateTestReturnResponse struct { 6737 // Kind: Identifies what kind of resource this is. Value: the fixed 6738 // string "content#ordersCreateTestReturnResponse". 6739 Kind string `json:"kind,omitempty"` 6740 6741 // ReturnId: The ID of the newly created test order return. 6742 ReturnId string `json:"returnId,omitempty"` 6743 6744 // ServerResponse contains the HTTP response code and headers from the 6745 // server. 6746 googleapi.ServerResponse `json:"-"` 6747 6748 // ForceSendFields is a list of field names (e.g. "Kind") to 6749 // unconditionally include in API requests. By default, fields with 6750 // empty or default values are omitted from API requests. However, any 6751 // non-pointer, non-interface field appearing in ForceSendFields will be 6752 // sent to the server regardless of whether the field is empty or not. 6753 // This may be used to include empty fields in Patch requests. 6754 ForceSendFields []string `json:"-"` 6755 6756 // NullFields is a list of field names (e.g. "Kind") to include in API 6757 // requests with the JSON null value. By default, fields with empty 6758 // values are omitted from API requests. However, any field with an 6759 // empty value appearing in NullFields will be sent to the server as 6760 // null. It is an error if a field in this list has a non-empty value. 6761 // This may be used to include null fields in Patch requests. 6762 NullFields []string `json:"-"` 6763} 6764 6765func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { 6766 type NoMethod OrdersCreateTestReturnResponse 6767 raw := NoMethod(*s) 6768 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6769} 6770 6771type OrdersCustomBatchRequest struct { 6772 // Entries: The request entries to be processed in the batch. 6773 Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"` 6774 6775 // ForceSendFields is a list of field names (e.g. "Entries") to 6776 // unconditionally include in API requests. By default, fields with 6777 // empty or default values are omitted from API requests. However, any 6778 // non-pointer, non-interface field appearing in ForceSendFields will be 6779 // sent to the server regardless of whether the field is empty or not. 6780 // This may be used to include empty fields in Patch requests. 6781 ForceSendFields []string `json:"-"` 6782 6783 // NullFields is a list of field names (e.g. "Entries") to include in 6784 // API requests with the JSON null value. By default, fields with empty 6785 // values are omitted from API requests. However, any field with an 6786 // empty value appearing in NullFields will be sent to the server as 6787 // null. It is an error if a field in this list has a non-empty value. 6788 // This may be used to include null fields in Patch requests. 6789 NullFields []string `json:"-"` 6790} 6791 6792func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) { 6793 type NoMethod OrdersCustomBatchRequest 6794 raw := NoMethod(*s) 6795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6796} 6797 6798type OrdersCustomBatchRequestEntry struct { 6799 // BatchId: An entry ID, unique within the batch request. 6800 BatchId int64 `json:"batchId,omitempty"` 6801 6802 // Cancel: Required for `cancel` method. 6803 Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"` 6804 6805 // CancelLineItem: Required for `cancelLineItem` method. 6806 CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"` 6807 6808 // InStoreRefundLineItem: Required for `inStoreReturnLineItem` method. 6809 InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"` 6810 6811 // MerchantId: The ID of the managing account. 6812 MerchantId uint64 `json:"merchantId,omitempty,string"` 6813 6814 // MerchantOrderId: The merchant order ID. Required for 6815 // `updateMerchantOrderId` and `getByMerchantOrderId` methods. 6816 MerchantOrderId string `json:"merchantOrderId,omitempty"` 6817 6818 // Method: The method of the batch entry. Acceptable values are: - 6819 // "acknowledge" - "cancel" - "cancelLineItem" - "get" - 6820 // "getByMerchantOrderId" - "inStoreRefundLineItem" - "refund" - 6821 // "rejectReturnLineItem" - "returnLineItem" - 6822 // "returnRefundLineItem" - "setLineItemMetadata" - 6823 // "shipLineItems" - "updateLineItemShippingDetails" - 6824 // "updateMerchantOrderId" - "updateShipment" 6825 Method string `json:"method,omitempty"` 6826 6827 // OperationId: The ID of the operation. Unique across all operations 6828 // for a given order. Required for all methods beside `get` and 6829 // `getByMerchantOrderId`. 6830 OperationId string `json:"operationId,omitempty"` 6831 6832 // OrderId: The ID of the order. Required for all methods beside 6833 // `getByMerchantOrderId`. 6834 OrderId string `json:"orderId,omitempty"` 6835 6836 // Refund: Required for `refund` method. 6837 Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"` 6838 6839 // RejectReturnLineItem: Required for `rejectReturnLineItem` method. 6840 RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"` 6841 6842 // ReturnLineItem: Required for `returnLineItem` method. 6843 ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"` 6844 6845 // ReturnRefundLineItem: Required for `returnRefundLineItem` method. 6846 ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"` 6847 6848 // SetLineItemMetadata: Required for `setLineItemMetadata` method. 6849 SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"` 6850 6851 // ShipLineItems: Required for `shipLineItems` method. 6852 ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"` 6853 6854 // UpdateLineItemShippingDetails: Required for 6855 // `updateLineItemShippingDate` method. 6856 UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"` 6857 6858 // UpdateShipment: Required for `updateShipment` method. 6859 UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"` 6860 6861 // ForceSendFields is a list of field names (e.g. "BatchId") to 6862 // unconditionally include in API requests. By default, fields with 6863 // empty or default values are omitted from API requests. However, any 6864 // non-pointer, non-interface field appearing in ForceSendFields will be 6865 // sent to the server regardless of whether the field is empty or not. 6866 // This may be used to include empty fields in Patch requests. 6867 ForceSendFields []string `json:"-"` 6868 6869 // NullFields is a list of field names (e.g. "BatchId") to include in 6870 // API requests with the JSON null value. By default, fields with empty 6871 // values are omitted from API requests. However, any field with an 6872 // empty value appearing in NullFields will be sent to the server as 6873 // null. It is an error if a field in this list has a non-empty value. 6874 // This may be used to include null fields in Patch requests. 6875 NullFields []string `json:"-"` 6876} 6877 6878func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 6879 type NoMethod OrdersCustomBatchRequestEntry 6880 raw := NoMethod(*s) 6881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6882} 6883 6884type OrdersCustomBatchRequestEntryCancel struct { 6885 // Reason: The reason for the cancellation. Acceptable values are: - 6886 // "customerInitiatedCancel" - "invalidCoupon" - 6887 // "malformedShippingAddress" - "noInventory" - "other" - 6888 // "priceError" - "shippingPriceError" - "taxError" - 6889 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6890 Reason string `json:"reason,omitempty"` 6891 6892 // ReasonText: The explanation of the reason. 6893 ReasonText string `json:"reasonText,omitempty"` 6894 6895 // ForceSendFields is a list of field names (e.g. "Reason") to 6896 // unconditionally include in API requests. By default, fields with 6897 // empty or default values are omitted from API requests. However, any 6898 // non-pointer, non-interface field appearing in ForceSendFields will be 6899 // sent to the server regardless of whether the field is empty or not. 6900 // This may be used to include empty fields in Patch requests. 6901 ForceSendFields []string `json:"-"` 6902 6903 // NullFields is a list of field names (e.g. "Reason") to include in API 6904 // requests with the JSON null value. By default, fields with empty 6905 // values are omitted from API requests. However, any field with an 6906 // empty value appearing in NullFields will be sent to the server as 6907 // null. It is an error if a field in this list has a non-empty value. 6908 // This may be used to include null fields in Patch requests. 6909 NullFields []string `json:"-"` 6910} 6911 6912func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) { 6913 type NoMethod OrdersCustomBatchRequestEntryCancel 6914 raw := NoMethod(*s) 6915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6916} 6917 6918type OrdersCustomBatchRequestEntryCancelLineItem struct { 6919 // Amount: Deprecated. Please use amountPretax and amountTax instead. 6920 Amount *Price `json:"amount,omitempty"` 6921 6922 // AmountPretax: Amount to refund for the cancelation. Optional. If not 6923 // set, Google will calculate the default based on the price and tax of 6924 // the items involved. The amount must not be larger than the net amount 6925 // left on the order. 6926 AmountPretax *Price `json:"amountPretax,omitempty"` 6927 6928 // AmountTax: Tax amount that corresponds to cancellation amount in 6929 // amountPretax. Optional, but if filled, then amountPretax must be set. 6930 // Calculated automatically if not provided. 6931 AmountTax *Price `json:"amountTax,omitempty"` 6932 6933 // LineItemId: The ID of the line item to cancel. Either lineItemId or 6934 // productId is required. 6935 LineItemId string `json:"lineItemId,omitempty"` 6936 6937 // ProductId: The ID of the product to cancel. This is the REST ID used 6938 // in the products service. Either lineItemId or productId is required. 6939 ProductId string `json:"productId,omitempty"` 6940 6941 // Quantity: The quantity to cancel. 6942 Quantity int64 `json:"quantity,omitempty"` 6943 6944 // Reason: The reason for the cancellation. Acceptable values are: - 6945 // "customerInitiatedCancel" - "invalidCoupon" - 6946 // "malformedShippingAddress" - "noInventory" - "other" - 6947 // "priceError" - "shippingPriceError" - "taxError" - 6948 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6949 Reason string `json:"reason,omitempty"` 6950 6951 // ReasonText: The explanation of the reason. 6952 ReasonText string `json:"reasonText,omitempty"` 6953 6954 // ForceSendFields is a list of field names (e.g. "Amount") to 6955 // unconditionally include in API requests. By default, fields with 6956 // empty or default values are omitted from API requests. However, any 6957 // non-pointer, non-interface field appearing in ForceSendFields will be 6958 // sent to the server regardless of whether the field is empty or not. 6959 // This may be used to include empty fields in Patch requests. 6960 ForceSendFields []string `json:"-"` 6961 6962 // NullFields is a list of field names (e.g. "Amount") to include in API 6963 // requests with the JSON null value. By default, fields with empty 6964 // values are omitted from API requests. However, any field with an 6965 // empty value appearing in NullFields will be sent to the server as 6966 // null. It is an error if a field in this list has a non-empty value. 6967 // This may be used to include null fields in Patch requests. 6968 NullFields []string `json:"-"` 6969} 6970 6971func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) { 6972 type NoMethod OrdersCustomBatchRequestEntryCancelLineItem 6973 raw := NoMethod(*s) 6974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6975} 6976 6977type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { 6978 // LineItemId: The ID of the line item to return. 6979 LineItemId string `json:"lineItemId,omitempty"` 6980 6981 // Quantity: Quantity that is returned. 6982 Quantity int64 `json:"quantity,omitempty"` 6983 6984 // ForceSendFields is a list of field names (e.g. "LineItemId") to 6985 // unconditionally include in API requests. By default, fields with 6986 // empty or default values are omitted from API requests. However, any 6987 // non-pointer, non-interface field appearing in ForceSendFields will be 6988 // sent to the server regardless of whether the field is empty or not. 6989 // This may be used to include empty fields in Patch requests. 6990 ForceSendFields []string `json:"-"` 6991 6992 // NullFields is a list of field names (e.g. "LineItemId") to include in 6993 // API requests with the JSON null value. By default, fields with empty 6994 // values are omitted from API requests. However, any field with an 6995 // empty value appearing in NullFields will be sent to the server as 6996 // null. It is an error if a field in this list has a non-empty value. 6997 // This may be used to include null fields in Patch requests. 6998 NullFields []string `json:"-"` 6999} 7000 7001func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { 7002 type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem 7003 raw := NoMethod(*s) 7004 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7005} 7006 7007type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct { 7008 // AmountPretax: The amount that is refunded. Required. 7009 AmountPretax *Price `json:"amountPretax,omitempty"` 7010 7011 // AmountTax: Tax amount that correspond to refund amount in 7012 // amountPretax. Required. 7013 AmountTax *Price `json:"amountTax,omitempty"` 7014 7015 // LineItemId: The ID of the line item to return. Either lineItemId or 7016 // productId is required. 7017 LineItemId string `json:"lineItemId,omitempty"` 7018 7019 // ProductId: The ID of the product to return. This is the REST ID used 7020 // in the products service. Either lineItemId or productId is required. 7021 ProductId string `json:"productId,omitempty"` 7022 7023 // Quantity: The quantity to return and refund. 7024 Quantity int64 `json:"quantity,omitempty"` 7025 7026 // Reason: The reason for the return. Acceptable values are: - 7027 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7028 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7029 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7030 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7031 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7032 // "wrongProductShipped" 7033 Reason string `json:"reason,omitempty"` 7034 7035 // ReasonText: The explanation of the reason. 7036 ReasonText string `json:"reasonText,omitempty"` 7037 7038 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7039 // unconditionally include in API requests. By default, fields with 7040 // empty or default values are omitted from API requests. However, any 7041 // non-pointer, non-interface field appearing in ForceSendFields will be 7042 // sent to the server regardless of whether the field is empty or not. 7043 // This may be used to include empty fields in Patch requests. 7044 ForceSendFields []string `json:"-"` 7045 7046 // NullFields is a list of field names (e.g. "AmountPretax") to include 7047 // in API requests with the JSON null value. By default, fields with 7048 // empty values are omitted from API requests. However, any field with 7049 // an empty value appearing in NullFields will be sent to the server as 7050 // null. It is an error if a field in this list has a non-empty value. 7051 // This may be used to include null fields in Patch requests. 7052 NullFields []string `json:"-"` 7053} 7054 7055func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) { 7056 type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem 7057 raw := NoMethod(*s) 7058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7059} 7060 7061type OrdersCustomBatchRequestEntryRefund struct { 7062 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7063 Amount *Price `json:"amount,omitempty"` 7064 7065 // AmountPretax: The amount that is refunded. Either amount or 7066 // amountPretax should be filled. 7067 AmountPretax *Price `json:"amountPretax,omitempty"` 7068 7069 // AmountTax: Tax amount that corresponds to refund amount in 7070 // amountPretax. Optional, but if filled, amountPretax must be set. 7071 // Calculated automatically if not provided. 7072 AmountTax *Price `json:"amountTax,omitempty"` 7073 7074 // Reason: The reason for the refund. Acceptable values are: - 7075 // "adjustment" - "courtesyAdjustment" - "customerCanceled" - 7076 // "customerDiscretionaryReturn" - "deliveredLateByCarrier" - 7077 // "feeAdjustment" - "lateShipmentCredit" - "noInventory" - 7078 // "other" - "priceError" - "productArrivedDamaged" - 7079 // "productNotAsDescribed" - "shippingCostAdjustment" - 7080 // "taxAdjustment" - "undeliverableShippingAddress" - 7081 // "wrongProductShipped" 7082 Reason string `json:"reason,omitempty"` 7083 7084 // ReasonText: The explanation of the reason. 7085 ReasonText string `json:"reasonText,omitempty"` 7086 7087 // ForceSendFields is a list of field names (e.g. "Amount") to 7088 // unconditionally include in API requests. By default, fields with 7089 // empty or default values are omitted from API requests. However, any 7090 // non-pointer, non-interface field appearing in ForceSendFields will be 7091 // sent to the server regardless of whether the field is empty or not. 7092 // This may be used to include empty fields in Patch requests. 7093 ForceSendFields []string `json:"-"` 7094 7095 // NullFields is a list of field names (e.g. "Amount") to include in API 7096 // requests with the JSON null value. By default, fields with empty 7097 // values are omitted from API requests. However, any field with an 7098 // empty value appearing in NullFields will be sent to the server as 7099 // null. It is an error if a field in this list has a non-empty value. 7100 // This may be used to include null fields in Patch requests. 7101 NullFields []string `json:"-"` 7102} 7103 7104func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) { 7105 type NoMethod OrdersCustomBatchRequestEntryRefund 7106 raw := NoMethod(*s) 7107 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7108} 7109 7110type OrdersCustomBatchRequestEntryRejectReturnLineItem struct { 7111 // LineItemId: The ID of the line item to return. Either lineItemId or 7112 // productId is required. 7113 LineItemId string `json:"lineItemId,omitempty"` 7114 7115 // ProductId: The ID of the product to return. This is the REST ID used 7116 // in the products service. Either lineItemId or productId is required. 7117 ProductId string `json:"productId,omitempty"` 7118 7119 // Quantity: The quantity to return and refund. 7120 Quantity int64 `json:"quantity,omitempty"` 7121 7122 // Reason: The reason for the return. Acceptable values are: - 7123 // "damagedOrUsed" - "missingComponent" - "notEligible" - 7124 // "other" - "outOfReturnWindow" 7125 Reason string `json:"reason,omitempty"` 7126 7127 // ReasonText: The explanation of the reason. 7128 ReasonText string `json:"reasonText,omitempty"` 7129 7130 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7131 // unconditionally include in API requests. By default, fields with 7132 // empty or default values are omitted from API requests. However, any 7133 // non-pointer, non-interface field appearing in ForceSendFields will be 7134 // sent to the server regardless of whether the field is empty or not. 7135 // This may be used to include empty fields in Patch requests. 7136 ForceSendFields []string `json:"-"` 7137 7138 // NullFields is a list of field names (e.g. "LineItemId") to include in 7139 // API requests with the JSON null value. By default, fields with empty 7140 // values are omitted from API requests. However, any field with an 7141 // empty value appearing in NullFields will be sent to the server as 7142 // null. It is an error if a field in this list has a non-empty value. 7143 // This may be used to include null fields in Patch requests. 7144 NullFields []string `json:"-"` 7145} 7146 7147func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) { 7148 type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem 7149 raw := NoMethod(*s) 7150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7151} 7152 7153type OrdersCustomBatchRequestEntryReturnLineItem struct { 7154 // LineItemId: The ID of the line item to return. Either lineItemId or 7155 // productId is required. 7156 LineItemId string `json:"lineItemId,omitempty"` 7157 7158 // ProductId: The ID of the product to return. This is the REST ID used 7159 // in the products service. Either lineItemId or productId is required. 7160 ProductId string `json:"productId,omitempty"` 7161 7162 // Quantity: The quantity to return. 7163 Quantity int64 `json:"quantity,omitempty"` 7164 7165 // Reason: The reason for the return. Acceptable values are: - 7166 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7167 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7168 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7169 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7170 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7171 // "wrongProductShipped" 7172 Reason string `json:"reason,omitempty"` 7173 7174 // ReasonText: The explanation of the reason. 7175 ReasonText string `json:"reasonText,omitempty"` 7176 7177 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7178 // unconditionally include in API requests. By default, fields with 7179 // empty or default values are omitted from API requests. However, any 7180 // non-pointer, non-interface field appearing in ForceSendFields will be 7181 // sent to the server regardless of whether the field is empty or not. 7182 // This may be used to include empty fields in Patch requests. 7183 ForceSendFields []string `json:"-"` 7184 7185 // NullFields is a list of field names (e.g. "LineItemId") to include in 7186 // API requests with the JSON null value. By default, fields with empty 7187 // values are omitted from API requests. However, any field with an 7188 // empty value appearing in NullFields will be sent to the server as 7189 // null. It is an error if a field in this list has a non-empty value. 7190 // This may be used to include null fields in Patch requests. 7191 NullFields []string `json:"-"` 7192} 7193 7194func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) { 7195 type NoMethod OrdersCustomBatchRequestEntryReturnLineItem 7196 raw := NoMethod(*s) 7197 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7198} 7199 7200type OrdersCustomBatchRequestEntryReturnRefundLineItem struct { 7201 // AmountPretax: The amount that is refunded. If omitted, refundless 7202 // return is assumed (same as calling returnLineItem method). 7203 AmountPretax *Price `json:"amountPretax,omitempty"` 7204 7205 // AmountTax: Tax amount that corresponds to refund amount in 7206 // amountPretax. Optional, but if filled, then amountPretax must be set. 7207 // Calculated automatically if not provided. 7208 AmountTax *Price `json:"amountTax,omitempty"` 7209 7210 // LineItemId: The ID of the line item to return. Either lineItemId or 7211 // productId is required. 7212 LineItemId string `json:"lineItemId,omitempty"` 7213 7214 // ProductId: The ID of the product to return. This is the REST ID used 7215 // in the products service. Either lineItemId or productId is required. 7216 ProductId string `json:"productId,omitempty"` 7217 7218 // Quantity: The quantity to return and refund. 7219 Quantity int64 `json:"quantity,omitempty"` 7220 7221 // Reason: The reason for the return. Acceptable values are: - 7222 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7223 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7224 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7225 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7226 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7227 // "wrongProductShipped" 7228 Reason string `json:"reason,omitempty"` 7229 7230 // ReasonText: The explanation of the reason. 7231 ReasonText string `json:"reasonText,omitempty"` 7232 7233 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7234 // unconditionally include in API requests. By default, fields with 7235 // empty or default values are omitted from API requests. However, any 7236 // non-pointer, non-interface field appearing in ForceSendFields will be 7237 // sent to the server regardless of whether the field is empty or not. 7238 // This may be used to include empty fields in Patch requests. 7239 ForceSendFields []string `json:"-"` 7240 7241 // NullFields is a list of field names (e.g. "AmountPretax") to include 7242 // in API requests with the JSON null value. By default, fields with 7243 // empty values are omitted from API requests. However, any field with 7244 // an empty value appearing in NullFields will be sent to the server as 7245 // null. It is an error if a field in this list has a non-empty value. 7246 // This may be used to include null fields in Patch requests. 7247 NullFields []string `json:"-"` 7248} 7249 7250func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) { 7251 type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem 7252 raw := NoMethod(*s) 7253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7254} 7255 7256type OrdersCustomBatchRequestEntrySetLineItemMetadata struct { 7257 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 7258 7259 // LineItemId: The ID of the line item to set metadata. Either 7260 // lineItemId or productId is required. 7261 LineItemId string `json:"lineItemId,omitempty"` 7262 7263 // ProductId: The ID of the product to set metadata. This is the REST ID 7264 // used in the products service. Either lineItemId or productId is 7265 // required. 7266 ProductId string `json:"productId,omitempty"` 7267 7268 // ForceSendFields is a list of field names (e.g. "Annotations") to 7269 // unconditionally include in API requests. By default, fields with 7270 // empty or default values are omitted from API requests. However, any 7271 // non-pointer, non-interface field appearing in ForceSendFields will be 7272 // sent to the server regardless of whether the field is empty or not. 7273 // This may be used to include empty fields in Patch requests. 7274 ForceSendFields []string `json:"-"` 7275 7276 // NullFields is a list of field names (e.g. "Annotations") to include 7277 // in API requests with the JSON null value. By default, fields with 7278 // empty values are omitted from API requests. However, any field with 7279 // an empty value appearing in NullFields will be sent to the server as 7280 // null. It is an error if a field in this list has a non-empty value. 7281 // This may be used to include null fields in Patch requests. 7282 NullFields []string `json:"-"` 7283} 7284 7285func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) { 7286 type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata 7287 raw := NoMethod(*s) 7288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7289} 7290 7291type OrdersCustomBatchRequestEntryShipLineItems struct { 7292 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 7293 // handling the shipment. See `shipments[].carrier` in the Orders 7294 // resource representation for a list of acceptable values. 7295 Carrier string `json:"carrier,omitempty"` 7296 7297 // LineItems: Line items to ship. 7298 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 7299 7300 // ShipmentGroupId: ID of the shipment group. Required for orders that 7301 // use the orderinvoices service. 7302 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 7303 7304 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 7305 // the shipment. 7306 ShipmentId string `json:"shipmentId,omitempty"` 7307 7308 // ShipmentInfos: Shipment information. This field is repeated because a 7309 // single line item can be shipped in several packages (and have several 7310 // tracking IDs). 7311 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 7312 7313 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 7314 // ID for the shipment. 7315 TrackingId string `json:"trackingId,omitempty"` 7316 7317 // ForceSendFields is a list of field names (e.g. "Carrier") to 7318 // unconditionally include in API requests. By default, fields with 7319 // empty or default values are omitted from API requests. However, any 7320 // non-pointer, non-interface field appearing in ForceSendFields will be 7321 // sent to the server regardless of whether the field is empty or not. 7322 // This may be used to include empty fields in Patch requests. 7323 ForceSendFields []string `json:"-"` 7324 7325 // NullFields is a list of field names (e.g. "Carrier") to include in 7326 // API requests with the JSON null value. By default, fields with empty 7327 // values are omitted from API requests. However, any field with an 7328 // empty value appearing in NullFields will be sent to the server as 7329 // null. It is an error if a field in this list has a non-empty value. 7330 // This may be used to include null fields in Patch requests. 7331 NullFields []string `json:"-"` 7332} 7333 7334func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) { 7335 type NoMethod OrdersCustomBatchRequestEntryShipLineItems 7336 raw := NoMethod(*s) 7337 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7338} 7339 7340type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { 7341 // Carrier: The carrier handling the shipment. See `shipments[].carrier` 7342 // in the Orders resource representation for a list of acceptable 7343 // values. 7344 Carrier string `json:"carrier,omitempty"` 7345 7346 // ShipmentId: Required. The ID of the shipment. This is assigned by the 7347 // merchant and is unique to each shipment. 7348 ShipmentId string `json:"shipmentId,omitempty"` 7349 7350 // TrackingId: The tracking ID for the shipment. 7351 TrackingId string `json:"trackingId,omitempty"` 7352 7353 // ForceSendFields is a list of field names (e.g. "Carrier") to 7354 // unconditionally include in API requests. By default, fields with 7355 // empty or default values are omitted from API requests. However, any 7356 // non-pointer, non-interface field appearing in ForceSendFields will be 7357 // sent to the server regardless of whether the field is empty or not. 7358 // This may be used to include empty fields in Patch requests. 7359 ForceSendFields []string `json:"-"` 7360 7361 // NullFields is a list of field names (e.g. "Carrier") to include in 7362 // API requests with the JSON null value. By default, fields with empty 7363 // values are omitted from API requests. However, any field with an 7364 // empty value appearing in NullFields will be sent to the server as 7365 // null. It is an error if a field in this list has a non-empty value. 7366 // This may be used to include null fields in Patch requests. 7367 NullFields []string `json:"-"` 7368} 7369 7370func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { 7371 type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo 7372 raw := NoMethod(*s) 7373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7374} 7375 7376type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct { 7377 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 7378 // specified only ship by date is updated. Provided date should be 7379 // within 1 year timeframe and can not be a date in the past. 7380 DeliverByDate string `json:"deliverByDate,omitempty"` 7381 7382 // LineItemId: The ID of the line item to set metadata. Either 7383 // lineItemId or productId is required. 7384 LineItemId string `json:"lineItemId,omitempty"` 7385 7386 // ProductId: The ID of the product to set metadata. This is the REST ID 7387 // used in the products service. Either lineItemId or productId is 7388 // required. 7389 ProductId string `json:"productId,omitempty"` 7390 7391 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 7392 // specified only deliver by date is updated. Provided date should be 7393 // within 1 year timeframe and can not be a date in the past. 7394 ShipByDate string `json:"shipByDate,omitempty"` 7395 7396 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 7397 // unconditionally include in API requests. By default, fields with 7398 // empty or default values are omitted from API requests. However, any 7399 // non-pointer, non-interface field appearing in ForceSendFields will be 7400 // sent to the server regardless of whether the field is empty or not. 7401 // This may be used to include empty fields in Patch requests. 7402 ForceSendFields []string `json:"-"` 7403 7404 // NullFields is a list of field names (e.g. "DeliverByDate") to include 7405 // in API requests with the JSON null value. By default, fields with 7406 // empty values are omitted from API requests. However, any field with 7407 // an empty value appearing in NullFields will be sent to the server as 7408 // null. It is an error if a field in this list has a non-empty value. 7409 // This may be used to include null fields in Patch requests. 7410 NullFields []string `json:"-"` 7411} 7412 7413func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) { 7414 type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails 7415 raw := NoMethod(*s) 7416 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7417} 7418 7419type OrdersCustomBatchRequestEntryUpdateShipment struct { 7420 // Carrier: The carrier handling the shipment. Not updated if missing. 7421 // See `shipments[].carrier` in the Orders resource representation for a 7422 // list of acceptable values. 7423 Carrier string `json:"carrier,omitempty"` 7424 7425 // DeliveryDate: Date on which the shipment has been delivered, in ISO 7426 // 8601 format. Optional and can be provided only if `status` is 7427 // `delivered`. 7428 DeliveryDate string `json:"deliveryDate,omitempty"` 7429 7430 // ShipmentId: The ID of the shipment. 7431 ShipmentId string `json:"shipmentId,omitempty"` 7432 7433 // Status: New status for the shipment. Not updated if missing. 7434 // Acceptable values are: - "delivered" - "undeliverable" - 7435 // "readyForPickup" 7436 Status string `json:"status,omitempty"` 7437 7438 // TrackingId: The tracking ID for the shipment. Not updated if missing. 7439 TrackingId string `json:"trackingId,omitempty"` 7440 7441 // ForceSendFields is a list of field names (e.g. "Carrier") to 7442 // unconditionally include in API requests. By default, fields with 7443 // empty or default values are omitted from API requests. However, any 7444 // non-pointer, non-interface field appearing in ForceSendFields will be 7445 // sent to the server regardless of whether the field is empty or not. 7446 // This may be used to include empty fields in Patch requests. 7447 ForceSendFields []string `json:"-"` 7448 7449 // NullFields is a list of field names (e.g. "Carrier") to include in 7450 // API requests with the JSON null value. By default, fields with empty 7451 // values are omitted from API requests. However, any field with an 7452 // empty value appearing in NullFields will be sent to the server as 7453 // null. It is an error if a field in this list has a non-empty value. 7454 // This may be used to include null fields in Patch requests. 7455 NullFields []string `json:"-"` 7456} 7457 7458func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) { 7459 type NoMethod OrdersCustomBatchRequestEntryUpdateShipment 7460 raw := NoMethod(*s) 7461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7462} 7463 7464type OrdersCustomBatchResponse struct { 7465 // Entries: The result of the execution of the batch requests. 7466 Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"` 7467 7468 // Kind: Identifies what kind of resource this is. Value: the fixed 7469 // string "content#ordersCustomBatchResponse". 7470 Kind string `json:"kind,omitempty"` 7471 7472 // ServerResponse contains the HTTP response code and headers from the 7473 // server. 7474 googleapi.ServerResponse `json:"-"` 7475 7476 // ForceSendFields is a list of field names (e.g. "Entries") to 7477 // unconditionally include in API requests. By default, fields with 7478 // empty or default values are omitted from API requests. However, any 7479 // non-pointer, non-interface field appearing in ForceSendFields will be 7480 // sent to the server regardless of whether the field is empty or not. 7481 // This may be used to include empty fields in Patch requests. 7482 ForceSendFields []string `json:"-"` 7483 7484 // NullFields is a list of field names (e.g. "Entries") to include in 7485 // API requests with the JSON null value. By default, fields with empty 7486 // values are omitted from API requests. However, any field with an 7487 // empty value appearing in NullFields will be sent to the server as 7488 // null. It is an error if a field in this list has a non-empty value. 7489 // This may be used to include null fields in Patch requests. 7490 NullFields []string `json:"-"` 7491} 7492 7493func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) { 7494 type NoMethod OrdersCustomBatchResponse 7495 raw := NoMethod(*s) 7496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7497} 7498 7499type OrdersCustomBatchResponseEntry struct { 7500 // BatchId: The ID of the request entry this entry responds to. 7501 BatchId int64 `json:"batchId,omitempty"` 7502 7503 // Errors: A list of errors defined if and only if the request failed. 7504 Errors *Errors `json:"errors,omitempty"` 7505 7506 // ExecutionStatus: The status of the execution. Only defined if 1. the 7507 // request was successful; and 2. the method is not `get`, 7508 // `getByMerchantOrderId`, or one of the test methods. Acceptable values 7509 // are: - "duplicate" - "executed" 7510 ExecutionStatus string `json:"executionStatus,omitempty"` 7511 7512 // Kind: Identifies what kind of resource this is. Value: the fixed 7513 // string "content#ordersCustomBatchResponseEntry" 7514 Kind string `json:"kind,omitempty"` 7515 7516 // Order: The retrieved order. Only defined if the method is `get` and 7517 // if the request was successful. 7518 Order *Order `json:"order,omitempty"` 7519 7520 // ForceSendFields is a list of field names (e.g. "BatchId") to 7521 // unconditionally include in API requests. By default, fields with 7522 // empty or default values are omitted from API requests. However, any 7523 // non-pointer, non-interface field appearing in ForceSendFields will be 7524 // sent to the server regardless of whether the field is empty or not. 7525 // This may be used to include empty fields in Patch requests. 7526 ForceSendFields []string `json:"-"` 7527 7528 // NullFields is a list of field names (e.g. "BatchId") to include in 7529 // API requests with the JSON null value. By default, fields with empty 7530 // values are omitted from API requests. However, any field with an 7531 // empty value appearing in NullFields will be sent to the server as 7532 // null. It is an error if a field in this list has a non-empty value. 7533 // This may be used to include null fields in Patch requests. 7534 NullFields []string `json:"-"` 7535} 7536 7537func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 7538 type NoMethod OrdersCustomBatchResponseEntry 7539 raw := NoMethod(*s) 7540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7541} 7542 7543type OrdersGetByMerchantOrderIdResponse struct { 7544 // Kind: Identifies what kind of resource this is. Value: the fixed 7545 // string "content#ordersGetByMerchantOrderIdResponse". 7546 Kind string `json:"kind,omitempty"` 7547 7548 // Order: The requested order. 7549 Order *Order `json:"order,omitempty"` 7550 7551 // ServerResponse contains the HTTP response code and headers from the 7552 // server. 7553 googleapi.ServerResponse `json:"-"` 7554 7555 // ForceSendFields is a list of field names (e.g. "Kind") to 7556 // unconditionally include in API requests. By default, fields with 7557 // empty or default values are omitted from API requests. However, any 7558 // non-pointer, non-interface field appearing in ForceSendFields will be 7559 // sent to the server regardless of whether the field is empty or not. 7560 // This may be used to include empty fields in Patch requests. 7561 ForceSendFields []string `json:"-"` 7562 7563 // NullFields is a list of field names (e.g. "Kind") to include in API 7564 // requests with the JSON null value. By default, fields with empty 7565 // values are omitted from API requests. However, any field with an 7566 // empty value appearing in NullFields will be sent to the server as 7567 // null. It is an error if a field in this list has a non-empty value. 7568 // This may be used to include null fields in Patch requests. 7569 NullFields []string `json:"-"` 7570} 7571 7572func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 7573 type NoMethod OrdersGetByMerchantOrderIdResponse 7574 raw := NoMethod(*s) 7575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7576} 7577 7578type OrdersGetTestOrderTemplateResponse struct { 7579 // Kind: Identifies what kind of resource this is. Value: the fixed 7580 // string "content#ordersGetTestOrderTemplateResponse". 7581 Kind string `json:"kind,omitempty"` 7582 7583 // Template: The requested test order template. 7584 Template *TestOrder `json:"template,omitempty"` 7585 7586 // ServerResponse contains the HTTP response code and headers from the 7587 // server. 7588 googleapi.ServerResponse `json:"-"` 7589 7590 // ForceSendFields is a list of field names (e.g. "Kind") to 7591 // unconditionally include in API requests. By default, fields with 7592 // empty or default values are omitted from API requests. However, any 7593 // non-pointer, non-interface field appearing in ForceSendFields will be 7594 // sent to the server regardless of whether the field is empty or not. 7595 // This may be used to include empty fields in Patch requests. 7596 ForceSendFields []string `json:"-"` 7597 7598 // NullFields is a list of field names (e.g. "Kind") to include in API 7599 // requests with the JSON null value. By default, fields with empty 7600 // values are omitted from API requests. However, any field with an 7601 // empty value appearing in NullFields will be sent to the server as 7602 // null. It is an error if a field in this list has a non-empty value. 7603 // This may be used to include null fields in Patch requests. 7604 NullFields []string `json:"-"` 7605} 7606 7607func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { 7608 type NoMethod OrdersGetTestOrderTemplateResponse 7609 raw := NoMethod(*s) 7610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7611} 7612 7613type OrdersInStoreRefundLineItemRequest struct { 7614 // AmountPretax: The amount that is refunded. Required. 7615 AmountPretax *Price `json:"amountPretax,omitempty"` 7616 7617 // AmountTax: Tax amount that correspond to refund amount in 7618 // amountPretax. Required. 7619 AmountTax *Price `json:"amountTax,omitempty"` 7620 7621 // LineItemId: The ID of the line item to return. Either lineItemId or 7622 // productId is required. 7623 LineItemId string `json:"lineItemId,omitempty"` 7624 7625 // OperationId: The ID of the operation. Unique across all operations 7626 // for a given order. 7627 OperationId string `json:"operationId,omitempty"` 7628 7629 // ProductId: The ID of the product to return. This is the REST ID used 7630 // in the products service. Either lineItemId or productId is required. 7631 ProductId string `json:"productId,omitempty"` 7632 7633 // Quantity: The quantity to return and refund. 7634 Quantity int64 `json:"quantity,omitempty"` 7635 7636 // Reason: The reason for the return. Acceptable values are: - 7637 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7638 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7639 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7640 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7641 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7642 // "wrongProductShipped" 7643 Reason string `json:"reason,omitempty"` 7644 7645 // ReasonText: The explanation of the reason. 7646 ReasonText string `json:"reasonText,omitempty"` 7647 7648 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7649 // unconditionally include in API requests. By default, fields with 7650 // empty or default values are omitted from API requests. However, any 7651 // non-pointer, non-interface field appearing in ForceSendFields will be 7652 // sent to the server regardless of whether the field is empty or not. 7653 // This may be used to include empty fields in Patch requests. 7654 ForceSendFields []string `json:"-"` 7655 7656 // NullFields is a list of field names (e.g. "AmountPretax") to include 7657 // in API requests with the JSON null value. By default, fields with 7658 // empty values are omitted from API requests. However, any field with 7659 // an empty value appearing in NullFields will be sent to the server as 7660 // null. It is an error if a field in this list has a non-empty value. 7661 // This may be used to include null fields in Patch requests. 7662 NullFields []string `json:"-"` 7663} 7664 7665func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { 7666 type NoMethod OrdersInStoreRefundLineItemRequest 7667 raw := NoMethod(*s) 7668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7669} 7670 7671type OrdersInStoreRefundLineItemResponse struct { 7672 // ExecutionStatus: The status of the execution. Acceptable values are: 7673 // - "duplicate" - "executed" 7674 ExecutionStatus string `json:"executionStatus,omitempty"` 7675 7676 // Kind: Identifies what kind of resource this is. Value: the fixed 7677 // string "content#ordersInStoreRefundLineItemResponse". 7678 Kind string `json:"kind,omitempty"` 7679 7680 // ServerResponse contains the HTTP response code and headers from the 7681 // server. 7682 googleapi.ServerResponse `json:"-"` 7683 7684 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7685 // unconditionally include in API requests. By default, fields with 7686 // empty or default values are omitted from API requests. However, any 7687 // non-pointer, non-interface field appearing in ForceSendFields will be 7688 // sent to the server regardless of whether the field is empty or not. 7689 // This may be used to include empty fields in Patch requests. 7690 ForceSendFields []string `json:"-"` 7691 7692 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7693 // include in API requests with the JSON null value. By default, fields 7694 // with empty values are omitted from API requests. However, any field 7695 // with an empty value appearing in NullFields will be sent to the 7696 // server as null. It is an error if a field in this list has a 7697 // non-empty value. This may be used to include null fields in Patch 7698 // requests. 7699 NullFields []string `json:"-"` 7700} 7701 7702func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { 7703 type NoMethod OrdersInStoreRefundLineItemResponse 7704 raw := NoMethod(*s) 7705 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7706} 7707 7708type OrdersListResponse struct { 7709 // Kind: Identifies what kind of resource this is. Value: the fixed 7710 // string "content#ordersListResponse". 7711 Kind string `json:"kind,omitempty"` 7712 7713 // NextPageToken: The token for the retrieval of the next page of 7714 // orders. 7715 NextPageToken string `json:"nextPageToken,omitempty"` 7716 7717 Resources []*Order `json:"resources,omitempty"` 7718 7719 // ServerResponse contains the HTTP response code and headers from the 7720 // server. 7721 googleapi.ServerResponse `json:"-"` 7722 7723 // ForceSendFields is a list of field names (e.g. "Kind") to 7724 // unconditionally include in API requests. By default, fields with 7725 // empty or default values are omitted from API requests. However, any 7726 // non-pointer, non-interface field appearing in ForceSendFields will be 7727 // sent to the server regardless of whether the field is empty or not. 7728 // This may be used to include empty fields in Patch requests. 7729 ForceSendFields []string `json:"-"` 7730 7731 // NullFields is a list of field names (e.g. "Kind") to include in API 7732 // requests with the JSON null value. By default, fields with empty 7733 // values are omitted from API requests. However, any field with an 7734 // empty value appearing in NullFields will be sent to the server as 7735 // null. It is an error if a field in this list has a non-empty value. 7736 // This may be used to include null fields in Patch requests. 7737 NullFields []string `json:"-"` 7738} 7739 7740func (s *OrdersListResponse) MarshalJSON() ([]byte, error) { 7741 type NoMethod OrdersListResponse 7742 raw := NoMethod(*s) 7743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7744} 7745 7746type OrdersRefundRequest struct { 7747 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7748 Amount *Price `json:"amount,omitempty"` 7749 7750 // AmountPretax: The amount that is refunded. Either amount or 7751 // amountPretax should be filled. 7752 AmountPretax *Price `json:"amountPretax,omitempty"` 7753 7754 // AmountTax: Tax amount that corresponds to refund amount in 7755 // amountPretax. Optional, but if filled, amountPretax must be set. 7756 // Calculated automatically if not provided. 7757 AmountTax *Price `json:"amountTax,omitempty"` 7758 7759 // OperationId: The ID of the operation. Unique across all operations 7760 // for a given order. 7761 OperationId string `json:"operationId,omitempty"` 7762 7763 // Reason: The reason for the refund. Acceptable values are: - 7764 // "adjustment" - "courtesyAdjustment" - "customerCanceled" - 7765 // "customerDiscretionaryReturn" - "deliveredLateByCarrier" - 7766 // "feeAdjustment" - "lateShipmentCredit" - "noInventory" - 7767 // "other" - "priceError" - "productArrivedDamaged" - 7768 // "productNotAsDescribed" - "shippingCostAdjustment" - 7769 // "taxAdjustment" - "undeliverableShippingAddress" - 7770 // "wrongProductShipped" 7771 Reason string `json:"reason,omitempty"` 7772 7773 // ReasonText: The explanation of the reason. 7774 ReasonText string `json:"reasonText,omitempty"` 7775 7776 // ForceSendFields is a list of field names (e.g. "Amount") to 7777 // unconditionally include in API requests. By default, fields with 7778 // empty or default values are omitted from API requests. However, any 7779 // non-pointer, non-interface field appearing in ForceSendFields will be 7780 // sent to the server regardless of whether the field is empty or not. 7781 // This may be used to include empty fields in Patch requests. 7782 ForceSendFields []string `json:"-"` 7783 7784 // NullFields is a list of field names (e.g. "Amount") to include in API 7785 // requests with the JSON null value. By default, fields with empty 7786 // values are omitted from API requests. However, any field with an 7787 // empty value appearing in NullFields will be sent to the server as 7788 // null. It is an error if a field in this list has a non-empty value. 7789 // This may be used to include null fields in Patch requests. 7790 NullFields []string `json:"-"` 7791} 7792 7793func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) { 7794 type NoMethod OrdersRefundRequest 7795 raw := NoMethod(*s) 7796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7797} 7798 7799type OrdersRefundResponse struct { 7800 // ExecutionStatus: The status of the execution. Acceptable values are: 7801 // - "duplicate" - "executed" 7802 ExecutionStatus string `json:"executionStatus,omitempty"` 7803 7804 // Kind: Identifies what kind of resource this is. Value: the fixed 7805 // string "content#ordersRefundResponse". 7806 Kind string `json:"kind,omitempty"` 7807 7808 // ServerResponse contains the HTTP response code and headers from the 7809 // server. 7810 googleapi.ServerResponse `json:"-"` 7811 7812 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7813 // unconditionally include in API requests. By default, fields with 7814 // empty or default values are omitted from API requests. However, any 7815 // non-pointer, non-interface field appearing in ForceSendFields will be 7816 // sent to the server regardless of whether the field is empty or not. 7817 // This may be used to include empty fields in Patch requests. 7818 ForceSendFields []string `json:"-"` 7819 7820 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7821 // include in API requests with the JSON null value. By default, fields 7822 // with empty values are omitted from API requests. However, any field 7823 // with an empty value appearing in NullFields will be sent to the 7824 // server as null. It is an error if a field in this list has a 7825 // non-empty value. This may be used to include null fields in Patch 7826 // requests. 7827 NullFields []string `json:"-"` 7828} 7829 7830func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) { 7831 type NoMethod OrdersRefundResponse 7832 raw := NoMethod(*s) 7833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7834} 7835 7836type OrdersRejectReturnLineItemRequest struct { 7837 // LineItemId: The ID of the line item to return. Either lineItemId or 7838 // productId is required. 7839 LineItemId string `json:"lineItemId,omitempty"` 7840 7841 // OperationId: The ID of the operation. Unique across all operations 7842 // for a given order. 7843 OperationId string `json:"operationId,omitempty"` 7844 7845 // ProductId: The ID of the product to return. This is the REST ID used 7846 // in the products service. Either lineItemId or productId is required. 7847 ProductId string `json:"productId,omitempty"` 7848 7849 // Quantity: The quantity to return and refund. 7850 Quantity int64 `json:"quantity,omitempty"` 7851 7852 // Reason: The reason for the return. Acceptable values are: - 7853 // "damagedOrUsed" - "missingComponent" - "notEligible" - 7854 // "other" - "outOfReturnWindow" 7855 Reason string `json:"reason,omitempty"` 7856 7857 // ReasonText: The explanation of the reason. 7858 ReasonText string `json:"reasonText,omitempty"` 7859 7860 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7861 // unconditionally include in API requests. By default, fields with 7862 // empty or default values are omitted from API requests. However, any 7863 // non-pointer, non-interface field appearing in ForceSendFields will be 7864 // sent to the server regardless of whether the field is empty or not. 7865 // This may be used to include empty fields in Patch requests. 7866 ForceSendFields []string `json:"-"` 7867 7868 // NullFields is a list of field names (e.g. "LineItemId") to include in 7869 // API requests with the JSON null value. By default, fields with empty 7870 // values are omitted from API requests. However, any field with an 7871 // empty value appearing in NullFields will be sent to the server as 7872 // null. It is an error if a field in this list has a non-empty value. 7873 // This may be used to include null fields in Patch requests. 7874 NullFields []string `json:"-"` 7875} 7876 7877func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { 7878 type NoMethod OrdersRejectReturnLineItemRequest 7879 raw := NoMethod(*s) 7880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7881} 7882 7883type OrdersRejectReturnLineItemResponse struct { 7884 // ExecutionStatus: The status of the execution. Acceptable values are: 7885 // - "duplicate" - "executed" 7886 ExecutionStatus string `json:"executionStatus,omitempty"` 7887 7888 // Kind: Identifies what kind of resource this is. Value: the fixed 7889 // string "content#ordersRejectReturnLineItemResponse". 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. "ExecutionStatus") to 7897 // unconditionally include in API requests. By default, fields with 7898 // empty or default values are omitted from API requests. However, any 7899 // non-pointer, non-interface field appearing in ForceSendFields will be 7900 // sent to the server regardless of whether the field is empty or not. 7901 // This may be used to include empty fields in Patch requests. 7902 ForceSendFields []string `json:"-"` 7903 7904 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7905 // include in API requests with the JSON null value. By default, fields 7906 // with empty values are omitted from API requests. However, any field 7907 // with an empty value appearing in NullFields will be sent to the 7908 // server as null. It is an error if a field in this list has a 7909 // non-empty value. This may be used to include null fields in Patch 7910 // requests. 7911 NullFields []string `json:"-"` 7912} 7913 7914func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { 7915 type NoMethod OrdersRejectReturnLineItemResponse 7916 raw := NoMethod(*s) 7917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7918} 7919 7920type OrdersReturnLineItemRequest struct { 7921 // LineItemId: The ID of the line item to return. Either lineItemId or 7922 // productId is required. 7923 LineItemId string `json:"lineItemId,omitempty"` 7924 7925 // OperationId: The ID of the operation. Unique across all operations 7926 // for a given order. 7927 OperationId string `json:"operationId,omitempty"` 7928 7929 // ProductId: The ID of the product to return. This is the REST ID used 7930 // in the products service. Either lineItemId or productId is required. 7931 ProductId string `json:"productId,omitempty"` 7932 7933 // Quantity: The quantity to return. 7934 Quantity int64 `json:"quantity,omitempty"` 7935 7936 // Reason: The reason for the return. Acceptable values are: - 7937 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7938 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7939 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7940 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7941 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7942 // "wrongProductShipped" 7943 Reason string `json:"reason,omitempty"` 7944 7945 // ReasonText: The explanation of the reason. 7946 ReasonText string `json:"reasonText,omitempty"` 7947 7948 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7949 // unconditionally include in API requests. By default, fields with 7950 // empty or default values are omitted from API requests. However, any 7951 // non-pointer, non-interface field appearing in ForceSendFields will be 7952 // sent to the server regardless of whether the field is empty or not. 7953 // This may be used to include empty fields in Patch requests. 7954 ForceSendFields []string `json:"-"` 7955 7956 // NullFields is a list of field names (e.g. "LineItemId") to include in 7957 // API requests with the JSON null value. By default, fields with empty 7958 // values are omitted from API requests. However, any field with an 7959 // empty value appearing in NullFields will be sent to the server as 7960 // null. It is an error if a field in this list has a non-empty value. 7961 // This may be used to include null fields in Patch requests. 7962 NullFields []string `json:"-"` 7963} 7964 7965func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) { 7966 type NoMethod OrdersReturnLineItemRequest 7967 raw := NoMethod(*s) 7968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7969} 7970 7971type OrdersReturnLineItemResponse struct { 7972 // ExecutionStatus: The status of the execution. Acceptable values are: 7973 // - "duplicate" - "executed" 7974 ExecutionStatus string `json:"executionStatus,omitempty"` 7975 7976 // Kind: Identifies what kind of resource this is. Value: the fixed 7977 // string "content#ordersReturnLineItemResponse". 7978 Kind string `json:"kind,omitempty"` 7979 7980 // ServerResponse contains the HTTP response code and headers from the 7981 // server. 7982 googleapi.ServerResponse `json:"-"` 7983 7984 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7985 // unconditionally include in API requests. By default, fields with 7986 // empty or default values are omitted from API requests. However, any 7987 // non-pointer, non-interface field appearing in ForceSendFields will be 7988 // sent to the server regardless of whether the field is empty or not. 7989 // This may be used to include empty fields in Patch requests. 7990 ForceSendFields []string `json:"-"` 7991 7992 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7993 // include in API requests with the JSON null value. By default, fields 7994 // with empty values are omitted from API requests. However, any field 7995 // with an empty value appearing in NullFields will be sent to the 7996 // server as null. It is an error if a field in this list has a 7997 // non-empty value. This may be used to include null fields in Patch 7998 // requests. 7999 NullFields []string `json:"-"` 8000} 8001 8002func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { 8003 type NoMethod OrdersReturnLineItemResponse 8004 raw := NoMethod(*s) 8005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8006} 8007 8008type OrdersReturnRefundLineItemRequest struct { 8009 // AmountPretax: The amount that is refunded. If omitted, refundless 8010 // return is assumed (same as calling returnLineItem method). 8011 AmountPretax *Price `json:"amountPretax,omitempty"` 8012 8013 // AmountTax: Tax amount that corresponds to refund amount in 8014 // amountPretax. Optional, but if filled, then amountPretax must be set. 8015 // Calculated automatically if not provided. 8016 AmountTax *Price `json:"amountTax,omitempty"` 8017 8018 // LineItemId: The ID of the line item to return. Either lineItemId or 8019 // productId is required. 8020 LineItemId string `json:"lineItemId,omitempty"` 8021 8022 // OperationId: The ID of the operation. Unique across all operations 8023 // for a given order. 8024 OperationId string `json:"operationId,omitempty"` 8025 8026 // ProductId: The ID of the product to return. This is the REST ID used 8027 // in the products service. Either lineItemId or productId is required. 8028 ProductId string `json:"productId,omitempty"` 8029 8030 // Quantity: The quantity to return and refund. Quantity is required. 8031 Quantity int64 `json:"quantity,omitempty"` 8032 8033 // Reason: The reason for the return. Acceptable values are: - 8034 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 8035 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 8036 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 8037 // - "productNotAsDescribed" - "qualityNotAsExpected" - 8038 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 8039 // "wrongProductShipped" 8040 Reason string `json:"reason,omitempty"` 8041 8042 // ReasonText: The explanation of the reason. 8043 ReasonText string `json:"reasonText,omitempty"` 8044 8045 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 8046 // unconditionally include in API requests. By default, fields with 8047 // empty or default values are omitted from API requests. However, any 8048 // non-pointer, non-interface field appearing in ForceSendFields will be 8049 // sent to the server regardless of whether the field is empty or not. 8050 // This may be used to include empty fields in Patch requests. 8051 ForceSendFields []string `json:"-"` 8052 8053 // NullFields is a list of field names (e.g. "AmountPretax") to include 8054 // in API requests with the JSON null value. By default, fields with 8055 // empty values are omitted from API requests. However, any field with 8056 // an empty value appearing in NullFields will be sent to the server as 8057 // null. It is an error if a field in this list has a non-empty value. 8058 // This may be used to include null fields in Patch requests. 8059 NullFields []string `json:"-"` 8060} 8061 8062func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { 8063 type NoMethod OrdersReturnRefundLineItemRequest 8064 raw := NoMethod(*s) 8065 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8066} 8067 8068type OrdersReturnRefundLineItemResponse struct { 8069 // ExecutionStatus: The status of the execution. Acceptable values are: 8070 // - "duplicate" - "executed" 8071 ExecutionStatus string `json:"executionStatus,omitempty"` 8072 8073 // Kind: Identifies what kind of resource this is. Value: the fixed 8074 // string "content#ordersReturnRefundLineItemResponse". 8075 Kind string `json:"kind,omitempty"` 8076 8077 // ServerResponse contains the HTTP response code and headers from the 8078 // server. 8079 googleapi.ServerResponse `json:"-"` 8080 8081 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8082 // unconditionally include in API requests. By default, fields with 8083 // empty or default values are omitted from API requests. However, any 8084 // non-pointer, non-interface field appearing in ForceSendFields will be 8085 // sent to the server regardless of whether the field is empty or not. 8086 // This may be used to include empty fields in Patch requests. 8087 ForceSendFields []string `json:"-"` 8088 8089 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8090 // include in API requests with the JSON null value. By default, fields 8091 // with empty values are omitted from API requests. However, any field 8092 // with an empty value appearing in NullFields will be sent to the 8093 // server as null. It is an error if a field in this list has a 8094 // non-empty value. This may be used to include null fields in Patch 8095 // requests. 8096 NullFields []string `json:"-"` 8097} 8098 8099func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { 8100 type NoMethod OrdersReturnRefundLineItemResponse 8101 raw := NoMethod(*s) 8102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8103} 8104 8105type OrdersSetLineItemMetadataRequest struct { 8106 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 8107 8108 // LineItemId: The ID of the line item to set metadata. Either 8109 // lineItemId or productId is required. 8110 LineItemId string `json:"lineItemId,omitempty"` 8111 8112 // OperationId: The ID of the operation. Unique across all operations 8113 // for a given order. 8114 OperationId string `json:"operationId,omitempty"` 8115 8116 // ProductId: The ID of the product to set metadata. This is the REST ID 8117 // used in the products service. Either lineItemId or productId is 8118 // required. 8119 ProductId string `json:"productId,omitempty"` 8120 8121 // ForceSendFields is a list of field names (e.g. "Annotations") to 8122 // unconditionally include in API requests. By default, fields with 8123 // empty or default values are omitted from API requests. However, any 8124 // non-pointer, non-interface field appearing in ForceSendFields will be 8125 // sent to the server regardless of whether the field is empty or not. 8126 // This may be used to include empty fields in Patch requests. 8127 ForceSendFields []string `json:"-"` 8128 8129 // NullFields is a list of field names (e.g. "Annotations") to include 8130 // in API requests with the JSON null value. By default, fields with 8131 // empty values are omitted from API requests. However, any field with 8132 // an empty value appearing in NullFields will be sent to the server as 8133 // null. It is an error if a field in this list has a non-empty value. 8134 // This may be used to include null fields in Patch requests. 8135 NullFields []string `json:"-"` 8136} 8137 8138func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { 8139 type NoMethod OrdersSetLineItemMetadataRequest 8140 raw := NoMethod(*s) 8141 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8142} 8143 8144type OrdersSetLineItemMetadataResponse struct { 8145 // ExecutionStatus: The status of the execution. Acceptable values are: 8146 // - "duplicate" - "executed" 8147 ExecutionStatus string `json:"executionStatus,omitempty"` 8148 8149 // Kind: Identifies what kind of resource this is. Value: the fixed 8150 // string "content#ordersSetLineItemMetadataResponse". 8151 Kind string `json:"kind,omitempty"` 8152 8153 // ServerResponse contains the HTTP response code and headers from the 8154 // server. 8155 googleapi.ServerResponse `json:"-"` 8156 8157 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8158 // unconditionally include in API requests. By default, fields with 8159 // empty or default values are omitted from API requests. However, any 8160 // non-pointer, non-interface field appearing in ForceSendFields will be 8161 // sent to the server regardless of whether the field is empty or not. 8162 // This may be used to include empty fields in Patch requests. 8163 ForceSendFields []string `json:"-"` 8164 8165 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8166 // include in API requests with the JSON null value. By default, fields 8167 // with empty values are omitted from API requests. However, any field 8168 // with an empty value appearing in NullFields will be sent to the 8169 // server as null. It is an error if a field in this list has a 8170 // non-empty value. This may be used to include null fields in Patch 8171 // requests. 8172 NullFields []string `json:"-"` 8173} 8174 8175func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { 8176 type NoMethod OrdersSetLineItemMetadataResponse 8177 raw := NoMethod(*s) 8178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8179} 8180 8181type OrdersShipLineItemsRequest struct { 8182 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 8183 // handling the shipment. See `shipments[].carrier` in the Orders 8184 // resource representation for a list of acceptable values. 8185 Carrier string `json:"carrier,omitempty"` 8186 8187 // LineItems: Line items to ship. 8188 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 8189 8190 // OperationId: The ID of the operation. Unique across all operations 8191 // for a given order. 8192 OperationId string `json:"operationId,omitempty"` 8193 8194 // ShipmentGroupId: ID of the shipment group. Required for orders that 8195 // use the orderinvoices service. 8196 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 8197 8198 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 8199 // the shipment. 8200 ShipmentId string `json:"shipmentId,omitempty"` 8201 8202 // ShipmentInfos: Shipment information. This field is repeated because a 8203 // single line item can be shipped in several packages (and have several 8204 // tracking IDs). 8205 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 8206 8207 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 8208 // ID for the shipment. 8209 TrackingId string `json:"trackingId,omitempty"` 8210 8211 // ForceSendFields is a list of field names (e.g. "Carrier") to 8212 // unconditionally include in API requests. By default, fields with 8213 // empty or default values are omitted from API requests. However, any 8214 // non-pointer, non-interface field appearing in ForceSendFields will be 8215 // sent to the server regardless of whether the field is empty or not. 8216 // This may be used to include empty fields in Patch requests. 8217 ForceSendFields []string `json:"-"` 8218 8219 // NullFields is a list of field names (e.g. "Carrier") to include in 8220 // API requests with the JSON null value. By default, fields with empty 8221 // values are omitted from API requests. However, any field with an 8222 // empty value appearing in NullFields will be sent to the server as 8223 // null. It is an error if a field in this list has a non-empty value. 8224 // This may be used to include null fields in Patch requests. 8225 NullFields []string `json:"-"` 8226} 8227 8228func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { 8229 type NoMethod OrdersShipLineItemsRequest 8230 raw := NoMethod(*s) 8231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8232} 8233 8234type OrdersShipLineItemsResponse struct { 8235 // ExecutionStatus: The status of the execution. Acceptable values are: 8236 // - "duplicate" - "executed" 8237 ExecutionStatus string `json:"executionStatus,omitempty"` 8238 8239 // Kind: Identifies what kind of resource this is. Value: the fixed 8240 // string "content#ordersShipLineItemsResponse". 8241 Kind string `json:"kind,omitempty"` 8242 8243 // ServerResponse contains the HTTP response code and headers from the 8244 // server. 8245 googleapi.ServerResponse `json:"-"` 8246 8247 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8248 // unconditionally include in API requests. By default, fields with 8249 // empty or default values are omitted from API requests. However, any 8250 // non-pointer, non-interface field appearing in ForceSendFields will be 8251 // sent to the server regardless of whether the field is empty or not. 8252 // This may be used to include empty fields in Patch requests. 8253 ForceSendFields []string `json:"-"` 8254 8255 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8256 // include in API requests with the JSON null value. By default, fields 8257 // with empty values are omitted from API requests. However, any field 8258 // with an empty value appearing in NullFields will be sent to the 8259 // server as null. It is an error if a field in this list has a 8260 // non-empty value. This may be used to include null fields in Patch 8261 // requests. 8262 NullFields []string `json:"-"` 8263} 8264 8265func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { 8266 type NoMethod OrdersShipLineItemsResponse 8267 raw := NoMethod(*s) 8268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8269} 8270 8271type OrdersUpdateLineItemShippingDetailsRequest struct { 8272 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 8273 // specified only ship by date is updated. Provided date should be 8274 // within 1 year timeframe and can not be a date in the past. 8275 DeliverByDate string `json:"deliverByDate,omitempty"` 8276 8277 // LineItemId: The ID of the line item to set metadata. Either 8278 // lineItemId or productId is required. 8279 LineItemId string `json:"lineItemId,omitempty"` 8280 8281 // OperationId: The ID of the operation. Unique across all operations 8282 // for a given order. 8283 OperationId string `json:"operationId,omitempty"` 8284 8285 // ProductId: The ID of the product to set metadata. This is the REST ID 8286 // used in the products service. Either lineItemId or productId is 8287 // required. 8288 ProductId string `json:"productId,omitempty"` 8289 8290 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 8291 // specified only deliver by date is updated. Provided date should be 8292 // within 1 year timeframe and can not be a date in the past. 8293 ShipByDate string `json:"shipByDate,omitempty"` 8294 8295 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 8296 // unconditionally include in API requests. By default, fields with 8297 // empty or default values are omitted from API requests. However, any 8298 // non-pointer, non-interface field appearing in ForceSendFields will be 8299 // sent to the server regardless of whether the field is empty or not. 8300 // This may be used to include empty fields in Patch requests. 8301 ForceSendFields []string `json:"-"` 8302 8303 // NullFields is a list of field names (e.g. "DeliverByDate") to include 8304 // in API requests with the JSON null value. By default, fields with 8305 // empty values are omitted from API requests. However, any field with 8306 // an empty value appearing in NullFields will be sent to the server as 8307 // null. It is an error if a field in this list has a non-empty value. 8308 // This may be used to include null fields in Patch requests. 8309 NullFields []string `json:"-"` 8310} 8311 8312func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { 8313 type NoMethod OrdersUpdateLineItemShippingDetailsRequest 8314 raw := NoMethod(*s) 8315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8316} 8317 8318type OrdersUpdateLineItemShippingDetailsResponse struct { 8319 // ExecutionStatus: The status of the execution. Acceptable values are: 8320 // - "duplicate" - "executed" 8321 ExecutionStatus string `json:"executionStatus,omitempty"` 8322 8323 // Kind: Identifies what kind of resource this is. Value: the fixed 8324 // string "content#ordersUpdateLineItemShippingDetailsResponse". 8325 Kind string `json:"kind,omitempty"` 8326 8327 // ServerResponse contains the HTTP response code and headers from the 8328 // server. 8329 googleapi.ServerResponse `json:"-"` 8330 8331 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8332 // unconditionally include in API requests. By default, fields with 8333 // empty or default values are omitted from API requests. However, any 8334 // non-pointer, non-interface field appearing in ForceSendFields will be 8335 // sent to the server regardless of whether the field is empty or not. 8336 // This may be used to include empty fields in Patch requests. 8337 ForceSendFields []string `json:"-"` 8338 8339 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8340 // include in API requests with the JSON null value. By default, fields 8341 // with empty values are omitted from API requests. However, any field 8342 // with an empty value appearing in NullFields will be sent to the 8343 // server as null. It is an error if a field in this list has a 8344 // non-empty value. This may be used to include null fields in Patch 8345 // requests. 8346 NullFields []string `json:"-"` 8347} 8348 8349func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { 8350 type NoMethod OrdersUpdateLineItemShippingDetailsResponse 8351 raw := NoMethod(*s) 8352 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8353} 8354 8355type OrdersUpdateMerchantOrderIdRequest struct { 8356 // MerchantOrderId: The merchant order id to be assigned to the order. 8357 // Must be unique per merchant. 8358 MerchantOrderId string `json:"merchantOrderId,omitempty"` 8359 8360 // OperationId: The ID of the operation. Unique across all operations 8361 // for a given order. 8362 OperationId string `json:"operationId,omitempty"` 8363 8364 // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to 8365 // unconditionally include in API requests. By default, fields with 8366 // empty or default values are omitted from API requests. However, any 8367 // non-pointer, non-interface field appearing in ForceSendFields will be 8368 // sent to the server regardless of whether the field is empty or not. 8369 // This may be used to include empty fields in Patch requests. 8370 ForceSendFields []string `json:"-"` 8371 8372 // NullFields is a list of field names (e.g. "MerchantOrderId") to 8373 // include in API requests with the JSON null value. By default, fields 8374 // with empty values are omitted from API requests. However, any field 8375 // with an empty value appearing in NullFields will be sent to the 8376 // server as null. It is an error if a field in this list has a 8377 // non-empty value. This may be used to include null fields in Patch 8378 // requests. 8379 NullFields []string `json:"-"` 8380} 8381 8382func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { 8383 type NoMethod OrdersUpdateMerchantOrderIdRequest 8384 raw := NoMethod(*s) 8385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8386} 8387 8388type OrdersUpdateMerchantOrderIdResponse struct { 8389 // ExecutionStatus: The status of the execution. Acceptable values are: 8390 // - "duplicate" - "executed" 8391 ExecutionStatus string `json:"executionStatus,omitempty"` 8392 8393 // Kind: Identifies what kind of resource this is. Value: the fixed 8394 // string "content#ordersUpdateMerchantOrderIdResponse". 8395 Kind string `json:"kind,omitempty"` 8396 8397 // ServerResponse contains the HTTP response code and headers from the 8398 // server. 8399 googleapi.ServerResponse `json:"-"` 8400 8401 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8402 // unconditionally include in API requests. By default, fields with 8403 // empty or default values are omitted from API requests. However, any 8404 // non-pointer, non-interface field appearing in ForceSendFields will be 8405 // sent to the server regardless of whether the field is empty or not. 8406 // This may be used to include empty fields in Patch requests. 8407 ForceSendFields []string `json:"-"` 8408 8409 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8410 // include in API requests with the JSON null value. By default, fields 8411 // with empty values are omitted from API requests. However, any field 8412 // with an empty value appearing in NullFields will be sent to the 8413 // server as null. It is an error if a field in this list has a 8414 // non-empty value. This may be used to include null fields in Patch 8415 // requests. 8416 NullFields []string `json:"-"` 8417} 8418 8419func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 8420 type NoMethod OrdersUpdateMerchantOrderIdResponse 8421 raw := NoMethod(*s) 8422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8423} 8424 8425type OrdersUpdateShipmentRequest struct { 8426 // Carrier: The carrier handling the shipment. Not updated if missing. 8427 // See `shipments[].carrier` in the Orders resource representation for a 8428 // list of acceptable values. 8429 Carrier string `json:"carrier,omitempty"` 8430 8431 // DeliveryDate: Date on which the shipment has been delivered, in ISO 8432 // 8601 format. Optional and can be provided only if `status` is 8433 // `delivered`. 8434 DeliveryDate string `json:"deliveryDate,omitempty"` 8435 8436 // OperationId: The ID of the operation. Unique across all operations 8437 // for a given order. 8438 OperationId string `json:"operationId,omitempty"` 8439 8440 // ShipmentId: The ID of the shipment. 8441 ShipmentId string `json:"shipmentId,omitempty"` 8442 8443 // Status: New status for the shipment. Not updated if missing. 8444 // Acceptable values are: - "delivered" - "undeliverable" - 8445 // "readyForPickup" 8446 Status string `json:"status,omitempty"` 8447 8448 // TrackingId: The tracking ID for the shipment. Not updated if missing. 8449 TrackingId string `json:"trackingId,omitempty"` 8450 8451 // ForceSendFields is a list of field names (e.g. "Carrier") to 8452 // unconditionally include in API requests. By default, fields with 8453 // empty or default values are omitted from API requests. However, any 8454 // non-pointer, non-interface field appearing in ForceSendFields will be 8455 // sent to the server regardless of whether the field is empty or not. 8456 // This may be used to include empty fields in Patch requests. 8457 ForceSendFields []string `json:"-"` 8458 8459 // NullFields is a list of field names (e.g. "Carrier") to include in 8460 // API requests with the JSON null value. By default, fields with empty 8461 // values are omitted from API requests. However, any field with an 8462 // empty value appearing in NullFields will be sent to the server as 8463 // null. It is an error if a field in this list has a non-empty value. 8464 // This may be used to include null fields in Patch requests. 8465 NullFields []string `json:"-"` 8466} 8467 8468func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { 8469 type NoMethod OrdersUpdateShipmentRequest 8470 raw := NoMethod(*s) 8471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8472} 8473 8474type OrdersUpdateShipmentResponse struct { 8475 // ExecutionStatus: The status of the execution. Acceptable values are: 8476 // - "duplicate" - "executed" 8477 ExecutionStatus string `json:"executionStatus,omitempty"` 8478 8479 // Kind: Identifies what kind of resource this is. Value: the fixed 8480 // string "content#ordersUpdateShipmentResponse". 8481 Kind string `json:"kind,omitempty"` 8482 8483 // ServerResponse contains the HTTP response code and headers from the 8484 // server. 8485 googleapi.ServerResponse `json:"-"` 8486 8487 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8488 // unconditionally include in API requests. By default, fields with 8489 // empty or default values are omitted from API requests. However, any 8490 // non-pointer, non-interface field appearing in ForceSendFields will be 8491 // sent to the server regardless of whether the field is empty or not. 8492 // This may be used to include empty fields in Patch requests. 8493 ForceSendFields []string `json:"-"` 8494 8495 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8496 // include in API requests with the JSON null value. By default, fields 8497 // with empty values are omitted from API requests. However, any field 8498 // with an empty value appearing in NullFields will be sent to the 8499 // server as null. It is an error if a field in this list has a 8500 // non-empty value. This may be used to include null fields in Patch 8501 // requests. 8502 NullFields []string `json:"-"` 8503} 8504 8505func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { 8506 type NoMethod OrdersUpdateShipmentResponse 8507 raw := NoMethod(*s) 8508 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8509} 8510 8511type PickupCarrierService struct { 8512 // CarrierName: The name of the pickup carrier (e.g., "UPS"). 8513 // Required. 8514 CarrierName string `json:"carrierName,omitempty"` 8515 8516 // ServiceName: The name of the pickup service (e.g., "Access point"). 8517 // Required. 8518 ServiceName string `json:"serviceName,omitempty"` 8519 8520 // ForceSendFields is a list of field names (e.g. "CarrierName") to 8521 // unconditionally include in API requests. By default, fields with 8522 // empty or default values are omitted from API requests. However, any 8523 // non-pointer, non-interface field appearing in ForceSendFields will be 8524 // sent to the server regardless of whether the field is empty or not. 8525 // This may be used to include empty fields in Patch requests. 8526 ForceSendFields []string `json:"-"` 8527 8528 // NullFields is a list of field names (e.g. "CarrierName") to include 8529 // in API requests with the JSON null value. By default, fields with 8530 // empty values are omitted from API requests. However, any field with 8531 // an empty value appearing in NullFields will be sent to the server as 8532 // null. It is an error if a field in this list has a non-empty value. 8533 // This may be used to include null fields in Patch requests. 8534 NullFields []string `json:"-"` 8535} 8536 8537func (s *PickupCarrierService) MarshalJSON() ([]byte, error) { 8538 type NoMethod PickupCarrierService 8539 raw := NoMethod(*s) 8540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8541} 8542 8543type PickupServicesPickupService struct { 8544 // CarrierName: The name of the carrier (e.g., "UPS"). Always present. 8545 CarrierName string `json:"carrierName,omitempty"` 8546 8547 // Country: The CLDR country code of the carrier (e.g., "US"). Always 8548 // present. 8549 Country string `json:"country,omitempty"` 8550 8551 // ServiceName: The name of the pickup service (e.g., "Access point"). 8552 // Always present. 8553 ServiceName string `json:"serviceName,omitempty"` 8554 8555 // ForceSendFields is a list of field names (e.g. "CarrierName") to 8556 // unconditionally include in API requests. By default, fields with 8557 // empty or default values are omitted from API requests. However, any 8558 // non-pointer, non-interface field appearing in ForceSendFields will be 8559 // sent to the server regardless of whether the field is empty or not. 8560 // This may be used to include empty fields in Patch requests. 8561 ForceSendFields []string `json:"-"` 8562 8563 // NullFields is a list of field names (e.g. "CarrierName") to include 8564 // in API requests with the JSON null value. By default, fields with 8565 // empty values are omitted from API requests. However, any field with 8566 // an empty value appearing in NullFields will be sent to the server as 8567 // null. It is an error if a field in this list has a non-empty value. 8568 // This may be used to include null fields in Patch requests. 8569 NullFields []string `json:"-"` 8570} 8571 8572func (s *PickupServicesPickupService) MarshalJSON() ([]byte, error) { 8573 type NoMethod PickupServicesPickupService 8574 raw := NoMethod(*s) 8575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8576} 8577 8578type PosCustomBatchRequest struct { 8579 // Entries: The request entries to be processed in the batch. 8580 Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` 8581 8582 // ForceSendFields is a list of field names (e.g. "Entries") to 8583 // unconditionally include in API requests. By default, fields with 8584 // empty or default values are omitted from API requests. However, any 8585 // non-pointer, non-interface field appearing in ForceSendFields will be 8586 // sent to the server regardless of whether the field is empty or not. 8587 // This may be used to include empty fields in Patch requests. 8588 ForceSendFields []string `json:"-"` 8589 8590 // NullFields is a list of field names (e.g. "Entries") to include in 8591 // API requests with the JSON null value. By default, fields with empty 8592 // values are omitted from API requests. However, any field with an 8593 // empty value appearing in NullFields will be sent to the server as 8594 // null. It is an error if a field in this list has a non-empty value. 8595 // This may be used to include null fields in Patch requests. 8596 NullFields []string `json:"-"` 8597} 8598 8599func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) { 8600 type NoMethod PosCustomBatchRequest 8601 raw := NoMethod(*s) 8602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8603} 8604 8605type PosCustomBatchRequestEntry struct { 8606 // BatchId: An entry ID, unique within the batch request. 8607 BatchId int64 `json:"batchId,omitempty"` 8608 8609 // Inventory: The inventory to submit. This should be set only if the 8610 // method is `inventory`. 8611 Inventory *PosInventory `json:"inventory,omitempty"` 8612 8613 // MerchantId: The ID of the POS data provider. 8614 MerchantId uint64 `json:"merchantId,omitempty,string"` 8615 8616 // Method: The method of the batch entry. Acceptable values are: - 8617 // "delete" - "get" - "insert" - "inventory" - "sale" 8618 Method string `json:"method,omitempty"` 8619 8620 // Sale: The sale information to submit. This should be set only if the 8621 // method is `sale`. 8622 Sale *PosSale `json:"sale,omitempty"` 8623 8624 // Store: The store information to submit. This should be set only if 8625 // the method is `insert`. 8626 Store *PosStore `json:"store,omitempty"` 8627 8628 // StoreCode: The store code. This should be set only if the method is 8629 // `delete` or `get`. 8630 StoreCode string `json:"storeCode,omitempty"` 8631 8632 // TargetMerchantId: The ID of the account for which to get/submit data. 8633 TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` 8634 8635 // ForceSendFields is a list of field names (e.g. "BatchId") to 8636 // unconditionally include in API requests. By default, fields with 8637 // empty or default values are omitted from API requests. However, any 8638 // non-pointer, non-interface field appearing in ForceSendFields will be 8639 // sent to the server regardless of whether the field is empty or not. 8640 // This may be used to include empty fields in Patch requests. 8641 ForceSendFields []string `json:"-"` 8642 8643 // NullFields is a list of field names (e.g. "BatchId") to include in 8644 // API requests with the JSON null value. By default, fields with empty 8645 // values are omitted from API requests. However, any field with an 8646 // empty value appearing in NullFields will be sent to the server as 8647 // null. It is an error if a field in this list has a non-empty value. 8648 // This may be used to include null fields in Patch requests. 8649 NullFields []string `json:"-"` 8650} 8651 8652func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 8653 type NoMethod PosCustomBatchRequestEntry 8654 raw := NoMethod(*s) 8655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8656} 8657 8658type PosCustomBatchResponse struct { 8659 // Entries: The result of the execution of the batch requests. 8660 Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` 8661 8662 // Kind: Identifies what kind of resource this is. Value: the fixed 8663 // string "content#posCustomBatchResponse". 8664 Kind string `json:"kind,omitempty"` 8665 8666 // ServerResponse contains the HTTP response code and headers from the 8667 // server. 8668 googleapi.ServerResponse `json:"-"` 8669 8670 // ForceSendFields is a list of field names (e.g. "Entries") to 8671 // unconditionally include in API requests. By default, fields with 8672 // empty or default values are omitted from API requests. However, any 8673 // non-pointer, non-interface field appearing in ForceSendFields will be 8674 // sent to the server regardless of whether the field is empty or not. 8675 // This may be used to include empty fields in Patch requests. 8676 ForceSendFields []string `json:"-"` 8677 8678 // NullFields is a list of field names (e.g. "Entries") to include in 8679 // API requests with the JSON null value. By default, fields with empty 8680 // values are omitted from API requests. However, any field with an 8681 // empty value appearing in NullFields will be sent to the server as 8682 // null. It is an error if a field in this list has a non-empty value. 8683 // This may be used to include null fields in Patch requests. 8684 NullFields []string `json:"-"` 8685} 8686 8687func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) { 8688 type NoMethod PosCustomBatchResponse 8689 raw := NoMethod(*s) 8690 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8691} 8692 8693type PosCustomBatchResponseEntry struct { 8694 // BatchId: The ID of the request entry to which this entry responds. 8695 BatchId int64 `json:"batchId,omitempty"` 8696 8697 // Errors: A list of errors defined if, and only if, the request failed. 8698 Errors *Errors `json:"errors,omitempty"` 8699 8700 // Inventory: The updated inventory information. 8701 Inventory *PosInventory `json:"inventory,omitempty"` 8702 8703 // Kind: Identifies what kind of resource this is. Value: the fixed 8704 // string "content#posCustomBatchResponseEntry" 8705 Kind string `json:"kind,omitempty"` 8706 8707 // Sale: The updated sale information. 8708 Sale *PosSale `json:"sale,omitempty"` 8709 8710 // Store: The retrieved or updated store information. 8711 Store *PosStore `json:"store,omitempty"` 8712 8713 // ForceSendFields is a list of field names (e.g. "BatchId") to 8714 // unconditionally include in API requests. By default, fields with 8715 // empty or default values are omitted from API requests. However, any 8716 // non-pointer, non-interface field appearing in ForceSendFields will be 8717 // sent to the server regardless of whether the field is empty or not. 8718 // This may be used to include empty fields in Patch requests. 8719 ForceSendFields []string `json:"-"` 8720 8721 // NullFields is a list of field names (e.g. "BatchId") to include in 8722 // API requests with the JSON null value. By default, fields with empty 8723 // values are omitted from API requests. However, any field with an 8724 // empty value appearing in NullFields will be sent to the server as 8725 // null. It is an error if a field in this list has a non-empty value. 8726 // This may be used to include null fields in Patch requests. 8727 NullFields []string `json:"-"` 8728} 8729 8730func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 8731 type NoMethod PosCustomBatchResponseEntry 8732 raw := NoMethod(*s) 8733 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8734} 8735 8736type PosDataProviders struct { 8737 // Country: Country code. 8738 Country string `json:"country,omitempty"` 8739 8740 // PosDataProviders: A list of POS data providers. 8741 PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` 8742 8743 // ForceSendFields is a list of field names (e.g. "Country") to 8744 // unconditionally include in API requests. By default, fields with 8745 // empty or default values are omitted from API requests. However, any 8746 // non-pointer, non-interface field appearing in ForceSendFields will be 8747 // sent to the server regardless of whether the field is empty or not. 8748 // This may be used to include empty fields in Patch requests. 8749 ForceSendFields []string `json:"-"` 8750 8751 // NullFields is a list of field names (e.g. "Country") to include in 8752 // API requests with the JSON null value. By default, fields with empty 8753 // values are omitted from API requests. However, any field with an 8754 // empty value appearing in NullFields will be sent to the server as 8755 // null. It is an error if a field in this list has a non-empty value. 8756 // This may be used to include null fields in Patch requests. 8757 NullFields []string `json:"-"` 8758} 8759 8760func (s *PosDataProviders) MarshalJSON() ([]byte, error) { 8761 type NoMethod PosDataProviders 8762 raw := NoMethod(*s) 8763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8764} 8765 8766type PosDataProvidersPosDataProvider struct { 8767 // DisplayName: The display name of Pos data Provider. 8768 DisplayName string `json:"displayName,omitempty"` 8769 8770 // FullName: The full name of this POS data Provider. 8771 FullName string `json:"fullName,omitempty"` 8772 8773 // ProviderId: The ID of the account. 8774 ProviderId uint64 `json:"providerId,omitempty,string"` 8775 8776 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8777 // unconditionally include in API requests. By default, fields with 8778 // empty or default values are omitted from API requests. However, any 8779 // non-pointer, non-interface field appearing in ForceSendFields will be 8780 // sent to the server regardless of whether the field is empty or not. 8781 // This may be used to include empty fields in Patch requests. 8782 ForceSendFields []string `json:"-"` 8783 8784 // NullFields is a list of field names (e.g. "DisplayName") to include 8785 // in API requests with the JSON null value. By default, fields with 8786 // empty values are omitted from API requests. However, any field with 8787 // an empty value appearing in NullFields will be sent to the server as 8788 // null. It is an error if a field in this list has a non-empty value. 8789 // This may be used to include null fields in Patch requests. 8790 NullFields []string `json:"-"` 8791} 8792 8793func (s *PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { 8794 type NoMethod PosDataProvidersPosDataProvider 8795 raw := NoMethod(*s) 8796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8797} 8798 8799// PosInventory: The absolute quantity of an item available at the given 8800// store. 8801type PosInventory struct { 8802 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8803 // the item. 8804 ContentLanguage string `json:"contentLanguage,omitempty"` 8805 8806 // Gtin: Global Trade Item Number. 8807 Gtin string `json:"gtin,omitempty"` 8808 8809 // ItemId: Required. A unique identifier for the item. 8810 ItemId string `json:"itemId,omitempty"` 8811 8812 // Kind: Identifies what kind of resource this is. Value: the fixed 8813 // string "content#posInventory" 8814 Kind string `json:"kind,omitempty"` 8815 8816 // Price: Required. The current price of the item. 8817 Price *Price `json:"price,omitempty"` 8818 8819 // Quantity: Required. The available quantity of the item. 8820 Quantity int64 `json:"quantity,omitempty,string"` 8821 8822 // StoreCode: Required. The identifier of the merchant's store. Either a 8823 // `storeCode` inserted via the API or the code of the store in Google 8824 // My Business. 8825 StoreCode string `json:"storeCode,omitempty"` 8826 8827 // TargetCountry: Required. The CLDR territory code for the item. 8828 TargetCountry string `json:"targetCountry,omitempty"` 8829 8830 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8831 Timestamp string `json:"timestamp,omitempty"` 8832 8833 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8834 // unconditionally include in API requests. By default, fields with 8835 // empty or default values are omitted from API requests. However, any 8836 // non-pointer, non-interface field appearing in ForceSendFields will be 8837 // sent to the server regardless of whether the field is empty or not. 8838 // This may be used to include empty fields in Patch requests. 8839 ForceSendFields []string `json:"-"` 8840 8841 // NullFields is a list of field names (e.g. "ContentLanguage") to 8842 // include in API requests with the JSON null value. By default, fields 8843 // with empty values are omitted from API requests. However, any field 8844 // with an empty value appearing in NullFields will be sent to the 8845 // server as null. It is an error if a field in this list has a 8846 // non-empty value. This may be used to include null fields in Patch 8847 // requests. 8848 NullFields []string `json:"-"` 8849} 8850 8851func (s *PosInventory) MarshalJSON() ([]byte, error) { 8852 type NoMethod PosInventory 8853 raw := NoMethod(*s) 8854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8855} 8856 8857type PosInventoryRequest struct { 8858 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8859 // the item. 8860 ContentLanguage string `json:"contentLanguage,omitempty"` 8861 8862 // Gtin: Global Trade Item Number. 8863 Gtin string `json:"gtin,omitempty"` 8864 8865 // ItemId: Required. A unique identifier for the item. 8866 ItemId string `json:"itemId,omitempty"` 8867 8868 // Price: Required. The current price of the item. 8869 Price *Price `json:"price,omitempty"` 8870 8871 // Quantity: Required. The available quantity of the item. 8872 Quantity int64 `json:"quantity,omitempty,string"` 8873 8874 // StoreCode: Required. The identifier of the merchant's store. Either a 8875 // `storeCode` inserted via the API or the code of the store in Google 8876 // My Business. 8877 StoreCode string `json:"storeCode,omitempty"` 8878 8879 // TargetCountry: Required. The CLDR territory code for the item. 8880 TargetCountry string `json:"targetCountry,omitempty"` 8881 8882 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8883 Timestamp string `json:"timestamp,omitempty"` 8884 8885 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8886 // unconditionally include in API requests. By default, fields with 8887 // empty or default values are omitted from API requests. However, any 8888 // non-pointer, non-interface field appearing in ForceSendFields will be 8889 // sent to the server regardless of whether the field is empty or not. 8890 // This may be used to include empty fields in Patch requests. 8891 ForceSendFields []string `json:"-"` 8892 8893 // NullFields is a list of field names (e.g. "ContentLanguage") to 8894 // include in API requests with the JSON null value. By default, fields 8895 // with empty values are omitted from API requests. However, any field 8896 // with an empty value appearing in NullFields will be sent to the 8897 // server as null. It is an error if a field in this list has a 8898 // non-empty value. This may be used to include null fields in Patch 8899 // requests. 8900 NullFields []string `json:"-"` 8901} 8902 8903func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) { 8904 type NoMethod PosInventoryRequest 8905 raw := NoMethod(*s) 8906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8907} 8908 8909type PosInventoryResponse struct { 8910 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8911 // the item. 8912 ContentLanguage string `json:"contentLanguage,omitempty"` 8913 8914 // Gtin: Global Trade Item Number. 8915 Gtin string `json:"gtin,omitempty"` 8916 8917 // ItemId: Required. A unique identifier for the item. 8918 ItemId string `json:"itemId,omitempty"` 8919 8920 // Kind: Identifies what kind of resource this is. Value: the fixed 8921 // string "content#posInventoryResponse". 8922 Kind string `json:"kind,omitempty"` 8923 8924 // Price: Required. The current price of the item. 8925 Price *Price `json:"price,omitempty"` 8926 8927 // Quantity: Required. The available quantity of the item. 8928 Quantity int64 `json:"quantity,omitempty,string"` 8929 8930 // StoreCode: Required. The identifier of the merchant's store. Either a 8931 // `storeCode` inserted via the API or the code of the store in Google 8932 // My Business. 8933 StoreCode string `json:"storeCode,omitempty"` 8934 8935 // TargetCountry: Required. The CLDR territory code for the item. 8936 TargetCountry string `json:"targetCountry,omitempty"` 8937 8938 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8939 Timestamp string `json:"timestamp,omitempty"` 8940 8941 // ServerResponse contains the HTTP response code and headers from the 8942 // server. 8943 googleapi.ServerResponse `json:"-"` 8944 8945 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8946 // unconditionally include in API requests. By default, fields with 8947 // empty or default values are omitted from API requests. However, any 8948 // non-pointer, non-interface field appearing in ForceSendFields will be 8949 // sent to the server regardless of whether the field is empty or not. 8950 // This may be used to include empty fields in Patch requests. 8951 ForceSendFields []string `json:"-"` 8952 8953 // NullFields is a list of field names (e.g. "ContentLanguage") to 8954 // include in API requests with the JSON null value. By default, fields 8955 // with empty values are omitted from API requests. However, any field 8956 // with an empty value appearing in NullFields will be sent to the 8957 // server as null. It is an error if a field in this list has a 8958 // non-empty value. This may be used to include null fields in Patch 8959 // requests. 8960 NullFields []string `json:"-"` 8961} 8962 8963func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) { 8964 type NoMethod PosInventoryResponse 8965 raw := NoMethod(*s) 8966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8967} 8968 8969type PosListResponse struct { 8970 // Kind: Identifies what kind of resource this is. Value: the fixed 8971 // string "content#posListResponse". 8972 Kind string `json:"kind,omitempty"` 8973 8974 Resources []*PosStore `json:"resources,omitempty"` 8975 8976 // ServerResponse contains the HTTP response code and headers from the 8977 // server. 8978 googleapi.ServerResponse `json:"-"` 8979 8980 // ForceSendFields is a list of field names (e.g. "Kind") to 8981 // unconditionally include in API requests. By default, fields with 8982 // empty or default values are omitted from API requests. However, any 8983 // non-pointer, non-interface field appearing in ForceSendFields will be 8984 // sent to the server regardless of whether the field is empty or not. 8985 // This may be used to include empty fields in Patch requests. 8986 ForceSendFields []string `json:"-"` 8987 8988 // NullFields is a list of field names (e.g. "Kind") to include in API 8989 // requests with the JSON null value. By default, fields with empty 8990 // values are omitted from API requests. However, any field with an 8991 // empty value appearing in NullFields will be sent to the server as 8992 // null. It is an error if a field in this list has a non-empty value. 8993 // This may be used to include null fields in Patch requests. 8994 NullFields []string `json:"-"` 8995} 8996 8997func (s *PosListResponse) MarshalJSON() ([]byte, error) { 8998 type NoMethod PosListResponse 8999 raw := NoMethod(*s) 9000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9001} 9002 9003// PosSale: The change of the available quantity of an item at the given 9004// store. 9005type PosSale struct { 9006 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9007 // the item. 9008 ContentLanguage string `json:"contentLanguage,omitempty"` 9009 9010 // Gtin: Global Trade Item Number. 9011 Gtin string `json:"gtin,omitempty"` 9012 9013 // ItemId: Required. A unique identifier for the item. 9014 ItemId string `json:"itemId,omitempty"` 9015 9016 // Kind: Identifies what kind of resource this is. Value: the fixed 9017 // string "content#posSale" 9018 Kind string `json:"kind,omitempty"` 9019 9020 // Price: Required. The price of the item. 9021 Price *Price `json:"price,omitempty"` 9022 9023 // Quantity: Required. The relative change of the available quantity. 9024 // Negative for items returned. 9025 Quantity int64 `json:"quantity,omitempty,string"` 9026 9027 // SaleId: A unique ID to group items from the same sale event. 9028 SaleId string `json:"saleId,omitempty"` 9029 9030 // StoreCode: Required. The identifier of the merchant's store. Either a 9031 // `storeCode` inserted via the API or the code of the store in Google 9032 // My Business. 9033 StoreCode string `json:"storeCode,omitempty"` 9034 9035 // TargetCountry: Required. The CLDR territory code for the item. 9036 TargetCountry string `json:"targetCountry,omitempty"` 9037 9038 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9039 Timestamp string `json:"timestamp,omitempty"` 9040 9041 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9042 // unconditionally include in API requests. By default, fields with 9043 // empty or default values are omitted from API requests. However, any 9044 // non-pointer, non-interface field appearing in ForceSendFields will be 9045 // sent to the server regardless of whether the field is empty or not. 9046 // This may be used to include empty fields in Patch requests. 9047 ForceSendFields []string `json:"-"` 9048 9049 // NullFields is a list of field names (e.g. "ContentLanguage") to 9050 // include in API requests with the JSON null value. By default, fields 9051 // with empty values are omitted from API requests. However, any field 9052 // with an empty value appearing in NullFields will be sent to the 9053 // server as null. It is an error if a field in this list has a 9054 // non-empty value. This may be used to include null fields in Patch 9055 // requests. 9056 NullFields []string `json:"-"` 9057} 9058 9059func (s *PosSale) MarshalJSON() ([]byte, error) { 9060 type NoMethod PosSale 9061 raw := NoMethod(*s) 9062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9063} 9064 9065type PosSaleRequest struct { 9066 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9067 // the item. 9068 ContentLanguage string `json:"contentLanguage,omitempty"` 9069 9070 // Gtin: Global Trade Item Number. 9071 Gtin string `json:"gtin,omitempty"` 9072 9073 // ItemId: Required. A unique identifier for the item. 9074 ItemId string `json:"itemId,omitempty"` 9075 9076 // Price: Required. The price of the item. 9077 Price *Price `json:"price,omitempty"` 9078 9079 // Quantity: Required. The relative change of the available quantity. 9080 // Negative for items returned. 9081 Quantity int64 `json:"quantity,omitempty,string"` 9082 9083 // SaleId: A unique ID to group items from the same sale event. 9084 SaleId string `json:"saleId,omitempty"` 9085 9086 // StoreCode: Required. The identifier of the merchant's store. Either a 9087 // `storeCode` inserted via the API or the code of the store in Google 9088 // My Business. 9089 StoreCode string `json:"storeCode,omitempty"` 9090 9091 // TargetCountry: Required. The CLDR territory code for the item. 9092 TargetCountry string `json:"targetCountry,omitempty"` 9093 9094 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9095 Timestamp string `json:"timestamp,omitempty"` 9096 9097 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9098 // unconditionally include in API requests. By default, fields with 9099 // empty or default values are omitted from API requests. However, any 9100 // non-pointer, non-interface field appearing in ForceSendFields will be 9101 // sent to the server regardless of whether the field is empty or not. 9102 // This may be used to include empty fields in Patch requests. 9103 ForceSendFields []string `json:"-"` 9104 9105 // NullFields is a list of field names (e.g. "ContentLanguage") to 9106 // include in API requests with the JSON null value. By default, fields 9107 // with empty values are omitted from API requests. However, any field 9108 // with an empty value appearing in NullFields will be sent to the 9109 // server as null. It is an error if a field in this list has a 9110 // non-empty value. This may be used to include null fields in Patch 9111 // requests. 9112 NullFields []string `json:"-"` 9113} 9114 9115func (s *PosSaleRequest) MarshalJSON() ([]byte, error) { 9116 type NoMethod PosSaleRequest 9117 raw := NoMethod(*s) 9118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9119} 9120 9121type PosSaleResponse struct { 9122 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9123 // the item. 9124 ContentLanguage string `json:"contentLanguage,omitempty"` 9125 9126 // Gtin: Global Trade Item Number. 9127 Gtin string `json:"gtin,omitempty"` 9128 9129 // ItemId: Required. A unique identifier for the item. 9130 ItemId string `json:"itemId,omitempty"` 9131 9132 // Kind: Identifies what kind of resource this is. Value: the fixed 9133 // string "content#posSaleResponse". 9134 Kind string `json:"kind,omitempty"` 9135 9136 // Price: Required. The price of the item. 9137 Price *Price `json:"price,omitempty"` 9138 9139 // Quantity: Required. The relative change of the available quantity. 9140 // Negative for items returned. 9141 Quantity int64 `json:"quantity,omitempty,string"` 9142 9143 // SaleId: A unique ID to group items from the same sale event. 9144 SaleId string `json:"saleId,omitempty"` 9145 9146 // StoreCode: Required. The identifier of the merchant's store. Either a 9147 // `storeCode` inserted via the API or the code of the store in Google 9148 // My Business. 9149 StoreCode string `json:"storeCode,omitempty"` 9150 9151 // TargetCountry: Required. The CLDR territory code for the item. 9152 TargetCountry string `json:"targetCountry,omitempty"` 9153 9154 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9155 Timestamp string `json:"timestamp,omitempty"` 9156 9157 // ServerResponse contains the HTTP response code and headers from the 9158 // server. 9159 googleapi.ServerResponse `json:"-"` 9160 9161 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9162 // unconditionally include in API requests. By default, fields with 9163 // empty or default values are omitted from API requests. However, any 9164 // non-pointer, non-interface field appearing in ForceSendFields will be 9165 // sent to the server regardless of whether the field is empty or not. 9166 // This may be used to include empty fields in Patch requests. 9167 ForceSendFields []string `json:"-"` 9168 9169 // NullFields is a list of field names (e.g. "ContentLanguage") to 9170 // include in API requests with the JSON null value. By default, fields 9171 // with empty values are omitted from API requests. However, any field 9172 // with an empty value appearing in NullFields will be sent to the 9173 // server as null. It is an error if a field in this list has a 9174 // non-empty value. This may be used to include null fields in Patch 9175 // requests. 9176 NullFields []string `json:"-"` 9177} 9178 9179func (s *PosSaleResponse) MarshalJSON() ([]byte, error) { 9180 type NoMethod PosSaleResponse 9181 raw := NoMethod(*s) 9182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9183} 9184 9185// PosStore: Store resource. 9186type PosStore struct { 9187 // Kind: Identifies what kind of resource this is. Value: the fixed 9188 // string "content#posStore" 9189 Kind string `json:"kind,omitempty"` 9190 9191 // StoreAddress: Required. The street address of the store. 9192 StoreAddress string `json:"storeAddress,omitempty"` 9193 9194 // StoreCode: Required. A store identifier that is unique for the given 9195 // merchant. 9196 StoreCode string `json:"storeCode,omitempty"` 9197 9198 // ServerResponse contains the HTTP response code and headers from the 9199 // server. 9200 googleapi.ServerResponse `json:"-"` 9201 9202 // ForceSendFields is a list of field names (e.g. "Kind") to 9203 // unconditionally include in API requests. By default, fields with 9204 // empty or default values are omitted from API requests. However, any 9205 // non-pointer, non-interface field appearing in ForceSendFields will be 9206 // sent to the server regardless of whether the field is empty or not. 9207 // This may be used to include empty fields in Patch requests. 9208 ForceSendFields []string `json:"-"` 9209 9210 // NullFields is a list of field names (e.g. "Kind") to include in API 9211 // requests with the JSON null value. By default, fields with empty 9212 // values are omitted from API requests. However, any field with an 9213 // empty value appearing in NullFields will be sent to the server as 9214 // null. It is an error if a field in this list has a non-empty value. 9215 // This may be used to include null fields in Patch requests. 9216 NullFields []string `json:"-"` 9217} 9218 9219func (s *PosStore) MarshalJSON() ([]byte, error) { 9220 type NoMethod PosStore 9221 raw := NoMethod(*s) 9222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9223} 9224 9225type PostalCodeGroup struct { 9226 // Country: The CLDR territory code of the country the postal code group 9227 // applies to. Required. 9228 Country string `json:"country,omitempty"` 9229 9230 // Name: The name of the postal code group, referred to in headers. 9231 // Required. 9232 Name string `json:"name,omitempty"` 9233 9234 // PostalCodeRanges: A range of postal codes. Required. 9235 PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` 9236 9237 // ForceSendFields is a list of field names (e.g. "Country") to 9238 // unconditionally include in API requests. By default, fields with 9239 // empty or default values are omitted from API requests. However, any 9240 // non-pointer, non-interface field appearing in ForceSendFields will be 9241 // sent to the server regardless of whether the field is empty or not. 9242 // This may be used to include empty fields in Patch requests. 9243 ForceSendFields []string `json:"-"` 9244 9245 // NullFields is a list of field names (e.g. "Country") to include in 9246 // API requests with the JSON null value. By default, fields with empty 9247 // values are omitted from API requests. However, any field with an 9248 // empty value appearing in NullFields will be sent to the server as 9249 // null. It is an error if a field in this list has a non-empty value. 9250 // This may be used to include null fields in Patch requests. 9251 NullFields []string `json:"-"` 9252} 9253 9254func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) { 9255 type NoMethod PostalCodeGroup 9256 raw := NoMethod(*s) 9257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9258} 9259 9260type PostalCodeRange struct { 9261 // PostalCodeRangeBegin: A postal code or a pattern of the form 9262 // `prefix*` denoting the inclusive lower bound of the range defining 9263 // the area. Examples values: "94108", "9410*", "9*". Required. 9264 PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` 9265 9266 // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` 9267 // denoting the inclusive upper bound of the range defining the area. It 9268 // must have the same length as `postalCodeRangeBegin`: if 9269 // `postalCodeRangeBegin` is a postal code then `postalCodeRangeEnd` 9270 // must be a postal code too; if `postalCodeRangeBegin` is a pattern 9271 // then `postalCodeRangeEnd` must be a pattern with the same prefix 9272 // length. Optional: if not set, then the area is defined as being all 9273 // the postal codes matching `postalCodeRangeBegin`. 9274 PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` 9275 9276 // ForceSendFields is a list of field names (e.g. 9277 // "PostalCodeRangeBegin") to unconditionally include in API requests. 9278 // By default, fields with empty or default values are omitted from API 9279 // requests. However, any non-pointer, non-interface field appearing in 9280 // ForceSendFields will be sent to the server regardless of whether the 9281 // field is empty or not. This may be used to include empty fields in 9282 // Patch requests. 9283 ForceSendFields []string `json:"-"` 9284 9285 // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to 9286 // include in API requests with the JSON null value. By default, fields 9287 // with empty values are omitted from API requests. However, any field 9288 // with an empty value appearing in NullFields will be sent to the 9289 // server as null. It is an error if a field in this list has a 9290 // non-empty value. This may be used to include null fields in Patch 9291 // requests. 9292 NullFields []string `json:"-"` 9293} 9294 9295func (s *PostalCodeRange) MarshalJSON() ([]byte, error) { 9296 type NoMethod PostalCodeRange 9297 raw := NoMethod(*s) 9298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9299} 9300 9301type Price struct { 9302 // Currency: The currency of the price. 9303 Currency string `json:"currency,omitempty"` 9304 9305 // Value: The price represented as a number. 9306 Value string `json:"value,omitempty"` 9307 9308 // ForceSendFields is a list of field names (e.g. "Currency") to 9309 // unconditionally include in API requests. By default, fields with 9310 // empty or default values are omitted from API requests. However, any 9311 // non-pointer, non-interface field appearing in ForceSendFields will be 9312 // sent to the server regardless of whether the field is empty or not. 9313 // This may be used to include empty fields in Patch requests. 9314 ForceSendFields []string `json:"-"` 9315 9316 // NullFields is a list of field names (e.g. "Currency") to include in 9317 // API requests with the JSON null value. By default, fields with empty 9318 // values are omitted from API requests. However, any field with an 9319 // empty value appearing in NullFields will be sent to the server as 9320 // null. It is an error if a field in this list has a non-empty value. 9321 // This may be used to include null fields in Patch requests. 9322 NullFields []string `json:"-"` 9323} 9324 9325func (s *Price) MarshalJSON() ([]byte, error) { 9326 type NoMethod Price 9327 raw := NoMethod(*s) 9328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9329} 9330 9331// Product: Required product attributes are primarily defined by the 9332// products data specification. See the Products Data Specification Help 9333// Center article for information. Product data. After inserting, 9334// updating, or deleting a product, it may take several minutes before 9335// changes take effect. 9336type Product struct { 9337 // AdditionalImageLinks: Additional URLs of images of the item. 9338 AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` 9339 9340 // AdditionalProductTypes: Additional categories of the item (formatted 9341 // as in products data specification). 9342 AdditionalProductTypes []string `json:"additionalProductTypes,omitempty"` 9343 9344 // Adult: Should be set to true if the item is targeted towards adults. 9345 Adult bool `json:"adult,omitempty"` 9346 9347 // AdwordsGrouping: Used to group items in an arbitrary way. Only for 9348 // CPA%, discouraged otherwise. 9349 AdwordsGrouping string `json:"adwordsGrouping,omitempty"` 9350 9351 // AdwordsLabels: Similar to adwords_grouping, but only works on CPC. 9352 AdwordsLabels []string `json:"adwordsLabels,omitempty"` 9353 9354 // AdwordsRedirect: Allows advertisers to override the item URL when the 9355 // product is shown within the context of Product Ads. 9356 AdwordsRedirect string `json:"adwordsRedirect,omitempty"` 9357 9358 // AgeGroup: Target age group of the item. Acceptable values are: - 9359 // "adult" - "infant" - "kids" - "newborn" - "toddler" - 9360 // "youngAdult" 9361 AgeGroup string `json:"ageGroup,omitempty"` 9362 9363 // Aspects: Deprecated. Do not use. 9364 Aspects []*ProductAspect `json:"aspects,omitempty"` 9365 9366 // Availability: Availability status of the item. Acceptable values are: 9367 // - "in stock" - "out of stock" - "preorder" 9368 Availability string `json:"availability,omitempty"` 9369 9370 // AvailabilityDate: The day a pre-ordered product becomes available for 9371 // delivery, in ISO 8601 format. 9372 AvailabilityDate string `json:"availabilityDate,omitempty"` 9373 9374 // Brand: Brand of the item. 9375 Brand string `json:"brand,omitempty"` 9376 9377 // CanonicalLink: URL for the canonical version of your item's landing 9378 // page. 9379 CanonicalLink string `json:"canonicalLink,omitempty"` 9380 9381 // Channel: Required. The item's channel (online or local). Acceptable 9382 // values are: - "local" - "online" 9383 Channel string `json:"channel,omitempty"` 9384 9385 // Color: Color of the item. 9386 Color string `json:"color,omitempty"` 9387 9388 // Condition: Condition or state of the item. Acceptable values are: - 9389 // "new" - "refurbished" - "used" 9390 Condition string `json:"condition,omitempty"` 9391 9392 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9393 // the item. 9394 ContentLanguage string `json:"contentLanguage,omitempty"` 9395 9396 // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. 9397 CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` 9398 9399 // CustomAttributes: A list of custom (merchant-provided) attributes. It 9400 // can also be used for submitting any attribute of the feed 9401 // specification in its generic form (e.g., `{ "name": "size type", 9402 // "value": "regular" }`). This is useful for submitting attributes not 9403 // explicitly exposed by the API, such as additional attributes used for 9404 // Buy on Google (formerly known as Shopping Actions). 9405 CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` 9406 9407 // CustomGroups: A list of custom (merchant-provided) custom attribute 9408 // groups. 9409 CustomGroups []*CustomGroup `json:"customGroups,omitempty"` 9410 9411 // CustomLabel0: Custom label 0 for custom grouping of items in a 9412 // Shopping campaign. 9413 CustomLabel0 string `json:"customLabel0,omitempty"` 9414 9415 // CustomLabel1: Custom label 1 for custom grouping of items in a 9416 // Shopping campaign. 9417 CustomLabel1 string `json:"customLabel1,omitempty"` 9418 9419 // CustomLabel2: Custom label 2 for custom grouping of items in a 9420 // Shopping campaign. 9421 CustomLabel2 string `json:"customLabel2,omitempty"` 9422 9423 // CustomLabel3: Custom label 3 for custom grouping of items in a 9424 // Shopping campaign. 9425 CustomLabel3 string `json:"customLabel3,omitempty"` 9426 9427 // CustomLabel4: Custom label 4 for custom grouping of items in a 9428 // Shopping campaign. 9429 CustomLabel4 string `json:"customLabel4,omitempty"` 9430 9431 // Description: Description of the item. 9432 Description string `json:"description,omitempty"` 9433 9434 // Destinations: Specifies the intended destinations for the product. 9435 Destinations []*ProductDestination `json:"destinations,omitempty"` 9436 9437 // DisplayAdsId: An identifier for an item for dynamic remarketing 9438 // campaigns. 9439 DisplayAdsId string `json:"displayAdsId,omitempty"` 9440 9441 // DisplayAdsLink: URL directly to your item's landing page for dynamic 9442 // remarketing campaigns. 9443 DisplayAdsLink string `json:"displayAdsLink,omitempty"` 9444 9445 // DisplayAdsSimilarIds: Advertiser-specified recommendations. 9446 DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` 9447 9448 // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. 9449 DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` 9450 9451 // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. 9452 DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` 9453 9454 // EnergyEfficiencyClass: The energy efficiency class as defined in EU 9455 // directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9456 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9457 EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` 9458 9459 // ExpirationDate: Date on which the item should expire, as specified 9460 // upon insertion, in ISO 8601 format. The actual expiration date in 9461 // Google Shopping is exposed in `productstatuses` as 9462 // `googleExpirationDate` and might be earlier if `expirationDate` is 9463 // too far in the future. 9464 ExpirationDate string `json:"expirationDate,omitempty"` 9465 9466 // Gender: Target gender of the item. Acceptable values are: - 9467 // "female" - "male" - "unisex" 9468 Gender string `json:"gender,omitempty"` 9469 9470 // GoogleProductCategory: Google's category of the item (see Google 9471 // product taxonomy 9472 // (https://support.google.com/merchants/answer/1705911)). When querying 9473 // products, this field will contain the user provided value. There is 9474 // currently no way to get back the auto assigned google product 9475 // categories through the API. 9476 GoogleProductCategory string `json:"googleProductCategory,omitempty"` 9477 9478 // Gtin: Global Trade Item Number (GTIN) of the item. 9479 Gtin string `json:"gtin,omitempty"` 9480 9481 // Id: The REST ID of the product. Content API methods that operate on 9482 // products take this as their `productId` parameter. The REST ID for a 9483 // product is of the form channel:contentLanguage: targetCountry: 9484 // offerId. 9485 Id string `json:"id,omitempty"` 9486 9487 // IdentifierExists: False when the item does not have unique product 9488 // identifiers appropriate to its category, such as GTIN, MPN, and 9489 // brand. Required according to the Unique Product Identifier Rules for 9490 // all target countries except for Canada. 9491 IdentifierExists bool `json:"identifierExists,omitempty"` 9492 9493 // ImageLink: URL of an image of the item. 9494 ImageLink string `json:"imageLink,omitempty"` 9495 9496 // Installment: Number and amount of installments to pay for an item. 9497 Installment *Installment `json:"installment,omitempty"` 9498 9499 // IsBundle: Whether the item is a merchant-defined bundle. A bundle is 9500 // a custom grouping of different products sold by a merchant for a 9501 // single price. 9502 IsBundle bool `json:"isBundle,omitempty"` 9503 9504 // ItemGroupId: Shared identifier for all variants of the same product. 9505 ItemGroupId string `json:"itemGroupId,omitempty"` 9506 9507 // Kind: Identifies what kind of resource this is. Value: the fixed 9508 // string "content#product" 9509 Kind string `json:"kind,omitempty"` 9510 9511 // Link: URL directly linking to your item's page on your website. 9512 Link string `json:"link,omitempty"` 9513 9514 // LoyaltyPoints: Loyalty points that users receive after purchasing the 9515 // item. Japan only. 9516 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 9517 9518 // Material: The material of which the item is made. 9519 Material string `json:"material,omitempty"` 9520 9521 // MaxEnergyEfficiencyClass: The energy efficiency class as defined in 9522 // EU directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9523 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9524 MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` 9525 9526 // MaxHandlingTime: Maximal product handling time (in business days). 9527 MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` 9528 9529 // MinEnergyEfficiencyClass: The energy efficiency class as defined in 9530 // EU directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9531 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9532 MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` 9533 9534 // MinHandlingTime: Minimal product handling time (in business days). 9535 MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` 9536 9537 // MobileLink: URL for the mobile-optimized version of your item's 9538 // landing page. 9539 MobileLink string `json:"mobileLink,omitempty"` 9540 9541 // Mpn: Manufacturer Part Number (MPN) of the item. 9542 Mpn string `json:"mpn,omitempty"` 9543 9544 // Multipack: The number of identical products in a merchant-defined 9545 // multipack. 9546 Multipack int64 `json:"multipack,omitempty,string"` 9547 9548 // OfferId: Required. A unique identifier for the item. Leading and 9549 // trailing whitespaces are stripped and multiple whitespaces are 9550 // replaced by a single whitespace upon submission. Only valid unicode 9551 // characters are accepted. See the products feed specification for 9552 // details. *Note:* Content API methods that operate on products take 9553 // the REST ID of the product, *not* this identifier. 9554 OfferId string `json:"offerId,omitempty"` 9555 9556 // OnlineOnly: Deprecated. 9557 OnlineOnly bool `json:"onlineOnly,omitempty"` 9558 9559 // Pattern: The item's pattern (e.g. polka dots). 9560 Pattern string `json:"pattern,omitempty"` 9561 9562 // Price: Price of the item. 9563 Price *Price `json:"price,omitempty"` 9564 9565 // ProductType: Your category of the item (formatted as in products data 9566 // specification). 9567 ProductType string `json:"productType,omitempty"` 9568 9569 // PromotionIds: The unique ID of a promotion. 9570 PromotionIds []string `json:"promotionIds,omitempty"` 9571 9572 // SalePrice: Advertised sale price of the item. 9573 SalePrice *Price `json:"salePrice,omitempty"` 9574 9575 // SalePriceEffectiveDate: Date range during which the item is on sale 9576 // (see products data specification ). 9577 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 9578 9579 // SellOnGoogleQuantity: The quantity of the product that is available 9580 // for selling on Google. Supported only for online products. 9581 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` 9582 9583 // Shipping: Shipping rules. 9584 Shipping []*ProductShipping `json:"shipping,omitempty"` 9585 9586 // ShippingHeight: Height of the item for shipping. 9587 ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` 9588 9589 // ShippingLabel: The shipping label of the product, used to group 9590 // product in account-level shipping rules. 9591 ShippingLabel string `json:"shippingLabel,omitempty"` 9592 9593 // ShippingLength: Length of the item for shipping. 9594 ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` 9595 9596 // ShippingWeight: Weight of the item for shipping. 9597 ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` 9598 9599 // ShippingWidth: Width of the item for shipping. 9600 ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` 9601 9602 // SizeSystem: System in which the size is specified. Recommended for 9603 // apparel items. Acceptable values are: - "AU" - "BR" - "CN" - 9604 // "DE" - "EU" - "FR" - "IT" - "JP" - "MEX" - "UK" - 9605 // "US" 9606 SizeSystem string `json:"sizeSystem,omitempty"` 9607 9608 // SizeType: The cut of the item. Recommended for apparel items. 9609 // Acceptable values are: - "big and tall" - "maternity" - 9610 // "oversize" - "petite" - "plus" - "regular" 9611 SizeType string `json:"sizeType,omitempty"` 9612 9613 // Sizes: Size of the item. Only one value is allowed. For variants with 9614 // different sizes, insert a separate product for each size with the 9615 // same `itemGroupId` value (see size definition). 9616 Sizes []string `json:"sizes,omitempty"` 9617 9618 // Source: The source of the offer, i.e., how the offer was created. 9619 // Acceptable values are: - "api" - "crawl" - "feed" 9620 Source string `json:"source,omitempty"` 9621 9622 // TargetCountry: Required. The CLDR territory code for the item. 9623 TargetCountry string `json:"targetCountry,omitempty"` 9624 9625 // Taxes: Tax information. 9626 Taxes []*ProductTax `json:"taxes,omitempty"` 9627 9628 // Title: Title of the item. 9629 Title string `json:"title,omitempty"` 9630 9631 // UnitPricingBaseMeasure: The preference of the denominator of the unit 9632 // price. 9633 UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` 9634 9635 // UnitPricingMeasure: The measure and dimension of an item. 9636 UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` 9637 9638 // ValidatedDestinations: Deprecated. The read-only list of intended 9639 // destinations which passed validation. 9640 ValidatedDestinations []string `json:"validatedDestinations,omitempty"` 9641 9642 // Warnings: Read-only warnings. 9643 Warnings []*Error `json:"warnings,omitempty"` 9644 9645 // ServerResponse contains the HTTP response code and headers from the 9646 // server. 9647 googleapi.ServerResponse `json:"-"` 9648 9649 // ForceSendFields is a list of field names (e.g. 9650 // "AdditionalImageLinks") to unconditionally include in API requests. 9651 // By default, fields with empty or default values are omitted from API 9652 // requests. However, any non-pointer, non-interface field appearing in 9653 // ForceSendFields will be sent to the server regardless of whether the 9654 // field is empty or not. This may be used to include empty fields in 9655 // Patch requests. 9656 ForceSendFields []string `json:"-"` 9657 9658 // NullFields is a list of field names (e.g. "AdditionalImageLinks") to 9659 // include in API requests with the JSON null value. By default, fields 9660 // with empty values are omitted from API requests. However, any field 9661 // with an empty value appearing in NullFields will be sent to the 9662 // server as null. It is an error if a field in this list has a 9663 // non-empty value. This may be used to include null fields in Patch 9664 // requests. 9665 NullFields []string `json:"-"` 9666} 9667 9668func (s *Product) MarshalJSON() ([]byte, error) { 9669 type NoMethod Product 9670 raw := NoMethod(*s) 9671 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9672} 9673 9674func (s *Product) UnmarshalJSON(data []byte) error { 9675 type NoMethod Product 9676 var s1 struct { 9677 DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` 9678 *NoMethod 9679 } 9680 s1.NoMethod = (*NoMethod)(s) 9681 if err := json.Unmarshal(data, &s1); err != nil { 9682 return err 9683 } 9684 s.DisplayAdsValue = float64(s1.DisplayAdsValue) 9685 return nil 9686} 9687 9688type ProductAmount struct { 9689 // PriceAmount: The pre-tax or post-tax price depending on the location 9690 // of the order. 9691 PriceAmount *Price `json:"priceAmount,omitempty"` 9692 9693 // RemittedTaxAmount: Remitted tax value. 9694 RemittedTaxAmount *Price `json:"remittedTaxAmount,omitempty"` 9695 9696 // TaxAmount: Tax value. 9697 TaxAmount *Price `json:"taxAmount,omitempty"` 9698 9699 // ForceSendFields is a list of field names (e.g. "PriceAmount") to 9700 // unconditionally include in API requests. By default, fields with 9701 // empty or default values are omitted from API requests. However, any 9702 // non-pointer, non-interface field appearing in ForceSendFields will be 9703 // sent to the server regardless of whether the field is empty or not. 9704 // This may be used to include empty fields in Patch requests. 9705 ForceSendFields []string `json:"-"` 9706 9707 // NullFields is a list of field names (e.g. "PriceAmount") to include 9708 // in API requests with the JSON null value. By default, fields with 9709 // empty values are omitted from API requests. However, any field with 9710 // an empty value appearing in NullFields will be sent to the server as 9711 // null. It is an error if a field in this list has a non-empty value. 9712 // This may be used to include null fields in Patch requests. 9713 NullFields []string `json:"-"` 9714} 9715 9716func (s *ProductAmount) MarshalJSON() ([]byte, error) { 9717 type NoMethod ProductAmount 9718 raw := NoMethod(*s) 9719 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9720} 9721 9722type ProductAspect struct { 9723 // AspectName: Deprecated. 9724 AspectName string `json:"aspectName,omitempty"` 9725 9726 // DestinationName: Deprecated. 9727 DestinationName string `json:"destinationName,omitempty"` 9728 9729 // Intention: Deprecated. 9730 Intention string `json:"intention,omitempty"` 9731 9732 // ForceSendFields is a list of field names (e.g. "AspectName") to 9733 // unconditionally include in API requests. By default, fields with 9734 // empty or default values are omitted from API requests. However, any 9735 // non-pointer, non-interface field appearing in ForceSendFields will be 9736 // sent to the server regardless of whether the field is empty or not. 9737 // This may be used to include empty fields in Patch requests. 9738 ForceSendFields []string `json:"-"` 9739 9740 // NullFields is a list of field names (e.g. "AspectName") to include in 9741 // API requests with the JSON null value. By default, fields with empty 9742 // values are omitted from API requests. However, any field with an 9743 // empty value appearing in NullFields will be sent to the server as 9744 // null. It is an error if a field in this list has a non-empty value. 9745 // This may be used to include null fields in Patch requests. 9746 NullFields []string `json:"-"` 9747} 9748 9749func (s *ProductAspect) MarshalJSON() ([]byte, error) { 9750 type NoMethod ProductAspect 9751 raw := NoMethod(*s) 9752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9753} 9754 9755type ProductDestination struct { 9756 // DestinationName: The name of the destination. 9757 DestinationName string `json:"destinationName,omitempty"` 9758 9759 // Intention: Whether the destination is required, excluded or should be 9760 // validated. Acceptable values are: - "default" - "excluded" - 9761 // "optional" - "required" 9762 Intention string `json:"intention,omitempty"` 9763 9764 // ForceSendFields is a list of field names (e.g. "DestinationName") to 9765 // unconditionally include in API requests. By default, fields with 9766 // empty or default values are omitted from API requests. However, any 9767 // non-pointer, non-interface field appearing in ForceSendFields will be 9768 // sent to the server regardless of whether the field is empty or not. 9769 // This may be used to include empty fields in Patch requests. 9770 ForceSendFields []string `json:"-"` 9771 9772 // NullFields is a list of field names (e.g. "DestinationName") to 9773 // include in API requests with the JSON null value. By default, fields 9774 // with empty values are omitted from API requests. However, any field 9775 // with an empty value appearing in NullFields will be sent to the 9776 // server as null. It is an error if a field in this list has a 9777 // non-empty value. This may be used to include null fields in Patch 9778 // requests. 9779 NullFields []string `json:"-"` 9780} 9781 9782func (s *ProductDestination) MarshalJSON() ([]byte, error) { 9783 type NoMethod ProductDestination 9784 raw := NoMethod(*s) 9785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9786} 9787 9788type ProductShipping struct { 9789 // Country: The CLDR territory code of the country to which an item will 9790 // ship. 9791 Country string `json:"country,omitempty"` 9792 9793 // LocationGroupName: The location where the shipping is applicable, 9794 // represented by a location group name. 9795 LocationGroupName string `json:"locationGroupName,omitempty"` 9796 9797 // LocationId: The numeric ID of a location that the shipping rate 9798 // applies to as defined in the AdWords API. 9799 LocationId int64 `json:"locationId,omitempty,string"` 9800 9801 // PostalCode: The postal code range that the shipping rate applies to, 9802 // represented by a postal code, a postal code prefix followed by a * 9803 // wildcard, a range between two postal codes or two postal code 9804 // prefixes of equal length. 9805 PostalCode string `json:"postalCode,omitempty"` 9806 9807 // Price: Fixed shipping price, represented as a number. 9808 Price *Price `json:"price,omitempty"` 9809 9810 // Region: The geographic region to which a shipping rate applies. 9811 Region string `json:"region,omitempty"` 9812 9813 // Service: A free-form description of the service class or delivery 9814 // speed. 9815 Service string `json:"service,omitempty"` 9816 9817 // ForceSendFields is a list of field names (e.g. "Country") to 9818 // unconditionally include in API requests. By default, fields with 9819 // empty or default values are omitted from API requests. However, any 9820 // non-pointer, non-interface field appearing in ForceSendFields will be 9821 // sent to the server regardless of whether the field is empty or not. 9822 // This may be used to include empty fields in Patch requests. 9823 ForceSendFields []string `json:"-"` 9824 9825 // NullFields is a list of field names (e.g. "Country") to include in 9826 // API requests with the JSON null value. By default, fields with empty 9827 // values are omitted from API requests. However, any field with an 9828 // empty value appearing in NullFields will be sent to the server as 9829 // null. It is an error if a field in this list has a non-empty value. 9830 // This may be used to include null fields in Patch requests. 9831 NullFields []string `json:"-"` 9832} 9833 9834func (s *ProductShipping) MarshalJSON() ([]byte, error) { 9835 type NoMethod ProductShipping 9836 raw := NoMethod(*s) 9837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9838} 9839 9840type ProductShippingDimension struct { 9841 // Unit: The unit of value. 9842 Unit string `json:"unit,omitempty"` 9843 9844 // Value: The dimension of the product used to calculate the shipping 9845 // cost of the item. 9846 Value float64 `json:"value,omitempty"` 9847 9848 // ForceSendFields is a list of field names (e.g. "Unit") to 9849 // unconditionally include in API requests. By default, fields with 9850 // empty or default values are omitted from API requests. However, any 9851 // non-pointer, non-interface field appearing in ForceSendFields will be 9852 // sent to the server regardless of whether the field is empty or not. 9853 // This may be used to include empty fields in Patch requests. 9854 ForceSendFields []string `json:"-"` 9855 9856 // NullFields is a list of field names (e.g. "Unit") to include in API 9857 // requests with the JSON null value. By default, fields with empty 9858 // values are omitted from API requests. However, any field with an 9859 // empty value appearing in NullFields will be sent to the server as 9860 // null. It is an error if a field in this list has a non-empty value. 9861 // This may be used to include null fields in Patch requests. 9862 NullFields []string `json:"-"` 9863} 9864 9865func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) { 9866 type NoMethod ProductShippingDimension 9867 raw := NoMethod(*s) 9868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9869} 9870 9871func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { 9872 type NoMethod ProductShippingDimension 9873 var s1 struct { 9874 Value gensupport.JSONFloat64 `json:"value"` 9875 *NoMethod 9876 } 9877 s1.NoMethod = (*NoMethod)(s) 9878 if err := json.Unmarshal(data, &s1); err != nil { 9879 return err 9880 } 9881 s.Value = float64(s1.Value) 9882 return nil 9883} 9884 9885type ProductShippingWeight struct { 9886 // Unit: The unit of value. 9887 Unit string `json:"unit,omitempty"` 9888 9889 // Value: The weight of the product used to calculate the shipping cost 9890 // of the item. 9891 Value float64 `json:"value,omitempty"` 9892 9893 // ForceSendFields is a list of field names (e.g. "Unit") to 9894 // unconditionally include in API requests. By default, fields with 9895 // empty or default values are omitted from API requests. However, any 9896 // non-pointer, non-interface field appearing in ForceSendFields will be 9897 // sent to the server regardless of whether the field is empty or not. 9898 // This may be used to include empty fields in Patch requests. 9899 ForceSendFields []string `json:"-"` 9900 9901 // NullFields is a list of field names (e.g. "Unit") to include in API 9902 // requests with the JSON null value. By default, fields with empty 9903 // values are omitted from API requests. However, any field with an 9904 // empty value appearing in NullFields will be sent to the server as 9905 // null. It is an error if a field in this list has a non-empty value. 9906 // This may be used to include null fields in Patch requests. 9907 NullFields []string `json:"-"` 9908} 9909 9910func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) { 9911 type NoMethod ProductShippingWeight 9912 raw := NoMethod(*s) 9913 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9914} 9915 9916func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { 9917 type NoMethod ProductShippingWeight 9918 var s1 struct { 9919 Value gensupport.JSONFloat64 `json:"value"` 9920 *NoMethod 9921 } 9922 s1.NoMethod = (*NoMethod)(s) 9923 if err := json.Unmarshal(data, &s1); err != nil { 9924 return err 9925 } 9926 s.Value = float64(s1.Value) 9927 return nil 9928} 9929 9930// ProductStatus: The status of a product, i.e., information about a 9931// product computed asynchronously. 9932type ProductStatus struct { 9933 // CreationDate: Date on which the item has been created, in ISO 8601 9934 // format. 9935 CreationDate string `json:"creationDate,omitempty"` 9936 9937 // DataQualityIssues: DEPRECATED - never populated 9938 DataQualityIssues []*ProductStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 9939 9940 // DestinationStatuses: The intended destinations for the product. 9941 DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` 9942 9943 // GoogleExpirationDate: Date on which the item expires in Google 9944 // Shopping, in ISO 8601 format. 9945 GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` 9946 9947 // ItemLevelIssues: A list of all issues associated with the product. 9948 ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 9949 9950 // Kind: Identifies what kind of resource this is. Value: the fixed 9951 // string "content#productStatus" 9952 Kind string `json:"kind,omitempty"` 9953 9954 // LastUpdateDate: Date on which the item has been last updated, in ISO 9955 // 8601 format. 9956 LastUpdateDate string `json:"lastUpdateDate,omitempty"` 9957 9958 // Link: The link to the product. 9959 Link string `json:"link,omitempty"` 9960 9961 // Product: Product data after applying all the join inputs. 9962 Product *Product `json:"product,omitempty"` 9963 9964 // ProductId: The ID of the product for which status is reported. 9965 ProductId string `json:"productId,omitempty"` 9966 9967 // Title: The title of the product. 9968 Title string `json:"title,omitempty"` 9969 9970 // ServerResponse contains the HTTP response code and headers from the 9971 // server. 9972 googleapi.ServerResponse `json:"-"` 9973 9974 // ForceSendFields is a list of field names (e.g. "CreationDate") to 9975 // unconditionally include in API requests. By default, fields with 9976 // empty or default values are omitted from API requests. However, any 9977 // non-pointer, non-interface field appearing in ForceSendFields will be 9978 // sent to the server regardless of whether the field is empty or not. 9979 // This may be used to include empty fields in Patch requests. 9980 ForceSendFields []string `json:"-"` 9981 9982 // NullFields is a list of field names (e.g. "CreationDate") to include 9983 // in API requests with the JSON null value. By default, fields with 9984 // empty values are omitted from API requests. However, any field with 9985 // an empty value appearing in NullFields will be sent to the server as 9986 // null. It is an error if a field in this list has a non-empty value. 9987 // This may be used to include null fields in Patch requests. 9988 NullFields []string `json:"-"` 9989} 9990 9991func (s *ProductStatus) MarshalJSON() ([]byte, error) { 9992 type NoMethod ProductStatus 9993 raw := NoMethod(*s) 9994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9995} 9996 9997type ProductStatusDataQualityIssue struct { 9998 Destination string `json:"destination,omitempty"` 9999 10000 Detail string `json:"detail,omitempty"` 10001 10002 FetchStatus string `json:"fetchStatus,omitempty"` 10003 10004 Id string `json:"id,omitempty"` 10005 10006 Location string `json:"location,omitempty"` 10007 10008 Severity string `json:"severity,omitempty"` 10009 10010 Timestamp string `json:"timestamp,omitempty"` 10011 10012 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 10013 10014 ValueProvided string `json:"valueProvided,omitempty"` 10015 10016 // ForceSendFields is a list of field names (e.g. "Destination") to 10017 // unconditionally include in API requests. By default, fields with 10018 // empty or default values are omitted from API requests. However, any 10019 // non-pointer, non-interface field appearing in ForceSendFields will be 10020 // sent to the server regardless of whether the field is empty or not. 10021 // This may be used to include empty fields in Patch requests. 10022 ForceSendFields []string `json:"-"` 10023 10024 // NullFields is a list of field names (e.g. "Destination") to include 10025 // in API requests with the JSON null value. By default, fields with 10026 // empty values are omitted from API requests. However, any field with 10027 // an empty value appearing in NullFields will be sent to the server as 10028 // null. It is an error if a field in this list has a non-empty value. 10029 // This may be used to include null fields in Patch requests. 10030 NullFields []string `json:"-"` 10031} 10032 10033func (s *ProductStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 10034 type NoMethod ProductStatusDataQualityIssue 10035 raw := NoMethod(*s) 10036 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10037} 10038 10039type ProductStatusDestinationStatus struct { 10040 // ApprovalPending: Whether the approval status might change due to 10041 // further processing. 10042 ApprovalPending bool `json:"approvalPending,omitempty"` 10043 10044 // ApprovalStatus: The destination's approval status. Acceptable values 10045 // are: - "approved" - "disapproved" 10046 ApprovalStatus string `json:"approvalStatus,omitempty"` 10047 10048 // Destination: The name of the destination 10049 Destination string `json:"destination,omitempty"` 10050 10051 // Intention: Provided for backward compatibility only. Always set to 10052 // "required". Acceptable values are: - "default" - "excluded" - 10053 // "optional" - "required" 10054 Intention string `json:"intention,omitempty"` 10055 10056 // ForceSendFields is a list of field names (e.g. "ApprovalPending") to 10057 // unconditionally include in API requests. By default, fields with 10058 // empty or default values are omitted from API requests. However, any 10059 // non-pointer, non-interface field appearing in ForceSendFields will be 10060 // sent to the server regardless of whether the field is empty or not. 10061 // This may be used to include empty fields in Patch requests. 10062 ForceSendFields []string `json:"-"` 10063 10064 // NullFields is a list of field names (e.g. "ApprovalPending") to 10065 // include in API requests with the JSON null value. By default, fields 10066 // with empty values are omitted from API requests. However, any field 10067 // with an empty value appearing in NullFields will be sent to the 10068 // server as null. It is an error if a field in this list has a 10069 // non-empty value. This may be used to include null fields in Patch 10070 // requests. 10071 NullFields []string `json:"-"` 10072} 10073 10074func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { 10075 type NoMethod ProductStatusDestinationStatus 10076 raw := NoMethod(*s) 10077 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10078} 10079 10080type ProductStatusItemLevelIssue struct { 10081 // AttributeName: The attribute's name, if the issue is caused by a 10082 // single attribute. 10083 AttributeName string `json:"attributeName,omitempty"` 10084 10085 // Code: The error code of the issue. 10086 Code string `json:"code,omitempty"` 10087 10088 // Description: A short issue description in English. 10089 Description string `json:"description,omitempty"` 10090 10091 // Destination: The destination the issue applies to. 10092 Destination string `json:"destination,omitempty"` 10093 10094 // Detail: A detailed issue description in English. 10095 Detail string `json:"detail,omitempty"` 10096 10097 // Documentation: The URL of a web page to help with resolving this 10098 // issue. 10099 Documentation string `json:"documentation,omitempty"` 10100 10101 // Resolution: Whether the issue can be resolved by the merchant. 10102 Resolution string `json:"resolution,omitempty"` 10103 10104 // Servability: How this issue affects serving of the offer. 10105 Servability string `json:"servability,omitempty"` 10106 10107 // ForceSendFields is a list of field names (e.g. "AttributeName") to 10108 // unconditionally include in API requests. By default, fields with 10109 // empty or default values are omitted from API requests. However, any 10110 // non-pointer, non-interface field appearing in ForceSendFields will be 10111 // sent to the server regardless of whether the field is empty or not. 10112 // This may be used to include empty fields in Patch requests. 10113 ForceSendFields []string `json:"-"` 10114 10115 // NullFields is a list of field names (e.g. "AttributeName") to include 10116 // in API requests with the JSON null value. By default, fields with 10117 // empty values are omitted from API requests. However, any field with 10118 // an empty value appearing in NullFields will be sent to the server as 10119 // null. It is an error if a field in this list has a non-empty value. 10120 // This may be used to include null fields in Patch requests. 10121 NullFields []string `json:"-"` 10122} 10123 10124func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 10125 type NoMethod ProductStatusItemLevelIssue 10126 raw := NoMethod(*s) 10127 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10128} 10129 10130type ProductTax struct { 10131 // Country: The country within which the item is taxed, specified as a 10132 // CLDR territory code. 10133 Country string `json:"country,omitempty"` 10134 10135 // LocationId: The numeric ID of a location that the tax rate applies to 10136 // as defined in the AdWords API. 10137 LocationId int64 `json:"locationId,omitempty,string"` 10138 10139 // PostalCode: The postal code range that the tax rate applies to, 10140 // represented by a ZIP code, a ZIP code prefix using * wildcard, a 10141 // range between two ZIP codes or two ZIP code prefixes of equal length. 10142 // Examples: 94114, 94*, 94002-95460, 94*-95*. 10143 PostalCode string `json:"postalCode,omitempty"` 10144 10145 // Rate: The percentage of tax rate that applies to the item price. 10146 Rate float64 `json:"rate,omitempty"` 10147 10148 // Region: The geographic region to which the tax rate applies. 10149 Region string `json:"region,omitempty"` 10150 10151 // TaxShip: Should be set to true if tax is charged on shipping. 10152 TaxShip bool `json:"taxShip,omitempty"` 10153 10154 // ForceSendFields is a list of field names (e.g. "Country") to 10155 // unconditionally include in API requests. By default, fields with 10156 // empty or default values are omitted from API requests. However, any 10157 // non-pointer, non-interface field appearing in ForceSendFields will be 10158 // sent to the server regardless of whether the field is empty or not. 10159 // This may be used to include empty fields in Patch requests. 10160 ForceSendFields []string `json:"-"` 10161 10162 // NullFields is a list of field names (e.g. "Country") to include in 10163 // API requests with the JSON null value. By default, fields with empty 10164 // values are omitted from API requests. However, any field with an 10165 // empty value appearing in NullFields will be sent to the server as 10166 // null. It is an error if a field in this list has a non-empty value. 10167 // This may be used to include null fields in Patch requests. 10168 NullFields []string `json:"-"` 10169} 10170 10171func (s *ProductTax) MarshalJSON() ([]byte, error) { 10172 type NoMethod ProductTax 10173 raw := NoMethod(*s) 10174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10175} 10176 10177func (s *ProductTax) UnmarshalJSON(data []byte) error { 10178 type NoMethod ProductTax 10179 var s1 struct { 10180 Rate gensupport.JSONFloat64 `json:"rate"` 10181 *NoMethod 10182 } 10183 s1.NoMethod = (*NoMethod)(s) 10184 if err := json.Unmarshal(data, &s1); err != nil { 10185 return err 10186 } 10187 s.Rate = float64(s1.Rate) 10188 return nil 10189} 10190 10191type ProductUnitPricingBaseMeasure struct { 10192 // Unit: The unit of the denominator. 10193 Unit string `json:"unit,omitempty"` 10194 10195 // Value: The denominator of the unit price. 10196 Value int64 `json:"value,omitempty,string"` 10197 10198 // ForceSendFields is a list of field names (e.g. "Unit") to 10199 // unconditionally include in API requests. By default, fields with 10200 // empty or default values are omitted from API requests. However, any 10201 // non-pointer, non-interface field appearing in ForceSendFields will be 10202 // sent to the server regardless of whether the field is empty or not. 10203 // This may be used to include empty fields in Patch requests. 10204 ForceSendFields []string `json:"-"` 10205 10206 // NullFields is a list of field names (e.g. "Unit") to include in API 10207 // requests with the JSON null value. By default, fields with empty 10208 // values are omitted from API requests. However, any field with an 10209 // empty value appearing in NullFields will be sent to the server as 10210 // null. It is an error if a field in this list has a non-empty value. 10211 // This may be used to include null fields in Patch requests. 10212 NullFields []string `json:"-"` 10213} 10214 10215func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { 10216 type NoMethod ProductUnitPricingBaseMeasure 10217 raw := NoMethod(*s) 10218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10219} 10220 10221type ProductUnitPricingMeasure struct { 10222 // Unit: The unit of the measure. 10223 Unit string `json:"unit,omitempty"` 10224 10225 // Value: The measure of an item. 10226 Value float64 `json:"value,omitempty"` 10227 10228 // ForceSendFields is a list of field names (e.g. "Unit") to 10229 // unconditionally include in API requests. By default, fields with 10230 // empty or default values are omitted from API requests. However, any 10231 // non-pointer, non-interface field appearing in ForceSendFields will be 10232 // sent to the server regardless of whether the field is empty or not. 10233 // This may be used to include empty fields in Patch requests. 10234 ForceSendFields []string `json:"-"` 10235 10236 // NullFields is a list of field names (e.g. "Unit") to include in API 10237 // requests with the JSON null value. By default, fields with empty 10238 // values are omitted from API requests. However, any field with an 10239 // empty value appearing in NullFields will be sent to the server as 10240 // null. It is an error if a field in this list has a non-empty value. 10241 // This may be used to include null fields in Patch requests. 10242 NullFields []string `json:"-"` 10243} 10244 10245func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { 10246 type NoMethod ProductUnitPricingMeasure 10247 raw := NoMethod(*s) 10248 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10249} 10250 10251func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { 10252 type NoMethod ProductUnitPricingMeasure 10253 var s1 struct { 10254 Value gensupport.JSONFloat64 `json:"value"` 10255 *NoMethod 10256 } 10257 s1.NoMethod = (*NoMethod)(s) 10258 if err := json.Unmarshal(data, &s1); err != nil { 10259 return err 10260 } 10261 s.Value = float64(s1.Value) 10262 return nil 10263} 10264 10265type ProductsCustomBatchRequest struct { 10266 // Entries: The request entries to be processed in the batch. 10267 Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` 10268 10269 // ForceSendFields is a list of field names (e.g. "Entries") to 10270 // unconditionally include in API requests. By default, fields with 10271 // empty or default values are omitted from API requests. However, any 10272 // non-pointer, non-interface field appearing in ForceSendFields will be 10273 // sent to the server regardless of whether the field is empty or not. 10274 // This may be used to include empty fields in Patch requests. 10275 ForceSendFields []string `json:"-"` 10276 10277 // NullFields is a list of field names (e.g. "Entries") to include in 10278 // API requests with the JSON null value. By default, fields with empty 10279 // values are omitted from API requests. However, any field with an 10280 // empty value appearing in NullFields will be sent to the server as 10281 // null. It is an error if a field in this list has a non-empty value. 10282 // This may be used to include null fields in Patch requests. 10283 NullFields []string `json:"-"` 10284} 10285 10286func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { 10287 type NoMethod ProductsCustomBatchRequest 10288 raw := NoMethod(*s) 10289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10290} 10291 10292// ProductsCustomBatchRequestEntry: A batch entry encoding a single 10293// non-batch products request. 10294type ProductsCustomBatchRequestEntry struct { 10295 // BatchId: An entry ID, unique within the batch request. 10296 BatchId int64 `json:"batchId,omitempty"` 10297 10298 // MerchantId: The ID of the managing account. 10299 MerchantId uint64 `json:"merchantId,omitempty,string"` 10300 10301 // Method: The method of the batch entry. Acceptable values are: - 10302 // "delete" - "get" - "insert" 10303 Method string `json:"method,omitempty"` 10304 10305 // Product: The product to insert. Only required if the method is 10306 // `insert`. 10307 Product *Product `json:"product,omitempty"` 10308 10309 // ProductId: The ID of the product to get or delete. Only defined if 10310 // the method is `get` or `delete`. 10311 ProductId string `json:"productId,omitempty"` 10312 10313 // ForceSendFields is a list of field names (e.g. "BatchId") to 10314 // unconditionally include in API requests. By default, fields with 10315 // empty or default values are omitted from API requests. However, any 10316 // non-pointer, non-interface field appearing in ForceSendFields will be 10317 // sent to the server regardless of whether the field is empty or not. 10318 // This may be used to include empty fields in Patch requests. 10319 ForceSendFields []string `json:"-"` 10320 10321 // NullFields is a list of field names (e.g. "BatchId") to include in 10322 // API requests with the JSON null value. By default, fields with empty 10323 // values are omitted from API requests. However, any field with an 10324 // empty value appearing in NullFields will be sent to the server as 10325 // null. It is an error if a field in this list has a non-empty value. 10326 // This may be used to include null fields in Patch requests. 10327 NullFields []string `json:"-"` 10328} 10329 10330func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 10331 type NoMethod ProductsCustomBatchRequestEntry 10332 raw := NoMethod(*s) 10333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10334} 10335 10336type ProductsCustomBatchResponse struct { 10337 // Entries: The result of the execution of the batch requests. 10338 Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` 10339 10340 // Kind: Identifies what kind of resource this is. Value: the fixed 10341 // string "content#productsCustomBatchResponse". 10342 Kind string `json:"kind,omitempty"` 10343 10344 // ServerResponse contains the HTTP response code and headers from the 10345 // server. 10346 googleapi.ServerResponse `json:"-"` 10347 10348 // ForceSendFields is a list of field names (e.g. "Entries") to 10349 // unconditionally include in API requests. By default, fields with 10350 // empty or default values are omitted from API requests. However, any 10351 // non-pointer, non-interface field appearing in ForceSendFields will be 10352 // sent to the server regardless of whether the field is empty or not. 10353 // This may be used to include empty fields in Patch requests. 10354 ForceSendFields []string `json:"-"` 10355 10356 // NullFields is a list of field names (e.g. "Entries") to include in 10357 // API requests with the JSON null value. By default, fields with empty 10358 // values are omitted from API requests. However, any field with an 10359 // empty value appearing in NullFields will be sent to the server as 10360 // null. It is an error if a field in this list has a non-empty value. 10361 // This may be used to include null fields in Patch requests. 10362 NullFields []string `json:"-"` 10363} 10364 10365func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { 10366 type NoMethod ProductsCustomBatchResponse 10367 raw := NoMethod(*s) 10368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10369} 10370 10371// ProductsCustomBatchResponseEntry: A batch entry encoding a single 10372// non-batch products response. 10373type ProductsCustomBatchResponseEntry struct { 10374 // BatchId: The ID of the request entry this entry responds to. 10375 BatchId int64 `json:"batchId,omitempty"` 10376 10377 // Errors: A list of errors defined if and only if the request failed. 10378 Errors *Errors `json:"errors,omitempty"` 10379 10380 // Kind: Identifies what kind of resource this is. Value: the fixed 10381 // string "content#productsCustomBatchResponseEntry" 10382 Kind string `json:"kind,omitempty"` 10383 10384 // Product: The inserted product. Only defined if the method is `insert` 10385 // and if the request was successful. 10386 Product *Product `json:"product,omitempty"` 10387 10388 // ForceSendFields is a list of field names (e.g. "BatchId") to 10389 // unconditionally include in API requests. By default, fields with 10390 // empty or default values are omitted from API requests. However, any 10391 // non-pointer, non-interface field appearing in ForceSendFields will be 10392 // sent to the server regardless of whether the field is empty or not. 10393 // This may be used to include empty fields in Patch requests. 10394 ForceSendFields []string `json:"-"` 10395 10396 // NullFields is a list of field names (e.g. "BatchId") to include in 10397 // API requests with the JSON null value. By default, fields with empty 10398 // values are omitted from API requests. However, any field with an 10399 // empty value appearing in NullFields will be sent to the server as 10400 // null. It is an error if a field in this list has a non-empty value. 10401 // This may be used to include null fields in Patch requests. 10402 NullFields []string `json:"-"` 10403} 10404 10405func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 10406 type NoMethod ProductsCustomBatchResponseEntry 10407 raw := NoMethod(*s) 10408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10409} 10410 10411type ProductsListResponse struct { 10412 // Kind: Identifies what kind of resource this is. Value: the fixed 10413 // string "content#productsListResponse". 10414 Kind string `json:"kind,omitempty"` 10415 10416 // NextPageToken: The token for the retrieval of the next page of 10417 // products. 10418 NextPageToken string `json:"nextPageToken,omitempty"` 10419 10420 Resources []*Product `json:"resources,omitempty"` 10421 10422 // ServerResponse contains the HTTP response code and headers from the 10423 // server. 10424 googleapi.ServerResponse `json:"-"` 10425 10426 // ForceSendFields is a list of field names (e.g. "Kind") to 10427 // unconditionally include in API requests. By default, fields with 10428 // empty or default values are omitted from API requests. However, any 10429 // non-pointer, non-interface field appearing in ForceSendFields will be 10430 // sent to the server regardless of whether the field is empty or not. 10431 // This may be used to include empty fields in Patch requests. 10432 ForceSendFields []string `json:"-"` 10433 10434 // NullFields is a list of field names (e.g. "Kind") to include in API 10435 // requests with the JSON null value. By default, fields with empty 10436 // values are omitted from API requests. However, any field with an 10437 // empty value appearing in NullFields will be sent to the server as 10438 // null. It is an error if a field in this list has a non-empty value. 10439 // This may be used to include null fields in Patch requests. 10440 NullFields []string `json:"-"` 10441} 10442 10443func (s *ProductsListResponse) MarshalJSON() ([]byte, error) { 10444 type NoMethod ProductsListResponse 10445 raw := NoMethod(*s) 10446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10447} 10448 10449type ProductstatusesCustomBatchRequest struct { 10450 // Entries: The request entries to be processed in the batch. 10451 Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 10452 10453 // ForceSendFields is a list of field names (e.g. "Entries") to 10454 // unconditionally include in API requests. By default, fields with 10455 // empty or default values are omitted from API requests. However, any 10456 // non-pointer, non-interface field appearing in ForceSendFields will be 10457 // sent to the server regardless of whether the field is empty or not. 10458 // This may be used to include empty fields in Patch requests. 10459 ForceSendFields []string `json:"-"` 10460 10461 // NullFields is a list of field names (e.g. "Entries") to include in 10462 // API requests with the JSON null value. By default, fields with empty 10463 // values are omitted from API requests. However, any field with an 10464 // empty value appearing in NullFields will be sent to the server as 10465 // null. It is an error if a field in this list has a non-empty value. 10466 // This may be used to include null fields in Patch requests. 10467 NullFields []string `json:"-"` 10468} 10469 10470func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 10471 type NoMethod ProductstatusesCustomBatchRequest 10472 raw := NoMethod(*s) 10473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10474} 10475 10476// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a 10477// single non-batch productstatuses request. 10478type ProductstatusesCustomBatchRequestEntry struct { 10479 // BatchId: An entry ID, unique within the batch request. 10480 BatchId int64 `json:"batchId,omitempty"` 10481 10482 // Destinations: If set, only issues for the specified destinations are 10483 // returned, otherwise only issues for the Shopping destination. 10484 Destinations []string `json:"destinations,omitempty"` 10485 10486 IncludeAttributes bool `json:"includeAttributes,omitempty"` 10487 10488 // MerchantId: The ID of the managing account. 10489 MerchantId uint64 `json:"merchantId,omitempty,string"` 10490 10491 // Method: The method of the batch entry. Acceptable values are: - 10492 // "get" 10493 Method string `json:"method,omitempty"` 10494 10495 // ProductId: The ID of the product whose status to get. 10496 ProductId string `json:"productId,omitempty"` 10497 10498 // ForceSendFields is a list of field names (e.g. "BatchId") to 10499 // unconditionally include in API requests. By default, fields with 10500 // empty or default values are omitted from API requests. However, any 10501 // non-pointer, non-interface field appearing in ForceSendFields will be 10502 // sent to the server regardless of whether the field is empty or not. 10503 // This may be used to include empty fields in Patch requests. 10504 ForceSendFields []string `json:"-"` 10505 10506 // NullFields is a list of field names (e.g. "BatchId") to include in 10507 // API requests with the JSON null value. By default, fields with empty 10508 // values are omitted from API requests. However, any field with an 10509 // empty value appearing in NullFields will be sent to the server as 10510 // null. It is an error if a field in this list has a non-empty value. 10511 // This may be used to include null fields in Patch requests. 10512 NullFields []string `json:"-"` 10513} 10514 10515func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 10516 type NoMethod ProductstatusesCustomBatchRequestEntry 10517 raw := NoMethod(*s) 10518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10519} 10520 10521type ProductstatusesCustomBatchResponse struct { 10522 // Entries: The result of the execution of the batch requests. 10523 Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 10524 10525 // Kind: Identifies what kind of resource this is. Value: the fixed 10526 // string "content#productstatusesCustomBatchResponse". 10527 Kind string `json:"kind,omitempty"` 10528 10529 // ServerResponse contains the HTTP response code and headers from the 10530 // server. 10531 googleapi.ServerResponse `json:"-"` 10532 10533 // ForceSendFields is a list of field names (e.g. "Entries") to 10534 // unconditionally include in API requests. By default, fields with 10535 // empty or default values are omitted from API requests. However, any 10536 // non-pointer, non-interface field appearing in ForceSendFields will be 10537 // sent to the server regardless of whether the field is empty or not. 10538 // This may be used to include empty fields in Patch requests. 10539 ForceSendFields []string `json:"-"` 10540 10541 // NullFields is a list of field names (e.g. "Entries") to include in 10542 // API requests with the JSON null value. By default, fields with empty 10543 // values are omitted from API requests. However, any field with an 10544 // empty value appearing in NullFields will be sent to the server as 10545 // null. It is an error if a field in this list has a non-empty value. 10546 // This may be used to include null fields in Patch requests. 10547 NullFields []string `json:"-"` 10548} 10549 10550func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 10551 type NoMethod ProductstatusesCustomBatchResponse 10552 raw := NoMethod(*s) 10553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10554} 10555 10556// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a 10557// single non-batch productstatuses response. 10558type ProductstatusesCustomBatchResponseEntry struct { 10559 // BatchId: The ID of the request entry this entry responds to. 10560 BatchId int64 `json:"batchId,omitempty"` 10561 10562 // Errors: A list of errors, if the request failed. 10563 Errors *Errors `json:"errors,omitempty"` 10564 10565 // Kind: Identifies what kind of resource this is. Value: the fixed 10566 // string "content#productstatusesCustomBatchResponseEntry" 10567 Kind string `json:"kind,omitempty"` 10568 10569 // ProductStatus: The requested product status. Only defined if the 10570 // request was successful. 10571 ProductStatus *ProductStatus `json:"productStatus,omitempty"` 10572 10573 // ForceSendFields is a list of field names (e.g. "BatchId") to 10574 // unconditionally include in API requests. By default, fields with 10575 // empty or default values are omitted from API requests. However, any 10576 // non-pointer, non-interface field appearing in ForceSendFields will be 10577 // sent to the server regardless of whether the field is empty or not. 10578 // This may be used to include empty fields in Patch requests. 10579 ForceSendFields []string `json:"-"` 10580 10581 // NullFields is a list of field names (e.g. "BatchId") to include in 10582 // API requests with the JSON null value. By default, fields with empty 10583 // values are omitted from API requests. However, any field with an 10584 // empty value appearing in NullFields will be sent to the server as 10585 // null. It is an error if a field in this list has a non-empty value. 10586 // This may be used to include null fields in Patch requests. 10587 NullFields []string `json:"-"` 10588} 10589 10590func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 10591 type NoMethod ProductstatusesCustomBatchResponseEntry 10592 raw := NoMethod(*s) 10593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10594} 10595 10596type ProductstatusesListResponse struct { 10597 // Kind: Identifies what kind of resource this is. Value: the fixed 10598 // string "content#productstatusesListResponse". 10599 Kind string `json:"kind,omitempty"` 10600 10601 // NextPageToken: The token for the retrieval of the next page of 10602 // products statuses. 10603 NextPageToken string `json:"nextPageToken,omitempty"` 10604 10605 Resources []*ProductStatus `json:"resources,omitempty"` 10606 10607 // ServerResponse contains the HTTP response code and headers from the 10608 // server. 10609 googleapi.ServerResponse `json:"-"` 10610 10611 // ForceSendFields is a list of field names (e.g. "Kind") to 10612 // unconditionally include in API requests. By default, fields with 10613 // empty or default values are omitted from API requests. However, any 10614 // non-pointer, non-interface field appearing in ForceSendFields will be 10615 // sent to the server regardless of whether the field is empty or not. 10616 // This may be used to include empty fields in Patch requests. 10617 ForceSendFields []string `json:"-"` 10618 10619 // NullFields is a list of field names (e.g. "Kind") to include in API 10620 // requests with the JSON null value. By default, fields with empty 10621 // values are omitted from API requests. However, any field with an 10622 // empty value appearing in NullFields will be sent to the server as 10623 // null. It is an error if a field in this list has a non-empty value. 10624 // This may be used to include null fields in Patch requests. 10625 NullFields []string `json:"-"` 10626} 10627 10628func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) { 10629 type NoMethod ProductstatusesListResponse 10630 raw := NoMethod(*s) 10631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10632} 10633 10634type Promotion struct { 10635 // PromotionAmount: [required] Amount of the promotion. The values here 10636 // are the promotion applied to the unit price pretax and to the total 10637 // of the tax amounts. 10638 PromotionAmount *Amount `json:"promotionAmount,omitempty"` 10639 10640 // PromotionId: [required] ID of the promotion. 10641 PromotionId string `json:"promotionId,omitempty"` 10642 10643 // ForceSendFields is a list of field names (e.g. "PromotionAmount") to 10644 // unconditionally include in API requests. By default, fields with 10645 // empty or default values are omitted from API requests. However, any 10646 // non-pointer, non-interface field appearing in ForceSendFields will be 10647 // sent to the server regardless of whether the field is empty or not. 10648 // This may be used to include empty fields in Patch requests. 10649 ForceSendFields []string `json:"-"` 10650 10651 // NullFields is a list of field names (e.g. "PromotionAmount") to 10652 // include in API requests with the JSON null value. By default, fields 10653 // with empty values are omitted from API requests. However, any field 10654 // with an empty value appearing in NullFields will be sent to the 10655 // server as null. It is an error if a field in this list has a 10656 // non-empty value. This may be used to include null fields in Patch 10657 // requests. 10658 NullFields []string `json:"-"` 10659} 10660 10661func (s *Promotion) MarshalJSON() ([]byte, error) { 10662 type NoMethod Promotion 10663 raw := NoMethod(*s) 10664 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10665} 10666 10667type RateGroup struct { 10668 // ApplicableShippingLabels: A list of shipping labels defining the 10669 // products to which this rate group applies to. This is a disjunction: 10670 // only one of the labels has to match for the rate group to apply. May 10671 // only be empty for the last rate group of a service. Required. 10672 ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` 10673 10674 // CarrierRates: A list of carrier rates that can be referred to by 10675 // `mainTable` or `singleValue`. 10676 CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` 10677 10678 // MainTable: A table defining the rate group, when `singleValue` is not 10679 // expressive enough. Can only be set if `singleValue` is not set. 10680 MainTable *Table `json:"mainTable,omitempty"` 10681 10682 // Name: Name of the rate group. Optional. If set has to be unique 10683 // within shipping service. 10684 Name string `json:"name,omitempty"` 10685 10686 // SingleValue: The value of the rate group (e.g. flat rate $10). Can 10687 // only be set if `mainTable` and `subtables` are not set. 10688 SingleValue *Value `json:"singleValue,omitempty"` 10689 10690 // Subtables: A list of subtables referred to by `mainTable`. Can only 10691 // be set if `mainTable` is set. 10692 Subtables []*Table `json:"subtables,omitempty"` 10693 10694 // ForceSendFields is a list of field names (e.g. 10695 // "ApplicableShippingLabels") to unconditionally include in API 10696 // requests. By default, fields with empty or default values are omitted 10697 // from API requests. However, any non-pointer, non-interface field 10698 // appearing in ForceSendFields will be sent to the server regardless of 10699 // whether the field is empty or not. This may be used to include empty 10700 // fields in Patch requests. 10701 ForceSendFields []string `json:"-"` 10702 10703 // NullFields is a list of field names (e.g. "ApplicableShippingLabels") 10704 // to include in API requests with the JSON null value. By default, 10705 // fields with empty values are omitted from API requests. However, any 10706 // field with an empty value appearing in NullFields will be sent to the 10707 // server as null. It is an error if a field in this list has a 10708 // non-empty value. This may be used to include null fields in Patch 10709 // requests. 10710 NullFields []string `json:"-"` 10711} 10712 10713func (s *RateGroup) MarshalJSON() ([]byte, error) { 10714 type NoMethod RateGroup 10715 raw := NoMethod(*s) 10716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10717} 10718 10719type RefundReason struct { 10720 // Description: Description of the reason. 10721 Description string `json:"description,omitempty"` 10722 10723 // ReasonCode: Code of the refund reason. Acceptable values are: - 10724 // "adjustment" - "autoPostInternal" - 10725 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 10726 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 10727 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 10728 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 10729 // - "customerSupportRequested" - "deliveredLateByCarrier" - 10730 // "deliveredTooLate" - "expiredItem" - 10731 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 10732 // "failToPushOrderMerchantFulfillmentError" - 10733 // "failToPushOrderToMerchant" - 10734 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 10735 // "invalidCoupon" - "lateShipmentCredit" - 10736 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 10737 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 10738 // "paymentDeclined" - "priceAdjustment" - "priceError" - 10739 // "productArrivedDamaged" - "productNotAsDescribed" - 10740 // "promoReallocation" - "qualityNotAsExpected" - 10741 // "returnRefundAbuse" - "shippingCostAdjustment" - 10742 // "shippingPriceError" - "taxAdjustment" - "taxError" - 10743 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 10744 // "wrongProductShipped" 10745 ReasonCode string `json:"reasonCode,omitempty"` 10746 10747 // ForceSendFields is a list of field names (e.g. "Description") to 10748 // unconditionally include in API requests. By default, fields with 10749 // empty or default values are omitted from API requests. However, any 10750 // non-pointer, non-interface field appearing in ForceSendFields will be 10751 // sent to the server regardless of whether the field is empty or not. 10752 // This may be used to include empty fields in Patch requests. 10753 ForceSendFields []string `json:"-"` 10754 10755 // NullFields is a list of field names (e.g. "Description") to include 10756 // in API requests with the JSON null value. By default, fields with 10757 // empty values are omitted from API requests. However, any field with 10758 // an empty value appearing in NullFields will be sent to the server as 10759 // null. It is an error if a field in this list has a non-empty value. 10760 // This may be used to include null fields in Patch requests. 10761 NullFields []string `json:"-"` 10762} 10763 10764func (s *RefundReason) MarshalJSON() ([]byte, error) { 10765 type NoMethod RefundReason 10766 raw := NoMethod(*s) 10767 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10768} 10769 10770type ReturnShipment struct { 10771 // CreationDate: The date of creation of the shipment, in ISO 8601 10772 // format. 10773 CreationDate string `json:"creationDate,omitempty"` 10774 10775 // DeliveryDate: The date of delivery of the shipment, in ISO 8601 10776 // format. 10777 DeliveryDate string `json:"deliveryDate,omitempty"` 10778 10779 // ReturnMethodType: Type of the return method. Acceptable values are: - 10780 // "byMail" - "contactCustomerSupport" - "returnless" 10781 ReturnMethodType string `json:"returnMethodType,omitempty"` 10782 10783 // ShipmentId: Shipment ID generated by Google. 10784 ShipmentId string `json:"shipmentId,omitempty"` 10785 10786 // ShipmentTrackingInfos: Tracking information of the shipment. One 10787 // return shipment might be handled by several shipping carriers 10788 // sequentially. 10789 ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` 10790 10791 // ShippingDate: The date of shipping of the shipment, in ISO 8601 10792 // format. 10793 ShippingDate string `json:"shippingDate,omitempty"` 10794 10795 // State: State of the shipment. Acceptable values are: - "completed" 10796 // - "new" - "shipped" - "undeliverable" - "pending" 10797 State string `json:"state,omitempty"` 10798 10799 // ForceSendFields is a list of field names (e.g. "CreationDate") to 10800 // unconditionally include in API requests. By default, fields with 10801 // empty or default values are omitted from API requests. However, any 10802 // non-pointer, non-interface field appearing in ForceSendFields will be 10803 // sent to the server regardless of whether the field is empty or not. 10804 // This may be used to include empty fields in Patch requests. 10805 ForceSendFields []string `json:"-"` 10806 10807 // NullFields is a list of field names (e.g. "CreationDate") to include 10808 // in API requests with the JSON null value. By default, fields with 10809 // empty values are omitted from API requests. However, any field with 10810 // an empty value appearing in NullFields will be sent to the server as 10811 // null. It is an error if a field in this list has a non-empty value. 10812 // This may be used to include null fields in Patch requests. 10813 NullFields []string `json:"-"` 10814} 10815 10816func (s *ReturnShipment) MarshalJSON() ([]byte, error) { 10817 type NoMethod ReturnShipment 10818 raw := NoMethod(*s) 10819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10820} 10821 10822type Row struct { 10823 // Cells: The list of cells that constitute the row. Must have the same 10824 // length as `columnHeaders` for two-dimensional tables, a length of 1 10825 // for one-dimensional tables. Required. 10826 Cells []*Value `json:"cells,omitempty"` 10827 10828 // ForceSendFields is a list of field names (e.g. "Cells") to 10829 // unconditionally include in API requests. By default, fields with 10830 // empty or default values are omitted from API requests. However, any 10831 // non-pointer, non-interface field appearing in ForceSendFields will be 10832 // sent to the server regardless of whether the field is empty or not. 10833 // This may be used to include empty fields in Patch requests. 10834 ForceSendFields []string `json:"-"` 10835 10836 // NullFields is a list of field names (e.g. "Cells") to include in API 10837 // requests with the JSON null value. By default, fields with empty 10838 // values are omitted from API requests. However, any field with an 10839 // empty value appearing in NullFields will be sent to the server as 10840 // null. It is an error if a field in this list has a non-empty value. 10841 // This may be used to include null fields in Patch requests. 10842 NullFields []string `json:"-"` 10843} 10844 10845func (s *Row) MarshalJSON() ([]byte, error) { 10846 type NoMethod Row 10847 raw := NoMethod(*s) 10848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10849} 10850 10851type Service struct { 10852 // Active: A boolean exposing the active status of the shipping service. 10853 // Required. 10854 Active bool `json:"active,omitempty"` 10855 10856 // Currency: The CLDR code of the currency to which this service 10857 // applies. Must match that of the prices in rate groups. 10858 Currency string `json:"currency,omitempty"` 10859 10860 // DeliveryCountry: The CLDR territory code of the country to which the 10861 // service applies. Required. 10862 DeliveryCountry string `json:"deliveryCountry,omitempty"` 10863 10864 // DeliveryTime: Time spent in various aspects from order to the 10865 // delivery of the product. Required. 10866 DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` 10867 10868 // Eligibility: Eligibility for this service. Acceptable values are: - 10869 // "All scenarios" - "All scenarios except Shopping Actions" - 10870 // "Shopping Actions" 10871 Eligibility string `json:"eligibility,omitempty"` 10872 10873 // MinimumOrderValue: Minimum order value for this service. If set, 10874 // indicates that customers will have to spend at least this amount. All 10875 // prices within a service must have the same currency. Cannot be set 10876 // together with minimum_order_value_table. 10877 MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` 10878 10879 // MinimumOrderValueTable: Table of per store minimum order values for 10880 // the pickup fulfillment type. Cannot be set together with 10881 // minimum_order_value. 10882 MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` 10883 10884 // Name: Free-form name of the service. Must be unique within target 10885 // account. Required. 10886 Name string `json:"name,omitempty"` 10887 10888 // PickupService: The carrier-service pair delivering items to 10889 // collection points. The list of supported pickup services can be 10890 // retrieved via the `getSupportedPickupServices` method. Required if 10891 // and only if the service delivery type is `pickup`. 10892 PickupService *PickupCarrierService `json:"pickupService,omitempty"` 10893 10894 // RateGroups: Shipping rate group definitions. Only the last one is 10895 // allowed to have an empty `applicableShippingLabels`, which means 10896 // "everything else". The other `applicableShippingLabels` must not 10897 // overlap. 10898 RateGroups []*RateGroup `json:"rateGroups,omitempty"` 10899 10900 // ShipmentType: Type of locations this service ships orders to. 10901 // Acceptable values are: - "delivery" - "pickup" 10902 ShipmentType string `json:"shipmentType,omitempty"` 10903 10904 // ForceSendFields is a list of field names (e.g. "Active") to 10905 // unconditionally include in API requests. By default, fields with 10906 // empty or default values are omitted from API requests. However, any 10907 // non-pointer, non-interface field appearing in ForceSendFields will be 10908 // sent to the server regardless of whether the field is empty or not. 10909 // This may be used to include empty fields in Patch requests. 10910 ForceSendFields []string `json:"-"` 10911 10912 // NullFields is a list of field names (e.g. "Active") to include in API 10913 // requests with the JSON null value. By default, fields with empty 10914 // values are omitted from API requests. However, any field with an 10915 // empty value appearing in NullFields will be sent to the server as 10916 // null. It is an error if a field in this list has a non-empty value. 10917 // This may be used to include null fields in Patch requests. 10918 NullFields []string `json:"-"` 10919} 10920 10921func (s *Service) MarshalJSON() ([]byte, error) { 10922 type NoMethod Service 10923 raw := NoMethod(*s) 10924 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10925} 10926 10927type ShipmentInvoice struct { 10928 // InvoiceSummary: [required] Invoice summary. 10929 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 10930 10931 // LineItemInvoices: [required] Invoice details per line item. 10932 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 10933 10934 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 10935 // by the merchant in the `shipLineItems` method and is used to group 10936 // multiple line items that have the same kind of shipping charges. 10937 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 10938 10939 // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to 10940 // unconditionally include in API requests. By default, fields with 10941 // empty or default values are omitted from API requests. However, any 10942 // non-pointer, non-interface field appearing in ForceSendFields will be 10943 // sent to the server regardless of whether the field is empty or not. 10944 // This may be used to include empty fields in Patch requests. 10945 ForceSendFields []string `json:"-"` 10946 10947 // NullFields is a list of field names (e.g. "InvoiceSummary") to 10948 // include in API requests with the JSON null value. By default, fields 10949 // with empty values are omitted from API requests. However, any field 10950 // with an empty value appearing in NullFields will be sent to the 10951 // server as null. It is an error if a field in this list has a 10952 // non-empty value. This may be used to include null fields in Patch 10953 // requests. 10954 NullFields []string `json:"-"` 10955} 10956 10957func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) { 10958 type NoMethod ShipmentInvoice 10959 raw := NoMethod(*s) 10960 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10961} 10962 10963type ShipmentInvoiceLineItemInvoice struct { 10964 // LineItemId: ID of the line item. Either lineItemId or productId must 10965 // be set. 10966 LineItemId string `json:"lineItemId,omitempty"` 10967 10968 // ProductId: ID of the product. This is the REST ID used in the 10969 // products service. Either lineItemId or productId must be set. 10970 ProductId string `json:"productId,omitempty"` 10971 10972 // ShipmentUnitIds: [required] The shipment unit ID is assigned by the 10973 // merchant and defines individual quantities within a line item. The 10974 // same ID can be assigned to units that are the same while units that 10975 // differ must be assigned a different ID (for example: free or 10976 // promotional units). 10977 ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` 10978 10979 // UnitInvoice: [required] Invoice details for a single unit. 10980 UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` 10981 10982 // ForceSendFields is a list of field names (e.g. "LineItemId") to 10983 // unconditionally include in API requests. By default, fields with 10984 // empty or default values are omitted from API requests. However, any 10985 // non-pointer, non-interface field appearing in ForceSendFields will be 10986 // sent to the server regardless of whether the field is empty or not. 10987 // This may be used to include empty fields in Patch requests. 10988 ForceSendFields []string `json:"-"` 10989 10990 // NullFields is a list of field names (e.g. "LineItemId") to include in 10991 // API requests with the JSON null value. By default, fields with empty 10992 // values are omitted from API requests. However, any field with an 10993 // empty value appearing in NullFields will be sent to the server as 10994 // null. It is an error if a field in this list has a non-empty value. 10995 // This may be used to include null fields in Patch requests. 10996 NullFields []string `json:"-"` 10997} 10998 10999func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { 11000 type NoMethod ShipmentInvoiceLineItemInvoice 11001 raw := NoMethod(*s) 11002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11003} 11004 11005type ShipmentTrackingInfo struct { 11006 // Carrier: The shipping carrier that handles the package. Acceptable 11007 // values are: - "boxtal" - "bpost" - "chronopost" - 11008 // "colisPrive" - "colissimo" - "cxt" - "deliv" - "dhl" - 11009 // "dpd" - "dynamex" - "eCourier" - "easypost" - "efw" - 11010 // "fedex" - "fedexSmartpost" - "geodis" - "gls" - 11011 // "googleCourier" - "gsx" - "jdLogistics" - "laPoste" - 11012 // "lasership" - "manual" - "mpx" - "onTrac" - "other" - 11013 // "tnt" - "uds" - "ups" - "usps" 11014 Carrier string `json:"carrier,omitempty"` 11015 11016 // TrackingNumber: The tracking number for the package. 11017 TrackingNumber string `json:"trackingNumber,omitempty"` 11018 11019 // ForceSendFields is a list of field names (e.g. "Carrier") to 11020 // unconditionally include in API requests. By default, fields with 11021 // empty or default values are omitted from API requests. However, any 11022 // non-pointer, non-interface field appearing in ForceSendFields will be 11023 // sent to the server regardless of whether the field is empty or not. 11024 // This may be used to include empty fields in Patch requests. 11025 ForceSendFields []string `json:"-"` 11026 11027 // NullFields is a list of field names (e.g. "Carrier") to include in 11028 // API requests with the JSON null value. By default, fields with empty 11029 // values are omitted from API requests. However, any field with an 11030 // empty value appearing in NullFields will be sent to the server as 11031 // null. It is an error if a field in this list has a non-empty value. 11032 // This may be used to include null fields in Patch requests. 11033 NullFields []string `json:"-"` 11034} 11035 11036func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { 11037 type NoMethod ShipmentTrackingInfo 11038 raw := NoMethod(*s) 11039 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11040} 11041 11042// ShippingSettings: The merchant account's shipping settings. All 11043// methods except getsupportedcarriers and getsupportedholidays require 11044// the admin role. 11045type ShippingSettings struct { 11046 // AccountId: The ID of the account to which these account shipping 11047 // settings belong. Ignored upon update, always present in get request 11048 // responses. 11049 AccountId uint64 `json:"accountId,omitempty,string"` 11050 11051 // PostalCodeGroups: A list of postal code groups that can be referred 11052 // to in `services`. Optional. 11053 PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` 11054 11055 // Services: The target account's list of services. Optional. 11056 Services []*Service `json:"services,omitempty"` 11057 11058 // ServerResponse contains the HTTP response code and headers from the 11059 // server. 11060 googleapi.ServerResponse `json:"-"` 11061 11062 // ForceSendFields is a list of field names (e.g. "AccountId") to 11063 // unconditionally include in API requests. By default, fields with 11064 // empty or default values are omitted from API requests. However, any 11065 // non-pointer, non-interface field appearing in ForceSendFields will be 11066 // sent to the server regardless of whether the field is empty or not. 11067 // This may be used to include empty fields in Patch requests. 11068 ForceSendFields []string `json:"-"` 11069 11070 // NullFields is a list of field names (e.g. "AccountId") to include in 11071 // API requests with the JSON null value. By default, fields with empty 11072 // values are omitted from API requests. However, any field with an 11073 // empty value appearing in NullFields will be sent to the server as 11074 // null. It is an error if a field in this list has a non-empty value. 11075 // This may be used to include null fields in Patch requests. 11076 NullFields []string `json:"-"` 11077} 11078 11079func (s *ShippingSettings) MarshalJSON() ([]byte, error) { 11080 type NoMethod ShippingSettings 11081 raw := NoMethod(*s) 11082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11083} 11084 11085type ShippingsettingsCustomBatchRequest struct { 11086 // Entries: The request entries to be processed in the batch. 11087 Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` 11088 11089 // ForceSendFields is a list of field names (e.g. "Entries") to 11090 // unconditionally include in API requests. By default, fields with 11091 // empty or default values are omitted from API requests. However, any 11092 // non-pointer, non-interface field appearing in ForceSendFields will be 11093 // sent to the server regardless of whether the field is empty or not. 11094 // This may be used to include empty fields in Patch requests. 11095 ForceSendFields []string `json:"-"` 11096 11097 // NullFields is a list of field names (e.g. "Entries") to include in 11098 // API requests with the JSON null value. By default, fields with empty 11099 // values are omitted from API requests. However, any field with an 11100 // empty value appearing in NullFields will be sent to the server as 11101 // null. It is an error if a field in this list has a non-empty value. 11102 // This may be used to include null fields in Patch requests. 11103 NullFields []string `json:"-"` 11104} 11105 11106func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 11107 type NoMethod ShippingsettingsCustomBatchRequest 11108 raw := NoMethod(*s) 11109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11110} 11111 11112// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a 11113// single non-batch shippingsettings request. 11114type ShippingsettingsCustomBatchRequestEntry struct { 11115 // AccountId: The ID of the account for which to get/update account 11116 // shipping settings. 11117 AccountId uint64 `json:"accountId,omitempty,string"` 11118 11119 // BatchId: An entry ID, unique within the batch request. 11120 BatchId int64 `json:"batchId,omitempty"` 11121 11122 // MerchantId: The ID of the managing account. 11123 MerchantId uint64 `json:"merchantId,omitempty,string"` 11124 11125 // Method: The method of the batch entry. Acceptable values are: - 11126 // "get" - "update" 11127 Method string `json:"method,omitempty"` 11128 11129 // ShippingSettings: The account shipping settings to update. Only 11130 // defined if the method is `update`. 11131 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11132 11133 // ForceSendFields is a list of field names (e.g. "AccountId") to 11134 // unconditionally include in API requests. By default, fields with 11135 // empty or default values are omitted from API requests. However, any 11136 // non-pointer, non-interface field appearing in ForceSendFields will be 11137 // sent to the server regardless of whether the field is empty or not. 11138 // This may be used to include empty fields in Patch requests. 11139 ForceSendFields []string `json:"-"` 11140 11141 // NullFields is a list of field names (e.g. "AccountId") to include in 11142 // API requests with the JSON null value. By default, fields with empty 11143 // values are omitted from API requests. However, any field with an 11144 // empty value appearing in NullFields will be sent to the server as 11145 // null. It is an error if a field in this list has a non-empty value. 11146 // This may be used to include null fields in Patch requests. 11147 NullFields []string `json:"-"` 11148} 11149 11150func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 11151 type NoMethod ShippingsettingsCustomBatchRequestEntry 11152 raw := NoMethod(*s) 11153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11154} 11155 11156type ShippingsettingsCustomBatchResponse struct { 11157 // Entries: The result of the execution of the batch requests. 11158 Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` 11159 11160 // Kind: Identifies what kind of resource this is. Value: the fixed 11161 // string "content#shippingsettingsCustomBatchResponse". 11162 Kind string `json:"kind,omitempty"` 11163 11164 // ServerResponse contains the HTTP response code and headers from the 11165 // server. 11166 googleapi.ServerResponse `json:"-"` 11167 11168 // ForceSendFields is a list of field names (e.g. "Entries") to 11169 // unconditionally include in API requests. By default, fields with 11170 // empty or default values are omitted from API requests. However, any 11171 // non-pointer, non-interface field appearing in ForceSendFields will be 11172 // sent to the server regardless of whether the field is empty or not. 11173 // This may be used to include empty fields in Patch requests. 11174 ForceSendFields []string `json:"-"` 11175 11176 // NullFields is a list of field names (e.g. "Entries") to include in 11177 // API requests with the JSON null value. By default, fields with empty 11178 // values are omitted from API requests. However, any field with an 11179 // empty value appearing in NullFields will be sent to the server as 11180 // null. It is an error if a field in this list has a non-empty value. 11181 // This may be used to include null fields in Patch requests. 11182 NullFields []string `json:"-"` 11183} 11184 11185func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 11186 type NoMethod ShippingsettingsCustomBatchResponse 11187 raw := NoMethod(*s) 11188 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11189} 11190 11191// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a 11192// single non-batch shipping settings response. 11193type ShippingsettingsCustomBatchResponseEntry struct { 11194 // BatchId: The ID of the request entry to which this entry responds. 11195 BatchId int64 `json:"batchId,omitempty"` 11196 11197 // Errors: A list of errors defined if, and only if, the request failed. 11198 Errors *Errors `json:"errors,omitempty"` 11199 11200 // Kind: Identifies what kind of resource this is. Value: the fixed 11201 // string "content#shippingsettingsCustomBatchResponseEntry" 11202 Kind string `json:"kind,omitempty"` 11203 11204 // ShippingSettings: The retrieved or updated account shipping settings. 11205 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11206 11207 // ForceSendFields is a list of field names (e.g. "BatchId") to 11208 // unconditionally include in API requests. By default, fields with 11209 // empty or default values are omitted from API requests. However, any 11210 // non-pointer, non-interface field appearing in ForceSendFields will be 11211 // sent to the server regardless of whether the field is empty or not. 11212 // This may be used to include empty fields in Patch requests. 11213 ForceSendFields []string `json:"-"` 11214 11215 // NullFields is a list of field names (e.g. "BatchId") to include in 11216 // API requests with the JSON null value. By default, fields with empty 11217 // values are omitted from API requests. However, any field with an 11218 // empty value appearing in NullFields will be sent to the server as 11219 // null. It is an error if a field in this list has a non-empty value. 11220 // This may be used to include null fields in Patch requests. 11221 NullFields []string `json:"-"` 11222} 11223 11224func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 11225 type NoMethod ShippingsettingsCustomBatchResponseEntry 11226 raw := NoMethod(*s) 11227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11228} 11229 11230type ShippingsettingsGetSupportedCarriersResponse struct { 11231 // Carriers: A list of supported carriers. May be empty. 11232 Carriers []*CarriersCarrier `json:"carriers,omitempty"` 11233 11234 // Kind: Identifies what kind of resource this is. Value: the fixed 11235 // string "content#shippingsettingsGetSupportedCarriersResponse". 11236 Kind string `json:"kind,omitempty"` 11237 11238 // ServerResponse contains the HTTP response code and headers from the 11239 // server. 11240 googleapi.ServerResponse `json:"-"` 11241 11242 // ForceSendFields is a list of field names (e.g. "Carriers") to 11243 // unconditionally include in API requests. By default, fields with 11244 // empty or default values are omitted from API requests. However, any 11245 // non-pointer, non-interface field appearing in ForceSendFields will be 11246 // sent to the server regardless of whether the field is empty or not. 11247 // This may be used to include empty fields in Patch requests. 11248 ForceSendFields []string `json:"-"` 11249 11250 // NullFields is a list of field names (e.g. "Carriers") to include in 11251 // API requests with the JSON null value. By default, fields with empty 11252 // values are omitted from API requests. However, any field with an 11253 // empty value appearing in NullFields will be sent to the server as 11254 // null. It is an error if a field in this list has a non-empty value. 11255 // This may be used to include null fields in Patch requests. 11256 NullFields []string `json:"-"` 11257} 11258 11259func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { 11260 type NoMethod ShippingsettingsGetSupportedCarriersResponse 11261 raw := NoMethod(*s) 11262 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11263} 11264 11265type ShippingsettingsGetSupportedHolidaysResponse struct { 11266 // Holidays: A list of holidays applicable for delivery guarantees. May 11267 // be empty. 11268 Holidays []*HolidaysHoliday `json:"holidays,omitempty"` 11269 11270 // Kind: Identifies what kind of resource this is. Value: the fixed 11271 // string "content#shippingsettingsGetSupportedHolidaysResponse". 11272 Kind string `json:"kind,omitempty"` 11273 11274 // ServerResponse contains the HTTP response code and headers from the 11275 // server. 11276 googleapi.ServerResponse `json:"-"` 11277 11278 // ForceSendFields is a list of field names (e.g. "Holidays") to 11279 // unconditionally include in API requests. By default, fields with 11280 // empty or default values are omitted from API requests. However, any 11281 // non-pointer, non-interface field appearing in ForceSendFields will be 11282 // sent to the server regardless of whether the field is empty or not. 11283 // This may be used to include empty fields in Patch requests. 11284 ForceSendFields []string `json:"-"` 11285 11286 // NullFields is a list of field names (e.g. "Holidays") to include in 11287 // API requests with the JSON null value. By default, fields with empty 11288 // values are omitted from API requests. However, any field with an 11289 // empty value appearing in NullFields will be sent to the server as 11290 // null. It is an error if a field in this list has a non-empty value. 11291 // This may be used to include null fields in Patch requests. 11292 NullFields []string `json:"-"` 11293} 11294 11295func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { 11296 type NoMethod ShippingsettingsGetSupportedHolidaysResponse 11297 raw := NoMethod(*s) 11298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11299} 11300 11301type ShippingsettingsGetSupportedPickupServicesResponse struct { 11302 // Kind: Identifies what kind of resource this is. Value: the fixed 11303 // string "content#shippingsettingsGetSupportedPickupServicesResponse". 11304 Kind string `json:"kind,omitempty"` 11305 11306 // PickupServices: A list of supported pickup services. May be empty. 11307 PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` 11308 11309 // ServerResponse contains the HTTP response code and headers from the 11310 // server. 11311 googleapi.ServerResponse `json:"-"` 11312 11313 // ForceSendFields is a list of field names (e.g. "Kind") to 11314 // unconditionally include in API requests. By default, fields with 11315 // empty or default values are omitted from API requests. However, any 11316 // non-pointer, non-interface field appearing in ForceSendFields will be 11317 // sent to the server regardless of whether the field is empty or not. 11318 // This may be used to include empty fields in Patch requests. 11319 ForceSendFields []string `json:"-"` 11320 11321 // NullFields is a list of field names (e.g. "Kind") to include in API 11322 // requests with the JSON null value. By default, fields with empty 11323 // values are omitted from API requests. However, any field with an 11324 // empty value appearing in NullFields will be sent to the server as 11325 // null. It is an error if a field in this list has a non-empty value. 11326 // This may be used to include null fields in Patch requests. 11327 NullFields []string `json:"-"` 11328} 11329 11330func (s *ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { 11331 type NoMethod ShippingsettingsGetSupportedPickupServicesResponse 11332 raw := NoMethod(*s) 11333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11334} 11335 11336type ShippingsettingsListResponse struct { 11337 // Kind: Identifies what kind of resource this is. Value: the fixed 11338 // string "content#shippingsettingsListResponse". 11339 Kind string `json:"kind,omitempty"` 11340 11341 // NextPageToken: The token for the retrieval of the next page of 11342 // shipping settings. 11343 NextPageToken string `json:"nextPageToken,omitempty"` 11344 11345 Resources []*ShippingSettings `json:"resources,omitempty"` 11346 11347 // ServerResponse contains the HTTP response code and headers from the 11348 // server. 11349 googleapi.ServerResponse `json:"-"` 11350 11351 // ForceSendFields is a list of field names (e.g. "Kind") to 11352 // unconditionally include in API requests. By default, fields with 11353 // empty or default values are omitted from API requests. However, any 11354 // non-pointer, non-interface field appearing in ForceSendFields will be 11355 // sent to the server regardless of whether the field is empty or not. 11356 // This may be used to include empty fields in Patch requests. 11357 ForceSendFields []string `json:"-"` 11358 11359 // NullFields is a list of field names (e.g. "Kind") to include in API 11360 // requests with the JSON null value. By default, fields with empty 11361 // values are omitted from API requests. However, any field with an 11362 // empty value appearing in NullFields will be sent to the server as 11363 // null. It is an error if a field in this list has a non-empty value. 11364 // This may be used to include null fields in Patch requests. 11365 NullFields []string `json:"-"` 11366} 11367 11368func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { 11369 type NoMethod ShippingsettingsListResponse 11370 raw := NoMethod(*s) 11371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11372} 11373 11374type Table struct { 11375 // ColumnHeaders: Headers of the table's columns. Optional: if not set 11376 // then the table has only one dimension. 11377 ColumnHeaders *Headers `json:"columnHeaders,omitempty"` 11378 11379 // Name: Name of the table. Required for subtables, ignored for the main 11380 // table. 11381 Name string `json:"name,omitempty"` 11382 11383 // RowHeaders: Headers of the table's rows. Required. 11384 RowHeaders *Headers `json:"rowHeaders,omitempty"` 11385 11386 // Rows: The list of rows that constitute the table. Must have the same 11387 // length as `rowHeaders`. Required. 11388 Rows []*Row `json:"rows,omitempty"` 11389 11390 // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to 11391 // unconditionally include in API requests. By default, fields with 11392 // empty or default values are omitted from API requests. However, any 11393 // non-pointer, non-interface field appearing in ForceSendFields will be 11394 // sent to the server regardless of whether the field is empty or not. 11395 // This may be used to include empty fields in Patch requests. 11396 ForceSendFields []string `json:"-"` 11397 11398 // NullFields is a list of field names (e.g. "ColumnHeaders") to include 11399 // in API requests with the JSON null value. By default, fields with 11400 // empty values are omitted from API requests. However, any field with 11401 // an empty value appearing in NullFields will be sent to the server as 11402 // null. It is an error if a field in this list has a non-empty value. 11403 // This may be used to include null fields in Patch requests. 11404 NullFields []string `json:"-"` 11405} 11406 11407func (s *Table) MarshalJSON() ([]byte, error) { 11408 type NoMethod Table 11409 raw := NoMethod(*s) 11410 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11411} 11412 11413type TestOrder struct { 11414 // Customer: Required. The details of the customer who placed the order. 11415 Customer *TestOrderCustomer `json:"customer,omitempty"` 11416 11417 // EnableOrderinvoices: Whether the orderinvoices service should support 11418 // this order. 11419 EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` 11420 11421 // Kind: Identifies what kind of resource this is. Value: the fixed 11422 // string "content#testOrder" 11423 Kind string `json:"kind,omitempty"` 11424 11425 // LineItems: Required. Line items that are ordered. At least one line 11426 // item must be provided. 11427 LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` 11428 11429 // NotificationMode: Restricted. Do not use. 11430 NotificationMode string `json:"notificationMode,omitempty"` 11431 11432 // PaymentMethod: The details of the payment method. 11433 PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"` 11434 11435 // PredefinedDeliveryAddress: Required. Identifier of one of the 11436 // predefined delivery addresses for the delivery. Acceptable values 11437 // are: - "dwight" - "jim" - "pam" 11438 PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` 11439 11440 // PredefinedPickupDetails: Identifier of one of the predefined pickup 11441 // details. Required for orders containing line items with shipping type 11442 // `pickup`. Acceptable values are: - "dwight" - "jim" - "pam" 11443 PredefinedPickupDetails string `json:"predefinedPickupDetails,omitempty"` 11444 11445 // Promotions: Deprecated. Ignored if provided. 11446 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 11447 11448 // ShippingCost: Required. The price of shipping for all items. Shipping 11449 // tax is automatically calculated for orders where marketplace 11450 // facilitator tax laws are applicable. Otherwise, tax settings from 11451 // Merchant Center are applied. Note that shipping is not taxed in 11452 // certain states. 11453 ShippingCost *Price `json:"shippingCost,omitempty"` 11454 11455 // ShippingCostTax: Deprecated. Ignored if provided. 11456 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 11457 11458 // ShippingOption: Required. The requested shipping option. Acceptable 11459 // values are: - "economy" - "expedited" - "oneDay" - "sameDay" 11460 // - "standard" - "twoDay" 11461 ShippingOption string `json:"shippingOption,omitempty"` 11462 11463 // ForceSendFields is a list of field names (e.g. "Customer") to 11464 // unconditionally include in API requests. By default, fields with 11465 // empty or default values are omitted from API requests. However, any 11466 // non-pointer, non-interface field appearing in ForceSendFields will be 11467 // sent to the server regardless of whether the field is empty or not. 11468 // This may be used to include empty fields in Patch requests. 11469 ForceSendFields []string `json:"-"` 11470 11471 // NullFields is a list of field names (e.g. "Customer") to include in 11472 // API requests with the JSON null value. By default, fields with empty 11473 // values are omitted from API requests. However, any field with an 11474 // empty value appearing in NullFields will be sent to the server as 11475 // null. It is an error if a field in this list has a non-empty value. 11476 // This may be used to include null fields in Patch requests. 11477 NullFields []string `json:"-"` 11478} 11479 11480func (s *TestOrder) MarshalJSON() ([]byte, error) { 11481 type NoMethod TestOrder 11482 raw := NoMethod(*s) 11483 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11484} 11485 11486type TestOrderCustomer struct { 11487 // Email: Required. Email address of the customer. Acceptable values 11488 // are: - "pog.dwight.schrute@gmail.com" - 11489 // "pog.jim.halpert@gmail.com" - "penpog.pam.beesly@gmail.comding" 11490 Email string `json:"email,omitempty"` 11491 11492 // ExplicitMarketingPreference: Deprecated. Please use 11493 // marketingRightsInfo instead. 11494 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 11495 11496 // FullName: Full name of the customer. 11497 FullName string `json:"fullName,omitempty"` 11498 11499 // MarketingRightsInfo: Customer's marketing preferences. 11500 MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 11501 11502 // ForceSendFields is a list of field names (e.g. "Email") to 11503 // unconditionally include in API requests. By default, fields with 11504 // empty or default values are omitted from API requests. However, any 11505 // non-pointer, non-interface field appearing in ForceSendFields will be 11506 // sent to the server regardless of whether the field is empty or not. 11507 // This may be used to include empty fields in Patch requests. 11508 ForceSendFields []string `json:"-"` 11509 11510 // NullFields is a list of field names (e.g. "Email") to include in API 11511 // requests with the JSON null value. By default, fields with empty 11512 // values are omitted from API requests. However, any field with an 11513 // empty value appearing in NullFields will be sent to the server as 11514 // null. It is an error if a field in this list has a non-empty value. 11515 // This may be used to include null fields in Patch requests. 11516 NullFields []string `json:"-"` 11517} 11518 11519func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) { 11520 type NoMethod TestOrderCustomer 11521 raw := NoMethod(*s) 11522 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11523} 11524 11525type TestOrderCustomerMarketingRightsInfo struct { 11526 // ExplicitMarketingPreference: Last know user use selection regards 11527 // marketing preferences. In certain cases selection might not be known, 11528 // so this field would be empty. Acceptable values are: - "denied" - 11529 // "granted" 11530 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 11531 11532 // LastUpdatedTimestamp: Timestamp when last time marketing preference 11533 // was updated. Could be empty, if user wasn't offered a selection yet. 11534 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 11535 11536 // ForceSendFields is a list of field names (e.g. 11537 // "ExplicitMarketingPreference") to unconditionally include in API 11538 // requests. By default, fields with empty or default values are omitted 11539 // from API requests. However, any non-pointer, non-interface field 11540 // appearing in ForceSendFields will be sent to the server regardless of 11541 // whether the field is empty or not. This may be used to include empty 11542 // fields in Patch requests. 11543 ForceSendFields []string `json:"-"` 11544 11545 // NullFields is a list of field names (e.g. 11546 // "ExplicitMarketingPreference") to include in API requests with the 11547 // JSON null value. By default, fields with empty values are omitted 11548 // from API requests. However, any field with an empty value appearing 11549 // in NullFields will be sent to the server as null. It is an error if a 11550 // field in this list has a non-empty value. This may be used to include 11551 // null fields in Patch requests. 11552 NullFields []string `json:"-"` 11553} 11554 11555func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 11556 type NoMethod TestOrderCustomerMarketingRightsInfo 11557 raw := NoMethod(*s) 11558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11559} 11560 11561type TestOrderLineItem struct { 11562 // Product: Required. Product data from the time of the order placement. 11563 Product *TestOrderLineItemProduct `json:"product,omitempty"` 11564 11565 // QuantityOrdered: Required. Number of items ordered. 11566 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 11567 11568 // ReturnInfo: Required. Details of the return policy for the line item. 11569 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 11570 11571 // ShippingDetails: Required. Details of the requested shipping for the 11572 // line item. 11573 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 11574 11575 // UnitTax: Deprecated. Ignored if provided. 11576 UnitTax *Price `json:"unitTax,omitempty"` 11577 11578 // ForceSendFields is a list of field names (e.g. "Product") to 11579 // unconditionally include in API requests. By default, fields with 11580 // empty or default values are omitted from API requests. However, any 11581 // non-pointer, non-interface field appearing in ForceSendFields will be 11582 // sent to the server regardless of whether the field is empty or not. 11583 // This may be used to include empty fields in Patch requests. 11584 ForceSendFields []string `json:"-"` 11585 11586 // NullFields is a list of field names (e.g. "Product") to include in 11587 // API requests with the JSON null value. By default, fields with empty 11588 // values are omitted from API requests. However, any field with an 11589 // empty value appearing in NullFields will be sent to the server as 11590 // null. It is an error if a field in this list has a non-empty value. 11591 // This may be used to include null fields in Patch requests. 11592 NullFields []string `json:"-"` 11593} 11594 11595func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) { 11596 type NoMethod TestOrderLineItem 11597 raw := NoMethod(*s) 11598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11599} 11600 11601type TestOrderLineItemProduct struct { 11602 // Brand: Required. Brand of the item. 11603 Brand string `json:"brand,omitempty"` 11604 11605 // Channel: Deprecated. Acceptable values are: - "online" 11606 Channel string `json:"channel,omitempty"` 11607 11608 // Condition: Required. Condition or state of the item. Acceptable 11609 // values are: - "new" 11610 Condition string `json:"condition,omitempty"` 11611 11612 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 11613 // the item. Acceptable values are: - "en" - "fr" 11614 ContentLanguage string `json:"contentLanguage,omitempty"` 11615 11616 // Fees: Fees for the item. Optional. 11617 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 11618 11619 // Gtin: Global Trade Item Number (GTIN) of the item. Optional. 11620 Gtin string `json:"gtin,omitempty"` 11621 11622 // ImageLink: Required. URL of an image of the item. 11623 ImageLink string `json:"imageLink,omitempty"` 11624 11625 // ItemGroupId: Shared identifier for all variants of the same product. 11626 // Optional. 11627 ItemGroupId string `json:"itemGroupId,omitempty"` 11628 11629 // Mpn: Manufacturer Part Number (MPN) of the item. Optional. 11630 Mpn string `json:"mpn,omitempty"` 11631 11632 // OfferId: Required. An identifier of the item. 11633 OfferId string `json:"offerId,omitempty"` 11634 11635 // Price: Required. The price for the product. Tax is automatically 11636 // calculated for orders where marketplace facilitator tax laws are 11637 // applicable. Otherwise, tax settings from Merchant Center are applied. 11638 Price *Price `json:"price,omitempty"` 11639 11640 // TargetCountry: Required. The CLDR territory // code of the target 11641 // country of the product. 11642 TargetCountry string `json:"targetCountry,omitempty"` 11643 11644 // Title: Required. The title of the product. 11645 Title string `json:"title,omitempty"` 11646 11647 // VariantAttributes: Variant attributes for the item. Optional. 11648 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 11649 11650 // ForceSendFields is a list of field names (e.g. "Brand") to 11651 // unconditionally include in API requests. By default, fields with 11652 // empty or default values are omitted from API requests. However, any 11653 // non-pointer, non-interface field appearing in ForceSendFields will be 11654 // sent to the server regardless of whether the field is empty or not. 11655 // This may be used to include empty fields in Patch requests. 11656 ForceSendFields []string `json:"-"` 11657 11658 // NullFields is a list of field names (e.g. "Brand") to include in API 11659 // requests with the JSON null value. By default, fields with empty 11660 // values are omitted from API requests. However, any field with an 11661 // empty value appearing in NullFields will be sent to the server as 11662 // null. It is an error if a field in this list has a non-empty value. 11663 // This may be used to include null fields in Patch requests. 11664 NullFields []string `json:"-"` 11665} 11666 11667func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { 11668 type NoMethod TestOrderLineItemProduct 11669 raw := NoMethod(*s) 11670 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11671} 11672 11673type TestOrderPaymentMethod struct { 11674 // ExpirationMonth: The card expiration month (January = 1, February = 2 11675 // etc.). 11676 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 11677 11678 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 11679 ExpirationYear int64 `json:"expirationYear,omitempty"` 11680 11681 // LastFourDigits: The last four digits of the card number. 11682 LastFourDigits string `json:"lastFourDigits,omitempty"` 11683 11684 // PredefinedBillingAddress: The billing address. Acceptable values are: 11685 // - "dwight" - "jim" - "pam" 11686 PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` 11687 11688 // Type: The type of instrument. Note that real orders might have 11689 // different values than the four values accepted by `createTestOrder`. 11690 // Acceptable values are: - "AMEX" - "DISCOVER" - "MASTERCARD" - 11691 // "VISA" 11692 Type string `json:"type,omitempty"` 11693 11694 // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to 11695 // unconditionally include in API requests. By default, fields with 11696 // empty or default values are omitted from API requests. However, any 11697 // non-pointer, non-interface field appearing in ForceSendFields will be 11698 // sent to the server regardless of whether the field is empty or not. 11699 // This may be used to include empty fields in Patch requests. 11700 ForceSendFields []string `json:"-"` 11701 11702 // NullFields is a list of field names (e.g. "ExpirationMonth") to 11703 // include in API requests with the JSON null value. By default, fields 11704 // with empty values are omitted from API requests. However, any field 11705 // with an empty value appearing in NullFields will be sent to the 11706 // server as null. It is an error if a field in this list has a 11707 // non-empty value. This may be used to include null fields in Patch 11708 // requests. 11709 NullFields []string `json:"-"` 11710} 11711 11712func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) { 11713 type NoMethod TestOrderPaymentMethod 11714 raw := NoMethod(*s) 11715 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11716} 11717 11718type TransitTable struct { 11719 // PostalCodeGroupNames: A list of postal group names. The last value 11720 // can be "all other locations". Example: `["zone 1", "zone 2", "all 11721 // other locations"]`. The referred postal code groups must match the 11722 // delivery country of the service. 11723 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 11724 11725 Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` 11726 11727 // TransitTimeLabels: A list of transit time labels. The last value can 11728 // be "all other labels". Example: `["food", "electronics", "all other 11729 // labels"]`. 11730 TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` 11731 11732 // ForceSendFields is a list of field names (e.g. 11733 // "PostalCodeGroupNames") to unconditionally include in API requests. 11734 // By default, fields with empty or default values are omitted from API 11735 // requests. However, any non-pointer, non-interface field appearing in 11736 // ForceSendFields will be sent to the server regardless of whether the 11737 // field is empty or not. This may be used to include empty fields in 11738 // Patch requests. 11739 ForceSendFields []string `json:"-"` 11740 11741 // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to 11742 // include in API requests with the JSON null value. By default, fields 11743 // with empty values are omitted from API requests. However, any field 11744 // with an empty value appearing in NullFields will be sent to the 11745 // server as null. It is an error if a field in this list has a 11746 // non-empty value. This may be used to include null fields in Patch 11747 // requests. 11748 NullFields []string `json:"-"` 11749} 11750 11751func (s *TransitTable) MarshalJSON() ([]byte, error) { 11752 type NoMethod TransitTable 11753 raw := NoMethod(*s) 11754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11755} 11756 11757type TransitTableTransitTimeRow struct { 11758 Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` 11759 11760 // ForceSendFields is a list of field names (e.g. "Values") to 11761 // unconditionally include in API requests. By default, fields with 11762 // empty or default values are omitted from API requests. However, any 11763 // non-pointer, non-interface field appearing in ForceSendFields will be 11764 // sent to the server regardless of whether the field is empty or not. 11765 // This may be used to include empty fields in Patch requests. 11766 ForceSendFields []string `json:"-"` 11767 11768 // NullFields is a list of field names (e.g. "Values") to include in API 11769 // requests with the JSON null value. By default, fields with empty 11770 // values are omitted from API requests. However, any field with an 11771 // empty value appearing in NullFields will be sent to the server as 11772 // null. It is an error if a field in this list has a non-empty value. 11773 // This may be used to include null fields in Patch requests. 11774 NullFields []string `json:"-"` 11775} 11776 11777func (s *TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { 11778 type NoMethod TransitTableTransitTimeRow 11779 raw := NoMethod(*s) 11780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11781} 11782 11783type TransitTableTransitTimeRowTransitTimeValue struct { 11784 // MaxTransitTimeInDays: Must be greater than or equal to 11785 // `minTransitTimeInDays`. 11786 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 11787 11788 // MinTransitTimeInDays: Transit time range (min-max) in business days. 11789 // 0 means same day delivery, 1 means next day delivery. 11790 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 11791 11792 // ForceSendFields is a list of field names (e.g. 11793 // "MaxTransitTimeInDays") to unconditionally include in API requests. 11794 // By default, fields with empty or default values are omitted from API 11795 // requests. However, any non-pointer, non-interface field appearing in 11796 // ForceSendFields will be sent to the server regardless of whether the 11797 // field is empty or not. This may be used to include empty fields in 11798 // Patch requests. 11799 ForceSendFields []string `json:"-"` 11800 11801 // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to 11802 // include in API requests with the JSON null value. By default, fields 11803 // with empty values are omitted from API requests. However, any field 11804 // with an empty value appearing in NullFields will be sent to the 11805 // server as null. It is an error if a field in this list has a 11806 // non-empty value. This may be used to include null fields in Patch 11807 // requests. 11808 NullFields []string `json:"-"` 11809} 11810 11811func (s *TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { 11812 type NoMethod TransitTableTransitTimeRowTransitTimeValue 11813 raw := NoMethod(*s) 11814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11815} 11816 11817type UnitInvoice struct { 11818 // AdditionalCharges: Additional charges for a unit, e.g. shipping 11819 // costs. 11820 AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` 11821 11822 // Promotions: Deprecated. 11823 Promotions []*Promotion `json:"promotions,omitempty"` 11824 11825 // UnitPricePretax: [required] Price of the unit, before applying taxes. 11826 UnitPricePretax *Price `json:"unitPricePretax,omitempty"` 11827 11828 // UnitPriceTaxes: Tax amounts to apply to the unit price. 11829 UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` 11830 11831 // ForceSendFields is a list of field names (e.g. "AdditionalCharges") 11832 // to unconditionally include in API requests. By default, fields with 11833 // empty or default values are omitted from API requests. However, any 11834 // non-pointer, non-interface field appearing in ForceSendFields will be 11835 // sent to the server regardless of whether the field is empty or not. 11836 // This may be used to include empty fields in Patch requests. 11837 ForceSendFields []string `json:"-"` 11838 11839 // NullFields is a list of field names (e.g. "AdditionalCharges") to 11840 // include in API requests with the JSON null value. By default, fields 11841 // with empty values are omitted from API requests. However, any field 11842 // with an empty value appearing in NullFields will be sent to the 11843 // server as null. It is an error if a field in this list has a 11844 // non-empty value. This may be used to include null fields in Patch 11845 // requests. 11846 NullFields []string `json:"-"` 11847} 11848 11849func (s *UnitInvoice) MarshalJSON() ([]byte, error) { 11850 type NoMethod UnitInvoice 11851 raw := NoMethod(*s) 11852 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11853} 11854 11855type UnitInvoiceAdditionalCharge struct { 11856 // AdditionalChargeAmount: [required] Amount of the additional charge. 11857 AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` 11858 11859 // AdditionalChargePromotions: Deprecated. 11860 AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"` 11861 11862 // Type: [required] Type of the additional charge. Acceptable values 11863 // are: - "shipping" 11864 Type string `json:"type,omitempty"` 11865 11866 // ForceSendFields is a list of field names (e.g. 11867 // "AdditionalChargeAmount") to unconditionally include in API requests. 11868 // By default, fields with empty or default values are omitted from API 11869 // requests. However, any non-pointer, non-interface field appearing in 11870 // ForceSendFields will be sent to the server regardless of whether the 11871 // field is empty or not. This may be used to include empty fields in 11872 // Patch requests. 11873 ForceSendFields []string `json:"-"` 11874 11875 // NullFields is a list of field names (e.g. "AdditionalChargeAmount") 11876 // to include in API requests with the JSON null value. By default, 11877 // fields with empty values are omitted from API requests. However, any 11878 // field with an empty value appearing in NullFields will be sent to the 11879 // server as null. It is an error if a field in this list has a 11880 // non-empty value. This may be used to include null fields in Patch 11881 // requests. 11882 NullFields []string `json:"-"` 11883} 11884 11885func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { 11886 type NoMethod UnitInvoiceAdditionalCharge 11887 raw := NoMethod(*s) 11888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11889} 11890 11891type UnitInvoiceTaxLine struct { 11892 // TaxAmount: [required] Tax amount for the tax type. 11893 TaxAmount *Price `json:"taxAmount,omitempty"` 11894 11895 // TaxName: Optional name of the tax type. This should only be provided 11896 // if `taxType` is `otherFeeTax`. 11897 TaxName string `json:"taxName,omitempty"` 11898 11899 // TaxType: [required] Type of the tax. Acceptable values are: - 11900 // "otherFee" - "otherFeeTax" - "sales" 11901 TaxType string `json:"taxType,omitempty"` 11902 11903 // ForceSendFields is a list of field names (e.g. "TaxAmount") to 11904 // unconditionally include in API requests. By default, fields with 11905 // empty or default values are omitted from API requests. However, any 11906 // non-pointer, non-interface field appearing in ForceSendFields will be 11907 // sent to the server regardless of whether the field is empty or not. 11908 // This may be used to include empty fields in Patch requests. 11909 ForceSendFields []string `json:"-"` 11910 11911 // NullFields is a list of field names (e.g. "TaxAmount") to include in 11912 // API requests with the JSON null value. By default, fields with empty 11913 // values are omitted from API requests. However, any field with an 11914 // empty value appearing in NullFields will be sent to the server as 11915 // null. It is an error if a field in this list has a non-empty value. 11916 // This may be used to include null fields in Patch requests. 11917 NullFields []string `json:"-"` 11918} 11919 11920func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { 11921 type NoMethod UnitInvoiceTaxLine 11922 raw := NoMethod(*s) 11923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11924} 11925 11926// Value: The single value of a rate group or the value of a rate group 11927// table's cell. Exactly one of `noShipping`, `flatRate`, 11928// `pricePercentage`, `carrierRateName`, `subtableName` must be set. 11929type Value struct { 11930 // CarrierRateName: The name of a carrier rate referring to a carrier 11931 // rate defined in the same rate group. Can only be set if all other 11932 // fields are not set. 11933 CarrierRateName string `json:"carrierRateName,omitempty"` 11934 11935 // FlatRate: A flat rate. Can only be set if all other fields are not 11936 // set. 11937 FlatRate *Price `json:"flatRate,omitempty"` 11938 11939 // NoShipping: If true, then the product can't ship. Must be true when 11940 // set, can only be set if all other fields are not set. 11941 NoShipping bool `json:"noShipping,omitempty"` 11942 11943 // PricePercentage: A percentage of the price represented as a number in 11944 // decimal notation (e.g., "5.4"). Can only be set if all other fields 11945 // are not set. 11946 PricePercentage string `json:"pricePercentage,omitempty"` 11947 11948 // SubtableName: The name of a subtable. Can only be set in table cells 11949 // (i.e., not for single values), and only if all other fields are not 11950 // set. 11951 SubtableName string `json:"subtableName,omitempty"` 11952 11953 // ForceSendFields is a list of field names (e.g. "CarrierRateName") to 11954 // unconditionally include in API requests. By default, fields with 11955 // empty or default values are omitted from API requests. However, any 11956 // non-pointer, non-interface field appearing in ForceSendFields will be 11957 // sent to the server regardless of whether the field is empty or not. 11958 // This may be used to include empty fields in Patch requests. 11959 ForceSendFields []string `json:"-"` 11960 11961 // NullFields is a list of field names (e.g. "CarrierRateName") to 11962 // include in API requests with the JSON null value. By default, fields 11963 // with empty values are omitted from API requests. However, any field 11964 // with an empty value appearing in NullFields will be sent to the 11965 // server as null. It is an error if a field in this list has a 11966 // non-empty value. This may be used to include null fields in Patch 11967 // requests. 11968 NullFields []string `json:"-"` 11969} 11970 11971func (s *Value) MarshalJSON() ([]byte, error) { 11972 type NoMethod Value 11973 raw := NoMethod(*s) 11974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11975} 11976 11977type WarehouseBasedDeliveryTime struct { 11978 // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of 11979 // supported carriers can be retrieved via the `listSupportedCarriers` 11980 // method. 11981 Carrier string `json:"carrier,omitempty"` 11982 11983 // CarrierService: Required. Carrier service, such as "ground" or "2 11984 // days". The list of supported services for a carrier can be retrieved 11985 // via the `listSupportedCarriers` method. The name of the service must 11986 // be in the eddSupportedServices list. 11987 CarrierService string `json:"carrierService,omitempty"` 11988 11989 // OriginAdministrativeArea: Required. Shipping origin's state. 11990 OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` 11991 11992 // OriginCity: Required. Shipping origin's city. 11993 OriginCity string `json:"originCity,omitempty"` 11994 11995 // OriginCountry: Required. Shipping origin's country represented as a 11996 // CLDR territory code 11997 // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml). 11998 OriginCountry string `json:"originCountry,omitempty"` 11999 12000 // OriginPostalCode: Required. Shipping origin. 12001 OriginPostalCode string `json:"originPostalCode,omitempty"` 12002 12003 // OriginStreetAddress: Shipping origin's street address 12004 OriginStreetAddress string `json:"originStreetAddress,omitempty"` 12005 12006 // ForceSendFields is a list of field names (e.g. "Carrier") to 12007 // unconditionally include in API requests. By default, fields with 12008 // empty or default values are omitted from API requests. However, any 12009 // non-pointer, non-interface field appearing in ForceSendFields will be 12010 // sent to the server regardless of whether the field is empty or not. 12011 // This may be used to include empty fields in Patch requests. 12012 ForceSendFields []string `json:"-"` 12013 12014 // NullFields is a list of field names (e.g. "Carrier") to include in 12015 // API requests with the JSON null value. By default, fields with empty 12016 // values are omitted from API requests. However, any field with an 12017 // empty value appearing in NullFields will be sent to the server as 12018 // null. It is an error if a field in this list has a non-empty value. 12019 // This may be used to include null fields in Patch requests. 12020 NullFields []string `json:"-"` 12021} 12022 12023func (s *WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { 12024 type NoMethod WarehouseBasedDeliveryTime 12025 raw := NoMethod(*s) 12026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12027} 12028 12029type Weight struct { 12030 // Unit: Required. The weight unit. Acceptable values are: - "kg" - 12031 // "lb" 12032 Unit string `json:"unit,omitempty"` 12033 12034 // Value: Required. The weight represented as a number. The weight can 12035 // have a maximum precision of four decimal places. 12036 Value string `json:"value,omitempty"` 12037 12038 // ForceSendFields is a list of field names (e.g. "Unit") to 12039 // unconditionally include in API requests. By default, fields with 12040 // empty or default values are omitted from API requests. However, any 12041 // non-pointer, non-interface field appearing in ForceSendFields will be 12042 // sent to the server regardless of whether the field is empty or not. 12043 // This may be used to include empty fields in Patch requests. 12044 ForceSendFields []string `json:"-"` 12045 12046 // NullFields is a list of field names (e.g. "Unit") to include in API 12047 // requests with the JSON null value. By default, fields with empty 12048 // values are omitted from API requests. However, any field with an 12049 // empty value appearing in NullFields will be sent to the server as 12050 // null. It is an error if a field in this list has a non-empty value. 12051 // This may be used to include null fields in Patch requests. 12052 NullFields []string `json:"-"` 12053} 12054 12055func (s *Weight) MarshalJSON() ([]byte, error) { 12056 type NoMethod Weight 12057 raw := NoMethod(*s) 12058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12059} 12060 12061// method id "content.accounts.authinfo": 12062 12063type AccountsAuthinfoCall struct { 12064 s *APIService 12065 urlParams_ gensupport.URLParams 12066 ifNoneMatch_ string 12067 ctx_ context.Context 12068 header_ http.Header 12069} 12070 12071// Authinfo: Returns information about the authenticated user. 12072func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { 12073 c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12074 return c 12075} 12076 12077// Fields allows partial responses to be retrieved. See 12078// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12079// for more information. 12080func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { 12081 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12082 return c 12083} 12084 12085// IfNoneMatch sets the optional parameter which makes the operation 12086// fail if the object's ETag matches the given value. This is useful for 12087// getting updates only after the object has changed since the last 12088// request. Use googleapi.IsNotModified to check whether the response 12089// error from Do is the result of In-None-Match. 12090func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { 12091 c.ifNoneMatch_ = entityTag 12092 return c 12093} 12094 12095// Context sets the context to be used in this call's Do method. Any 12096// pending HTTP request will be aborted if the provided context is 12097// canceled. 12098func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 12099 c.ctx_ = ctx 12100 return c 12101} 12102 12103// Header returns an http.Header that can be modified by the caller to 12104// add HTTP headers to the request. 12105func (c *AccountsAuthinfoCall) Header() http.Header { 12106 if c.header_ == nil { 12107 c.header_ = make(http.Header) 12108 } 12109 return c.header_ 12110} 12111 12112func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { 12113 reqHeaders := make(http.Header) 12114 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12115 for k, v := range c.header_ { 12116 reqHeaders[k] = v 12117 } 12118 reqHeaders.Set("User-Agent", c.s.userAgent()) 12119 if c.ifNoneMatch_ != "" { 12120 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12121 } 12122 var body io.Reader = nil 12123 c.urlParams_.Set("alt", alt) 12124 c.urlParams_.Set("prettyPrint", "false") 12125 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") 12126 urls += "?" + c.urlParams_.Encode() 12127 req, err := http.NewRequest("GET", urls, body) 12128 if err != nil { 12129 return nil, err 12130 } 12131 req.Header = reqHeaders 12132 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12133} 12134 12135// Do executes the "content.accounts.authinfo" call. 12136// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. 12137// Any non-2xx status code is an error. Response headers are in either 12138// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was 12139// returned at all) in error.(*googleapi.Error).Header. Use 12140// googleapi.IsNotModified to check whether the returned error was 12141// because http.StatusNotModified was returned. 12142func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { 12143 gensupport.SetOptions(c.urlParams_, opts...) 12144 res, err := c.doRequest("json") 12145 if res != nil && res.StatusCode == http.StatusNotModified { 12146 if res.Body != nil { 12147 res.Body.Close() 12148 } 12149 return nil, &googleapi.Error{ 12150 Code: res.StatusCode, 12151 Header: res.Header, 12152 } 12153 } 12154 if err != nil { 12155 return nil, err 12156 } 12157 defer googleapi.CloseBody(res) 12158 if err := googleapi.CheckResponse(res); err != nil { 12159 return nil, err 12160 } 12161 ret := &AccountsAuthInfoResponse{ 12162 ServerResponse: googleapi.ServerResponse{ 12163 Header: res.Header, 12164 HTTPStatusCode: res.StatusCode, 12165 }, 12166 } 12167 target := &ret 12168 if err := gensupport.DecodeResponse(target, res); err != nil { 12169 return nil, err 12170 } 12171 return ret, nil 12172 // { 12173 // "description": "Returns information about the authenticated user.", 12174 // "flatPath": "accounts/authinfo", 12175 // "httpMethod": "GET", 12176 // "id": "content.accounts.authinfo", 12177 // "parameterOrder": [], 12178 // "parameters": {}, 12179 // "path": "accounts/authinfo", 12180 // "response": { 12181 // "$ref": "AccountsAuthInfoResponse" 12182 // }, 12183 // "scopes": [ 12184 // "https://www.googleapis.com/auth/content" 12185 // ] 12186 // } 12187 12188} 12189 12190// method id "content.accounts.claimwebsite": 12191 12192type AccountsClaimwebsiteCall struct { 12193 s *APIService 12194 merchantId uint64 12195 accountId uint64 12196 urlParams_ gensupport.URLParams 12197 ctx_ context.Context 12198 header_ http.Header 12199} 12200 12201// Claimwebsite: Claims the website of a Merchant Center sub-account. 12202// 12203// - accountId: The ID of the account whose website is claimed. 12204// - merchantId: The ID of the managing account. If this parameter is 12205// not the same as accountId, then this account must be a multi-client 12206// account and `accountId` must be the ID of a sub-account of this 12207// account. 12208func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { 12209 c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12210 c.merchantId = merchantId 12211 c.accountId = accountId 12212 return c 12213} 12214 12215// Overwrite sets the optional parameter "overwrite": Only available to 12216// selected merchants. When set to `True`, this flag removes any 12217// existing claim on the requested website by another account and 12218// replaces it with a claim from this account. 12219func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { 12220 c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 12221 return c 12222} 12223 12224// Fields allows partial responses to be retrieved. See 12225// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12226// for more information. 12227func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 12228 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12229 return c 12230} 12231 12232// Context sets the context to be used in this call's Do method. Any 12233// pending HTTP request will be aborted if the provided context is 12234// canceled. 12235func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 12236 c.ctx_ = ctx 12237 return c 12238} 12239 12240// Header returns an http.Header that can be modified by the caller to 12241// add HTTP headers to the request. 12242func (c *AccountsClaimwebsiteCall) Header() http.Header { 12243 if c.header_ == nil { 12244 c.header_ = make(http.Header) 12245 } 12246 return c.header_ 12247} 12248 12249func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { 12250 reqHeaders := make(http.Header) 12251 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12252 for k, v := range c.header_ { 12253 reqHeaders[k] = v 12254 } 12255 reqHeaders.Set("User-Agent", c.s.userAgent()) 12256 var body io.Reader = nil 12257 c.urlParams_.Set("alt", alt) 12258 c.urlParams_.Set("prettyPrint", "false") 12259 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") 12260 urls += "?" + c.urlParams_.Encode() 12261 req, err := http.NewRequest("POST", urls, body) 12262 if err != nil { 12263 return nil, err 12264 } 12265 req.Header = reqHeaders 12266 googleapi.Expand(req.URL, map[string]string{ 12267 "merchantId": strconv.FormatUint(c.merchantId, 10), 12268 "accountId": strconv.FormatUint(c.accountId, 10), 12269 }) 12270 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12271} 12272 12273// Do executes the "content.accounts.claimwebsite" call. 12274// Exactly one of *AccountsClaimWebsiteResponse or error will be 12275// non-nil. Any non-2xx status code is an error. Response headers are in 12276// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a 12277// response was returned at all) in error.(*googleapi.Error).Header. Use 12278// googleapi.IsNotModified to check whether the returned error was 12279// because http.StatusNotModified was returned. 12280func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { 12281 gensupport.SetOptions(c.urlParams_, opts...) 12282 res, err := c.doRequest("json") 12283 if res != nil && res.StatusCode == http.StatusNotModified { 12284 if res.Body != nil { 12285 res.Body.Close() 12286 } 12287 return nil, &googleapi.Error{ 12288 Code: res.StatusCode, 12289 Header: res.Header, 12290 } 12291 } 12292 if err != nil { 12293 return nil, err 12294 } 12295 defer googleapi.CloseBody(res) 12296 if err := googleapi.CheckResponse(res); err != nil { 12297 return nil, err 12298 } 12299 ret := &AccountsClaimWebsiteResponse{ 12300 ServerResponse: googleapi.ServerResponse{ 12301 Header: res.Header, 12302 HTTPStatusCode: res.StatusCode, 12303 }, 12304 } 12305 target := &ret 12306 if err := gensupport.DecodeResponse(target, res); err != nil { 12307 return nil, err 12308 } 12309 return ret, nil 12310 // { 12311 // "description": "Claims the website of a Merchant Center sub-account.", 12312 // "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", 12313 // "httpMethod": "POST", 12314 // "id": "content.accounts.claimwebsite", 12315 // "parameterOrder": [ 12316 // "merchantId", 12317 // "accountId" 12318 // ], 12319 // "parameters": { 12320 // "accountId": { 12321 // "description": "The ID of the account whose website is claimed.", 12322 // "format": "uint64", 12323 // "location": "path", 12324 // "required": true, 12325 // "type": "string" 12326 // }, 12327 // "merchantId": { 12328 // "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.", 12329 // "format": "uint64", 12330 // "location": "path", 12331 // "required": true, 12332 // "type": "string" 12333 // }, 12334 // "overwrite": { 12335 // "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.", 12336 // "location": "query", 12337 // "type": "boolean" 12338 // } 12339 // }, 12340 // "path": "{merchantId}/accounts/{accountId}/claimwebsite", 12341 // "response": { 12342 // "$ref": "AccountsClaimWebsiteResponse" 12343 // }, 12344 // "scopes": [ 12345 // "https://www.googleapis.com/auth/content" 12346 // ] 12347 // } 12348 12349} 12350 12351// method id "content.accounts.custombatch": 12352 12353type AccountsCustombatchCall struct { 12354 s *APIService 12355 accountscustombatchrequest *AccountsCustomBatchRequest 12356 urlParams_ gensupport.URLParams 12357 ctx_ context.Context 12358 header_ http.Header 12359} 12360 12361// Custombatch: Retrieves, inserts, updates, and deletes multiple 12362// Merchant Center (sub-)accounts in a single request. 12363func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { 12364 c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12365 c.accountscustombatchrequest = accountscustombatchrequest 12366 return c 12367} 12368 12369// DryRun sets the optional parameter "dryRun": Flag to simulate a 12370// request like in a live environment. If set to true, dry-run mode 12371// checks the validity of the request and returns errors (if any). 12372func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { 12373 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12374 return c 12375} 12376 12377// Fields allows partial responses to be retrieved. See 12378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12379// for more information. 12380func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { 12381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12382 return c 12383} 12384 12385// Context sets the context to be used in this call's Do method. Any 12386// pending HTTP request will be aborted if the provided context is 12387// canceled. 12388func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 12389 c.ctx_ = ctx 12390 return c 12391} 12392 12393// Header returns an http.Header that can be modified by the caller to 12394// add HTTP headers to the request. 12395func (c *AccountsCustombatchCall) Header() http.Header { 12396 if c.header_ == nil { 12397 c.header_ = make(http.Header) 12398 } 12399 return c.header_ 12400} 12401 12402func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { 12403 reqHeaders := make(http.Header) 12404 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12405 for k, v := range c.header_ { 12406 reqHeaders[k] = v 12407 } 12408 reqHeaders.Set("User-Agent", c.s.userAgent()) 12409 var body io.Reader = nil 12410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) 12411 if err != nil { 12412 return nil, err 12413 } 12414 reqHeaders.Set("Content-Type", "application/json") 12415 c.urlParams_.Set("alt", alt) 12416 c.urlParams_.Set("prettyPrint", "false") 12417 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 12418 urls += "?" + c.urlParams_.Encode() 12419 req, err := http.NewRequest("POST", urls, body) 12420 if err != nil { 12421 return nil, err 12422 } 12423 req.Header = reqHeaders 12424 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12425} 12426 12427// Do executes the "content.accounts.custombatch" call. 12428// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. 12429// Any non-2xx status code is an error. Response headers are in either 12430// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response 12431// was returned at all) in error.(*googleapi.Error).Header. Use 12432// googleapi.IsNotModified to check whether the returned error was 12433// because http.StatusNotModified was returned. 12434func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { 12435 gensupport.SetOptions(c.urlParams_, opts...) 12436 res, err := c.doRequest("json") 12437 if res != nil && res.StatusCode == http.StatusNotModified { 12438 if res.Body != nil { 12439 res.Body.Close() 12440 } 12441 return nil, &googleapi.Error{ 12442 Code: res.StatusCode, 12443 Header: res.Header, 12444 } 12445 } 12446 if err != nil { 12447 return nil, err 12448 } 12449 defer googleapi.CloseBody(res) 12450 if err := googleapi.CheckResponse(res); err != nil { 12451 return nil, err 12452 } 12453 ret := &AccountsCustomBatchResponse{ 12454 ServerResponse: googleapi.ServerResponse{ 12455 Header: res.Header, 12456 HTTPStatusCode: res.StatusCode, 12457 }, 12458 } 12459 target := &ret 12460 if err := gensupport.DecodeResponse(target, res); err != nil { 12461 return nil, err 12462 } 12463 return ret, nil 12464 // { 12465 // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", 12466 // "flatPath": "accounts/batch", 12467 // "httpMethod": "POST", 12468 // "id": "content.accounts.custombatch", 12469 // "parameterOrder": [], 12470 // "parameters": { 12471 // "dryRun": { 12472 // "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).", 12473 // "location": "query", 12474 // "type": "boolean" 12475 // } 12476 // }, 12477 // "path": "accounts/batch", 12478 // "request": { 12479 // "$ref": "AccountsCustomBatchRequest" 12480 // }, 12481 // "response": { 12482 // "$ref": "AccountsCustomBatchResponse" 12483 // }, 12484 // "scopes": [ 12485 // "https://www.googleapis.com/auth/content" 12486 // ] 12487 // } 12488 12489} 12490 12491// method id "content.accounts.delete": 12492 12493type AccountsDeleteCall struct { 12494 s *APIService 12495 merchantId uint64 12496 accountId uint64 12497 urlParams_ gensupport.URLParams 12498 ctx_ context.Context 12499 header_ http.Header 12500} 12501 12502// Delete: Deletes a Merchant Center sub-account. 12503// 12504// - accountId: The ID of the account. 12505// - merchantId: The ID of the managing account. This must be a 12506// multi-client account, and accountId must be the ID of a sub-account 12507// of this account. 12508func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { 12509 c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12510 c.merchantId = merchantId 12511 c.accountId = accountId 12512 return c 12513} 12514 12515// DryRun sets the optional parameter "dryRun": Flag to simulate a 12516// request like in a live environment. If set to true, dry-run mode 12517// checks the validity of the request and returns errors (if any). 12518func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { 12519 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12520 return c 12521} 12522 12523// Force sets the optional parameter "force": Flag to delete 12524// sub-accounts with products. The default value is false. 12525func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { 12526 c.urlParams_.Set("force", fmt.Sprint(force)) 12527 return c 12528} 12529 12530// Fields allows partial responses to be retrieved. See 12531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12532// for more information. 12533func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { 12534 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12535 return c 12536} 12537 12538// Context sets the context to be used in this call's Do method. Any 12539// pending HTTP request will be aborted if the provided context is 12540// canceled. 12541func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 12542 c.ctx_ = ctx 12543 return c 12544} 12545 12546// Header returns an http.Header that can be modified by the caller to 12547// add HTTP headers to the request. 12548func (c *AccountsDeleteCall) Header() http.Header { 12549 if c.header_ == nil { 12550 c.header_ = make(http.Header) 12551 } 12552 return c.header_ 12553} 12554 12555func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { 12556 reqHeaders := make(http.Header) 12557 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12558 for k, v := range c.header_ { 12559 reqHeaders[k] = v 12560 } 12561 reqHeaders.Set("User-Agent", c.s.userAgent()) 12562 var body io.Reader = nil 12563 c.urlParams_.Set("alt", alt) 12564 c.urlParams_.Set("prettyPrint", "false") 12565 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 12566 urls += "?" + c.urlParams_.Encode() 12567 req, err := http.NewRequest("DELETE", urls, body) 12568 if err != nil { 12569 return nil, err 12570 } 12571 req.Header = reqHeaders 12572 googleapi.Expand(req.URL, map[string]string{ 12573 "merchantId": strconv.FormatUint(c.merchantId, 10), 12574 "accountId": strconv.FormatUint(c.accountId, 10), 12575 }) 12576 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12577} 12578 12579// Do executes the "content.accounts.delete" call. 12580func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { 12581 gensupport.SetOptions(c.urlParams_, opts...) 12582 res, err := c.doRequest("json") 12583 if err != nil { 12584 return err 12585 } 12586 defer googleapi.CloseBody(res) 12587 if err := googleapi.CheckResponse(res); err != nil { 12588 return err 12589 } 12590 return nil 12591 // { 12592 // "description": "Deletes a Merchant Center sub-account.", 12593 // "flatPath": "{merchantId}/accounts/{accountId}", 12594 // "httpMethod": "DELETE", 12595 // "id": "content.accounts.delete", 12596 // "parameterOrder": [ 12597 // "merchantId", 12598 // "accountId" 12599 // ], 12600 // "parameters": { 12601 // "accountId": { 12602 // "description": "The ID of the account.", 12603 // "format": "uint64", 12604 // "location": "path", 12605 // "required": true, 12606 // "type": "string" 12607 // }, 12608 // "dryRun": { 12609 // "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).", 12610 // "location": "query", 12611 // "type": "boolean" 12612 // }, 12613 // "force": { 12614 // "default": "false", 12615 // "description": "Flag to delete sub-accounts with products. The default value is false.", 12616 // "location": "query", 12617 // "type": "boolean" 12618 // }, 12619 // "merchantId": { 12620 // "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.", 12621 // "format": "uint64", 12622 // "location": "path", 12623 // "required": true, 12624 // "type": "string" 12625 // } 12626 // }, 12627 // "path": "{merchantId}/accounts/{accountId}", 12628 // "scopes": [ 12629 // "https://www.googleapis.com/auth/content" 12630 // ] 12631 // } 12632 12633} 12634 12635// method id "content.accounts.get": 12636 12637type AccountsGetCall struct { 12638 s *APIService 12639 merchantId uint64 12640 accountId uint64 12641 urlParams_ gensupport.URLParams 12642 ifNoneMatch_ string 12643 ctx_ context.Context 12644 header_ http.Header 12645} 12646 12647// Get: Retrieves a Merchant Center account. 12648// 12649// - accountId: The ID of the account. 12650// - merchantId: The ID of the managing account. If this parameter is 12651// not the same as accountId, then this account must be a multi-client 12652// account and `accountId` must be the ID of a sub-account of this 12653// account. 12654func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { 12655 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12656 c.merchantId = merchantId 12657 c.accountId = accountId 12658 return c 12659} 12660 12661// Fields allows partial responses to be retrieved. See 12662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12663// for more information. 12664func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 12665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12666 return c 12667} 12668 12669// IfNoneMatch sets the optional parameter which makes the operation 12670// fail if the object's ETag matches the given value. This is useful for 12671// getting updates only after the object has changed since the last 12672// request. Use googleapi.IsNotModified to check whether the response 12673// error from Do is the result of In-None-Match. 12674func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 12675 c.ifNoneMatch_ = entityTag 12676 return c 12677} 12678 12679// Context sets the context to be used in this call's Do method. Any 12680// pending HTTP request will be aborted if the provided context is 12681// canceled. 12682func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 12683 c.ctx_ = ctx 12684 return c 12685} 12686 12687// Header returns an http.Header that can be modified by the caller to 12688// add HTTP headers to the request. 12689func (c *AccountsGetCall) Header() http.Header { 12690 if c.header_ == nil { 12691 c.header_ = make(http.Header) 12692 } 12693 return c.header_ 12694} 12695 12696func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 12697 reqHeaders := make(http.Header) 12698 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12699 for k, v := range c.header_ { 12700 reqHeaders[k] = v 12701 } 12702 reqHeaders.Set("User-Agent", c.s.userAgent()) 12703 if c.ifNoneMatch_ != "" { 12704 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12705 } 12706 var body io.Reader = nil 12707 c.urlParams_.Set("alt", alt) 12708 c.urlParams_.Set("prettyPrint", "false") 12709 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 12710 urls += "?" + c.urlParams_.Encode() 12711 req, err := http.NewRequest("GET", urls, body) 12712 if err != nil { 12713 return nil, err 12714 } 12715 req.Header = reqHeaders 12716 googleapi.Expand(req.URL, map[string]string{ 12717 "merchantId": strconv.FormatUint(c.merchantId, 10), 12718 "accountId": strconv.FormatUint(c.accountId, 10), 12719 }) 12720 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12721} 12722 12723// Do executes the "content.accounts.get" call. 12724// Exactly one of *Account or error will be non-nil. Any non-2xx status 12725// code is an error. Response headers are in either 12726// *Account.ServerResponse.Header or (if a response was returned at all) 12727// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12728// check whether the returned error was because http.StatusNotModified 12729// was returned. 12730func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { 12731 gensupport.SetOptions(c.urlParams_, opts...) 12732 res, err := c.doRequest("json") 12733 if res != nil && res.StatusCode == http.StatusNotModified { 12734 if res.Body != nil { 12735 res.Body.Close() 12736 } 12737 return nil, &googleapi.Error{ 12738 Code: res.StatusCode, 12739 Header: res.Header, 12740 } 12741 } 12742 if err != nil { 12743 return nil, err 12744 } 12745 defer googleapi.CloseBody(res) 12746 if err := googleapi.CheckResponse(res); err != nil { 12747 return nil, err 12748 } 12749 ret := &Account{ 12750 ServerResponse: googleapi.ServerResponse{ 12751 Header: res.Header, 12752 HTTPStatusCode: res.StatusCode, 12753 }, 12754 } 12755 target := &ret 12756 if err := gensupport.DecodeResponse(target, res); err != nil { 12757 return nil, err 12758 } 12759 return ret, nil 12760 // { 12761 // "description": "Retrieves a Merchant Center account.", 12762 // "flatPath": "{merchantId}/accounts/{accountId}", 12763 // "httpMethod": "GET", 12764 // "id": "content.accounts.get", 12765 // "parameterOrder": [ 12766 // "merchantId", 12767 // "accountId" 12768 // ], 12769 // "parameters": { 12770 // "accountId": { 12771 // "description": "The ID of the account.", 12772 // "format": "uint64", 12773 // "location": "path", 12774 // "required": true, 12775 // "type": "string" 12776 // }, 12777 // "merchantId": { 12778 // "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.", 12779 // "format": "uint64", 12780 // "location": "path", 12781 // "required": true, 12782 // "type": "string" 12783 // } 12784 // }, 12785 // "path": "{merchantId}/accounts/{accountId}", 12786 // "response": { 12787 // "$ref": "Account" 12788 // }, 12789 // "scopes": [ 12790 // "https://www.googleapis.com/auth/content" 12791 // ] 12792 // } 12793 12794} 12795 12796// method id "content.accounts.insert": 12797 12798type AccountsInsertCall struct { 12799 s *APIService 12800 merchantId uint64 12801 account *Account 12802 urlParams_ gensupport.URLParams 12803 ctx_ context.Context 12804 header_ http.Header 12805} 12806 12807// Insert: Creates a Merchant Center sub-account. 12808// 12809// - merchantId: The ID of the managing account. This must be a 12810// multi-client account. 12811func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { 12812 c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12813 c.merchantId = merchantId 12814 c.account = account 12815 return c 12816} 12817 12818// DryRun sets the optional parameter "dryRun": Flag to simulate a 12819// request like in a live environment. If set to true, dry-run mode 12820// checks the validity of the request and returns errors (if any). 12821func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { 12822 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12823 return c 12824} 12825 12826// Fields allows partial responses to be retrieved. See 12827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12828// for more information. 12829func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 12830 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12831 return c 12832} 12833 12834// Context sets the context to be used in this call's Do method. Any 12835// pending HTTP request will be aborted if the provided context is 12836// canceled. 12837func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 12838 c.ctx_ = ctx 12839 return c 12840} 12841 12842// Header returns an http.Header that can be modified by the caller to 12843// add HTTP headers to the request. 12844func (c *AccountsInsertCall) Header() http.Header { 12845 if c.header_ == nil { 12846 c.header_ = make(http.Header) 12847 } 12848 return c.header_ 12849} 12850 12851func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { 12852 reqHeaders := make(http.Header) 12853 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12854 for k, v := range c.header_ { 12855 reqHeaders[k] = v 12856 } 12857 reqHeaders.Set("User-Agent", c.s.userAgent()) 12858 var body io.Reader = nil 12859 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 12860 if err != nil { 12861 return nil, err 12862 } 12863 reqHeaders.Set("Content-Type", "application/json") 12864 c.urlParams_.Set("alt", alt) 12865 c.urlParams_.Set("prettyPrint", "false") 12866 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 12867 urls += "?" + c.urlParams_.Encode() 12868 req, err := http.NewRequest("POST", urls, body) 12869 if err != nil { 12870 return nil, err 12871 } 12872 req.Header = reqHeaders 12873 googleapi.Expand(req.URL, map[string]string{ 12874 "merchantId": strconv.FormatUint(c.merchantId, 10), 12875 }) 12876 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12877} 12878 12879// Do executes the "content.accounts.insert" call. 12880// Exactly one of *Account or error will be non-nil. Any non-2xx status 12881// code is an error. Response headers are in either 12882// *Account.ServerResponse.Header or (if a response was returned at all) 12883// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12884// check whether the returned error was because http.StatusNotModified 12885// was returned. 12886func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { 12887 gensupport.SetOptions(c.urlParams_, opts...) 12888 res, err := c.doRequest("json") 12889 if res != nil && res.StatusCode == http.StatusNotModified { 12890 if res.Body != nil { 12891 res.Body.Close() 12892 } 12893 return nil, &googleapi.Error{ 12894 Code: res.StatusCode, 12895 Header: res.Header, 12896 } 12897 } 12898 if err != nil { 12899 return nil, err 12900 } 12901 defer googleapi.CloseBody(res) 12902 if err := googleapi.CheckResponse(res); err != nil { 12903 return nil, err 12904 } 12905 ret := &Account{ 12906 ServerResponse: googleapi.ServerResponse{ 12907 Header: res.Header, 12908 HTTPStatusCode: res.StatusCode, 12909 }, 12910 } 12911 target := &ret 12912 if err := gensupport.DecodeResponse(target, res); err != nil { 12913 return nil, err 12914 } 12915 return ret, nil 12916 // { 12917 // "description": "Creates a Merchant Center sub-account.", 12918 // "flatPath": "{merchantId}/accounts", 12919 // "httpMethod": "POST", 12920 // "id": "content.accounts.insert", 12921 // "parameterOrder": [ 12922 // "merchantId" 12923 // ], 12924 // "parameters": { 12925 // "dryRun": { 12926 // "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).", 12927 // "location": "query", 12928 // "type": "boolean" 12929 // }, 12930 // "merchantId": { 12931 // "description": "The ID of the managing account. This must be a multi-client account.", 12932 // "format": "uint64", 12933 // "location": "path", 12934 // "required": true, 12935 // "type": "string" 12936 // } 12937 // }, 12938 // "path": "{merchantId}/accounts", 12939 // "request": { 12940 // "$ref": "Account" 12941 // }, 12942 // "response": { 12943 // "$ref": "Account" 12944 // }, 12945 // "scopes": [ 12946 // "https://www.googleapis.com/auth/content" 12947 // ] 12948 // } 12949 12950} 12951 12952// method id "content.accounts.link": 12953 12954type AccountsLinkCall struct { 12955 s *APIService 12956 merchantId uint64 12957 accountId uint64 12958 accountslinkrequest *AccountsLinkRequest 12959 urlParams_ gensupport.URLParams 12960 ctx_ context.Context 12961 header_ http.Header 12962} 12963 12964// Link: Performs an action on a link between two Merchant Center 12965// accounts, namely accountId and linkedAccountId. 12966// 12967// - accountId: The ID of the account that should be linked. 12968// - merchantId: The ID of the managing account. If this parameter is 12969// not the same as accountId, then this account must be a multi-client 12970// account and `accountId` must be the ID of a sub-account of this 12971// account. 12972func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { 12973 c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12974 c.merchantId = merchantId 12975 c.accountId = accountId 12976 c.accountslinkrequest = accountslinkrequest 12977 return c 12978} 12979 12980// Fields allows partial responses to be retrieved. See 12981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12982// for more information. 12983func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { 12984 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12985 return c 12986} 12987 12988// Context sets the context to be used in this call's Do method. Any 12989// pending HTTP request will be aborted if the provided context is 12990// canceled. 12991func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { 12992 c.ctx_ = ctx 12993 return c 12994} 12995 12996// Header returns an http.Header that can be modified by the caller to 12997// add HTTP headers to the request. 12998func (c *AccountsLinkCall) Header() http.Header { 12999 if c.header_ == nil { 13000 c.header_ = make(http.Header) 13001 } 13002 return c.header_ 13003} 13004 13005func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { 13006 reqHeaders := make(http.Header) 13007 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13008 for k, v := range c.header_ { 13009 reqHeaders[k] = v 13010 } 13011 reqHeaders.Set("User-Agent", c.s.userAgent()) 13012 var body io.Reader = nil 13013 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) 13014 if err != nil { 13015 return nil, err 13016 } 13017 reqHeaders.Set("Content-Type", "application/json") 13018 c.urlParams_.Set("alt", alt) 13019 c.urlParams_.Set("prettyPrint", "false") 13020 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") 13021 urls += "?" + c.urlParams_.Encode() 13022 req, err := http.NewRequest("POST", urls, body) 13023 if err != nil { 13024 return nil, err 13025 } 13026 req.Header = reqHeaders 13027 googleapi.Expand(req.URL, map[string]string{ 13028 "merchantId": strconv.FormatUint(c.merchantId, 10), 13029 "accountId": strconv.FormatUint(c.accountId, 10), 13030 }) 13031 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13032} 13033 13034// Do executes the "content.accounts.link" call. 13035// Exactly one of *AccountsLinkResponse or error will be non-nil. Any 13036// non-2xx status code is an error. Response headers are in either 13037// *AccountsLinkResponse.ServerResponse.Header or (if a response was 13038// returned at all) in error.(*googleapi.Error).Header. Use 13039// googleapi.IsNotModified to check whether the returned error was 13040// because http.StatusNotModified was returned. 13041func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { 13042 gensupport.SetOptions(c.urlParams_, opts...) 13043 res, err := c.doRequest("json") 13044 if res != nil && res.StatusCode == http.StatusNotModified { 13045 if res.Body != nil { 13046 res.Body.Close() 13047 } 13048 return nil, &googleapi.Error{ 13049 Code: res.StatusCode, 13050 Header: res.Header, 13051 } 13052 } 13053 if err != nil { 13054 return nil, err 13055 } 13056 defer googleapi.CloseBody(res) 13057 if err := googleapi.CheckResponse(res); err != nil { 13058 return nil, err 13059 } 13060 ret := &AccountsLinkResponse{ 13061 ServerResponse: googleapi.ServerResponse{ 13062 Header: res.Header, 13063 HTTPStatusCode: res.StatusCode, 13064 }, 13065 } 13066 target := &ret 13067 if err := gensupport.DecodeResponse(target, res); err != nil { 13068 return nil, err 13069 } 13070 return ret, nil 13071 // { 13072 // "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", 13073 // "flatPath": "{merchantId}/accounts/{accountId}/link", 13074 // "httpMethod": "POST", 13075 // "id": "content.accounts.link", 13076 // "parameterOrder": [ 13077 // "merchantId", 13078 // "accountId" 13079 // ], 13080 // "parameters": { 13081 // "accountId": { 13082 // "description": "The ID of the account that should be linked.", 13083 // "format": "uint64", 13084 // "location": "path", 13085 // "required": true, 13086 // "type": "string" 13087 // }, 13088 // "merchantId": { 13089 // "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.", 13090 // "format": "uint64", 13091 // "location": "path", 13092 // "required": true, 13093 // "type": "string" 13094 // } 13095 // }, 13096 // "path": "{merchantId}/accounts/{accountId}/link", 13097 // "request": { 13098 // "$ref": "AccountsLinkRequest" 13099 // }, 13100 // "response": { 13101 // "$ref": "AccountsLinkResponse" 13102 // }, 13103 // "scopes": [ 13104 // "https://www.googleapis.com/auth/content" 13105 // ] 13106 // } 13107 13108} 13109 13110// method id "content.accounts.list": 13111 13112type AccountsListCall struct { 13113 s *APIService 13114 merchantId uint64 13115 urlParams_ gensupport.URLParams 13116 ifNoneMatch_ string 13117 ctx_ context.Context 13118 header_ http.Header 13119} 13120 13121// List: Lists the sub-accounts in your Merchant Center account. 13122// 13123// - merchantId: The ID of the managing account. This must be a 13124// multi-client account. 13125func (r *AccountsService) List(merchantId uint64) *AccountsListCall { 13126 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13127 c.merchantId = merchantId 13128 return c 13129} 13130 13131// MaxResults sets the optional parameter "maxResults": The maximum 13132// number of accounts to return in the response, used for paging. 13133func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { 13134 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13135 return c 13136} 13137 13138// PageToken sets the optional parameter "pageToken": The token returned 13139// by the previous request. 13140func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { 13141 c.urlParams_.Set("pageToken", pageToken) 13142 return c 13143} 13144 13145// Fields allows partial responses to be retrieved. See 13146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13147// for more information. 13148func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 13149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13150 return c 13151} 13152 13153// IfNoneMatch sets the optional parameter which makes the operation 13154// fail if the object's ETag matches the given value. This is useful for 13155// getting updates only after the object has changed since the last 13156// request. Use googleapi.IsNotModified to check whether the response 13157// error from Do is the result of In-None-Match. 13158func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 13159 c.ifNoneMatch_ = entityTag 13160 return c 13161} 13162 13163// Context sets the context to be used in this call's Do method. Any 13164// pending HTTP request will be aborted if the provided context is 13165// canceled. 13166func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 13167 c.ctx_ = ctx 13168 return c 13169} 13170 13171// Header returns an http.Header that can be modified by the caller to 13172// add HTTP headers to the request. 13173func (c *AccountsListCall) Header() http.Header { 13174 if c.header_ == nil { 13175 c.header_ = make(http.Header) 13176 } 13177 return c.header_ 13178} 13179 13180func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 13181 reqHeaders := make(http.Header) 13182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13183 for k, v := range c.header_ { 13184 reqHeaders[k] = v 13185 } 13186 reqHeaders.Set("User-Agent", c.s.userAgent()) 13187 if c.ifNoneMatch_ != "" { 13188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13189 } 13190 var body io.Reader = nil 13191 c.urlParams_.Set("alt", alt) 13192 c.urlParams_.Set("prettyPrint", "false") 13193 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 13194 urls += "?" + c.urlParams_.Encode() 13195 req, err := http.NewRequest("GET", urls, body) 13196 if err != nil { 13197 return nil, err 13198 } 13199 req.Header = reqHeaders 13200 googleapi.Expand(req.URL, map[string]string{ 13201 "merchantId": strconv.FormatUint(c.merchantId, 10), 13202 }) 13203 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13204} 13205 13206// Do executes the "content.accounts.list" call. 13207// Exactly one of *AccountsListResponse or error will be non-nil. Any 13208// non-2xx status code is an error. Response headers are in either 13209// *AccountsListResponse.ServerResponse.Header or (if a response was 13210// returned at all) in error.(*googleapi.Error).Header. Use 13211// googleapi.IsNotModified to check whether the returned error was 13212// because http.StatusNotModified was returned. 13213func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { 13214 gensupport.SetOptions(c.urlParams_, opts...) 13215 res, err := c.doRequest("json") 13216 if res != nil && res.StatusCode == http.StatusNotModified { 13217 if res.Body != nil { 13218 res.Body.Close() 13219 } 13220 return nil, &googleapi.Error{ 13221 Code: res.StatusCode, 13222 Header: res.Header, 13223 } 13224 } 13225 if err != nil { 13226 return nil, err 13227 } 13228 defer googleapi.CloseBody(res) 13229 if err := googleapi.CheckResponse(res); err != nil { 13230 return nil, err 13231 } 13232 ret := &AccountsListResponse{ 13233 ServerResponse: googleapi.ServerResponse{ 13234 Header: res.Header, 13235 HTTPStatusCode: res.StatusCode, 13236 }, 13237 } 13238 target := &ret 13239 if err := gensupport.DecodeResponse(target, res); err != nil { 13240 return nil, err 13241 } 13242 return ret, nil 13243 // { 13244 // "description": "Lists the sub-accounts in your Merchant Center account.", 13245 // "flatPath": "{merchantId}/accounts", 13246 // "httpMethod": "GET", 13247 // "id": "content.accounts.list", 13248 // "parameterOrder": [ 13249 // "merchantId" 13250 // ], 13251 // "parameters": { 13252 // "maxResults": { 13253 // "description": "The maximum number of accounts to return in the response, used for paging.", 13254 // "format": "uint32", 13255 // "location": "query", 13256 // "type": "integer" 13257 // }, 13258 // "merchantId": { 13259 // "description": "The ID of the managing account. This must be a multi-client account.", 13260 // "format": "uint64", 13261 // "location": "path", 13262 // "required": true, 13263 // "type": "string" 13264 // }, 13265 // "pageToken": { 13266 // "description": "The token returned by the previous request.", 13267 // "location": "query", 13268 // "type": "string" 13269 // } 13270 // }, 13271 // "path": "{merchantId}/accounts", 13272 // "response": { 13273 // "$ref": "AccountsListResponse" 13274 // }, 13275 // "scopes": [ 13276 // "https://www.googleapis.com/auth/content" 13277 // ] 13278 // } 13279 13280} 13281 13282// Pages invokes f for each page of results. 13283// A non-nil error returned from f will halt the iteration. 13284// The provided context supersedes any context provided to the Context method. 13285func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { 13286 c.ctx_ = ctx 13287 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13288 for { 13289 x, err := c.Do() 13290 if err != nil { 13291 return err 13292 } 13293 if err := f(x); err != nil { 13294 return err 13295 } 13296 if x.NextPageToken == "" { 13297 return nil 13298 } 13299 c.PageToken(x.NextPageToken) 13300 } 13301} 13302 13303// method id "content.accounts.update": 13304 13305type AccountsUpdateCall struct { 13306 s *APIService 13307 merchantId uint64 13308 accountId uint64 13309 account *Account 13310 urlParams_ gensupport.URLParams 13311 ctx_ context.Context 13312 header_ http.Header 13313} 13314 13315// Update: Updates a Merchant Center account. Any fields that are not 13316// provided are deleted from the resource. 13317// 13318// - accountId: The ID of the account. 13319// - merchantId: The ID of the managing account. If this parameter is 13320// not the same as accountId, then this account must be a multi-client 13321// account and `accountId` must be the ID of a sub-account of this 13322// account. 13323func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { 13324 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13325 c.merchantId = merchantId 13326 c.accountId = accountId 13327 c.account = account 13328 return c 13329} 13330 13331// DryRun sets the optional parameter "dryRun": Flag to simulate a 13332// request like in a live environment. If set to true, dry-run mode 13333// checks the validity of the request and returns errors (if any). 13334func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { 13335 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13336 return c 13337} 13338 13339// Fields allows partial responses to be retrieved. See 13340// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13341// for more information. 13342func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 13343 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13344 return c 13345} 13346 13347// Context sets the context to be used in this call's Do method. Any 13348// pending HTTP request will be aborted if the provided context is 13349// canceled. 13350func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 13351 c.ctx_ = ctx 13352 return c 13353} 13354 13355// Header returns an http.Header that can be modified by the caller to 13356// add HTTP headers to the request. 13357func (c *AccountsUpdateCall) Header() http.Header { 13358 if c.header_ == nil { 13359 c.header_ = make(http.Header) 13360 } 13361 return c.header_ 13362} 13363 13364func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { 13365 reqHeaders := make(http.Header) 13366 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13367 for k, v := range c.header_ { 13368 reqHeaders[k] = v 13369 } 13370 reqHeaders.Set("User-Agent", c.s.userAgent()) 13371 var body io.Reader = nil 13372 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 13373 if err != nil { 13374 return nil, err 13375 } 13376 reqHeaders.Set("Content-Type", "application/json") 13377 c.urlParams_.Set("alt", alt) 13378 c.urlParams_.Set("prettyPrint", "false") 13379 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 13380 urls += "?" + c.urlParams_.Encode() 13381 req, err := http.NewRequest("PUT", urls, body) 13382 if err != nil { 13383 return nil, err 13384 } 13385 req.Header = reqHeaders 13386 googleapi.Expand(req.URL, map[string]string{ 13387 "merchantId": strconv.FormatUint(c.merchantId, 10), 13388 "accountId": strconv.FormatUint(c.accountId, 10), 13389 }) 13390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13391} 13392 13393// Do executes the "content.accounts.update" call. 13394// Exactly one of *Account or error will be non-nil. Any non-2xx status 13395// code is an error. Response headers are in either 13396// *Account.ServerResponse.Header or (if a response was returned at all) 13397// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13398// check whether the returned error was because http.StatusNotModified 13399// was returned. 13400func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { 13401 gensupport.SetOptions(c.urlParams_, opts...) 13402 res, err := c.doRequest("json") 13403 if res != nil && res.StatusCode == http.StatusNotModified { 13404 if res.Body != nil { 13405 res.Body.Close() 13406 } 13407 return nil, &googleapi.Error{ 13408 Code: res.StatusCode, 13409 Header: res.Header, 13410 } 13411 } 13412 if err != nil { 13413 return nil, err 13414 } 13415 defer googleapi.CloseBody(res) 13416 if err := googleapi.CheckResponse(res); err != nil { 13417 return nil, err 13418 } 13419 ret := &Account{ 13420 ServerResponse: googleapi.ServerResponse{ 13421 Header: res.Header, 13422 HTTPStatusCode: res.StatusCode, 13423 }, 13424 } 13425 target := &ret 13426 if err := gensupport.DecodeResponse(target, res); err != nil { 13427 return nil, err 13428 } 13429 return ret, nil 13430 // { 13431 // "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", 13432 // "flatPath": "{merchantId}/accounts/{accountId}", 13433 // "httpMethod": "PUT", 13434 // "id": "content.accounts.update", 13435 // "parameterOrder": [ 13436 // "merchantId", 13437 // "accountId" 13438 // ], 13439 // "parameters": { 13440 // "accountId": { 13441 // "description": "The ID of the account.", 13442 // "format": "uint64", 13443 // "location": "path", 13444 // "required": true, 13445 // "type": "string" 13446 // }, 13447 // "dryRun": { 13448 // "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).", 13449 // "location": "query", 13450 // "type": "boolean" 13451 // }, 13452 // "merchantId": { 13453 // "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.", 13454 // "format": "uint64", 13455 // "location": "path", 13456 // "required": true, 13457 // "type": "string" 13458 // } 13459 // }, 13460 // "path": "{merchantId}/accounts/{accountId}", 13461 // "request": { 13462 // "$ref": "Account" 13463 // }, 13464 // "response": { 13465 // "$ref": "Account" 13466 // }, 13467 // "scopes": [ 13468 // "https://www.googleapis.com/auth/content" 13469 // ] 13470 // } 13471 13472} 13473 13474// method id "content.accountstatuses.custombatch": 13475 13476type AccountstatusesCustombatchCall struct { 13477 s *APIService 13478 accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest 13479 urlParams_ gensupport.URLParams 13480 ctx_ context.Context 13481 header_ http.Header 13482} 13483 13484// Custombatch: Retrieves multiple Merchant Center account statuses in a 13485// single request. 13486func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { 13487 c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13488 c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 13489 return c 13490} 13491 13492// Fields allows partial responses to be retrieved. See 13493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13494// for more information. 13495func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { 13496 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13497 return c 13498} 13499 13500// Context sets the context to be used in this call's Do method. Any 13501// pending HTTP request will be aborted if the provided context is 13502// canceled. 13503func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 13504 c.ctx_ = ctx 13505 return c 13506} 13507 13508// Header returns an http.Header that can be modified by the caller to 13509// add HTTP headers to the request. 13510func (c *AccountstatusesCustombatchCall) Header() http.Header { 13511 if c.header_ == nil { 13512 c.header_ = make(http.Header) 13513 } 13514 return c.header_ 13515} 13516 13517func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 13518 reqHeaders := make(http.Header) 13519 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13520 for k, v := range c.header_ { 13521 reqHeaders[k] = v 13522 } 13523 reqHeaders.Set("User-Agent", c.s.userAgent()) 13524 var body io.Reader = nil 13525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) 13526 if err != nil { 13527 return nil, err 13528 } 13529 reqHeaders.Set("Content-Type", "application/json") 13530 c.urlParams_.Set("alt", alt) 13531 c.urlParams_.Set("prettyPrint", "false") 13532 urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 13533 urls += "?" + c.urlParams_.Encode() 13534 req, err := http.NewRequest("POST", urls, body) 13535 if err != nil { 13536 return nil, err 13537 } 13538 req.Header = reqHeaders 13539 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13540} 13541 13542// Do executes the "content.accountstatuses.custombatch" call. 13543// Exactly one of *AccountstatusesCustomBatchResponse or error will be 13544// non-nil. Any non-2xx status code is an error. Response headers are in 13545// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or 13546// (if a response was returned at all) in 13547// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13548// whether the returned error was because http.StatusNotModified was 13549// returned. 13550func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { 13551 gensupport.SetOptions(c.urlParams_, opts...) 13552 res, err := c.doRequest("json") 13553 if res != nil && res.StatusCode == http.StatusNotModified { 13554 if res.Body != nil { 13555 res.Body.Close() 13556 } 13557 return nil, &googleapi.Error{ 13558 Code: res.StatusCode, 13559 Header: res.Header, 13560 } 13561 } 13562 if err != nil { 13563 return nil, err 13564 } 13565 defer googleapi.CloseBody(res) 13566 if err := googleapi.CheckResponse(res); err != nil { 13567 return nil, err 13568 } 13569 ret := &AccountstatusesCustomBatchResponse{ 13570 ServerResponse: googleapi.ServerResponse{ 13571 Header: res.Header, 13572 HTTPStatusCode: res.StatusCode, 13573 }, 13574 } 13575 target := &ret 13576 if err := gensupport.DecodeResponse(target, res); err != nil { 13577 return nil, err 13578 } 13579 return ret, nil 13580 // { 13581 // "description": "Retrieves multiple Merchant Center account statuses in a single request.", 13582 // "flatPath": "accountstatuses/batch", 13583 // "httpMethod": "POST", 13584 // "id": "content.accountstatuses.custombatch", 13585 // "parameterOrder": [], 13586 // "parameters": {}, 13587 // "path": "accountstatuses/batch", 13588 // "request": { 13589 // "$ref": "AccountstatusesCustomBatchRequest" 13590 // }, 13591 // "response": { 13592 // "$ref": "AccountstatusesCustomBatchResponse" 13593 // }, 13594 // "scopes": [ 13595 // "https://www.googleapis.com/auth/content" 13596 // ] 13597 // } 13598 13599} 13600 13601// method id "content.accountstatuses.get": 13602 13603type AccountstatusesGetCall struct { 13604 s *APIService 13605 merchantId uint64 13606 accountId uint64 13607 urlParams_ gensupport.URLParams 13608 ifNoneMatch_ string 13609 ctx_ context.Context 13610 header_ http.Header 13611} 13612 13613// Get: Retrieves the status of a Merchant Center account. No 13614// itemLevelIssues are returned for multi-client accounts. 13615// 13616// - accountId: The ID of the account. 13617// - merchantId: The ID of the managing account. If this parameter is 13618// not the same as accountId, then this account must be a multi-client 13619// account and `accountId` must be the ID of a sub-account of this 13620// account. 13621func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { 13622 c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13623 c.merchantId = merchantId 13624 c.accountId = accountId 13625 return c 13626} 13627 13628// Destinations sets the optional parameter "destinations": If set, only 13629// issues for the specified destinations are returned, otherwise only 13630// issues for the Shopping destination. 13631func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { 13632 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 13633 return c 13634} 13635 13636// Fields allows partial responses to be retrieved. See 13637// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13638// for more information. 13639func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 13640 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13641 return c 13642} 13643 13644// IfNoneMatch sets the optional parameter which makes the operation 13645// fail if the object's ETag matches the given value. This is useful for 13646// getting updates only after the object has changed since the last 13647// request. Use googleapi.IsNotModified to check whether the response 13648// error from Do is the result of In-None-Match. 13649func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { 13650 c.ifNoneMatch_ = entityTag 13651 return c 13652} 13653 13654// Context sets the context to be used in this call's Do method. Any 13655// pending HTTP request will be aborted if the provided context is 13656// canceled. 13657func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 13658 c.ctx_ = ctx 13659 return c 13660} 13661 13662// Header returns an http.Header that can be modified by the caller to 13663// add HTTP headers to the request. 13664func (c *AccountstatusesGetCall) Header() http.Header { 13665 if c.header_ == nil { 13666 c.header_ = make(http.Header) 13667 } 13668 return c.header_ 13669} 13670 13671func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { 13672 reqHeaders := make(http.Header) 13673 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13674 for k, v := range c.header_ { 13675 reqHeaders[k] = v 13676 } 13677 reqHeaders.Set("User-Agent", c.s.userAgent()) 13678 if c.ifNoneMatch_ != "" { 13679 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13680 } 13681 var body io.Reader = nil 13682 c.urlParams_.Set("alt", alt) 13683 c.urlParams_.Set("prettyPrint", "false") 13684 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") 13685 urls += "?" + c.urlParams_.Encode() 13686 req, err := http.NewRequest("GET", urls, body) 13687 if err != nil { 13688 return nil, err 13689 } 13690 req.Header = reqHeaders 13691 googleapi.Expand(req.URL, map[string]string{ 13692 "merchantId": strconv.FormatUint(c.merchantId, 10), 13693 "accountId": strconv.FormatUint(c.accountId, 10), 13694 }) 13695 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13696} 13697 13698// Do executes the "content.accountstatuses.get" call. 13699// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx 13700// status code is an error. Response headers are in either 13701// *AccountStatus.ServerResponse.Header or (if a response was returned 13702// at all) in error.(*googleapi.Error).Header. Use 13703// googleapi.IsNotModified to check whether the returned error was 13704// because http.StatusNotModified was returned. 13705func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { 13706 gensupport.SetOptions(c.urlParams_, opts...) 13707 res, err := c.doRequest("json") 13708 if res != nil && res.StatusCode == http.StatusNotModified { 13709 if res.Body != nil { 13710 res.Body.Close() 13711 } 13712 return nil, &googleapi.Error{ 13713 Code: res.StatusCode, 13714 Header: res.Header, 13715 } 13716 } 13717 if err != nil { 13718 return nil, err 13719 } 13720 defer googleapi.CloseBody(res) 13721 if err := googleapi.CheckResponse(res); err != nil { 13722 return nil, err 13723 } 13724 ret := &AccountStatus{ 13725 ServerResponse: googleapi.ServerResponse{ 13726 Header: res.Header, 13727 HTTPStatusCode: res.StatusCode, 13728 }, 13729 } 13730 target := &ret 13731 if err := gensupport.DecodeResponse(target, res); err != nil { 13732 return nil, err 13733 } 13734 return ret, nil 13735 // { 13736 // "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", 13737 // "flatPath": "{merchantId}/accountstatuses/{accountId}", 13738 // "httpMethod": "GET", 13739 // "id": "content.accountstatuses.get", 13740 // "parameterOrder": [ 13741 // "merchantId", 13742 // "accountId" 13743 // ], 13744 // "parameters": { 13745 // "accountId": { 13746 // "description": "The ID of the account.", 13747 // "format": "uint64", 13748 // "location": "path", 13749 // "required": true, 13750 // "type": "string" 13751 // }, 13752 // "destinations": { 13753 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 13754 // "location": "query", 13755 // "repeated": true, 13756 // "type": "string" 13757 // }, 13758 // "merchantId": { 13759 // "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.", 13760 // "format": "uint64", 13761 // "location": "path", 13762 // "required": true, 13763 // "type": "string" 13764 // } 13765 // }, 13766 // "path": "{merchantId}/accountstatuses/{accountId}", 13767 // "response": { 13768 // "$ref": "AccountStatus" 13769 // }, 13770 // "scopes": [ 13771 // "https://www.googleapis.com/auth/content" 13772 // ] 13773 // } 13774 13775} 13776 13777// method id "content.accountstatuses.list": 13778 13779type AccountstatusesListCall struct { 13780 s *APIService 13781 merchantId uint64 13782 urlParams_ gensupport.URLParams 13783 ifNoneMatch_ string 13784 ctx_ context.Context 13785 header_ http.Header 13786} 13787 13788// List: Lists the statuses of the sub-accounts in your Merchant Center 13789// account. 13790// 13791// - merchantId: The ID of the managing account. This must be a 13792// multi-client account. 13793func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { 13794 c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13795 c.merchantId = merchantId 13796 return c 13797} 13798 13799// Destinations sets the optional parameter "destinations": If set, only 13800// issues for the specified destinations are returned, otherwise only 13801// issues for the Shopping destination. 13802func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { 13803 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 13804 return c 13805} 13806 13807// MaxResults sets the optional parameter "maxResults": The maximum 13808// number of account statuses to return in the response, used for 13809// paging. 13810func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { 13811 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13812 return c 13813} 13814 13815// PageToken sets the optional parameter "pageToken": The token returned 13816// by the previous request. 13817func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { 13818 c.urlParams_.Set("pageToken", pageToken) 13819 return c 13820} 13821 13822// Fields allows partial responses to be retrieved. See 13823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13824// for more information. 13825func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { 13826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13827 return c 13828} 13829 13830// IfNoneMatch sets the optional parameter which makes the operation 13831// fail if the object's ETag matches the given value. This is useful for 13832// getting updates only after the object has changed since the last 13833// request. Use googleapi.IsNotModified to check whether the response 13834// error from Do is the result of In-None-Match. 13835func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { 13836 c.ifNoneMatch_ = entityTag 13837 return c 13838} 13839 13840// Context sets the context to be used in this call's Do method. Any 13841// pending HTTP request will be aborted if the provided context is 13842// canceled. 13843func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 13844 c.ctx_ = ctx 13845 return c 13846} 13847 13848// Header returns an http.Header that can be modified by the caller to 13849// add HTTP headers to the request. 13850func (c *AccountstatusesListCall) Header() http.Header { 13851 if c.header_ == nil { 13852 c.header_ = make(http.Header) 13853 } 13854 return c.header_ 13855} 13856 13857func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { 13858 reqHeaders := make(http.Header) 13859 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13860 for k, v := range c.header_ { 13861 reqHeaders[k] = v 13862 } 13863 reqHeaders.Set("User-Agent", c.s.userAgent()) 13864 if c.ifNoneMatch_ != "" { 13865 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13866 } 13867 var body io.Reader = nil 13868 c.urlParams_.Set("alt", alt) 13869 c.urlParams_.Set("prettyPrint", "false") 13870 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") 13871 urls += "?" + c.urlParams_.Encode() 13872 req, err := http.NewRequest("GET", urls, body) 13873 if err != nil { 13874 return nil, err 13875 } 13876 req.Header = reqHeaders 13877 googleapi.Expand(req.URL, map[string]string{ 13878 "merchantId": strconv.FormatUint(c.merchantId, 10), 13879 }) 13880 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13881} 13882 13883// Do executes the "content.accountstatuses.list" call. 13884// Exactly one of *AccountstatusesListResponse or error will be non-nil. 13885// Any non-2xx status code is an error. Response headers are in either 13886// *AccountstatusesListResponse.ServerResponse.Header or (if a response 13887// was returned at all) in error.(*googleapi.Error).Header. Use 13888// googleapi.IsNotModified to check whether the returned error was 13889// because http.StatusNotModified was returned. 13890func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { 13891 gensupport.SetOptions(c.urlParams_, opts...) 13892 res, err := c.doRequest("json") 13893 if res != nil && res.StatusCode == http.StatusNotModified { 13894 if res.Body != nil { 13895 res.Body.Close() 13896 } 13897 return nil, &googleapi.Error{ 13898 Code: res.StatusCode, 13899 Header: res.Header, 13900 } 13901 } 13902 if err != nil { 13903 return nil, err 13904 } 13905 defer googleapi.CloseBody(res) 13906 if err := googleapi.CheckResponse(res); err != nil { 13907 return nil, err 13908 } 13909 ret := &AccountstatusesListResponse{ 13910 ServerResponse: googleapi.ServerResponse{ 13911 Header: res.Header, 13912 HTTPStatusCode: res.StatusCode, 13913 }, 13914 } 13915 target := &ret 13916 if err := gensupport.DecodeResponse(target, res); err != nil { 13917 return nil, err 13918 } 13919 return ret, nil 13920 // { 13921 // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", 13922 // "flatPath": "{merchantId}/accountstatuses", 13923 // "httpMethod": "GET", 13924 // "id": "content.accountstatuses.list", 13925 // "parameterOrder": [ 13926 // "merchantId" 13927 // ], 13928 // "parameters": { 13929 // "destinations": { 13930 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 13931 // "location": "query", 13932 // "repeated": true, 13933 // "type": "string" 13934 // }, 13935 // "maxResults": { 13936 // "description": "The maximum number of account statuses to return in the response, used for paging.", 13937 // "format": "uint32", 13938 // "location": "query", 13939 // "type": "integer" 13940 // }, 13941 // "merchantId": { 13942 // "description": "The ID of the managing account. This must be a multi-client account.", 13943 // "format": "uint64", 13944 // "location": "path", 13945 // "required": true, 13946 // "type": "string" 13947 // }, 13948 // "pageToken": { 13949 // "description": "The token returned by the previous request.", 13950 // "location": "query", 13951 // "type": "string" 13952 // } 13953 // }, 13954 // "path": "{merchantId}/accountstatuses", 13955 // "response": { 13956 // "$ref": "AccountstatusesListResponse" 13957 // }, 13958 // "scopes": [ 13959 // "https://www.googleapis.com/auth/content" 13960 // ] 13961 // } 13962 13963} 13964 13965// Pages invokes f for each page of results. 13966// A non-nil error returned from f will halt the iteration. 13967// The provided context supersedes any context provided to the Context method. 13968func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { 13969 c.ctx_ = ctx 13970 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13971 for { 13972 x, err := c.Do() 13973 if err != nil { 13974 return err 13975 } 13976 if err := f(x); err != nil { 13977 return err 13978 } 13979 if x.NextPageToken == "" { 13980 return nil 13981 } 13982 c.PageToken(x.NextPageToken) 13983 } 13984} 13985 13986// method id "content.accounttax.custombatch": 13987 13988type AccounttaxCustombatchCall struct { 13989 s *APIService 13990 accounttaxcustombatchrequest *AccounttaxCustomBatchRequest 13991 urlParams_ gensupport.URLParams 13992 ctx_ context.Context 13993 header_ http.Header 13994} 13995 13996// Custombatch: Retrieves and updates tax settings of multiple accounts 13997// in a single request. 13998func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { 13999 c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14000 c.accounttaxcustombatchrequest = accounttaxcustombatchrequest 14001 return c 14002} 14003 14004// DryRun sets the optional parameter "dryRun": Flag to simulate a 14005// request like in a live environment. If set to true, dry-run mode 14006// checks the validity of the request and returns errors (if any). 14007func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { 14008 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14009 return c 14010} 14011 14012// Fields allows partial responses to be retrieved. See 14013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14014// for more information. 14015func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { 14016 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14017 return c 14018} 14019 14020// Context sets the context to be used in this call's Do method. Any 14021// pending HTTP request will be aborted if the provided context is 14022// canceled. 14023func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 14024 c.ctx_ = ctx 14025 return c 14026} 14027 14028// Header returns an http.Header that can be modified by the caller to 14029// add HTTP headers to the request. 14030func (c *AccounttaxCustombatchCall) Header() http.Header { 14031 if c.header_ == nil { 14032 c.header_ = make(http.Header) 14033 } 14034 return c.header_ 14035} 14036 14037func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { 14038 reqHeaders := make(http.Header) 14039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14040 for k, v := range c.header_ { 14041 reqHeaders[k] = v 14042 } 14043 reqHeaders.Set("User-Agent", c.s.userAgent()) 14044 var body io.Reader = nil 14045 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) 14046 if err != nil { 14047 return nil, err 14048 } 14049 reqHeaders.Set("Content-Type", "application/json") 14050 c.urlParams_.Set("alt", alt) 14051 c.urlParams_.Set("prettyPrint", "false") 14052 urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 14053 urls += "?" + c.urlParams_.Encode() 14054 req, err := http.NewRequest("POST", urls, body) 14055 if err != nil { 14056 return nil, err 14057 } 14058 req.Header = reqHeaders 14059 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14060} 14061 14062// Do executes the "content.accounttax.custombatch" call. 14063// Exactly one of *AccounttaxCustomBatchResponse or error will be 14064// non-nil. Any non-2xx status code is an error. Response headers are in 14065// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a 14066// response was returned at all) in error.(*googleapi.Error).Header. Use 14067// googleapi.IsNotModified to check whether the returned error was 14068// because http.StatusNotModified was returned. 14069func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { 14070 gensupport.SetOptions(c.urlParams_, opts...) 14071 res, err := c.doRequest("json") 14072 if res != nil && res.StatusCode == http.StatusNotModified { 14073 if res.Body != nil { 14074 res.Body.Close() 14075 } 14076 return nil, &googleapi.Error{ 14077 Code: res.StatusCode, 14078 Header: res.Header, 14079 } 14080 } 14081 if err != nil { 14082 return nil, err 14083 } 14084 defer googleapi.CloseBody(res) 14085 if err := googleapi.CheckResponse(res); err != nil { 14086 return nil, err 14087 } 14088 ret := &AccounttaxCustomBatchResponse{ 14089 ServerResponse: googleapi.ServerResponse{ 14090 Header: res.Header, 14091 HTTPStatusCode: res.StatusCode, 14092 }, 14093 } 14094 target := &ret 14095 if err := gensupport.DecodeResponse(target, res); err != nil { 14096 return nil, err 14097 } 14098 return ret, nil 14099 // { 14100 // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", 14101 // "flatPath": "accounttax/batch", 14102 // "httpMethod": "POST", 14103 // "id": "content.accounttax.custombatch", 14104 // "parameterOrder": [], 14105 // "parameters": { 14106 // "dryRun": { 14107 // "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).", 14108 // "location": "query", 14109 // "type": "boolean" 14110 // } 14111 // }, 14112 // "path": "accounttax/batch", 14113 // "request": { 14114 // "$ref": "AccounttaxCustomBatchRequest" 14115 // }, 14116 // "response": { 14117 // "$ref": "AccounttaxCustomBatchResponse" 14118 // }, 14119 // "scopes": [ 14120 // "https://www.googleapis.com/auth/content" 14121 // ] 14122 // } 14123 14124} 14125 14126// method id "content.accounttax.get": 14127 14128type AccounttaxGetCall struct { 14129 s *APIService 14130 merchantId uint64 14131 accountId uint64 14132 urlParams_ gensupport.URLParams 14133 ifNoneMatch_ string 14134 ctx_ context.Context 14135 header_ http.Header 14136} 14137 14138// Get: Retrieves the tax settings of the account. 14139// 14140// - accountId: The ID of the account for which to get/update account 14141// tax settings. 14142// - merchantId: The ID of the managing account. If this parameter is 14143// not the same as accountId, then this account must be a multi-client 14144// account and `accountId` must be the ID of a sub-account of this 14145// account. 14146func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { 14147 c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14148 c.merchantId = merchantId 14149 c.accountId = accountId 14150 return c 14151} 14152 14153// Fields allows partial responses to be retrieved. See 14154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14155// for more information. 14156func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 14157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14158 return c 14159} 14160 14161// IfNoneMatch sets the optional parameter which makes the operation 14162// fail if the object's ETag matches the given value. This is useful for 14163// getting updates only after the object has changed since the last 14164// request. Use googleapi.IsNotModified to check whether the response 14165// error from Do is the result of In-None-Match. 14166func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { 14167 c.ifNoneMatch_ = entityTag 14168 return c 14169} 14170 14171// Context sets the context to be used in this call's Do method. Any 14172// pending HTTP request will be aborted if the provided context is 14173// canceled. 14174func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 14175 c.ctx_ = ctx 14176 return c 14177} 14178 14179// Header returns an http.Header that can be modified by the caller to 14180// add HTTP headers to the request. 14181func (c *AccounttaxGetCall) Header() http.Header { 14182 if c.header_ == nil { 14183 c.header_ = make(http.Header) 14184 } 14185 return c.header_ 14186} 14187 14188func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { 14189 reqHeaders := make(http.Header) 14190 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14191 for k, v := range c.header_ { 14192 reqHeaders[k] = v 14193 } 14194 reqHeaders.Set("User-Agent", c.s.userAgent()) 14195 if c.ifNoneMatch_ != "" { 14196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14197 } 14198 var body io.Reader = nil 14199 c.urlParams_.Set("alt", alt) 14200 c.urlParams_.Set("prettyPrint", "false") 14201 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 14202 urls += "?" + c.urlParams_.Encode() 14203 req, err := http.NewRequest("GET", urls, body) 14204 if err != nil { 14205 return nil, err 14206 } 14207 req.Header = reqHeaders 14208 googleapi.Expand(req.URL, map[string]string{ 14209 "merchantId": strconv.FormatUint(c.merchantId, 10), 14210 "accountId": strconv.FormatUint(c.accountId, 10), 14211 }) 14212 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14213} 14214 14215// Do executes the "content.accounttax.get" call. 14216// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 14217// status code is an error. Response headers are in either 14218// *AccountTax.ServerResponse.Header or (if a response was returned at 14219// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14220// to check whether the returned error was because 14221// http.StatusNotModified was returned. 14222func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 14223 gensupport.SetOptions(c.urlParams_, opts...) 14224 res, err := c.doRequest("json") 14225 if res != nil && res.StatusCode == http.StatusNotModified { 14226 if res.Body != nil { 14227 res.Body.Close() 14228 } 14229 return nil, &googleapi.Error{ 14230 Code: res.StatusCode, 14231 Header: res.Header, 14232 } 14233 } 14234 if err != nil { 14235 return nil, err 14236 } 14237 defer googleapi.CloseBody(res) 14238 if err := googleapi.CheckResponse(res); err != nil { 14239 return nil, err 14240 } 14241 ret := &AccountTax{ 14242 ServerResponse: googleapi.ServerResponse{ 14243 Header: res.Header, 14244 HTTPStatusCode: res.StatusCode, 14245 }, 14246 } 14247 target := &ret 14248 if err := gensupport.DecodeResponse(target, res); err != nil { 14249 return nil, err 14250 } 14251 return ret, nil 14252 // { 14253 // "description": "Retrieves the tax settings of the account.", 14254 // "flatPath": "{merchantId}/accounttax/{accountId}", 14255 // "httpMethod": "GET", 14256 // "id": "content.accounttax.get", 14257 // "parameterOrder": [ 14258 // "merchantId", 14259 // "accountId" 14260 // ], 14261 // "parameters": { 14262 // "accountId": { 14263 // "description": "The ID of the account for which to get/update account tax settings.", 14264 // "format": "uint64", 14265 // "location": "path", 14266 // "required": true, 14267 // "type": "string" 14268 // }, 14269 // "merchantId": { 14270 // "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.", 14271 // "format": "uint64", 14272 // "location": "path", 14273 // "required": true, 14274 // "type": "string" 14275 // } 14276 // }, 14277 // "path": "{merchantId}/accounttax/{accountId}", 14278 // "response": { 14279 // "$ref": "AccountTax" 14280 // }, 14281 // "scopes": [ 14282 // "https://www.googleapis.com/auth/content" 14283 // ] 14284 // } 14285 14286} 14287 14288// method id "content.accounttax.list": 14289 14290type AccounttaxListCall struct { 14291 s *APIService 14292 merchantId uint64 14293 urlParams_ gensupport.URLParams 14294 ifNoneMatch_ string 14295 ctx_ context.Context 14296 header_ http.Header 14297} 14298 14299// List: Lists the tax settings of the sub-accounts in your Merchant 14300// Center account. 14301// 14302// - merchantId: The ID of the managing account. This must be a 14303// multi-client account. 14304func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { 14305 c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14306 c.merchantId = merchantId 14307 return c 14308} 14309 14310// MaxResults sets the optional parameter "maxResults": The maximum 14311// number of tax settings to return in the response, used for paging. 14312func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { 14313 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14314 return c 14315} 14316 14317// PageToken sets the optional parameter "pageToken": The token returned 14318// by the previous request. 14319func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { 14320 c.urlParams_.Set("pageToken", pageToken) 14321 return c 14322} 14323 14324// Fields allows partial responses to be retrieved. See 14325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14326// for more information. 14327func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { 14328 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14329 return c 14330} 14331 14332// IfNoneMatch sets the optional parameter which makes the operation 14333// fail if the object's ETag matches the given value. This is useful for 14334// getting updates only after the object has changed since the last 14335// request. Use googleapi.IsNotModified to check whether the response 14336// error from Do is the result of In-None-Match. 14337func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { 14338 c.ifNoneMatch_ = entityTag 14339 return c 14340} 14341 14342// Context sets the context to be used in this call's Do method. Any 14343// pending HTTP request will be aborted if the provided context is 14344// canceled. 14345func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 14346 c.ctx_ = ctx 14347 return c 14348} 14349 14350// Header returns an http.Header that can be modified by the caller to 14351// add HTTP headers to the request. 14352func (c *AccounttaxListCall) Header() http.Header { 14353 if c.header_ == nil { 14354 c.header_ = make(http.Header) 14355 } 14356 return c.header_ 14357} 14358 14359func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { 14360 reqHeaders := make(http.Header) 14361 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14362 for k, v := range c.header_ { 14363 reqHeaders[k] = v 14364 } 14365 reqHeaders.Set("User-Agent", c.s.userAgent()) 14366 if c.ifNoneMatch_ != "" { 14367 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14368 } 14369 var body io.Reader = nil 14370 c.urlParams_.Set("alt", alt) 14371 c.urlParams_.Set("prettyPrint", "false") 14372 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") 14373 urls += "?" + c.urlParams_.Encode() 14374 req, err := http.NewRequest("GET", urls, body) 14375 if err != nil { 14376 return nil, err 14377 } 14378 req.Header = reqHeaders 14379 googleapi.Expand(req.URL, map[string]string{ 14380 "merchantId": strconv.FormatUint(c.merchantId, 10), 14381 }) 14382 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14383} 14384 14385// Do executes the "content.accounttax.list" call. 14386// Exactly one of *AccounttaxListResponse or error will be non-nil. Any 14387// non-2xx status code is an error. Response headers are in either 14388// *AccounttaxListResponse.ServerResponse.Header or (if a response was 14389// returned at all) in error.(*googleapi.Error).Header. Use 14390// googleapi.IsNotModified to check whether the returned error was 14391// because http.StatusNotModified was returned. 14392func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { 14393 gensupport.SetOptions(c.urlParams_, opts...) 14394 res, err := c.doRequest("json") 14395 if res != nil && res.StatusCode == http.StatusNotModified { 14396 if res.Body != nil { 14397 res.Body.Close() 14398 } 14399 return nil, &googleapi.Error{ 14400 Code: res.StatusCode, 14401 Header: res.Header, 14402 } 14403 } 14404 if err != nil { 14405 return nil, err 14406 } 14407 defer googleapi.CloseBody(res) 14408 if err := googleapi.CheckResponse(res); err != nil { 14409 return nil, err 14410 } 14411 ret := &AccounttaxListResponse{ 14412 ServerResponse: googleapi.ServerResponse{ 14413 Header: res.Header, 14414 HTTPStatusCode: res.StatusCode, 14415 }, 14416 } 14417 target := &ret 14418 if err := gensupport.DecodeResponse(target, res); err != nil { 14419 return nil, err 14420 } 14421 return ret, nil 14422 // { 14423 // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", 14424 // "flatPath": "{merchantId}/accounttax", 14425 // "httpMethod": "GET", 14426 // "id": "content.accounttax.list", 14427 // "parameterOrder": [ 14428 // "merchantId" 14429 // ], 14430 // "parameters": { 14431 // "maxResults": { 14432 // "description": "The maximum number of tax settings to return in the response, used for paging.", 14433 // "format": "uint32", 14434 // "location": "query", 14435 // "type": "integer" 14436 // }, 14437 // "merchantId": { 14438 // "description": "The ID of the managing account. This must be a multi-client account.", 14439 // "format": "uint64", 14440 // "location": "path", 14441 // "required": true, 14442 // "type": "string" 14443 // }, 14444 // "pageToken": { 14445 // "description": "The token returned by the previous request.", 14446 // "location": "query", 14447 // "type": "string" 14448 // } 14449 // }, 14450 // "path": "{merchantId}/accounttax", 14451 // "response": { 14452 // "$ref": "AccounttaxListResponse" 14453 // }, 14454 // "scopes": [ 14455 // "https://www.googleapis.com/auth/content" 14456 // ] 14457 // } 14458 14459} 14460 14461// Pages invokes f for each page of results. 14462// A non-nil error returned from f will halt the iteration. 14463// The provided context supersedes any context provided to the Context method. 14464func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { 14465 c.ctx_ = ctx 14466 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14467 for { 14468 x, err := c.Do() 14469 if err != nil { 14470 return err 14471 } 14472 if err := f(x); err != nil { 14473 return err 14474 } 14475 if x.NextPageToken == "" { 14476 return nil 14477 } 14478 c.PageToken(x.NextPageToken) 14479 } 14480} 14481 14482// method id "content.accounttax.update": 14483 14484type AccounttaxUpdateCall struct { 14485 s *APIService 14486 merchantId uint64 14487 accountId uint64 14488 accounttax *AccountTax 14489 urlParams_ gensupport.URLParams 14490 ctx_ context.Context 14491 header_ http.Header 14492} 14493 14494// Update: Updates the tax settings of the account. Any fields that are 14495// not provided are deleted from the resource. 14496// 14497// - accountId: The ID of the account for which to get/update account 14498// tax settings. 14499// - merchantId: The ID of the managing account. If this parameter is 14500// not the same as accountId, then this account must be a multi-client 14501// account and `accountId` must be the ID of a sub-account of this 14502// account. 14503func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { 14504 c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14505 c.merchantId = merchantId 14506 c.accountId = accountId 14507 c.accounttax = accounttax 14508 return c 14509} 14510 14511// DryRun sets the optional parameter "dryRun": Flag to simulate a 14512// request like in a live environment. If set to true, dry-run mode 14513// checks the validity of the request and returns errors (if any). 14514func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { 14515 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14516 return c 14517} 14518 14519// Fields allows partial responses to be retrieved. See 14520// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14521// for more information. 14522func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { 14523 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14524 return c 14525} 14526 14527// Context sets the context to be used in this call's Do method. Any 14528// pending HTTP request will be aborted if the provided context is 14529// canceled. 14530func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 14531 c.ctx_ = ctx 14532 return c 14533} 14534 14535// Header returns an http.Header that can be modified by the caller to 14536// add HTTP headers to the request. 14537func (c *AccounttaxUpdateCall) Header() http.Header { 14538 if c.header_ == nil { 14539 c.header_ = make(http.Header) 14540 } 14541 return c.header_ 14542} 14543 14544func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { 14545 reqHeaders := make(http.Header) 14546 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14547 for k, v := range c.header_ { 14548 reqHeaders[k] = v 14549 } 14550 reqHeaders.Set("User-Agent", c.s.userAgent()) 14551 var body io.Reader = nil 14552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) 14553 if err != nil { 14554 return nil, err 14555 } 14556 reqHeaders.Set("Content-Type", "application/json") 14557 c.urlParams_.Set("alt", alt) 14558 c.urlParams_.Set("prettyPrint", "false") 14559 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 14560 urls += "?" + c.urlParams_.Encode() 14561 req, err := http.NewRequest("PUT", urls, body) 14562 if err != nil { 14563 return nil, err 14564 } 14565 req.Header = reqHeaders 14566 googleapi.Expand(req.URL, map[string]string{ 14567 "merchantId": strconv.FormatUint(c.merchantId, 10), 14568 "accountId": strconv.FormatUint(c.accountId, 10), 14569 }) 14570 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14571} 14572 14573// Do executes the "content.accounttax.update" call. 14574// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 14575// status code is an error. Response headers are in either 14576// *AccountTax.ServerResponse.Header or (if a response was returned at 14577// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14578// to check whether the returned error was because 14579// http.StatusNotModified was returned. 14580func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 14581 gensupport.SetOptions(c.urlParams_, opts...) 14582 res, err := c.doRequest("json") 14583 if res != nil && res.StatusCode == http.StatusNotModified { 14584 if res.Body != nil { 14585 res.Body.Close() 14586 } 14587 return nil, &googleapi.Error{ 14588 Code: res.StatusCode, 14589 Header: res.Header, 14590 } 14591 } 14592 if err != nil { 14593 return nil, err 14594 } 14595 defer googleapi.CloseBody(res) 14596 if err := googleapi.CheckResponse(res); err != nil { 14597 return nil, err 14598 } 14599 ret := &AccountTax{ 14600 ServerResponse: googleapi.ServerResponse{ 14601 Header: res.Header, 14602 HTTPStatusCode: res.StatusCode, 14603 }, 14604 } 14605 target := &ret 14606 if err := gensupport.DecodeResponse(target, res); err != nil { 14607 return nil, err 14608 } 14609 return ret, nil 14610 // { 14611 // "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", 14612 // "flatPath": "{merchantId}/accounttax/{accountId}", 14613 // "httpMethod": "PUT", 14614 // "id": "content.accounttax.update", 14615 // "parameterOrder": [ 14616 // "merchantId", 14617 // "accountId" 14618 // ], 14619 // "parameters": { 14620 // "accountId": { 14621 // "description": "The ID of the account for which to get/update account tax settings.", 14622 // "format": "uint64", 14623 // "location": "path", 14624 // "required": true, 14625 // "type": "string" 14626 // }, 14627 // "dryRun": { 14628 // "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).", 14629 // "location": "query", 14630 // "type": "boolean" 14631 // }, 14632 // "merchantId": { 14633 // "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.", 14634 // "format": "uint64", 14635 // "location": "path", 14636 // "required": true, 14637 // "type": "string" 14638 // } 14639 // }, 14640 // "path": "{merchantId}/accounttax/{accountId}", 14641 // "request": { 14642 // "$ref": "AccountTax" 14643 // }, 14644 // "response": { 14645 // "$ref": "AccountTax" 14646 // }, 14647 // "scopes": [ 14648 // "https://www.googleapis.com/auth/content" 14649 // ] 14650 // } 14651 14652} 14653 14654// method id "content.datafeeds.custombatch": 14655 14656type DatafeedsCustombatchCall struct { 14657 s *APIService 14658 datafeedscustombatchrequest *DatafeedsCustomBatchRequest 14659 urlParams_ gensupport.URLParams 14660 ctx_ context.Context 14661 header_ http.Header 14662} 14663 14664// Custombatch: Deletes, fetches, gets, inserts and updates multiple 14665// datafeeds in a single request. 14666func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { 14667 c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14668 c.datafeedscustombatchrequest = datafeedscustombatchrequest 14669 return c 14670} 14671 14672// DryRun sets the optional parameter "dryRun": Flag to simulate a 14673// request like in a live environment. If set to true, dry-run mode 14674// checks the validity of the request and returns errors (if any). 14675func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { 14676 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14677 return c 14678} 14679 14680// Fields allows partial responses to be retrieved. See 14681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14682// for more information. 14683func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 14684 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14685 return c 14686} 14687 14688// Context sets the context to be used in this call's Do method. Any 14689// pending HTTP request will be aborted if the provided context is 14690// canceled. 14691func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 14692 c.ctx_ = ctx 14693 return c 14694} 14695 14696// Header returns an http.Header that can be modified by the caller to 14697// add HTTP headers to the request. 14698func (c *DatafeedsCustombatchCall) Header() http.Header { 14699 if c.header_ == nil { 14700 c.header_ = make(http.Header) 14701 } 14702 return c.header_ 14703} 14704 14705func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { 14706 reqHeaders := make(http.Header) 14707 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14708 for k, v := range c.header_ { 14709 reqHeaders[k] = v 14710 } 14711 reqHeaders.Set("User-Agent", c.s.userAgent()) 14712 var body io.Reader = nil 14713 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) 14714 if err != nil { 14715 return nil, err 14716 } 14717 reqHeaders.Set("Content-Type", "application/json") 14718 c.urlParams_.Set("alt", alt) 14719 c.urlParams_.Set("prettyPrint", "false") 14720 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") 14721 urls += "?" + c.urlParams_.Encode() 14722 req, err := http.NewRequest("POST", urls, body) 14723 if err != nil { 14724 return nil, err 14725 } 14726 req.Header = reqHeaders 14727 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14728} 14729 14730// Do executes the "content.datafeeds.custombatch" call. 14731// Exactly one of *DatafeedsCustomBatchResponse or error will be 14732// non-nil. Any non-2xx status code is an error. Response headers are in 14733// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a 14734// response was returned at all) in error.(*googleapi.Error).Header. Use 14735// googleapi.IsNotModified to check whether the returned error was 14736// because http.StatusNotModified was returned. 14737func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { 14738 gensupport.SetOptions(c.urlParams_, opts...) 14739 res, err := c.doRequest("json") 14740 if res != nil && res.StatusCode == http.StatusNotModified { 14741 if res.Body != nil { 14742 res.Body.Close() 14743 } 14744 return nil, &googleapi.Error{ 14745 Code: res.StatusCode, 14746 Header: res.Header, 14747 } 14748 } 14749 if err != nil { 14750 return nil, err 14751 } 14752 defer googleapi.CloseBody(res) 14753 if err := googleapi.CheckResponse(res); err != nil { 14754 return nil, err 14755 } 14756 ret := &DatafeedsCustomBatchResponse{ 14757 ServerResponse: googleapi.ServerResponse{ 14758 Header: res.Header, 14759 HTTPStatusCode: res.StatusCode, 14760 }, 14761 } 14762 target := &ret 14763 if err := gensupport.DecodeResponse(target, res); err != nil { 14764 return nil, err 14765 } 14766 return ret, nil 14767 // { 14768 // "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", 14769 // "flatPath": "datafeeds/batch", 14770 // "httpMethod": "POST", 14771 // "id": "content.datafeeds.custombatch", 14772 // "parameterOrder": [], 14773 // "parameters": { 14774 // "dryRun": { 14775 // "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).", 14776 // "location": "query", 14777 // "type": "boolean" 14778 // } 14779 // }, 14780 // "path": "datafeeds/batch", 14781 // "request": { 14782 // "$ref": "DatafeedsCustomBatchRequest" 14783 // }, 14784 // "response": { 14785 // "$ref": "DatafeedsCustomBatchResponse" 14786 // }, 14787 // "scopes": [ 14788 // "https://www.googleapis.com/auth/content" 14789 // ] 14790 // } 14791 14792} 14793 14794// method id "content.datafeeds.delete": 14795 14796type DatafeedsDeleteCall struct { 14797 s *APIService 14798 merchantId uint64 14799 datafeedId uint64 14800 urlParams_ gensupport.URLParams 14801 ctx_ context.Context 14802 header_ http.Header 14803} 14804 14805// Delete: Deletes a datafeed configuration from your Merchant Center 14806// account. 14807// 14808// - datafeedId: The ID of the datafeed. 14809// - merchantId: The ID of the account that manages the datafeed. This 14810// account cannot be a multi-client account. 14811func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { 14812 c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14813 c.merchantId = merchantId 14814 c.datafeedId = datafeedId 14815 return c 14816} 14817 14818// DryRun sets the optional parameter "dryRun": Flag to simulate a 14819// request like in a live environment. If set to true, dry-run mode 14820// checks the validity of the request and returns errors (if any). 14821func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { 14822 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14823 return c 14824} 14825 14826// Fields allows partial responses to be retrieved. See 14827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14828// for more information. 14829func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 14830 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14831 return c 14832} 14833 14834// Context sets the context to be used in this call's Do method. Any 14835// pending HTTP request will be aborted if the provided context is 14836// canceled. 14837func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 14838 c.ctx_ = ctx 14839 return c 14840} 14841 14842// Header returns an http.Header that can be modified by the caller to 14843// add HTTP headers to the request. 14844func (c *DatafeedsDeleteCall) Header() http.Header { 14845 if c.header_ == nil { 14846 c.header_ = make(http.Header) 14847 } 14848 return c.header_ 14849} 14850 14851func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { 14852 reqHeaders := make(http.Header) 14853 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14854 for k, v := range c.header_ { 14855 reqHeaders[k] = v 14856 } 14857 reqHeaders.Set("User-Agent", c.s.userAgent()) 14858 var body io.Reader = nil 14859 c.urlParams_.Set("alt", alt) 14860 c.urlParams_.Set("prettyPrint", "false") 14861 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 14862 urls += "?" + c.urlParams_.Encode() 14863 req, err := http.NewRequest("DELETE", urls, body) 14864 if err != nil { 14865 return nil, err 14866 } 14867 req.Header = reqHeaders 14868 googleapi.Expand(req.URL, map[string]string{ 14869 "merchantId": strconv.FormatUint(c.merchantId, 10), 14870 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 14871 }) 14872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14873} 14874 14875// Do executes the "content.datafeeds.delete" call. 14876func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { 14877 gensupport.SetOptions(c.urlParams_, opts...) 14878 res, err := c.doRequest("json") 14879 if err != nil { 14880 return err 14881 } 14882 defer googleapi.CloseBody(res) 14883 if err := googleapi.CheckResponse(res); err != nil { 14884 return err 14885 } 14886 return nil 14887 // { 14888 // "description": "Deletes a datafeed configuration from your Merchant Center account.", 14889 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 14890 // "httpMethod": "DELETE", 14891 // "id": "content.datafeeds.delete", 14892 // "parameterOrder": [ 14893 // "merchantId", 14894 // "datafeedId" 14895 // ], 14896 // "parameters": { 14897 // "datafeedId": { 14898 // "description": "The ID of the datafeed.", 14899 // "format": "uint64", 14900 // "location": "path", 14901 // "required": true, 14902 // "type": "string" 14903 // }, 14904 // "dryRun": { 14905 // "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).", 14906 // "location": "query", 14907 // "type": "boolean" 14908 // }, 14909 // "merchantId": { 14910 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 14911 // "format": "uint64", 14912 // "location": "path", 14913 // "required": true, 14914 // "type": "string" 14915 // } 14916 // }, 14917 // "path": "{merchantId}/datafeeds/{datafeedId}", 14918 // "scopes": [ 14919 // "https://www.googleapis.com/auth/content" 14920 // ] 14921 // } 14922 14923} 14924 14925// method id "content.datafeeds.fetchnow": 14926 14927type DatafeedsFetchnowCall struct { 14928 s *APIService 14929 merchantId uint64 14930 datafeedId uint64 14931 urlParams_ gensupport.URLParams 14932 ctx_ context.Context 14933 header_ http.Header 14934} 14935 14936// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center 14937// account. If you need to call this method more than once per day, we 14938// recommend you use the Products service to update your product data. 14939// 14940// - datafeedId: The ID of the datafeed to be fetched. 14941// - merchantId: The ID of the account that manages the datafeed. This 14942// account cannot be a multi-client account. 14943func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { 14944 c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14945 c.merchantId = merchantId 14946 c.datafeedId = datafeedId 14947 return c 14948} 14949 14950// DryRun sets the optional parameter "dryRun": Flag to simulate a 14951// request like in a live environment. If set to true, dry-run mode 14952// checks the validity of the request and returns errors (if any). 14953func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { 14954 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14955 return c 14956} 14957 14958// Fields allows partial responses to be retrieved. See 14959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14960// for more information. 14961func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { 14962 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14963 return c 14964} 14965 14966// Context sets the context to be used in this call's Do method. Any 14967// pending HTTP request will be aborted if the provided context is 14968// canceled. 14969func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 14970 c.ctx_ = ctx 14971 return c 14972} 14973 14974// Header returns an http.Header that can be modified by the caller to 14975// add HTTP headers to the request. 14976func (c *DatafeedsFetchnowCall) Header() http.Header { 14977 if c.header_ == nil { 14978 c.header_ = make(http.Header) 14979 } 14980 return c.header_ 14981} 14982 14983func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { 14984 reqHeaders := make(http.Header) 14985 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14986 for k, v := range c.header_ { 14987 reqHeaders[k] = v 14988 } 14989 reqHeaders.Set("User-Agent", c.s.userAgent()) 14990 var body io.Reader = nil 14991 c.urlParams_.Set("alt", alt) 14992 c.urlParams_.Set("prettyPrint", "false") 14993 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") 14994 urls += "?" + c.urlParams_.Encode() 14995 req, err := http.NewRequest("POST", urls, body) 14996 if err != nil { 14997 return nil, err 14998 } 14999 req.Header = reqHeaders 15000 googleapi.Expand(req.URL, map[string]string{ 15001 "merchantId": strconv.FormatUint(c.merchantId, 10), 15002 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15003 }) 15004 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15005} 15006 15007// Do executes the "content.datafeeds.fetchnow" call. 15008// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. 15009// Any non-2xx status code is an error. Response headers are in either 15010// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response 15011// was returned at all) in error.(*googleapi.Error).Header. Use 15012// googleapi.IsNotModified to check whether the returned error was 15013// because http.StatusNotModified was returned. 15014func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { 15015 gensupport.SetOptions(c.urlParams_, opts...) 15016 res, err := c.doRequest("json") 15017 if res != nil && res.StatusCode == http.StatusNotModified { 15018 if res.Body != nil { 15019 res.Body.Close() 15020 } 15021 return nil, &googleapi.Error{ 15022 Code: res.StatusCode, 15023 Header: res.Header, 15024 } 15025 } 15026 if err != nil { 15027 return nil, err 15028 } 15029 defer googleapi.CloseBody(res) 15030 if err := googleapi.CheckResponse(res); err != nil { 15031 return nil, err 15032 } 15033 ret := &DatafeedsFetchNowResponse{ 15034 ServerResponse: googleapi.ServerResponse{ 15035 Header: res.Header, 15036 HTTPStatusCode: res.StatusCode, 15037 }, 15038 } 15039 target := &ret 15040 if err := gensupport.DecodeResponse(target, res); err != nil { 15041 return nil, err 15042 } 15043 return ret, nil 15044 // { 15045 // "description": "Invokes a fetch for the datafeed in your Merchant Center account. If you need to call this method more than once per day, we recommend you use the Products service to update your product data.", 15046 // "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 15047 // "httpMethod": "POST", 15048 // "id": "content.datafeeds.fetchnow", 15049 // "parameterOrder": [ 15050 // "merchantId", 15051 // "datafeedId" 15052 // ], 15053 // "parameters": { 15054 // "datafeedId": { 15055 // "description": "The ID of the datafeed to be fetched.", 15056 // "format": "uint64", 15057 // "location": "path", 15058 // "required": true, 15059 // "type": "string" 15060 // }, 15061 // "dryRun": { 15062 // "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).", 15063 // "location": "query", 15064 // "type": "boolean" 15065 // }, 15066 // "merchantId": { 15067 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15068 // "format": "uint64", 15069 // "location": "path", 15070 // "required": true, 15071 // "type": "string" 15072 // } 15073 // }, 15074 // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 15075 // "response": { 15076 // "$ref": "DatafeedsFetchNowResponse" 15077 // }, 15078 // "scopes": [ 15079 // "https://www.googleapis.com/auth/content" 15080 // ] 15081 // } 15082 15083} 15084 15085// method id "content.datafeeds.get": 15086 15087type DatafeedsGetCall struct { 15088 s *APIService 15089 merchantId uint64 15090 datafeedId uint64 15091 urlParams_ gensupport.URLParams 15092 ifNoneMatch_ string 15093 ctx_ context.Context 15094 header_ http.Header 15095} 15096 15097// Get: Retrieves a datafeed configuration from your Merchant Center 15098// account. 15099// 15100// - datafeedId: The ID of the datafeed. 15101// - merchantId: The ID of the account that manages the datafeed. This 15102// account cannot be a multi-client account. 15103func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { 15104 c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15105 c.merchantId = merchantId 15106 c.datafeedId = datafeedId 15107 return c 15108} 15109 15110// Fields allows partial responses to be retrieved. See 15111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15112// for more information. 15113func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { 15114 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15115 return c 15116} 15117 15118// IfNoneMatch sets the optional parameter which makes the operation 15119// fail if the object's ETag matches the given value. This is useful for 15120// getting updates only after the object has changed since the last 15121// request. Use googleapi.IsNotModified to check whether the response 15122// error from Do is the result of In-None-Match. 15123func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { 15124 c.ifNoneMatch_ = entityTag 15125 return c 15126} 15127 15128// Context sets the context to be used in this call's Do method. Any 15129// pending HTTP request will be aborted if the provided context is 15130// canceled. 15131func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 15132 c.ctx_ = ctx 15133 return c 15134} 15135 15136// Header returns an http.Header that can be modified by the caller to 15137// add HTTP headers to the request. 15138func (c *DatafeedsGetCall) Header() http.Header { 15139 if c.header_ == nil { 15140 c.header_ = make(http.Header) 15141 } 15142 return c.header_ 15143} 15144 15145func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { 15146 reqHeaders := make(http.Header) 15147 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15148 for k, v := range c.header_ { 15149 reqHeaders[k] = v 15150 } 15151 reqHeaders.Set("User-Agent", c.s.userAgent()) 15152 if c.ifNoneMatch_ != "" { 15153 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15154 } 15155 var body io.Reader = nil 15156 c.urlParams_.Set("alt", alt) 15157 c.urlParams_.Set("prettyPrint", "false") 15158 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15159 urls += "?" + c.urlParams_.Encode() 15160 req, err := http.NewRequest("GET", urls, body) 15161 if err != nil { 15162 return nil, err 15163 } 15164 req.Header = reqHeaders 15165 googleapi.Expand(req.URL, map[string]string{ 15166 "merchantId": strconv.FormatUint(c.merchantId, 10), 15167 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15168 }) 15169 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15170} 15171 15172// Do executes the "content.datafeeds.get" call. 15173// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15174// code is an error. Response headers are in either 15175// *Datafeed.ServerResponse.Header or (if a response was returned at 15176// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15177// to check whether the returned error was because 15178// http.StatusNotModified was returned. 15179func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15180 gensupport.SetOptions(c.urlParams_, opts...) 15181 res, err := c.doRequest("json") 15182 if res != nil && res.StatusCode == http.StatusNotModified { 15183 if res.Body != nil { 15184 res.Body.Close() 15185 } 15186 return nil, &googleapi.Error{ 15187 Code: res.StatusCode, 15188 Header: res.Header, 15189 } 15190 } 15191 if err != nil { 15192 return nil, err 15193 } 15194 defer googleapi.CloseBody(res) 15195 if err := googleapi.CheckResponse(res); err != nil { 15196 return nil, err 15197 } 15198 ret := &Datafeed{ 15199 ServerResponse: googleapi.ServerResponse{ 15200 Header: res.Header, 15201 HTTPStatusCode: res.StatusCode, 15202 }, 15203 } 15204 target := &ret 15205 if err := gensupport.DecodeResponse(target, res); err != nil { 15206 return nil, err 15207 } 15208 return ret, nil 15209 // { 15210 // "description": "Retrieves a datafeed configuration from your Merchant Center account.", 15211 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 15212 // "httpMethod": "GET", 15213 // "id": "content.datafeeds.get", 15214 // "parameterOrder": [ 15215 // "merchantId", 15216 // "datafeedId" 15217 // ], 15218 // "parameters": { 15219 // "datafeedId": { 15220 // "description": "The ID of the datafeed.", 15221 // "format": "uint64", 15222 // "location": "path", 15223 // "required": true, 15224 // "type": "string" 15225 // }, 15226 // "merchantId": { 15227 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15228 // "format": "uint64", 15229 // "location": "path", 15230 // "required": true, 15231 // "type": "string" 15232 // } 15233 // }, 15234 // "path": "{merchantId}/datafeeds/{datafeedId}", 15235 // "response": { 15236 // "$ref": "Datafeed" 15237 // }, 15238 // "scopes": [ 15239 // "https://www.googleapis.com/auth/content" 15240 // ] 15241 // } 15242 15243} 15244 15245// method id "content.datafeeds.insert": 15246 15247type DatafeedsInsertCall struct { 15248 s *APIService 15249 merchantId uint64 15250 datafeed *Datafeed 15251 urlParams_ gensupport.URLParams 15252 ctx_ context.Context 15253 header_ http.Header 15254} 15255 15256// Insert: Registers a datafeed configuration with your Merchant Center 15257// account. 15258// 15259// - merchantId: The ID of the account that manages the datafeed. This 15260// account cannot be a multi-client account. 15261func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { 15262 c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15263 c.merchantId = merchantId 15264 c.datafeed = datafeed 15265 return c 15266} 15267 15268// DryRun sets the optional parameter "dryRun": Flag to simulate a 15269// request like in a live environment. If set to true, dry-run mode 15270// checks the validity of the request and returns errors (if any). 15271func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { 15272 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15273 return c 15274} 15275 15276// Fields allows partial responses to be retrieved. See 15277// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15278// for more information. 15279func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { 15280 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15281 return c 15282} 15283 15284// Context sets the context to be used in this call's Do method. Any 15285// pending HTTP request will be aborted if the provided context is 15286// canceled. 15287func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 15288 c.ctx_ = ctx 15289 return c 15290} 15291 15292// Header returns an http.Header that can be modified by the caller to 15293// add HTTP headers to the request. 15294func (c *DatafeedsInsertCall) Header() http.Header { 15295 if c.header_ == nil { 15296 c.header_ = make(http.Header) 15297 } 15298 return c.header_ 15299} 15300 15301func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { 15302 reqHeaders := make(http.Header) 15303 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15304 for k, v := range c.header_ { 15305 reqHeaders[k] = v 15306 } 15307 reqHeaders.Set("User-Agent", c.s.userAgent()) 15308 var body io.Reader = nil 15309 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 15310 if err != nil { 15311 return nil, err 15312 } 15313 reqHeaders.Set("Content-Type", "application/json") 15314 c.urlParams_.Set("alt", alt) 15315 c.urlParams_.Set("prettyPrint", "false") 15316 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 15317 urls += "?" + c.urlParams_.Encode() 15318 req, err := http.NewRequest("POST", urls, body) 15319 if err != nil { 15320 return nil, err 15321 } 15322 req.Header = reqHeaders 15323 googleapi.Expand(req.URL, map[string]string{ 15324 "merchantId": strconv.FormatUint(c.merchantId, 10), 15325 }) 15326 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15327} 15328 15329// Do executes the "content.datafeeds.insert" call. 15330// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15331// code is an error. Response headers are in either 15332// *Datafeed.ServerResponse.Header or (if a response was returned at 15333// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15334// to check whether the returned error was because 15335// http.StatusNotModified was returned. 15336func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15337 gensupport.SetOptions(c.urlParams_, opts...) 15338 res, err := c.doRequest("json") 15339 if res != nil && res.StatusCode == http.StatusNotModified { 15340 if res.Body != nil { 15341 res.Body.Close() 15342 } 15343 return nil, &googleapi.Error{ 15344 Code: res.StatusCode, 15345 Header: res.Header, 15346 } 15347 } 15348 if err != nil { 15349 return nil, err 15350 } 15351 defer googleapi.CloseBody(res) 15352 if err := googleapi.CheckResponse(res); err != nil { 15353 return nil, err 15354 } 15355 ret := &Datafeed{ 15356 ServerResponse: googleapi.ServerResponse{ 15357 Header: res.Header, 15358 HTTPStatusCode: res.StatusCode, 15359 }, 15360 } 15361 target := &ret 15362 if err := gensupport.DecodeResponse(target, res); err != nil { 15363 return nil, err 15364 } 15365 return ret, nil 15366 // { 15367 // "description": "Registers a datafeed configuration with your Merchant Center account.", 15368 // "flatPath": "{merchantId}/datafeeds", 15369 // "httpMethod": "POST", 15370 // "id": "content.datafeeds.insert", 15371 // "parameterOrder": [ 15372 // "merchantId" 15373 // ], 15374 // "parameters": { 15375 // "dryRun": { 15376 // "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).", 15377 // "location": "query", 15378 // "type": "boolean" 15379 // }, 15380 // "merchantId": { 15381 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15382 // "format": "uint64", 15383 // "location": "path", 15384 // "required": true, 15385 // "type": "string" 15386 // } 15387 // }, 15388 // "path": "{merchantId}/datafeeds", 15389 // "request": { 15390 // "$ref": "Datafeed" 15391 // }, 15392 // "response": { 15393 // "$ref": "Datafeed" 15394 // }, 15395 // "scopes": [ 15396 // "https://www.googleapis.com/auth/content" 15397 // ] 15398 // } 15399 15400} 15401 15402// method id "content.datafeeds.list": 15403 15404type DatafeedsListCall struct { 15405 s *APIService 15406 merchantId uint64 15407 urlParams_ gensupport.URLParams 15408 ifNoneMatch_ string 15409 ctx_ context.Context 15410 header_ http.Header 15411} 15412 15413// List: Lists the configurations for datafeeds in your Merchant Center 15414// account. 15415// 15416// - merchantId: The ID of the account that manages the datafeeds. This 15417// account cannot be a multi-client account. 15418func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { 15419 c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15420 c.merchantId = merchantId 15421 return c 15422} 15423 15424// MaxResults sets the optional parameter "maxResults": The maximum 15425// number of products to return in the response, used for paging. 15426func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { 15427 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 15428 return c 15429} 15430 15431// PageToken sets the optional parameter "pageToken": The token returned 15432// by the previous request. 15433func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { 15434 c.urlParams_.Set("pageToken", pageToken) 15435 return c 15436} 15437 15438// Fields allows partial responses to be retrieved. See 15439// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15440// for more information. 15441func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { 15442 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15443 return c 15444} 15445 15446// IfNoneMatch sets the optional parameter which makes the operation 15447// fail if the object's ETag matches the given value. This is useful for 15448// getting updates only after the object has changed since the last 15449// request. Use googleapi.IsNotModified to check whether the response 15450// error from Do is the result of In-None-Match. 15451func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { 15452 c.ifNoneMatch_ = entityTag 15453 return c 15454} 15455 15456// Context sets the context to be used in this call's Do method. Any 15457// pending HTTP request will be aborted if the provided context is 15458// canceled. 15459func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 15460 c.ctx_ = ctx 15461 return c 15462} 15463 15464// Header returns an http.Header that can be modified by the caller to 15465// add HTTP headers to the request. 15466func (c *DatafeedsListCall) Header() http.Header { 15467 if c.header_ == nil { 15468 c.header_ = make(http.Header) 15469 } 15470 return c.header_ 15471} 15472 15473func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { 15474 reqHeaders := make(http.Header) 15475 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15476 for k, v := range c.header_ { 15477 reqHeaders[k] = v 15478 } 15479 reqHeaders.Set("User-Agent", c.s.userAgent()) 15480 if c.ifNoneMatch_ != "" { 15481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15482 } 15483 var body io.Reader = nil 15484 c.urlParams_.Set("alt", alt) 15485 c.urlParams_.Set("prettyPrint", "false") 15486 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 15487 urls += "?" + c.urlParams_.Encode() 15488 req, err := http.NewRequest("GET", urls, body) 15489 if err != nil { 15490 return nil, err 15491 } 15492 req.Header = reqHeaders 15493 googleapi.Expand(req.URL, map[string]string{ 15494 "merchantId": strconv.FormatUint(c.merchantId, 10), 15495 }) 15496 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15497} 15498 15499// Do executes the "content.datafeeds.list" call. 15500// Exactly one of *DatafeedsListResponse or error will be non-nil. Any 15501// non-2xx status code is an error. Response headers are in either 15502// *DatafeedsListResponse.ServerResponse.Header or (if a response was 15503// returned at all) in error.(*googleapi.Error).Header. Use 15504// googleapi.IsNotModified to check whether the returned error was 15505// because http.StatusNotModified was returned. 15506func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { 15507 gensupport.SetOptions(c.urlParams_, opts...) 15508 res, err := c.doRequest("json") 15509 if res != nil && res.StatusCode == http.StatusNotModified { 15510 if res.Body != nil { 15511 res.Body.Close() 15512 } 15513 return nil, &googleapi.Error{ 15514 Code: res.StatusCode, 15515 Header: res.Header, 15516 } 15517 } 15518 if err != nil { 15519 return nil, err 15520 } 15521 defer googleapi.CloseBody(res) 15522 if err := googleapi.CheckResponse(res); err != nil { 15523 return nil, err 15524 } 15525 ret := &DatafeedsListResponse{ 15526 ServerResponse: googleapi.ServerResponse{ 15527 Header: res.Header, 15528 HTTPStatusCode: res.StatusCode, 15529 }, 15530 } 15531 target := &ret 15532 if err := gensupport.DecodeResponse(target, res); err != nil { 15533 return nil, err 15534 } 15535 return ret, nil 15536 // { 15537 // "description": "Lists the configurations for datafeeds in your Merchant Center account.", 15538 // "flatPath": "{merchantId}/datafeeds", 15539 // "httpMethod": "GET", 15540 // "id": "content.datafeeds.list", 15541 // "parameterOrder": [ 15542 // "merchantId" 15543 // ], 15544 // "parameters": { 15545 // "maxResults": { 15546 // "description": "The maximum number of products to return in the response, used for paging.", 15547 // "format": "uint32", 15548 // "location": "query", 15549 // "type": "integer" 15550 // }, 15551 // "merchantId": { 15552 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 15553 // "format": "uint64", 15554 // "location": "path", 15555 // "required": true, 15556 // "type": "string" 15557 // }, 15558 // "pageToken": { 15559 // "description": "The token returned by the previous request.", 15560 // "location": "query", 15561 // "type": "string" 15562 // } 15563 // }, 15564 // "path": "{merchantId}/datafeeds", 15565 // "response": { 15566 // "$ref": "DatafeedsListResponse" 15567 // }, 15568 // "scopes": [ 15569 // "https://www.googleapis.com/auth/content" 15570 // ] 15571 // } 15572 15573} 15574 15575// Pages invokes f for each page of results. 15576// A non-nil error returned from f will halt the iteration. 15577// The provided context supersedes any context provided to the Context method. 15578func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { 15579 c.ctx_ = ctx 15580 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15581 for { 15582 x, err := c.Do() 15583 if err != nil { 15584 return err 15585 } 15586 if err := f(x); err != nil { 15587 return err 15588 } 15589 if x.NextPageToken == "" { 15590 return nil 15591 } 15592 c.PageToken(x.NextPageToken) 15593 } 15594} 15595 15596// method id "content.datafeeds.update": 15597 15598type DatafeedsUpdateCall struct { 15599 s *APIService 15600 merchantId uint64 15601 datafeedId uint64 15602 datafeed *Datafeed 15603 urlParams_ gensupport.URLParams 15604 ctx_ context.Context 15605 header_ http.Header 15606} 15607 15608// Update: Updates a datafeed configuration of your Merchant Center 15609// account. Any fields that are not provided are deleted from the 15610// resource. 15611// 15612// - datafeedId: The ID of the datafeed. 15613// - merchantId: The ID of the account that manages the datafeed. This 15614// account cannot be a multi-client account. 15615func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { 15616 c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15617 c.merchantId = merchantId 15618 c.datafeedId = datafeedId 15619 c.datafeed = datafeed 15620 return c 15621} 15622 15623// DryRun sets the optional parameter "dryRun": Flag to simulate a 15624// request like in a live environment. If set to true, dry-run mode 15625// checks the validity of the request and returns errors (if any). 15626func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { 15627 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15628 return c 15629} 15630 15631// Fields allows partial responses to be retrieved. See 15632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15633// for more information. 15634func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { 15635 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15636 return c 15637} 15638 15639// Context sets the context to be used in this call's Do method. Any 15640// pending HTTP request will be aborted if the provided context is 15641// canceled. 15642func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 15643 c.ctx_ = ctx 15644 return c 15645} 15646 15647// Header returns an http.Header that can be modified by the caller to 15648// add HTTP headers to the request. 15649func (c *DatafeedsUpdateCall) Header() http.Header { 15650 if c.header_ == nil { 15651 c.header_ = make(http.Header) 15652 } 15653 return c.header_ 15654} 15655 15656func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { 15657 reqHeaders := make(http.Header) 15658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15659 for k, v := range c.header_ { 15660 reqHeaders[k] = v 15661 } 15662 reqHeaders.Set("User-Agent", c.s.userAgent()) 15663 var body io.Reader = nil 15664 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 15665 if err != nil { 15666 return nil, err 15667 } 15668 reqHeaders.Set("Content-Type", "application/json") 15669 c.urlParams_.Set("alt", alt) 15670 c.urlParams_.Set("prettyPrint", "false") 15671 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15672 urls += "?" + c.urlParams_.Encode() 15673 req, err := http.NewRequest("PUT", urls, body) 15674 if err != nil { 15675 return nil, err 15676 } 15677 req.Header = reqHeaders 15678 googleapi.Expand(req.URL, map[string]string{ 15679 "merchantId": strconv.FormatUint(c.merchantId, 10), 15680 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15681 }) 15682 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15683} 15684 15685// Do executes the "content.datafeeds.update" call. 15686// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15687// code is an error. Response headers are in either 15688// *Datafeed.ServerResponse.Header or (if a response was returned at 15689// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15690// to check whether the returned error was because 15691// http.StatusNotModified was returned. 15692func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15693 gensupport.SetOptions(c.urlParams_, opts...) 15694 res, err := c.doRequest("json") 15695 if res != nil && res.StatusCode == http.StatusNotModified { 15696 if res.Body != nil { 15697 res.Body.Close() 15698 } 15699 return nil, &googleapi.Error{ 15700 Code: res.StatusCode, 15701 Header: res.Header, 15702 } 15703 } 15704 if err != nil { 15705 return nil, err 15706 } 15707 defer googleapi.CloseBody(res) 15708 if err := googleapi.CheckResponse(res); err != nil { 15709 return nil, err 15710 } 15711 ret := &Datafeed{ 15712 ServerResponse: googleapi.ServerResponse{ 15713 Header: res.Header, 15714 HTTPStatusCode: res.StatusCode, 15715 }, 15716 } 15717 target := &ret 15718 if err := gensupport.DecodeResponse(target, res); err != nil { 15719 return nil, err 15720 } 15721 return ret, nil 15722 // { 15723 // "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", 15724 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 15725 // "httpMethod": "PUT", 15726 // "id": "content.datafeeds.update", 15727 // "parameterOrder": [ 15728 // "merchantId", 15729 // "datafeedId" 15730 // ], 15731 // "parameters": { 15732 // "datafeedId": { 15733 // "description": "The ID of the datafeed.", 15734 // "format": "uint64", 15735 // "location": "path", 15736 // "required": true, 15737 // "type": "string" 15738 // }, 15739 // "dryRun": { 15740 // "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).", 15741 // "location": "query", 15742 // "type": "boolean" 15743 // }, 15744 // "merchantId": { 15745 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15746 // "format": "uint64", 15747 // "location": "path", 15748 // "required": true, 15749 // "type": "string" 15750 // } 15751 // }, 15752 // "path": "{merchantId}/datafeeds/{datafeedId}", 15753 // "request": { 15754 // "$ref": "Datafeed" 15755 // }, 15756 // "response": { 15757 // "$ref": "Datafeed" 15758 // }, 15759 // "scopes": [ 15760 // "https://www.googleapis.com/auth/content" 15761 // ] 15762 // } 15763 15764} 15765 15766// method id "content.datafeedstatuses.custombatch": 15767 15768type DatafeedstatusesCustombatchCall struct { 15769 s *APIService 15770 datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest 15771 urlParams_ gensupport.URLParams 15772 ctx_ context.Context 15773 header_ http.Header 15774} 15775 15776// Custombatch: Gets multiple Merchant Center datafeed statuses in a 15777// single request. 15778func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { 15779 c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15780 c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 15781 return c 15782} 15783 15784// Fields allows partial responses to be retrieved. See 15785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15786// for more information. 15787func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { 15788 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15789 return c 15790} 15791 15792// Context sets the context to be used in this call's Do method. Any 15793// pending HTTP request will be aborted if the provided context is 15794// canceled. 15795func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 15796 c.ctx_ = ctx 15797 return c 15798} 15799 15800// Header returns an http.Header that can be modified by the caller to 15801// add HTTP headers to the request. 15802func (c *DatafeedstatusesCustombatchCall) Header() http.Header { 15803 if c.header_ == nil { 15804 c.header_ = make(http.Header) 15805 } 15806 return c.header_ 15807} 15808 15809func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 15810 reqHeaders := make(http.Header) 15811 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15812 for k, v := range c.header_ { 15813 reqHeaders[k] = v 15814 } 15815 reqHeaders.Set("User-Agent", c.s.userAgent()) 15816 var body io.Reader = nil 15817 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) 15818 if err != nil { 15819 return nil, err 15820 } 15821 reqHeaders.Set("Content-Type", "application/json") 15822 c.urlParams_.Set("alt", alt) 15823 c.urlParams_.Set("prettyPrint", "false") 15824 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 15825 urls += "?" + c.urlParams_.Encode() 15826 req, err := http.NewRequest("POST", urls, body) 15827 if err != nil { 15828 return nil, err 15829 } 15830 req.Header = reqHeaders 15831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15832} 15833 15834// Do executes the "content.datafeedstatuses.custombatch" call. 15835// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be 15836// non-nil. Any non-2xx status code is an error. Response headers are in 15837// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or 15838// (if a response was returned at all) in 15839// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15840// whether the returned error was because http.StatusNotModified was 15841// returned. 15842func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { 15843 gensupport.SetOptions(c.urlParams_, opts...) 15844 res, err := c.doRequest("json") 15845 if res != nil && res.StatusCode == http.StatusNotModified { 15846 if res.Body != nil { 15847 res.Body.Close() 15848 } 15849 return nil, &googleapi.Error{ 15850 Code: res.StatusCode, 15851 Header: res.Header, 15852 } 15853 } 15854 if err != nil { 15855 return nil, err 15856 } 15857 defer googleapi.CloseBody(res) 15858 if err := googleapi.CheckResponse(res); err != nil { 15859 return nil, err 15860 } 15861 ret := &DatafeedstatusesCustomBatchResponse{ 15862 ServerResponse: googleapi.ServerResponse{ 15863 Header: res.Header, 15864 HTTPStatusCode: res.StatusCode, 15865 }, 15866 } 15867 target := &ret 15868 if err := gensupport.DecodeResponse(target, res); err != nil { 15869 return nil, err 15870 } 15871 return ret, nil 15872 // { 15873 // "description": "Gets multiple Merchant Center datafeed statuses in a single request.", 15874 // "flatPath": "datafeedstatuses/batch", 15875 // "httpMethod": "POST", 15876 // "id": "content.datafeedstatuses.custombatch", 15877 // "parameterOrder": [], 15878 // "parameters": {}, 15879 // "path": "datafeedstatuses/batch", 15880 // "request": { 15881 // "$ref": "DatafeedstatusesCustomBatchRequest" 15882 // }, 15883 // "response": { 15884 // "$ref": "DatafeedstatusesCustomBatchResponse" 15885 // }, 15886 // "scopes": [ 15887 // "https://www.googleapis.com/auth/content" 15888 // ] 15889 // } 15890 15891} 15892 15893// method id "content.datafeedstatuses.get": 15894 15895type DatafeedstatusesGetCall struct { 15896 s *APIService 15897 merchantId uint64 15898 datafeedId uint64 15899 urlParams_ gensupport.URLParams 15900 ifNoneMatch_ string 15901 ctx_ context.Context 15902 header_ http.Header 15903} 15904 15905// Get: Retrieves the status of a datafeed from your Merchant Center 15906// account. 15907// 15908// - datafeedId: The ID of the datafeed. 15909// - merchantId: The ID of the account that manages the datafeed. This 15910// account cannot be a multi-client account. 15911func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { 15912 c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15913 c.merchantId = merchantId 15914 c.datafeedId = datafeedId 15915 return c 15916} 15917 15918// Country sets the optional parameter "country": The country for which 15919// to get the datafeed status. If this parameter is provided then 15920// language must also be provided. Note that this parameter is required 15921// for feeds targeting multiple countries and languages, since a feed 15922// may have a different status for each target. 15923func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { 15924 c.urlParams_.Set("country", country) 15925 return c 15926} 15927 15928// Language sets the optional parameter "language": The language for 15929// which to get the datafeed status. If this parameter is provided then 15930// country must also be provided. Note that this parameter is required 15931// for feeds targeting multiple countries and languages, since a feed 15932// may have a different status for each target. 15933func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { 15934 c.urlParams_.Set("language", language) 15935 return c 15936} 15937 15938// Fields allows partial responses to be retrieved. See 15939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15940// for more information. 15941func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 15942 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15943 return c 15944} 15945 15946// IfNoneMatch sets the optional parameter which makes the operation 15947// fail if the object's ETag matches the given value. This is useful for 15948// getting updates only after the object has changed since the last 15949// request. Use googleapi.IsNotModified to check whether the response 15950// error from Do is the result of In-None-Match. 15951func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { 15952 c.ifNoneMatch_ = entityTag 15953 return c 15954} 15955 15956// Context sets the context to be used in this call's Do method. Any 15957// pending HTTP request will be aborted if the provided context is 15958// canceled. 15959func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 15960 c.ctx_ = ctx 15961 return c 15962} 15963 15964// Header returns an http.Header that can be modified by the caller to 15965// add HTTP headers to the request. 15966func (c *DatafeedstatusesGetCall) Header() http.Header { 15967 if c.header_ == nil { 15968 c.header_ = make(http.Header) 15969 } 15970 return c.header_ 15971} 15972 15973func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { 15974 reqHeaders := make(http.Header) 15975 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 15976 for k, v := range c.header_ { 15977 reqHeaders[k] = v 15978 } 15979 reqHeaders.Set("User-Agent", c.s.userAgent()) 15980 if c.ifNoneMatch_ != "" { 15981 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15982 } 15983 var body io.Reader = nil 15984 c.urlParams_.Set("alt", alt) 15985 c.urlParams_.Set("prettyPrint", "false") 15986 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") 15987 urls += "?" + c.urlParams_.Encode() 15988 req, err := http.NewRequest("GET", urls, body) 15989 if err != nil { 15990 return nil, err 15991 } 15992 req.Header = reqHeaders 15993 googleapi.Expand(req.URL, map[string]string{ 15994 "merchantId": strconv.FormatUint(c.merchantId, 10), 15995 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15996 }) 15997 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15998} 15999 16000// Do executes the "content.datafeedstatuses.get" call. 16001// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx 16002// status code is an error. Response headers are in either 16003// *DatafeedStatus.ServerResponse.Header or (if a response was returned 16004// at all) in error.(*googleapi.Error).Header. Use 16005// googleapi.IsNotModified to check whether the returned error was 16006// because http.StatusNotModified was returned. 16007func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { 16008 gensupport.SetOptions(c.urlParams_, opts...) 16009 res, err := c.doRequest("json") 16010 if res != nil && res.StatusCode == http.StatusNotModified { 16011 if res.Body != nil { 16012 res.Body.Close() 16013 } 16014 return nil, &googleapi.Error{ 16015 Code: res.StatusCode, 16016 Header: res.Header, 16017 } 16018 } 16019 if err != nil { 16020 return nil, err 16021 } 16022 defer googleapi.CloseBody(res) 16023 if err := googleapi.CheckResponse(res); err != nil { 16024 return nil, err 16025 } 16026 ret := &DatafeedStatus{ 16027 ServerResponse: googleapi.ServerResponse{ 16028 Header: res.Header, 16029 HTTPStatusCode: res.StatusCode, 16030 }, 16031 } 16032 target := &ret 16033 if err := gensupport.DecodeResponse(target, res); err != nil { 16034 return nil, err 16035 } 16036 return ret, nil 16037 // { 16038 // "description": "Retrieves the status of a datafeed from your Merchant Center account.", 16039 // "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", 16040 // "httpMethod": "GET", 16041 // "id": "content.datafeedstatuses.get", 16042 // "parameterOrder": [ 16043 // "merchantId", 16044 // "datafeedId" 16045 // ], 16046 // "parameters": { 16047 // "country": { 16048 // "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.", 16049 // "location": "query", 16050 // "type": "string" 16051 // }, 16052 // "datafeedId": { 16053 // "description": "The ID of the datafeed.", 16054 // "format": "uint64", 16055 // "location": "path", 16056 // "required": true, 16057 // "type": "string" 16058 // }, 16059 // "language": { 16060 // "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.", 16061 // "location": "query", 16062 // "type": "string" 16063 // }, 16064 // "merchantId": { 16065 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 16066 // "format": "uint64", 16067 // "location": "path", 16068 // "required": true, 16069 // "type": "string" 16070 // } 16071 // }, 16072 // "path": "{merchantId}/datafeedstatuses/{datafeedId}", 16073 // "response": { 16074 // "$ref": "DatafeedStatus" 16075 // }, 16076 // "scopes": [ 16077 // "https://www.googleapis.com/auth/content" 16078 // ] 16079 // } 16080 16081} 16082 16083// method id "content.datafeedstatuses.list": 16084 16085type DatafeedstatusesListCall struct { 16086 s *APIService 16087 merchantId uint64 16088 urlParams_ gensupport.URLParams 16089 ifNoneMatch_ string 16090 ctx_ context.Context 16091 header_ http.Header 16092} 16093 16094// List: Lists the statuses of the datafeeds in your Merchant Center 16095// account. 16096// 16097// - merchantId: The ID of the account that manages the datafeeds. This 16098// account cannot be a multi-client account. 16099func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { 16100 c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16101 c.merchantId = merchantId 16102 return c 16103} 16104 16105// MaxResults sets the optional parameter "maxResults": The maximum 16106// number of products to return in the response, used for paging. 16107func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { 16108 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 16109 return c 16110} 16111 16112// PageToken sets the optional parameter "pageToken": The token returned 16113// by the previous request. 16114func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { 16115 c.urlParams_.Set("pageToken", pageToken) 16116 return c 16117} 16118 16119// Fields allows partial responses to be retrieved. See 16120// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16121// for more information. 16122func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 16123 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16124 return c 16125} 16126 16127// IfNoneMatch sets the optional parameter which makes the operation 16128// fail if the object's ETag matches the given value. This is useful for 16129// getting updates only after the object has changed since the last 16130// request. Use googleapi.IsNotModified to check whether the response 16131// error from Do is the result of In-None-Match. 16132func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { 16133 c.ifNoneMatch_ = entityTag 16134 return c 16135} 16136 16137// Context sets the context to be used in this call's Do method. Any 16138// pending HTTP request will be aborted if the provided context is 16139// canceled. 16140func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 16141 c.ctx_ = ctx 16142 return c 16143} 16144 16145// Header returns an http.Header that can be modified by the caller to 16146// add HTTP headers to the request. 16147func (c *DatafeedstatusesListCall) Header() http.Header { 16148 if c.header_ == nil { 16149 c.header_ = make(http.Header) 16150 } 16151 return c.header_ 16152} 16153 16154func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { 16155 reqHeaders := make(http.Header) 16156 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16157 for k, v := range c.header_ { 16158 reqHeaders[k] = v 16159 } 16160 reqHeaders.Set("User-Agent", c.s.userAgent()) 16161 if c.ifNoneMatch_ != "" { 16162 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16163 } 16164 var body io.Reader = nil 16165 c.urlParams_.Set("alt", alt) 16166 c.urlParams_.Set("prettyPrint", "false") 16167 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") 16168 urls += "?" + c.urlParams_.Encode() 16169 req, err := http.NewRequest("GET", urls, body) 16170 if err != nil { 16171 return nil, err 16172 } 16173 req.Header = reqHeaders 16174 googleapi.Expand(req.URL, map[string]string{ 16175 "merchantId": strconv.FormatUint(c.merchantId, 10), 16176 }) 16177 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16178} 16179 16180// Do executes the "content.datafeedstatuses.list" call. 16181// Exactly one of *DatafeedstatusesListResponse or error will be 16182// non-nil. Any non-2xx status code is an error. Response headers are in 16183// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a 16184// response was returned at all) in error.(*googleapi.Error).Header. Use 16185// googleapi.IsNotModified to check whether the returned error was 16186// because http.StatusNotModified was returned. 16187func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { 16188 gensupport.SetOptions(c.urlParams_, opts...) 16189 res, err := c.doRequest("json") 16190 if res != nil && res.StatusCode == http.StatusNotModified { 16191 if res.Body != nil { 16192 res.Body.Close() 16193 } 16194 return nil, &googleapi.Error{ 16195 Code: res.StatusCode, 16196 Header: res.Header, 16197 } 16198 } 16199 if err != nil { 16200 return nil, err 16201 } 16202 defer googleapi.CloseBody(res) 16203 if err := googleapi.CheckResponse(res); err != nil { 16204 return nil, err 16205 } 16206 ret := &DatafeedstatusesListResponse{ 16207 ServerResponse: googleapi.ServerResponse{ 16208 Header: res.Header, 16209 HTTPStatusCode: res.StatusCode, 16210 }, 16211 } 16212 target := &ret 16213 if err := gensupport.DecodeResponse(target, res); err != nil { 16214 return nil, err 16215 } 16216 return ret, nil 16217 // { 16218 // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", 16219 // "flatPath": "{merchantId}/datafeedstatuses", 16220 // "httpMethod": "GET", 16221 // "id": "content.datafeedstatuses.list", 16222 // "parameterOrder": [ 16223 // "merchantId" 16224 // ], 16225 // "parameters": { 16226 // "maxResults": { 16227 // "description": "The maximum number of products to return in the response, used for paging.", 16228 // "format": "uint32", 16229 // "location": "query", 16230 // "type": "integer" 16231 // }, 16232 // "merchantId": { 16233 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 16234 // "format": "uint64", 16235 // "location": "path", 16236 // "required": true, 16237 // "type": "string" 16238 // }, 16239 // "pageToken": { 16240 // "description": "The token returned by the previous request.", 16241 // "location": "query", 16242 // "type": "string" 16243 // } 16244 // }, 16245 // "path": "{merchantId}/datafeedstatuses", 16246 // "response": { 16247 // "$ref": "DatafeedstatusesListResponse" 16248 // }, 16249 // "scopes": [ 16250 // "https://www.googleapis.com/auth/content" 16251 // ] 16252 // } 16253 16254} 16255 16256// Pages invokes f for each page of results. 16257// A non-nil error returned from f will halt the iteration. 16258// The provided context supersedes any context provided to the Context method. 16259func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { 16260 c.ctx_ = ctx 16261 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16262 for { 16263 x, err := c.Do() 16264 if err != nil { 16265 return err 16266 } 16267 if err := f(x); err != nil { 16268 return err 16269 } 16270 if x.NextPageToken == "" { 16271 return nil 16272 } 16273 c.PageToken(x.NextPageToken) 16274 } 16275} 16276 16277// method id "content.inventory.custombatch": 16278 16279type InventoryCustombatchCall struct { 16280 s *APIService 16281 inventorycustombatchrequest *InventoryCustomBatchRequest 16282 urlParams_ gensupport.URLParams 16283 ctx_ context.Context 16284 header_ http.Header 16285} 16286 16287// Custombatch: Updates price and availability for multiple products or 16288// stores in a single request. This operation does not update the 16289// expiration date of the products. 16290func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall { 16291 c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16292 c.inventorycustombatchrequest = inventorycustombatchrequest 16293 return c 16294} 16295 16296// DryRun sets the optional parameter "dryRun": Flag to simulate a 16297// request like in a live environment. If set to true, dry-run mode 16298// checks the validity of the request and returns errors (if any). 16299func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall { 16300 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16301 return c 16302} 16303 16304// Fields allows partial responses to be retrieved. See 16305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16306// for more information. 16307func (c *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall { 16308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16309 return c 16310} 16311 16312// Context sets the context to be used in this call's Do method. Any 16313// pending HTTP request will be aborted if the provided context is 16314// canceled. 16315func (c *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall { 16316 c.ctx_ = ctx 16317 return c 16318} 16319 16320// Header returns an http.Header that can be modified by the caller to 16321// add HTTP headers to the request. 16322func (c *InventoryCustombatchCall) Header() http.Header { 16323 if c.header_ == nil { 16324 c.header_ = make(http.Header) 16325 } 16326 return c.header_ 16327} 16328 16329func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { 16330 reqHeaders := make(http.Header) 16331 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16332 for k, v := range c.header_ { 16333 reqHeaders[k] = v 16334 } 16335 reqHeaders.Set("User-Agent", c.s.userAgent()) 16336 var body io.Reader = nil 16337 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest) 16338 if err != nil { 16339 return nil, err 16340 } 16341 reqHeaders.Set("Content-Type", "application/json") 16342 c.urlParams_.Set("alt", alt) 16343 c.urlParams_.Set("prettyPrint", "false") 16344 urls := googleapi.ResolveRelative(c.s.BasePath, "inventory/batch") 16345 urls += "?" + c.urlParams_.Encode() 16346 req, err := http.NewRequest("POST", urls, body) 16347 if err != nil { 16348 return nil, err 16349 } 16350 req.Header = reqHeaders 16351 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16352} 16353 16354// Do executes the "content.inventory.custombatch" call. 16355// Exactly one of *InventoryCustomBatchResponse or error will be 16356// non-nil. Any non-2xx status code is an error. Response headers are in 16357// either *InventoryCustomBatchResponse.ServerResponse.Header or (if a 16358// response was returned at all) in error.(*googleapi.Error).Header. Use 16359// googleapi.IsNotModified to check whether the returned error was 16360// because http.StatusNotModified was returned. 16361func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) { 16362 gensupport.SetOptions(c.urlParams_, opts...) 16363 res, err := c.doRequest("json") 16364 if res != nil && res.StatusCode == http.StatusNotModified { 16365 if res.Body != nil { 16366 res.Body.Close() 16367 } 16368 return nil, &googleapi.Error{ 16369 Code: res.StatusCode, 16370 Header: res.Header, 16371 } 16372 } 16373 if err != nil { 16374 return nil, err 16375 } 16376 defer googleapi.CloseBody(res) 16377 if err := googleapi.CheckResponse(res); err != nil { 16378 return nil, err 16379 } 16380 ret := &InventoryCustomBatchResponse{ 16381 ServerResponse: googleapi.ServerResponse{ 16382 Header: res.Header, 16383 HTTPStatusCode: res.StatusCode, 16384 }, 16385 } 16386 target := &ret 16387 if err := gensupport.DecodeResponse(target, res); err != nil { 16388 return nil, err 16389 } 16390 return ret, nil 16391 // { 16392 // "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.", 16393 // "flatPath": "inventory/batch", 16394 // "httpMethod": "POST", 16395 // "id": "content.inventory.custombatch", 16396 // "parameterOrder": [], 16397 // "parameters": { 16398 // "dryRun": { 16399 // "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).", 16400 // "location": "query", 16401 // "type": "boolean" 16402 // } 16403 // }, 16404 // "path": "inventory/batch", 16405 // "request": { 16406 // "$ref": "InventoryCustomBatchRequest" 16407 // }, 16408 // "response": { 16409 // "$ref": "InventoryCustomBatchResponse" 16410 // }, 16411 // "scopes": [ 16412 // "https://www.googleapis.com/auth/content" 16413 // ] 16414 // } 16415 16416} 16417 16418// method id "content.inventory.set": 16419 16420type InventorySetCall struct { 16421 s *APIService 16422 merchantId uint64 16423 storeCode string 16424 productId string 16425 inventorysetrequest *InventorySetRequest 16426 urlParams_ gensupport.URLParams 16427 ctx_ context.Context 16428 header_ http.Header 16429} 16430 16431// Set: Updates price and availability of a product in your Merchant 16432// Center account. 16433// 16434// - merchantId: The ID of the account that contains the product. This 16435// account cannot be a multi-client account. 16436// - productId: The REST ID of the product for which to update price and 16437// availability. 16438// - storeCode: The code of the store for which to update price and 16439// availability. Use `online` to update price and availability of an 16440// online product. 16441func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall { 16442 c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16443 c.merchantId = merchantId 16444 c.storeCode = storeCode 16445 c.productId = productId 16446 c.inventorysetrequest = inventorysetrequest 16447 return c 16448} 16449 16450// DryRun sets the optional parameter "dryRun": Flag to simulate a 16451// request like in a live environment. If set to true, dry-run mode 16452// checks the validity of the request and returns errors (if any). 16453func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall { 16454 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16455 return c 16456} 16457 16458// Fields allows partial responses to be retrieved. See 16459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16460// for more information. 16461func (c *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall { 16462 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16463 return c 16464} 16465 16466// Context sets the context to be used in this call's Do method. Any 16467// pending HTTP request will be aborted if the provided context is 16468// canceled. 16469func (c *InventorySetCall) Context(ctx context.Context) *InventorySetCall { 16470 c.ctx_ = ctx 16471 return c 16472} 16473 16474// Header returns an http.Header that can be modified by the caller to 16475// add HTTP headers to the request. 16476func (c *InventorySetCall) Header() http.Header { 16477 if c.header_ == nil { 16478 c.header_ = make(http.Header) 16479 } 16480 return c.header_ 16481} 16482 16483func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) { 16484 reqHeaders := make(http.Header) 16485 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16486 for k, v := range c.header_ { 16487 reqHeaders[k] = v 16488 } 16489 reqHeaders.Set("User-Agent", c.s.userAgent()) 16490 var body io.Reader = nil 16491 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest) 16492 if err != nil { 16493 return nil, err 16494 } 16495 reqHeaders.Set("Content-Type", "application/json") 16496 c.urlParams_.Set("alt", alt) 16497 c.urlParams_.Set("prettyPrint", "false") 16498 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/inventory/{storeCode}/products/{productId}") 16499 urls += "?" + c.urlParams_.Encode() 16500 req, err := http.NewRequest("POST", urls, body) 16501 if err != nil { 16502 return nil, err 16503 } 16504 req.Header = reqHeaders 16505 googleapi.Expand(req.URL, map[string]string{ 16506 "merchantId": strconv.FormatUint(c.merchantId, 10), 16507 "storeCode": c.storeCode, 16508 "productId": c.productId, 16509 }) 16510 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16511} 16512 16513// Do executes the "content.inventory.set" call. 16514// Exactly one of *InventorySetResponse or error will be non-nil. Any 16515// non-2xx status code is an error. Response headers are in either 16516// *InventorySetResponse.ServerResponse.Header or (if a response was 16517// returned at all) in error.(*googleapi.Error).Header. Use 16518// googleapi.IsNotModified to check whether the returned error was 16519// because http.StatusNotModified was returned. 16520func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) { 16521 gensupport.SetOptions(c.urlParams_, opts...) 16522 res, err := c.doRequest("json") 16523 if res != nil && res.StatusCode == http.StatusNotModified { 16524 if res.Body != nil { 16525 res.Body.Close() 16526 } 16527 return nil, &googleapi.Error{ 16528 Code: res.StatusCode, 16529 Header: res.Header, 16530 } 16531 } 16532 if err != nil { 16533 return nil, err 16534 } 16535 defer googleapi.CloseBody(res) 16536 if err := googleapi.CheckResponse(res); err != nil { 16537 return nil, err 16538 } 16539 ret := &InventorySetResponse{ 16540 ServerResponse: googleapi.ServerResponse{ 16541 Header: res.Header, 16542 HTTPStatusCode: res.StatusCode, 16543 }, 16544 } 16545 target := &ret 16546 if err := gensupport.DecodeResponse(target, res); err != nil { 16547 return nil, err 16548 } 16549 return ret, nil 16550 // { 16551 // "description": "Updates price and availability of a product in your Merchant Center account.", 16552 // "flatPath": "{merchantId}/inventory/{storeCode}/products/{productId}", 16553 // "httpMethod": "POST", 16554 // "id": "content.inventory.set", 16555 // "parameterOrder": [ 16556 // "merchantId", 16557 // "storeCode", 16558 // "productId" 16559 // ], 16560 // "parameters": { 16561 // "dryRun": { 16562 // "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).", 16563 // "location": "query", 16564 // "type": "boolean" 16565 // }, 16566 // "merchantId": { 16567 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 16568 // "format": "uint64", 16569 // "location": "path", 16570 // "required": true, 16571 // "type": "string" 16572 // }, 16573 // "productId": { 16574 // "description": "The REST ID of the product for which to update price and availability.", 16575 // "location": "path", 16576 // "required": true, 16577 // "type": "string" 16578 // }, 16579 // "storeCode": { 16580 // "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", 16581 // "location": "path", 16582 // "required": true, 16583 // "type": "string" 16584 // } 16585 // }, 16586 // "path": "{merchantId}/inventory/{storeCode}/products/{productId}", 16587 // "request": { 16588 // "$ref": "InventorySetRequest" 16589 // }, 16590 // "response": { 16591 // "$ref": "InventorySetResponse" 16592 // }, 16593 // "scopes": [ 16594 // "https://www.googleapis.com/auth/content" 16595 // ] 16596 // } 16597 16598} 16599 16600// method id "content.liasettings.custombatch": 16601 16602type LiasettingsCustombatchCall struct { 16603 s *APIService 16604 liasettingscustombatchrequest *LiasettingsCustomBatchRequest 16605 urlParams_ gensupport.URLParams 16606 ctx_ context.Context 16607 header_ http.Header 16608} 16609 16610// Custombatch: Retrieves and/or updates the LIA settings of multiple 16611// accounts in a single request. 16612func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { 16613 c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16614 c.liasettingscustombatchrequest = liasettingscustombatchrequest 16615 return c 16616} 16617 16618// DryRun sets the optional parameter "dryRun": Flag to simulate a 16619// request like in a live environment. If set to true, dry-run mode 16620// checks the validity of the request and returns errors (if any). 16621func (c *LiasettingsCustombatchCall) DryRun(dryRun bool) *LiasettingsCustombatchCall { 16622 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16623 return c 16624} 16625 16626// Fields allows partial responses to be retrieved. See 16627// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16628// for more information. 16629func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { 16630 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16631 return c 16632} 16633 16634// Context sets the context to be used in this call's Do method. Any 16635// pending HTTP request will be aborted if the provided context is 16636// canceled. 16637func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { 16638 c.ctx_ = ctx 16639 return c 16640} 16641 16642// Header returns an http.Header that can be modified by the caller to 16643// add HTTP headers to the request. 16644func (c *LiasettingsCustombatchCall) Header() http.Header { 16645 if c.header_ == nil { 16646 c.header_ = make(http.Header) 16647 } 16648 return c.header_ 16649} 16650 16651func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 16652 reqHeaders := make(http.Header) 16653 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16654 for k, v := range c.header_ { 16655 reqHeaders[k] = v 16656 } 16657 reqHeaders.Set("User-Agent", c.s.userAgent()) 16658 var body io.Reader = nil 16659 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) 16660 if err != nil { 16661 return nil, err 16662 } 16663 reqHeaders.Set("Content-Type", "application/json") 16664 c.urlParams_.Set("alt", alt) 16665 c.urlParams_.Set("prettyPrint", "false") 16666 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") 16667 urls += "?" + c.urlParams_.Encode() 16668 req, err := http.NewRequest("POST", urls, body) 16669 if err != nil { 16670 return nil, err 16671 } 16672 req.Header = reqHeaders 16673 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16674} 16675 16676// Do executes the "content.liasettings.custombatch" call. 16677// Exactly one of *LiasettingsCustomBatchResponse or error will be 16678// non-nil. Any non-2xx status code is an error. Response headers are in 16679// either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a 16680// response was returned at all) in error.(*googleapi.Error).Header. Use 16681// googleapi.IsNotModified to check whether the returned error was 16682// because http.StatusNotModified was returned. 16683func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { 16684 gensupport.SetOptions(c.urlParams_, opts...) 16685 res, err := c.doRequest("json") 16686 if res != nil && res.StatusCode == http.StatusNotModified { 16687 if res.Body != nil { 16688 res.Body.Close() 16689 } 16690 return nil, &googleapi.Error{ 16691 Code: res.StatusCode, 16692 Header: res.Header, 16693 } 16694 } 16695 if err != nil { 16696 return nil, err 16697 } 16698 defer googleapi.CloseBody(res) 16699 if err := googleapi.CheckResponse(res); err != nil { 16700 return nil, err 16701 } 16702 ret := &LiasettingsCustomBatchResponse{ 16703 ServerResponse: googleapi.ServerResponse{ 16704 Header: res.Header, 16705 HTTPStatusCode: res.StatusCode, 16706 }, 16707 } 16708 target := &ret 16709 if err := gensupport.DecodeResponse(target, res); err != nil { 16710 return nil, err 16711 } 16712 return ret, nil 16713 // { 16714 // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", 16715 // "flatPath": "liasettings/batch", 16716 // "httpMethod": "POST", 16717 // "id": "content.liasettings.custombatch", 16718 // "parameterOrder": [], 16719 // "parameters": { 16720 // "dryRun": { 16721 // "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).", 16722 // "location": "query", 16723 // "type": "boolean" 16724 // } 16725 // }, 16726 // "path": "liasettings/batch", 16727 // "request": { 16728 // "$ref": "LiasettingsCustomBatchRequest" 16729 // }, 16730 // "response": { 16731 // "$ref": "LiasettingsCustomBatchResponse" 16732 // }, 16733 // "scopes": [ 16734 // "https://www.googleapis.com/auth/content" 16735 // ] 16736 // } 16737 16738} 16739 16740// method id "content.liasettings.get": 16741 16742type LiasettingsGetCall struct { 16743 s *APIService 16744 merchantId uint64 16745 accountId uint64 16746 urlParams_ gensupport.URLParams 16747 ifNoneMatch_ string 16748 ctx_ context.Context 16749 header_ http.Header 16750} 16751 16752// Get: Retrieves the LIA settings of the account. 16753// 16754// - accountId: The ID of the account for which to get or update LIA 16755// settings. 16756// - merchantId: The ID of the managing account. If this parameter is 16757// not the same as accountId, then this account must be a multi-client 16758// account and `accountId` must be the ID of a sub-account of this 16759// account. 16760func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { 16761 c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16762 c.merchantId = merchantId 16763 c.accountId = accountId 16764 return c 16765} 16766 16767// Fields allows partial responses to be retrieved. See 16768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16769// for more information. 16770func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { 16771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16772 return c 16773} 16774 16775// IfNoneMatch sets the optional parameter which makes the operation 16776// fail if the object's ETag matches the given value. This is useful for 16777// getting updates only after the object has changed since the last 16778// request. Use googleapi.IsNotModified to check whether the response 16779// error from Do is the result of In-None-Match. 16780func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { 16781 c.ifNoneMatch_ = entityTag 16782 return c 16783} 16784 16785// Context sets the context to be used in this call's Do method. Any 16786// pending HTTP request will be aborted if the provided context is 16787// canceled. 16788func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { 16789 c.ctx_ = ctx 16790 return c 16791} 16792 16793// Header returns an http.Header that can be modified by the caller to 16794// add HTTP headers to the request. 16795func (c *LiasettingsGetCall) Header() http.Header { 16796 if c.header_ == nil { 16797 c.header_ = make(http.Header) 16798 } 16799 return c.header_ 16800} 16801 16802func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { 16803 reqHeaders := make(http.Header) 16804 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16805 for k, v := range c.header_ { 16806 reqHeaders[k] = v 16807 } 16808 reqHeaders.Set("User-Agent", c.s.userAgent()) 16809 if c.ifNoneMatch_ != "" { 16810 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16811 } 16812 var body io.Reader = nil 16813 c.urlParams_.Set("alt", alt) 16814 c.urlParams_.Set("prettyPrint", "false") 16815 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 16816 urls += "?" + c.urlParams_.Encode() 16817 req, err := http.NewRequest("GET", urls, body) 16818 if err != nil { 16819 return nil, err 16820 } 16821 req.Header = reqHeaders 16822 googleapi.Expand(req.URL, map[string]string{ 16823 "merchantId": strconv.FormatUint(c.merchantId, 10), 16824 "accountId": strconv.FormatUint(c.accountId, 10), 16825 }) 16826 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16827} 16828 16829// Do executes the "content.liasettings.get" call. 16830// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 16831// status code is an error. Response headers are in either 16832// *LiaSettings.ServerResponse.Header or (if a response was returned at 16833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16834// to check whether the returned error was because 16835// http.StatusNotModified was returned. 16836func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 16837 gensupport.SetOptions(c.urlParams_, opts...) 16838 res, err := c.doRequest("json") 16839 if res != nil && res.StatusCode == http.StatusNotModified { 16840 if res.Body != nil { 16841 res.Body.Close() 16842 } 16843 return nil, &googleapi.Error{ 16844 Code: res.StatusCode, 16845 Header: res.Header, 16846 } 16847 } 16848 if err != nil { 16849 return nil, err 16850 } 16851 defer googleapi.CloseBody(res) 16852 if err := googleapi.CheckResponse(res); err != nil { 16853 return nil, err 16854 } 16855 ret := &LiaSettings{ 16856 ServerResponse: googleapi.ServerResponse{ 16857 Header: res.Header, 16858 HTTPStatusCode: res.StatusCode, 16859 }, 16860 } 16861 target := &ret 16862 if err := gensupport.DecodeResponse(target, res); err != nil { 16863 return nil, err 16864 } 16865 return ret, nil 16866 // { 16867 // "description": "Retrieves the LIA settings of the account.", 16868 // "flatPath": "{merchantId}/liasettings/{accountId}", 16869 // "httpMethod": "GET", 16870 // "id": "content.liasettings.get", 16871 // "parameterOrder": [ 16872 // "merchantId", 16873 // "accountId" 16874 // ], 16875 // "parameters": { 16876 // "accountId": { 16877 // "description": "The ID of the account for which to get or update LIA settings.", 16878 // "format": "uint64", 16879 // "location": "path", 16880 // "required": true, 16881 // "type": "string" 16882 // }, 16883 // "merchantId": { 16884 // "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.", 16885 // "format": "uint64", 16886 // "location": "path", 16887 // "required": true, 16888 // "type": "string" 16889 // } 16890 // }, 16891 // "path": "{merchantId}/liasettings/{accountId}", 16892 // "response": { 16893 // "$ref": "LiaSettings" 16894 // }, 16895 // "scopes": [ 16896 // "https://www.googleapis.com/auth/content" 16897 // ] 16898 // } 16899 16900} 16901 16902// method id "content.liasettings.getaccessiblegmbaccounts": 16903 16904type LiasettingsGetaccessiblegmbaccountsCall struct { 16905 s *APIService 16906 merchantId uint64 16907 accountId uint64 16908 urlParams_ gensupport.URLParams 16909 ifNoneMatch_ string 16910 ctx_ context.Context 16911 header_ http.Header 16912} 16913 16914// Getaccessiblegmbaccounts: Retrieves the list of accessible Google My 16915// Business accounts. 16916// 16917// - accountId: The ID of the account for which to retrieve accessible 16918// Google My Business accounts. 16919// - merchantId: The ID of the managing account. If this parameter is 16920// not the same as accountId, then this account must be a multi-client 16921// account and `accountId` must be the ID of a sub-account of this 16922// account. 16923func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { 16924 c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16925 c.merchantId = merchantId 16926 c.accountId = accountId 16927 return c 16928} 16929 16930// Fields allows partial responses to be retrieved. See 16931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16932// for more information. 16933func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { 16934 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16935 return c 16936} 16937 16938// IfNoneMatch sets the optional parameter which makes the operation 16939// fail if the object's ETag matches the given value. This is useful for 16940// getting updates only after the object has changed since the last 16941// request. Use googleapi.IsNotModified to check whether the response 16942// error from Do is the result of In-None-Match. 16943func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { 16944 c.ifNoneMatch_ = entityTag 16945 return c 16946} 16947 16948// Context sets the context to be used in this call's Do method. Any 16949// pending HTTP request will be aborted if the provided context is 16950// canceled. 16951func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { 16952 c.ctx_ = ctx 16953 return c 16954} 16955 16956// Header returns an http.Header that can be modified by the caller to 16957// add HTTP headers to the request. 16958func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { 16959 if c.header_ == nil { 16960 c.header_ = make(http.Header) 16961 } 16962 return c.header_ 16963} 16964 16965func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { 16966 reqHeaders := make(http.Header) 16967 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 16968 for k, v := range c.header_ { 16969 reqHeaders[k] = v 16970 } 16971 reqHeaders.Set("User-Agent", c.s.userAgent()) 16972 if c.ifNoneMatch_ != "" { 16973 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16974 } 16975 var body io.Reader = nil 16976 c.urlParams_.Set("alt", alt) 16977 c.urlParams_.Set("prettyPrint", "false") 16978 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") 16979 urls += "?" + c.urlParams_.Encode() 16980 req, err := http.NewRequest("GET", urls, body) 16981 if err != nil { 16982 return nil, err 16983 } 16984 req.Header = reqHeaders 16985 googleapi.Expand(req.URL, map[string]string{ 16986 "merchantId": strconv.FormatUint(c.merchantId, 10), 16987 "accountId": strconv.FormatUint(c.accountId, 10), 16988 }) 16989 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16990} 16991 16992// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. 16993// Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error 16994// will be non-nil. Any non-2xx status code is an error. Response 16995// headers are in either 16996// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or 16997// (if a response was returned at all) in 16998// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16999// whether the returned error was because http.StatusNotModified was 17000// returned. 17001func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { 17002 gensupport.SetOptions(c.urlParams_, opts...) 17003 res, err := c.doRequest("json") 17004 if res != nil && res.StatusCode == http.StatusNotModified { 17005 if res.Body != nil { 17006 res.Body.Close() 17007 } 17008 return nil, &googleapi.Error{ 17009 Code: res.StatusCode, 17010 Header: res.Header, 17011 } 17012 } 17013 if err != nil { 17014 return nil, err 17015 } 17016 defer googleapi.CloseBody(res) 17017 if err := googleapi.CheckResponse(res); err != nil { 17018 return nil, err 17019 } 17020 ret := &LiasettingsGetAccessibleGmbAccountsResponse{ 17021 ServerResponse: googleapi.ServerResponse{ 17022 Header: res.Header, 17023 HTTPStatusCode: res.StatusCode, 17024 }, 17025 } 17026 target := &ret 17027 if err := gensupport.DecodeResponse(target, res); err != nil { 17028 return nil, err 17029 } 17030 return ret, nil 17031 // { 17032 // "description": "Retrieves the list of accessible Google My Business accounts.", 17033 // "flatPath": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 17034 // "httpMethod": "GET", 17035 // "id": "content.liasettings.getaccessiblegmbaccounts", 17036 // "parameterOrder": [ 17037 // "merchantId", 17038 // "accountId" 17039 // ], 17040 // "parameters": { 17041 // "accountId": { 17042 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 17043 // "format": "uint64", 17044 // "location": "path", 17045 // "required": true, 17046 // "type": "string" 17047 // }, 17048 // "merchantId": { 17049 // "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.", 17050 // "format": "uint64", 17051 // "location": "path", 17052 // "required": true, 17053 // "type": "string" 17054 // } 17055 // }, 17056 // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 17057 // "response": { 17058 // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" 17059 // }, 17060 // "scopes": [ 17061 // "https://www.googleapis.com/auth/content" 17062 // ] 17063 // } 17064 17065} 17066 17067// method id "content.liasettings.list": 17068 17069type LiasettingsListCall struct { 17070 s *APIService 17071 merchantId uint64 17072 urlParams_ gensupport.URLParams 17073 ifNoneMatch_ string 17074 ctx_ context.Context 17075 header_ http.Header 17076} 17077 17078// List: Lists the LIA settings of the sub-accounts in your Merchant 17079// Center account. 17080// 17081// - merchantId: The ID of the managing account. This must be a 17082// multi-client account. 17083func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { 17084 c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17085 c.merchantId = merchantId 17086 return c 17087} 17088 17089// MaxResults sets the optional parameter "maxResults": The maximum 17090// number of LIA settings to return in the response, used for paging. 17091func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { 17092 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 17093 return c 17094} 17095 17096// PageToken sets the optional parameter "pageToken": The token returned 17097// by the previous request. 17098func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { 17099 c.urlParams_.Set("pageToken", pageToken) 17100 return c 17101} 17102 17103// Fields allows partial responses to be retrieved. See 17104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17105// for more information. 17106func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { 17107 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17108 return c 17109} 17110 17111// IfNoneMatch sets the optional parameter which makes the operation 17112// fail if the object's ETag matches the given value. This is useful for 17113// getting updates only after the object has changed since the last 17114// request. Use googleapi.IsNotModified to check whether the response 17115// error from Do is the result of In-None-Match. 17116func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { 17117 c.ifNoneMatch_ = entityTag 17118 return c 17119} 17120 17121// Context sets the context to be used in this call's Do method. Any 17122// pending HTTP request will be aborted if the provided context is 17123// canceled. 17124func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { 17125 c.ctx_ = ctx 17126 return c 17127} 17128 17129// Header returns an http.Header that can be modified by the caller to 17130// add HTTP headers to the request. 17131func (c *LiasettingsListCall) Header() http.Header { 17132 if c.header_ == nil { 17133 c.header_ = make(http.Header) 17134 } 17135 return c.header_ 17136} 17137 17138func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { 17139 reqHeaders := make(http.Header) 17140 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17141 for k, v := range c.header_ { 17142 reqHeaders[k] = v 17143 } 17144 reqHeaders.Set("User-Agent", c.s.userAgent()) 17145 if c.ifNoneMatch_ != "" { 17146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17147 } 17148 var body io.Reader = nil 17149 c.urlParams_.Set("alt", alt) 17150 c.urlParams_.Set("prettyPrint", "false") 17151 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") 17152 urls += "?" + c.urlParams_.Encode() 17153 req, err := http.NewRequest("GET", urls, body) 17154 if err != nil { 17155 return nil, err 17156 } 17157 req.Header = reqHeaders 17158 googleapi.Expand(req.URL, map[string]string{ 17159 "merchantId": strconv.FormatUint(c.merchantId, 10), 17160 }) 17161 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17162} 17163 17164// Do executes the "content.liasettings.list" call. 17165// Exactly one of *LiasettingsListResponse or error will be non-nil. Any 17166// non-2xx status code is an error. Response headers are in either 17167// *LiasettingsListResponse.ServerResponse.Header or (if a response was 17168// returned at all) in error.(*googleapi.Error).Header. Use 17169// googleapi.IsNotModified to check whether the returned error was 17170// because http.StatusNotModified was returned. 17171func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { 17172 gensupport.SetOptions(c.urlParams_, opts...) 17173 res, err := c.doRequest("json") 17174 if res != nil && res.StatusCode == http.StatusNotModified { 17175 if res.Body != nil { 17176 res.Body.Close() 17177 } 17178 return nil, &googleapi.Error{ 17179 Code: res.StatusCode, 17180 Header: res.Header, 17181 } 17182 } 17183 if err != nil { 17184 return nil, err 17185 } 17186 defer googleapi.CloseBody(res) 17187 if err := googleapi.CheckResponse(res); err != nil { 17188 return nil, err 17189 } 17190 ret := &LiasettingsListResponse{ 17191 ServerResponse: googleapi.ServerResponse{ 17192 Header: res.Header, 17193 HTTPStatusCode: res.StatusCode, 17194 }, 17195 } 17196 target := &ret 17197 if err := gensupport.DecodeResponse(target, res); err != nil { 17198 return nil, err 17199 } 17200 return ret, nil 17201 // { 17202 // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", 17203 // "flatPath": "{merchantId}/liasettings", 17204 // "httpMethod": "GET", 17205 // "id": "content.liasettings.list", 17206 // "parameterOrder": [ 17207 // "merchantId" 17208 // ], 17209 // "parameters": { 17210 // "maxResults": { 17211 // "description": "The maximum number of LIA settings to return in the response, used for paging.", 17212 // "format": "uint32", 17213 // "location": "query", 17214 // "type": "integer" 17215 // }, 17216 // "merchantId": { 17217 // "description": "The ID of the managing account. This must be a multi-client account.", 17218 // "format": "uint64", 17219 // "location": "path", 17220 // "required": true, 17221 // "type": "string" 17222 // }, 17223 // "pageToken": { 17224 // "description": "The token returned by the previous request.", 17225 // "location": "query", 17226 // "type": "string" 17227 // } 17228 // }, 17229 // "path": "{merchantId}/liasettings", 17230 // "response": { 17231 // "$ref": "LiasettingsListResponse" 17232 // }, 17233 // "scopes": [ 17234 // "https://www.googleapis.com/auth/content" 17235 // ] 17236 // } 17237 17238} 17239 17240// Pages invokes f for each page of results. 17241// A non-nil error returned from f will halt the iteration. 17242// The provided context supersedes any context provided to the Context method. 17243func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { 17244 c.ctx_ = ctx 17245 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17246 for { 17247 x, err := c.Do() 17248 if err != nil { 17249 return err 17250 } 17251 if err := f(x); err != nil { 17252 return err 17253 } 17254 if x.NextPageToken == "" { 17255 return nil 17256 } 17257 c.PageToken(x.NextPageToken) 17258 } 17259} 17260 17261// method id "content.liasettings.listposdataproviders": 17262 17263type LiasettingsListposdataprovidersCall struct { 17264 s *APIService 17265 urlParams_ gensupport.URLParams 17266 ifNoneMatch_ string 17267 ctx_ context.Context 17268 header_ http.Header 17269} 17270 17271// Listposdataproviders: Retrieves the list of POS data providers that 17272// have active settings for the all eiligible countries. 17273func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { 17274 c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17275 return c 17276} 17277 17278// Fields allows partial responses to be retrieved. See 17279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17280// for more information. 17281func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { 17282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17283 return c 17284} 17285 17286// IfNoneMatch sets the optional parameter which makes the operation 17287// fail if the object's ETag matches the given value. This is useful for 17288// getting updates only after the object has changed since the last 17289// request. Use googleapi.IsNotModified to check whether the response 17290// error from Do is the result of In-None-Match. 17291func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { 17292 c.ifNoneMatch_ = entityTag 17293 return c 17294} 17295 17296// Context sets the context to be used in this call's Do method. Any 17297// pending HTTP request will be aborted if the provided context is 17298// canceled. 17299func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { 17300 c.ctx_ = ctx 17301 return c 17302} 17303 17304// Header returns an http.Header that can be modified by the caller to 17305// add HTTP headers to the request. 17306func (c *LiasettingsListposdataprovidersCall) Header() http.Header { 17307 if c.header_ == nil { 17308 c.header_ = make(http.Header) 17309 } 17310 return c.header_ 17311} 17312 17313func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { 17314 reqHeaders := make(http.Header) 17315 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17316 for k, v := range c.header_ { 17317 reqHeaders[k] = v 17318 } 17319 reqHeaders.Set("User-Agent", c.s.userAgent()) 17320 if c.ifNoneMatch_ != "" { 17321 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17322 } 17323 var body io.Reader = nil 17324 c.urlParams_.Set("alt", alt) 17325 c.urlParams_.Set("prettyPrint", "false") 17326 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") 17327 urls += "?" + c.urlParams_.Encode() 17328 req, err := http.NewRequest("GET", urls, body) 17329 if err != nil { 17330 return nil, err 17331 } 17332 req.Header = reqHeaders 17333 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17334} 17335 17336// Do executes the "content.liasettings.listposdataproviders" call. 17337// Exactly one of *LiasettingsListPosDataProvidersResponse or error will 17338// be non-nil. Any non-2xx status code is an error. Response headers are 17339// in either 17340// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if 17341// a response was returned at all) in error.(*googleapi.Error).Header. 17342// Use googleapi.IsNotModified to check whether the returned error was 17343// because http.StatusNotModified was returned. 17344func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { 17345 gensupport.SetOptions(c.urlParams_, opts...) 17346 res, err := c.doRequest("json") 17347 if res != nil && res.StatusCode == http.StatusNotModified { 17348 if res.Body != nil { 17349 res.Body.Close() 17350 } 17351 return nil, &googleapi.Error{ 17352 Code: res.StatusCode, 17353 Header: res.Header, 17354 } 17355 } 17356 if err != nil { 17357 return nil, err 17358 } 17359 defer googleapi.CloseBody(res) 17360 if err := googleapi.CheckResponse(res); err != nil { 17361 return nil, err 17362 } 17363 ret := &LiasettingsListPosDataProvidersResponse{ 17364 ServerResponse: googleapi.ServerResponse{ 17365 Header: res.Header, 17366 HTTPStatusCode: res.StatusCode, 17367 }, 17368 } 17369 target := &ret 17370 if err := gensupport.DecodeResponse(target, res); err != nil { 17371 return nil, err 17372 } 17373 return ret, nil 17374 // { 17375 // "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.", 17376 // "flatPath": "liasettings/posdataproviders", 17377 // "httpMethod": "GET", 17378 // "id": "content.liasettings.listposdataproviders", 17379 // "parameterOrder": [], 17380 // "parameters": {}, 17381 // "path": "liasettings/posdataproviders", 17382 // "response": { 17383 // "$ref": "LiasettingsListPosDataProvidersResponse" 17384 // }, 17385 // "scopes": [ 17386 // "https://www.googleapis.com/auth/content" 17387 // ] 17388 // } 17389 17390} 17391 17392// method id "content.liasettings.requestgmbaccess": 17393 17394type LiasettingsRequestgmbaccessCall struct { 17395 s *APIService 17396 merchantId uint64 17397 accountId uint64 17398 urlParams_ gensupport.URLParams 17399 ctx_ context.Context 17400 header_ http.Header 17401} 17402 17403// Requestgmbaccess: Requests access to a specified Google My Business 17404// account. 17405// 17406// - accountId: The ID of the account for which GMB access is requested. 17407// - gmbEmail: The email of the Google My Business account. 17408// - merchantId: The ID of the managing account. If this parameter is 17409// not the same as accountId, then this account must be a multi-client 17410// account and `accountId` must be the ID of a sub-account of this 17411// account. 17412func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { 17413 c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17414 c.merchantId = merchantId 17415 c.accountId = accountId 17416 c.urlParams_.Set("gmbEmail", gmbEmail) 17417 return c 17418} 17419 17420// Fields allows partial responses to be retrieved. See 17421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17422// for more information. 17423func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { 17424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17425 return c 17426} 17427 17428// Context sets the context to be used in this call's Do method. Any 17429// pending HTTP request will be aborted if the provided context is 17430// canceled. 17431func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { 17432 c.ctx_ = ctx 17433 return c 17434} 17435 17436// Header returns an http.Header that can be modified by the caller to 17437// add HTTP headers to the request. 17438func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { 17439 if c.header_ == nil { 17440 c.header_ = make(http.Header) 17441 } 17442 return c.header_ 17443} 17444 17445func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { 17446 reqHeaders := make(http.Header) 17447 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17448 for k, v := range c.header_ { 17449 reqHeaders[k] = v 17450 } 17451 reqHeaders.Set("User-Agent", c.s.userAgent()) 17452 var body io.Reader = nil 17453 c.urlParams_.Set("alt", alt) 17454 c.urlParams_.Set("prettyPrint", "false") 17455 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") 17456 urls += "?" + c.urlParams_.Encode() 17457 req, err := http.NewRequest("POST", urls, body) 17458 if err != nil { 17459 return nil, err 17460 } 17461 req.Header = reqHeaders 17462 googleapi.Expand(req.URL, map[string]string{ 17463 "merchantId": strconv.FormatUint(c.merchantId, 10), 17464 "accountId": strconv.FormatUint(c.accountId, 10), 17465 }) 17466 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17467} 17468 17469// Do executes the "content.liasettings.requestgmbaccess" call. 17470// Exactly one of *LiasettingsRequestGmbAccessResponse or error will be 17471// non-nil. Any non-2xx status code is an error. Response headers are in 17472// either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or 17473// (if a response was returned at all) in 17474// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17475// whether the returned error was because http.StatusNotModified was 17476// returned. 17477func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { 17478 gensupport.SetOptions(c.urlParams_, opts...) 17479 res, err := c.doRequest("json") 17480 if res != nil && res.StatusCode == http.StatusNotModified { 17481 if res.Body != nil { 17482 res.Body.Close() 17483 } 17484 return nil, &googleapi.Error{ 17485 Code: res.StatusCode, 17486 Header: res.Header, 17487 } 17488 } 17489 if err != nil { 17490 return nil, err 17491 } 17492 defer googleapi.CloseBody(res) 17493 if err := googleapi.CheckResponse(res); err != nil { 17494 return nil, err 17495 } 17496 ret := &LiasettingsRequestGmbAccessResponse{ 17497 ServerResponse: googleapi.ServerResponse{ 17498 Header: res.Header, 17499 HTTPStatusCode: res.StatusCode, 17500 }, 17501 } 17502 target := &ret 17503 if err := gensupport.DecodeResponse(target, res); err != nil { 17504 return nil, err 17505 } 17506 return ret, nil 17507 // { 17508 // "description": "Requests access to a specified Google My Business account.", 17509 // "flatPath": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 17510 // "httpMethod": "POST", 17511 // "id": "content.liasettings.requestgmbaccess", 17512 // "parameterOrder": [ 17513 // "merchantId", 17514 // "accountId", 17515 // "gmbEmail" 17516 // ], 17517 // "parameters": { 17518 // "accountId": { 17519 // "description": "The ID of the account for which GMB access is requested.", 17520 // "format": "uint64", 17521 // "location": "path", 17522 // "required": true, 17523 // "type": "string" 17524 // }, 17525 // "gmbEmail": { 17526 // "description": "The email of the Google My Business account.", 17527 // "location": "query", 17528 // "required": true, 17529 // "type": "string" 17530 // }, 17531 // "merchantId": { 17532 // "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.", 17533 // "format": "uint64", 17534 // "location": "path", 17535 // "required": true, 17536 // "type": "string" 17537 // } 17538 // }, 17539 // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 17540 // "response": { 17541 // "$ref": "LiasettingsRequestGmbAccessResponse" 17542 // }, 17543 // "scopes": [ 17544 // "https://www.googleapis.com/auth/content" 17545 // ] 17546 // } 17547 17548} 17549 17550// method id "content.liasettings.requestinventoryverification": 17551 17552type LiasettingsRequestinventoryverificationCall struct { 17553 s *APIService 17554 merchantId uint64 17555 accountId uint64 17556 country string 17557 urlParams_ gensupport.URLParams 17558 ctx_ context.Context 17559 header_ http.Header 17560} 17561 17562// Requestinventoryverification: Requests inventory validation for the 17563// specified country. 17564// 17565// - accountId: The ID of the account that manages the order. This 17566// cannot be a multi-client account. 17567// - country: The country for which inventory validation is requested. 17568// - merchantId: The ID of the managing account. If this parameter is 17569// not the same as accountId, then this account must be a multi-client 17570// account and `accountId` must be the ID of a sub-account of this 17571// account. 17572func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { 17573 c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17574 c.merchantId = merchantId 17575 c.accountId = accountId 17576 c.country = country 17577 return c 17578} 17579 17580// Fields allows partial responses to be retrieved. See 17581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17582// for more information. 17583func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 17584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17585 return c 17586} 17587 17588// Context sets the context to be used in this call's Do method. Any 17589// pending HTTP request will be aborted if the provided context is 17590// canceled. 17591func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { 17592 c.ctx_ = ctx 17593 return c 17594} 17595 17596// Header returns an http.Header that can be modified by the caller to 17597// add HTTP headers to the request. 17598func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { 17599 if c.header_ == nil { 17600 c.header_ = make(http.Header) 17601 } 17602 return c.header_ 17603} 17604 17605func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { 17606 reqHeaders := make(http.Header) 17607 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17608 for k, v := range c.header_ { 17609 reqHeaders[k] = v 17610 } 17611 reqHeaders.Set("User-Agent", c.s.userAgent()) 17612 var body io.Reader = nil 17613 c.urlParams_.Set("alt", alt) 17614 c.urlParams_.Set("prettyPrint", "false") 17615 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") 17616 urls += "?" + c.urlParams_.Encode() 17617 req, err := http.NewRequest("POST", urls, body) 17618 if err != nil { 17619 return nil, err 17620 } 17621 req.Header = reqHeaders 17622 googleapi.Expand(req.URL, map[string]string{ 17623 "merchantId": strconv.FormatUint(c.merchantId, 10), 17624 "accountId": strconv.FormatUint(c.accountId, 10), 17625 "country": c.country, 17626 }) 17627 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17628} 17629 17630// Do executes the "content.liasettings.requestinventoryverification" call. 17631// Exactly one of *LiasettingsRequestInventoryVerificationResponse or 17632// error will be non-nil. Any non-2xx status code is an error. Response 17633// headers are in either 17634// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header 17635// or (if a response was returned at all) in 17636// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17637// whether the returned error was because http.StatusNotModified was 17638// returned. 17639func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { 17640 gensupport.SetOptions(c.urlParams_, opts...) 17641 res, err := c.doRequest("json") 17642 if res != nil && res.StatusCode == http.StatusNotModified { 17643 if res.Body != nil { 17644 res.Body.Close() 17645 } 17646 return nil, &googleapi.Error{ 17647 Code: res.StatusCode, 17648 Header: res.Header, 17649 } 17650 } 17651 if err != nil { 17652 return nil, err 17653 } 17654 defer googleapi.CloseBody(res) 17655 if err := googleapi.CheckResponse(res); err != nil { 17656 return nil, err 17657 } 17658 ret := &LiasettingsRequestInventoryVerificationResponse{ 17659 ServerResponse: googleapi.ServerResponse{ 17660 Header: res.Header, 17661 HTTPStatusCode: res.StatusCode, 17662 }, 17663 } 17664 target := &ret 17665 if err := gensupport.DecodeResponse(target, res); err != nil { 17666 return nil, err 17667 } 17668 return ret, nil 17669 // { 17670 // "description": "Requests inventory validation for the specified country.", 17671 // "flatPath": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 17672 // "httpMethod": "POST", 17673 // "id": "content.liasettings.requestinventoryverification", 17674 // "parameterOrder": [ 17675 // "merchantId", 17676 // "accountId", 17677 // "country" 17678 // ], 17679 // "parameters": { 17680 // "accountId": { 17681 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17682 // "format": "uint64", 17683 // "location": "path", 17684 // "required": true, 17685 // "type": "string" 17686 // }, 17687 // "country": { 17688 // "description": "The country for which inventory validation is requested.", 17689 // "location": "path", 17690 // "required": true, 17691 // "type": "string" 17692 // }, 17693 // "merchantId": { 17694 // "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.", 17695 // "format": "uint64", 17696 // "location": "path", 17697 // "required": true, 17698 // "type": "string" 17699 // } 17700 // }, 17701 // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 17702 // "response": { 17703 // "$ref": "LiasettingsRequestInventoryVerificationResponse" 17704 // }, 17705 // "scopes": [ 17706 // "https://www.googleapis.com/auth/content" 17707 // ] 17708 // } 17709 17710} 17711 17712// method id "content.liasettings.setinventoryverificationcontact": 17713 17714type LiasettingsSetinventoryverificationcontactCall struct { 17715 s *APIService 17716 merchantId uint64 17717 accountId uint64 17718 urlParams_ gensupport.URLParams 17719 ctx_ context.Context 17720 header_ http.Header 17721} 17722 17723// Setinventoryverificationcontact: Sets the inventory verification 17724// contract for the specified country. 17725// 17726// - accountId: The ID of the account that manages the order. This 17727// cannot be a multi-client account. 17728// - contactEmail: The email of the inventory verification contact. 17729// - contactName: The name of the inventory verification contact. 17730// - country: The country for which inventory verification is requested. 17731// - language: The language for which inventory verification is 17732// requested. 17733// - merchantId: The ID of the managing account. If this parameter is 17734// not the same as accountId, then this account must be a multi-client 17735// account and `accountId` must be the ID of a sub-account of this 17736// account. 17737func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { 17738 c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17739 c.merchantId = merchantId 17740 c.accountId = accountId 17741 c.urlParams_.Set("country", country) 17742 c.urlParams_.Set("language", language) 17743 c.urlParams_.Set("contactName", contactName) 17744 c.urlParams_.Set("contactEmail", contactEmail) 17745 return c 17746} 17747 17748// Fields allows partial responses to be retrieved. See 17749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17750// for more information. 17751func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { 17752 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17753 return c 17754} 17755 17756// Context sets the context to be used in this call's Do method. Any 17757// pending HTTP request will be aborted if the provided context is 17758// canceled. 17759func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { 17760 c.ctx_ = ctx 17761 return c 17762} 17763 17764// Header returns an http.Header that can be modified by the caller to 17765// add HTTP headers to the request. 17766func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { 17767 if c.header_ == nil { 17768 c.header_ = make(http.Header) 17769 } 17770 return c.header_ 17771} 17772 17773func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { 17774 reqHeaders := make(http.Header) 17775 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17776 for k, v := range c.header_ { 17777 reqHeaders[k] = v 17778 } 17779 reqHeaders.Set("User-Agent", c.s.userAgent()) 17780 var body io.Reader = nil 17781 c.urlParams_.Set("alt", alt) 17782 c.urlParams_.Set("prettyPrint", "false") 17783 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") 17784 urls += "?" + c.urlParams_.Encode() 17785 req, err := http.NewRequest("POST", urls, body) 17786 if err != nil { 17787 return nil, err 17788 } 17789 req.Header = reqHeaders 17790 googleapi.Expand(req.URL, map[string]string{ 17791 "merchantId": strconv.FormatUint(c.merchantId, 10), 17792 "accountId": strconv.FormatUint(c.accountId, 10), 17793 }) 17794 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17795} 17796 17797// Do executes the "content.liasettings.setinventoryverificationcontact" call. 17798// Exactly one of *LiasettingsSetInventoryVerificationContactResponse or 17799// error will be non-nil. Any non-2xx status code is an error. Response 17800// headers are in either 17801// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea 17802// der or (if a response was returned at all) in 17803// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17804// whether the returned error was because http.StatusNotModified was 17805// returned. 17806func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { 17807 gensupport.SetOptions(c.urlParams_, opts...) 17808 res, err := c.doRequest("json") 17809 if res != nil && res.StatusCode == http.StatusNotModified { 17810 if res.Body != nil { 17811 res.Body.Close() 17812 } 17813 return nil, &googleapi.Error{ 17814 Code: res.StatusCode, 17815 Header: res.Header, 17816 } 17817 } 17818 if err != nil { 17819 return nil, err 17820 } 17821 defer googleapi.CloseBody(res) 17822 if err := googleapi.CheckResponse(res); err != nil { 17823 return nil, err 17824 } 17825 ret := &LiasettingsSetInventoryVerificationContactResponse{ 17826 ServerResponse: googleapi.ServerResponse{ 17827 Header: res.Header, 17828 HTTPStatusCode: res.StatusCode, 17829 }, 17830 } 17831 target := &ret 17832 if err := gensupport.DecodeResponse(target, res); err != nil { 17833 return nil, err 17834 } 17835 return ret, nil 17836 // { 17837 // "description": "Sets the inventory verification contract for the specified country.", 17838 // "flatPath": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 17839 // "httpMethod": "POST", 17840 // "id": "content.liasettings.setinventoryverificationcontact", 17841 // "parameterOrder": [ 17842 // "merchantId", 17843 // "accountId", 17844 // "country", 17845 // "language", 17846 // "contactName", 17847 // "contactEmail" 17848 // ], 17849 // "parameters": { 17850 // "accountId": { 17851 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17852 // "format": "uint64", 17853 // "location": "path", 17854 // "required": true, 17855 // "type": "string" 17856 // }, 17857 // "contactEmail": { 17858 // "description": "The email of the inventory verification contact.", 17859 // "location": "query", 17860 // "required": true, 17861 // "type": "string" 17862 // }, 17863 // "contactName": { 17864 // "description": "The name of the inventory verification contact.", 17865 // "location": "query", 17866 // "required": true, 17867 // "type": "string" 17868 // }, 17869 // "country": { 17870 // "description": "The country for which inventory verification is requested.", 17871 // "location": "query", 17872 // "required": true, 17873 // "type": "string" 17874 // }, 17875 // "language": { 17876 // "description": "The language for which inventory verification is requested.", 17877 // "location": "query", 17878 // "required": true, 17879 // "type": "string" 17880 // }, 17881 // "merchantId": { 17882 // "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.", 17883 // "format": "uint64", 17884 // "location": "path", 17885 // "required": true, 17886 // "type": "string" 17887 // } 17888 // }, 17889 // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 17890 // "response": { 17891 // "$ref": "LiasettingsSetInventoryVerificationContactResponse" 17892 // }, 17893 // "scopes": [ 17894 // "https://www.googleapis.com/auth/content" 17895 // ] 17896 // } 17897 17898} 17899 17900// method id "content.liasettings.setposdataprovider": 17901 17902type LiasettingsSetposdataproviderCall struct { 17903 s *APIService 17904 merchantId uint64 17905 accountId uint64 17906 urlParams_ gensupport.URLParams 17907 ctx_ context.Context 17908 header_ http.Header 17909} 17910 17911// Setposdataprovider: Sets the POS data provider for the specified 17912// country. 17913// 17914// - accountId: The ID of the account for which to retrieve accessible 17915// Google My Business accounts. 17916// - country: The country for which the POS data provider is selected. 17917// - merchantId: The ID of the managing account. If this parameter is 17918// not the same as accountId, then this account must be a multi-client 17919// account and `accountId` must be the ID of a sub-account of this 17920// account. 17921func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { 17922 c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17923 c.merchantId = merchantId 17924 c.accountId = accountId 17925 c.urlParams_.Set("country", country) 17926 return c 17927} 17928 17929// PosDataProviderId sets the optional parameter "posDataProviderId": 17930// The ID of POS data provider. 17931func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { 17932 c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) 17933 return c 17934} 17935 17936// PosExternalAccountId sets the optional parameter 17937// "posExternalAccountId": The account ID by which this merchant is 17938// known to the POS data provider. 17939func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { 17940 c.urlParams_.Set("posExternalAccountId", posExternalAccountId) 17941 return c 17942} 17943 17944// Fields allows partial responses to be retrieved. See 17945// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17946// for more information. 17947func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { 17948 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17949 return c 17950} 17951 17952// Context sets the context to be used in this call's Do method. Any 17953// pending HTTP request will be aborted if the provided context is 17954// canceled. 17955func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { 17956 c.ctx_ = ctx 17957 return c 17958} 17959 17960// Header returns an http.Header that can be modified by the caller to 17961// add HTTP headers to the request. 17962func (c *LiasettingsSetposdataproviderCall) Header() http.Header { 17963 if c.header_ == nil { 17964 c.header_ = make(http.Header) 17965 } 17966 return c.header_ 17967} 17968 17969func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { 17970 reqHeaders := make(http.Header) 17971 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 17972 for k, v := range c.header_ { 17973 reqHeaders[k] = v 17974 } 17975 reqHeaders.Set("User-Agent", c.s.userAgent()) 17976 var body io.Reader = nil 17977 c.urlParams_.Set("alt", alt) 17978 c.urlParams_.Set("prettyPrint", "false") 17979 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") 17980 urls += "?" + c.urlParams_.Encode() 17981 req, err := http.NewRequest("POST", urls, body) 17982 if err != nil { 17983 return nil, err 17984 } 17985 req.Header = reqHeaders 17986 googleapi.Expand(req.URL, map[string]string{ 17987 "merchantId": strconv.FormatUint(c.merchantId, 10), 17988 "accountId": strconv.FormatUint(c.accountId, 10), 17989 }) 17990 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17991} 17992 17993// Do executes the "content.liasettings.setposdataprovider" call. 17994// Exactly one of *LiasettingsSetPosDataProviderResponse or error will 17995// be non-nil. Any non-2xx status code is an error. Response headers are 17996// in either 17997// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a 17998// response was returned at all) in error.(*googleapi.Error).Header. Use 17999// googleapi.IsNotModified to check whether the returned error was 18000// because http.StatusNotModified was returned. 18001func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { 18002 gensupport.SetOptions(c.urlParams_, opts...) 18003 res, err := c.doRequest("json") 18004 if res != nil && res.StatusCode == http.StatusNotModified { 18005 if res.Body != nil { 18006 res.Body.Close() 18007 } 18008 return nil, &googleapi.Error{ 18009 Code: res.StatusCode, 18010 Header: res.Header, 18011 } 18012 } 18013 if err != nil { 18014 return nil, err 18015 } 18016 defer googleapi.CloseBody(res) 18017 if err := googleapi.CheckResponse(res); err != nil { 18018 return nil, err 18019 } 18020 ret := &LiasettingsSetPosDataProviderResponse{ 18021 ServerResponse: googleapi.ServerResponse{ 18022 Header: res.Header, 18023 HTTPStatusCode: res.StatusCode, 18024 }, 18025 } 18026 target := &ret 18027 if err := gensupport.DecodeResponse(target, res); err != nil { 18028 return nil, err 18029 } 18030 return ret, nil 18031 // { 18032 // "description": "Sets the POS data provider for the specified country.", 18033 // "flatPath": "{merchantId}/liasettings/{accountId}/setposdataprovider", 18034 // "httpMethod": "POST", 18035 // "id": "content.liasettings.setposdataprovider", 18036 // "parameterOrder": [ 18037 // "merchantId", 18038 // "accountId", 18039 // "country" 18040 // ], 18041 // "parameters": { 18042 // "accountId": { 18043 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 18044 // "format": "uint64", 18045 // "location": "path", 18046 // "required": true, 18047 // "type": "string" 18048 // }, 18049 // "country": { 18050 // "description": "The country for which the POS data provider is selected.", 18051 // "location": "query", 18052 // "required": true, 18053 // "type": "string" 18054 // }, 18055 // "merchantId": { 18056 // "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.", 18057 // "format": "uint64", 18058 // "location": "path", 18059 // "required": true, 18060 // "type": "string" 18061 // }, 18062 // "posDataProviderId": { 18063 // "description": "The ID of POS data provider.", 18064 // "format": "uint64", 18065 // "location": "query", 18066 // "type": "string" 18067 // }, 18068 // "posExternalAccountId": { 18069 // "description": "The account ID by which this merchant is known to the POS data provider.", 18070 // "location": "query", 18071 // "type": "string" 18072 // } 18073 // }, 18074 // "path": "{merchantId}/liasettings/{accountId}/setposdataprovider", 18075 // "response": { 18076 // "$ref": "LiasettingsSetPosDataProviderResponse" 18077 // }, 18078 // "scopes": [ 18079 // "https://www.googleapis.com/auth/content" 18080 // ] 18081 // } 18082 18083} 18084 18085// method id "content.liasettings.update": 18086 18087type LiasettingsUpdateCall struct { 18088 s *APIService 18089 merchantId uint64 18090 accountId uint64 18091 liasettings *LiaSettings 18092 urlParams_ gensupport.URLParams 18093 ctx_ context.Context 18094 header_ http.Header 18095} 18096 18097// Update: Updates the LIA settings of the account. Any fields that are 18098// not provided are deleted from the resource. 18099// 18100// - accountId: The ID of the account for which to get or update LIA 18101// settings. 18102// - merchantId: The ID of the managing account. If this parameter is 18103// not the same as accountId, then this account must be a multi-client 18104// account and `accountId` must be the ID of a sub-account of this 18105// account. 18106func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { 18107 c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18108 c.merchantId = merchantId 18109 c.accountId = accountId 18110 c.liasettings = liasettings 18111 return c 18112} 18113 18114// DryRun sets the optional parameter "dryRun": Flag to simulate a 18115// request like in a live environment. If set to true, dry-run mode 18116// checks the validity of the request and returns errors (if any). 18117func (c *LiasettingsUpdateCall) DryRun(dryRun bool) *LiasettingsUpdateCall { 18118 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18119 return c 18120} 18121 18122// Fields allows partial responses to be retrieved. See 18123// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18124// for more information. 18125func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { 18126 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18127 return c 18128} 18129 18130// Context sets the context to be used in this call's Do method. Any 18131// pending HTTP request will be aborted if the provided context is 18132// canceled. 18133func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { 18134 c.ctx_ = ctx 18135 return c 18136} 18137 18138// Header returns an http.Header that can be modified by the caller to 18139// add HTTP headers to the request. 18140func (c *LiasettingsUpdateCall) Header() http.Header { 18141 if c.header_ == nil { 18142 c.header_ = make(http.Header) 18143 } 18144 return c.header_ 18145} 18146 18147func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 18148 reqHeaders := make(http.Header) 18149 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 18150 for k, v := range c.header_ { 18151 reqHeaders[k] = v 18152 } 18153 reqHeaders.Set("User-Agent", c.s.userAgent()) 18154 var body io.Reader = nil 18155 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) 18156 if err != nil { 18157 return nil, err 18158 } 18159 reqHeaders.Set("Content-Type", "application/json") 18160 c.urlParams_.Set("alt", alt) 18161 c.urlParams_.Set("prettyPrint", "false") 18162 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 18163 urls += "?" + c.urlParams_.Encode() 18164 req, err := http.NewRequest("PUT", urls, body) 18165 if err != nil { 18166 return nil, err 18167 } 18168 req.Header = reqHeaders 18169 googleapi.Expand(req.URL, map[string]string{ 18170 "merchantId": strconv.FormatUint(c.merchantId, 10), 18171 "accountId": strconv.FormatUint(c.accountId, 10), 18172 }) 18173 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18174} 18175 18176// Do executes the "content.liasettings.update" call. 18177// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 18178// status code is an error. Response headers are in either 18179// *LiaSettings.ServerResponse.Header or (if a response was returned at 18180// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18181// to check whether the returned error was because 18182// http.StatusNotModified was returned. 18183func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 18184 gensupport.SetOptions(c.urlParams_, opts...) 18185 res, err := c.doRequest("json") 18186 if res != nil && res.StatusCode == http.StatusNotModified { 18187 if res.Body != nil { 18188 res.Body.Close() 18189 } 18190 return nil, &googleapi.Error{ 18191 Code: res.StatusCode, 18192 Header: res.Header, 18193 } 18194 } 18195 if err != nil { 18196 return nil, err 18197 } 18198 defer googleapi.CloseBody(res) 18199 if err := googleapi.CheckResponse(res); err != nil { 18200 return nil, err 18201 } 18202 ret := &LiaSettings{ 18203 ServerResponse: googleapi.ServerResponse{ 18204 Header: res.Header, 18205 HTTPStatusCode: res.StatusCode, 18206 }, 18207 } 18208 target := &ret 18209 if err := gensupport.DecodeResponse(target, res); err != nil { 18210 return nil, err 18211 } 18212 return ret, nil 18213 // { 18214 // "description": "Updates the LIA settings of the account. Any fields that are not provided are deleted from the resource.", 18215 // "flatPath": "{merchantId}/liasettings/{accountId}", 18216 // "httpMethod": "PUT", 18217 // "id": "content.liasettings.update", 18218 // "parameterOrder": [ 18219 // "merchantId", 18220 // "accountId" 18221 // ], 18222 // "parameters": { 18223 // "accountId": { 18224 // "description": "The ID of the account for which to get or update LIA settings.", 18225 // "format": "uint64", 18226 // "location": "path", 18227 // "required": true, 18228 // "type": "string" 18229 // }, 18230 // "dryRun": { 18231 // "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).", 18232 // "location": "query", 18233 // "type": "boolean" 18234 // }, 18235 // "merchantId": { 18236 // "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.", 18237 // "format": "uint64", 18238 // "location": "path", 18239 // "required": true, 18240 // "type": "string" 18241 // } 18242 // }, 18243 // "path": "{merchantId}/liasettings/{accountId}", 18244 // "request": { 18245 // "$ref": "LiaSettings" 18246 // }, 18247 // "response": { 18248 // "$ref": "LiaSettings" 18249 // }, 18250 // "scopes": [ 18251 // "https://www.googleapis.com/auth/content" 18252 // ] 18253 // } 18254 18255} 18256 18257// method id "content.orderinvoices.createchargeinvoice": 18258 18259type OrderinvoicesCreatechargeinvoiceCall struct { 18260 s *APIService 18261 merchantId uint64 18262 orderId string 18263 orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest 18264 urlParams_ gensupport.URLParams 18265 ctx_ context.Context 18266 header_ http.Header 18267} 18268 18269// Createchargeinvoice: Creates a charge invoice for a shipment group, 18270// and triggers a charge capture for orderinvoice enabled orders. 18271// 18272// - merchantId: The ID of the account that manages the order. This 18273// cannot be a multi-client account. 18274// - orderId: The ID of the order. 18275func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { 18276 c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18277 c.merchantId = merchantId 18278 c.orderId = orderId 18279 c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest 18280 return c 18281} 18282 18283// Fields allows partial responses to be retrieved. See 18284// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18285// for more information. 18286func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { 18287 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18288 return c 18289} 18290 18291// Context sets the context to be used in this call's Do method. Any 18292// pending HTTP request will be aborted if the provided context is 18293// canceled. 18294func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { 18295 c.ctx_ = ctx 18296 return c 18297} 18298 18299// Header returns an http.Header that can be modified by the caller to 18300// add HTTP headers to the request. 18301func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { 18302 if c.header_ == nil { 18303 c.header_ = make(http.Header) 18304 } 18305 return c.header_ 18306} 18307 18308func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) { 18309 reqHeaders := make(http.Header) 18310 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 18311 for k, v := range c.header_ { 18312 reqHeaders[k] = v 18313 } 18314 reqHeaders.Set("User-Agent", c.s.userAgent()) 18315 var body io.Reader = nil 18316 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest) 18317 if err != nil { 18318 return nil, err 18319 } 18320 reqHeaders.Set("Content-Type", "application/json") 18321 c.urlParams_.Set("alt", alt) 18322 c.urlParams_.Set("prettyPrint", "false") 18323 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") 18324 urls += "?" + c.urlParams_.Encode() 18325 req, err := http.NewRequest("POST", urls, body) 18326 if err != nil { 18327 return nil, err 18328 } 18329 req.Header = reqHeaders 18330 googleapi.Expand(req.URL, map[string]string{ 18331 "merchantId": strconv.FormatUint(c.merchantId, 10), 18332 "orderId": c.orderId, 18333 }) 18334 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18335} 18336 18337// Do executes the "content.orderinvoices.createchargeinvoice" call. 18338// Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error 18339// will be non-nil. Any non-2xx status code is an error. Response 18340// headers are in either 18341// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or 18342// (if a response was returned at all) in 18343// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18344// whether the returned error was because http.StatusNotModified was 18345// returned. 18346func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { 18347 gensupport.SetOptions(c.urlParams_, opts...) 18348 res, err := c.doRequest("json") 18349 if res != nil && res.StatusCode == http.StatusNotModified { 18350 if res.Body != nil { 18351 res.Body.Close() 18352 } 18353 return nil, &googleapi.Error{ 18354 Code: res.StatusCode, 18355 Header: res.Header, 18356 } 18357 } 18358 if err != nil { 18359 return nil, err 18360 } 18361 defer googleapi.CloseBody(res) 18362 if err := googleapi.CheckResponse(res); err != nil { 18363 return nil, err 18364 } 18365 ret := &OrderinvoicesCreateChargeInvoiceResponse{ 18366 ServerResponse: googleapi.ServerResponse{ 18367 Header: res.Header, 18368 HTTPStatusCode: res.StatusCode, 18369 }, 18370 } 18371 target := &ret 18372 if err := gensupport.DecodeResponse(target, res); err != nil { 18373 return nil, err 18374 } 18375 return ret, nil 18376 // { 18377 // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", 18378 // "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 18379 // "httpMethod": "POST", 18380 // "id": "content.orderinvoices.createchargeinvoice", 18381 // "parameterOrder": [ 18382 // "merchantId", 18383 // "orderId" 18384 // ], 18385 // "parameters": { 18386 // "merchantId": { 18387 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18388 // "format": "uint64", 18389 // "location": "path", 18390 // "required": true, 18391 // "type": "string" 18392 // }, 18393 // "orderId": { 18394 // "description": "The ID of the order.", 18395 // "location": "path", 18396 // "required": true, 18397 // "type": "string" 18398 // } 18399 // }, 18400 // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 18401 // "request": { 18402 // "$ref": "OrderinvoicesCreateChargeInvoiceRequest" 18403 // }, 18404 // "response": { 18405 // "$ref": "OrderinvoicesCreateChargeInvoiceResponse" 18406 // }, 18407 // "scopes": [ 18408 // "https://www.googleapis.com/auth/content" 18409 // ] 18410 // } 18411 18412} 18413 18414// method id "content.orderinvoices.createrefundinvoice": 18415 18416type OrderinvoicesCreaterefundinvoiceCall struct { 18417 s *APIService 18418 merchantId uint64 18419 orderId string 18420 orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest 18421 urlParams_ gensupport.URLParams 18422 ctx_ context.Context 18423 header_ http.Header 18424} 18425 18426// Createrefundinvoice: Creates a refund invoice for one or more 18427// shipment groups, and triggers a refund for orderinvoice enabled 18428// orders. This can only be used for line items that have previously 18429// been charged using `createChargeInvoice`. All amounts (except for the 18430// summary) are incremental with respect to the previous invoice. 18431// 18432// - merchantId: The ID of the account that manages the order. This 18433// cannot be a multi-client account. 18434// - orderId: The ID of the order. 18435func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { 18436 c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18437 c.merchantId = merchantId 18438 c.orderId = orderId 18439 c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest 18440 return c 18441} 18442 18443// Fields allows partial responses to be retrieved. See 18444// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18445// for more information. 18446func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { 18447 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18448 return c 18449} 18450 18451// Context sets the context to be used in this call's Do method. Any 18452// pending HTTP request will be aborted if the provided context is 18453// canceled. 18454func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { 18455 c.ctx_ = ctx 18456 return c 18457} 18458 18459// Header returns an http.Header that can be modified by the caller to 18460// add HTTP headers to the request. 18461func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { 18462 if c.header_ == nil { 18463 c.header_ = make(http.Header) 18464 } 18465 return c.header_ 18466} 18467 18468func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { 18469 reqHeaders := make(http.Header) 18470 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 18471 for k, v := range c.header_ { 18472 reqHeaders[k] = v 18473 } 18474 reqHeaders.Set("User-Agent", c.s.userAgent()) 18475 var body io.Reader = nil 18476 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) 18477 if err != nil { 18478 return nil, err 18479 } 18480 reqHeaders.Set("Content-Type", "application/json") 18481 c.urlParams_.Set("alt", alt) 18482 c.urlParams_.Set("prettyPrint", "false") 18483 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") 18484 urls += "?" + c.urlParams_.Encode() 18485 req, err := http.NewRequest("POST", urls, body) 18486 if err != nil { 18487 return nil, err 18488 } 18489 req.Header = reqHeaders 18490 googleapi.Expand(req.URL, map[string]string{ 18491 "merchantId": strconv.FormatUint(c.merchantId, 10), 18492 "orderId": c.orderId, 18493 }) 18494 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18495} 18496 18497// Do executes the "content.orderinvoices.createrefundinvoice" call. 18498// Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error 18499// will be non-nil. Any non-2xx status code is an error. Response 18500// headers are in either 18501// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or 18502// (if a response was returned at all) in 18503// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18504// whether the returned error was because http.StatusNotModified was 18505// returned. 18506func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { 18507 gensupport.SetOptions(c.urlParams_, opts...) 18508 res, err := c.doRequest("json") 18509 if res != nil && res.StatusCode == http.StatusNotModified { 18510 if res.Body != nil { 18511 res.Body.Close() 18512 } 18513 return nil, &googleapi.Error{ 18514 Code: res.StatusCode, 18515 Header: res.Header, 18516 } 18517 } 18518 if err != nil { 18519 return nil, err 18520 } 18521 defer googleapi.CloseBody(res) 18522 if err := googleapi.CheckResponse(res); err != nil { 18523 return nil, err 18524 } 18525 ret := &OrderinvoicesCreateRefundInvoiceResponse{ 18526 ServerResponse: googleapi.ServerResponse{ 18527 Header: res.Header, 18528 HTTPStatusCode: res.StatusCode, 18529 }, 18530 } 18531 target := &ret 18532 if err := gensupport.DecodeResponse(target, res); err != nil { 18533 return nil, err 18534 } 18535 return ret, nil 18536 // { 18537 // "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.", 18538 // "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 18539 // "httpMethod": "POST", 18540 // "id": "content.orderinvoices.createrefundinvoice", 18541 // "parameterOrder": [ 18542 // "merchantId", 18543 // "orderId" 18544 // ], 18545 // "parameters": { 18546 // "merchantId": { 18547 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18548 // "format": "uint64", 18549 // "location": "path", 18550 // "required": true, 18551 // "type": "string" 18552 // }, 18553 // "orderId": { 18554 // "description": "The ID of the order.", 18555 // "location": "path", 18556 // "required": true, 18557 // "type": "string" 18558 // } 18559 // }, 18560 // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 18561 // "request": { 18562 // "$ref": "OrderinvoicesCreateRefundInvoiceRequest" 18563 // }, 18564 // "response": { 18565 // "$ref": "OrderinvoicesCreateRefundInvoiceResponse" 18566 // }, 18567 // "scopes": [ 18568 // "https://www.googleapis.com/auth/content" 18569 // ] 18570 // } 18571 18572} 18573 18574// method id "content.orderreports.listdisbursements": 18575 18576type OrderreportsListdisbursementsCall struct { 18577 s *APIService 18578 merchantId uint64 18579 urlParams_ gensupport.URLParams 18580 ifNoneMatch_ string 18581 ctx_ context.Context 18582 header_ http.Header 18583} 18584 18585// Listdisbursements: Retrieves a report for disbursements from your 18586// Merchant Center account. 18587// 18588// - merchantId: The ID of the account that manages the order. This 18589// cannot be a multi-client account. 18590func (r *OrderreportsService) Listdisbursements(merchantId uint64) *OrderreportsListdisbursementsCall { 18591 c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18592 c.merchantId = merchantId 18593 return c 18594} 18595 18596// DisbursementEndDate sets the optional parameter 18597// "disbursementEndDate": The last date which disbursements occurred. In 18598// ISO 8601 format. Default: current date. 18599func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall { 18600 c.urlParams_.Set("disbursementEndDate", disbursementEndDate) 18601 return c 18602} 18603 18604// DisbursementStartDate sets the optional parameter 18605// "disbursementStartDate": The first date which disbursements occurred. 18606// In ISO 8601 format. 18607func (c *OrderreportsListdisbursementsCall) DisbursementStartDate(disbursementStartDate string) *OrderreportsListdisbursementsCall { 18608 c.urlParams_.Set("disbursementStartDate", disbursementStartDate) 18609 return c 18610} 18611 18612// MaxResults sets the optional parameter "maxResults": The maximum 18613// number of disbursements to return in the response, used for paging. 18614func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall { 18615 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 18616 return c 18617} 18618 18619// PageToken sets the optional parameter "pageToken": The token returned 18620// by the previous request. 18621func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall { 18622 c.urlParams_.Set("pageToken", pageToken) 18623 return c 18624} 18625 18626// Fields allows partial responses to be retrieved. See 18627// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18628// for more information. 18629func (c *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall { 18630 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18631 return c 18632} 18633 18634// IfNoneMatch sets the optional parameter which makes the operation 18635// fail if the object's ETag matches the given value. This is useful for 18636// getting updates only after the object has changed since the last 18637// request. Use googleapi.IsNotModified to check whether the response 18638// error from Do is the result of In-None-Match. 18639func (c *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall { 18640 c.ifNoneMatch_ = entityTag 18641 return c 18642} 18643 18644// Context sets the context to be used in this call's Do method. Any 18645// pending HTTP request will be aborted if the provided context is 18646// canceled. 18647func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall { 18648 c.ctx_ = ctx 18649 return c 18650} 18651 18652// Header returns an http.Header that can be modified by the caller to 18653// add HTTP headers to the request. 18654func (c *OrderreportsListdisbursementsCall) Header() http.Header { 18655 if c.header_ == nil { 18656 c.header_ = make(http.Header) 18657 } 18658 return c.header_ 18659} 18660 18661func (c *OrderreportsListdisbursementsCall) doRequest(alt string) (*http.Response, error) { 18662 reqHeaders := make(http.Header) 18663 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 18664 for k, v := range c.header_ { 18665 reqHeaders[k] = v 18666 } 18667 reqHeaders.Set("User-Agent", c.s.userAgent()) 18668 if c.ifNoneMatch_ != "" { 18669 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18670 } 18671 var body io.Reader = nil 18672 c.urlParams_.Set("alt", alt) 18673 c.urlParams_.Set("prettyPrint", "false") 18674 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements") 18675 urls += "?" + c.urlParams_.Encode() 18676 req, err := http.NewRequest("GET", urls, body) 18677 if err != nil { 18678 return nil, err 18679 } 18680 req.Header = reqHeaders 18681 googleapi.Expand(req.URL, map[string]string{ 18682 "merchantId": strconv.FormatUint(c.merchantId, 10), 18683 }) 18684 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18685} 18686 18687// Do executes the "content.orderreports.listdisbursements" call. 18688// Exactly one of *OrderreportsListDisbursementsResponse or error will 18689// be non-nil. Any non-2xx status code is an error. Response headers are 18690// in either 18691// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a 18692// response was returned at all) in error.(*googleapi.Error).Header. Use 18693// googleapi.IsNotModified to check whether the returned error was 18694// because http.StatusNotModified was returned. 18695func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) { 18696 gensupport.SetOptions(c.urlParams_, opts...) 18697 res, err := c.doRequest("json") 18698 if res != nil && res.StatusCode == http.StatusNotModified { 18699 if res.Body != nil { 18700 res.Body.Close() 18701 } 18702 return nil, &googleapi.Error{ 18703 Code: res.StatusCode, 18704 Header: res.Header, 18705 } 18706 } 18707 if err != nil { 18708 return nil, err 18709 } 18710 defer googleapi.CloseBody(res) 18711 if err := googleapi.CheckResponse(res); err != nil { 18712 return nil, err 18713 } 18714 ret := &OrderreportsListDisbursementsResponse{ 18715 ServerResponse: googleapi.ServerResponse{ 18716 Header: res.Header, 18717 HTTPStatusCode: res.StatusCode, 18718 }, 18719 } 18720 target := &ret 18721 if err := gensupport.DecodeResponse(target, res); err != nil { 18722 return nil, err 18723 } 18724 return ret, nil 18725 // { 18726 // "description": "Retrieves a report for disbursements from your Merchant Center account.", 18727 // "flatPath": "{merchantId}/orderreports/disbursements", 18728 // "httpMethod": "GET", 18729 // "id": "content.orderreports.listdisbursements", 18730 // "parameterOrder": [ 18731 // "merchantId" 18732 // ], 18733 // "parameters": { 18734 // "disbursementEndDate": { 18735 // "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.", 18736 // "location": "query", 18737 // "type": "string" 18738 // }, 18739 // "disbursementStartDate": { 18740 // "description": "The first date which disbursements occurred. In ISO 8601 format.", 18741 // "location": "query", 18742 // "type": "string" 18743 // }, 18744 // "maxResults": { 18745 // "description": "The maximum number of disbursements to return in the response, used for paging.", 18746 // "format": "uint32", 18747 // "location": "query", 18748 // "type": "integer" 18749 // }, 18750 // "merchantId": { 18751 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18752 // "format": "uint64", 18753 // "location": "path", 18754 // "required": true, 18755 // "type": "string" 18756 // }, 18757 // "pageToken": { 18758 // "description": "The token returned by the previous request.", 18759 // "location": "query", 18760 // "type": "string" 18761 // } 18762 // }, 18763 // "path": "{merchantId}/orderreports/disbursements", 18764 // "response": { 18765 // "$ref": "OrderreportsListDisbursementsResponse" 18766 // }, 18767 // "scopes": [ 18768 // "https://www.googleapis.com/auth/content" 18769 // ] 18770 // } 18771 18772} 18773 18774// Pages invokes f for each page of results. 18775// A non-nil error returned from f will halt the iteration. 18776// The provided context supersedes any context provided to the Context method. 18777func (c *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) error) error { 18778 c.ctx_ = ctx 18779 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18780 for { 18781 x, err := c.Do() 18782 if err != nil { 18783 return err 18784 } 18785 if err := f(x); err != nil { 18786 return err 18787 } 18788 if x.NextPageToken == "" { 18789 return nil 18790 } 18791 c.PageToken(x.NextPageToken) 18792 } 18793} 18794 18795// method id "content.orderreports.listtransactions": 18796 18797type OrderreportsListtransactionsCall struct { 18798 s *APIService 18799 merchantId uint64 18800 disbursementId string 18801 urlParams_ gensupport.URLParams 18802 ifNoneMatch_ string 18803 ctx_ context.Context 18804 header_ http.Header 18805} 18806 18807// Listtransactions: Retrieves a list of transactions for a disbursement 18808// from your Merchant Center account. 18809// 18810// - disbursementId: The Google-provided ID of the disbursement (found 18811// in Wallet). 18812// - merchantId: The ID of the account that manages the order. This 18813// cannot be a multi-client account. 18814func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string) *OrderreportsListtransactionsCall { 18815 c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18816 c.merchantId = merchantId 18817 c.disbursementId = disbursementId 18818 return c 18819} 18820 18821// MaxResults sets the optional parameter "maxResults": The maximum 18822// number of disbursements to return in the response, used for paging. 18823func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall { 18824 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 18825 return c 18826} 18827 18828// PageToken sets the optional parameter "pageToken": The token returned 18829// by the previous request. 18830func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall { 18831 c.urlParams_.Set("pageToken", pageToken) 18832 return c 18833} 18834 18835// TransactionEndDate sets the optional parameter "transactionEndDate": 18836// The last date in which transaction occurred. In ISO 8601 format. 18837// Default: current date. 18838func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall { 18839 c.urlParams_.Set("transactionEndDate", transactionEndDate) 18840 return c 18841} 18842 18843// TransactionStartDate sets the optional parameter 18844// "transactionStartDate": The first date in which transaction occurred. 18845// In ISO 8601 format. 18846func (c *OrderreportsListtransactionsCall) TransactionStartDate(transactionStartDate string) *OrderreportsListtransactionsCall { 18847 c.urlParams_.Set("transactionStartDate", transactionStartDate) 18848 return c 18849} 18850 18851// Fields allows partial responses to be retrieved. See 18852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18853// for more information. 18854func (c *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall { 18855 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18856 return c 18857} 18858 18859// IfNoneMatch sets the optional parameter which makes the operation 18860// fail if the object's ETag matches the given value. This is useful for 18861// getting updates only after the object has changed since the last 18862// request. Use googleapi.IsNotModified to check whether the response 18863// error from Do is the result of In-None-Match. 18864func (c *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall { 18865 c.ifNoneMatch_ = entityTag 18866 return c 18867} 18868 18869// Context sets the context to be used in this call's Do method. Any 18870// pending HTTP request will be aborted if the provided context is 18871// canceled. 18872func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall { 18873 c.ctx_ = ctx 18874 return c 18875} 18876 18877// Header returns an http.Header that can be modified by the caller to 18878// add HTTP headers to the request. 18879func (c *OrderreportsListtransactionsCall) Header() http.Header { 18880 if c.header_ == nil { 18881 c.header_ = make(http.Header) 18882 } 18883 return c.header_ 18884} 18885 18886func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) { 18887 reqHeaders := make(http.Header) 18888 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 18889 for k, v := range c.header_ { 18890 reqHeaders[k] = v 18891 } 18892 reqHeaders.Set("User-Agent", c.s.userAgent()) 18893 if c.ifNoneMatch_ != "" { 18894 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18895 } 18896 var body io.Reader = nil 18897 c.urlParams_.Set("alt", alt) 18898 c.urlParams_.Set("prettyPrint", "false") 18899 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions") 18900 urls += "?" + c.urlParams_.Encode() 18901 req, err := http.NewRequest("GET", urls, body) 18902 if err != nil { 18903 return nil, err 18904 } 18905 req.Header = reqHeaders 18906 googleapi.Expand(req.URL, map[string]string{ 18907 "merchantId": strconv.FormatUint(c.merchantId, 10), 18908 "disbursementId": c.disbursementId, 18909 }) 18910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18911} 18912 18913// Do executes the "content.orderreports.listtransactions" call. 18914// Exactly one of *OrderreportsListTransactionsResponse or error will be 18915// non-nil. Any non-2xx status code is an error. Response headers are in 18916// either *OrderreportsListTransactionsResponse.ServerResponse.Header or 18917// (if a response was returned at all) in 18918// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18919// whether the returned error was because http.StatusNotModified was 18920// returned. 18921func (c *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) { 18922 gensupport.SetOptions(c.urlParams_, opts...) 18923 res, err := c.doRequest("json") 18924 if res != nil && res.StatusCode == http.StatusNotModified { 18925 if res.Body != nil { 18926 res.Body.Close() 18927 } 18928 return nil, &googleapi.Error{ 18929 Code: res.StatusCode, 18930 Header: res.Header, 18931 } 18932 } 18933 if err != nil { 18934 return nil, err 18935 } 18936 defer googleapi.CloseBody(res) 18937 if err := googleapi.CheckResponse(res); err != nil { 18938 return nil, err 18939 } 18940 ret := &OrderreportsListTransactionsResponse{ 18941 ServerResponse: googleapi.ServerResponse{ 18942 Header: res.Header, 18943 HTTPStatusCode: res.StatusCode, 18944 }, 18945 } 18946 target := &ret 18947 if err := gensupport.DecodeResponse(target, res); err != nil { 18948 return nil, err 18949 } 18950 return ret, nil 18951 // { 18952 // "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", 18953 // "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", 18954 // "httpMethod": "GET", 18955 // "id": "content.orderreports.listtransactions", 18956 // "parameterOrder": [ 18957 // "merchantId", 18958 // "disbursementId" 18959 // ], 18960 // "parameters": { 18961 // "disbursementId": { 18962 // "description": "The Google-provided ID of the disbursement (found in Wallet).", 18963 // "location": "path", 18964 // "required": true, 18965 // "type": "string" 18966 // }, 18967 // "maxResults": { 18968 // "description": "The maximum number of disbursements to return in the response, used for paging.", 18969 // "format": "uint32", 18970 // "location": "query", 18971 // "type": "integer" 18972 // }, 18973 // "merchantId": { 18974 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18975 // "format": "uint64", 18976 // "location": "path", 18977 // "required": true, 18978 // "type": "string" 18979 // }, 18980 // "pageToken": { 18981 // "description": "The token returned by the previous request.", 18982 // "location": "query", 18983 // "type": "string" 18984 // }, 18985 // "transactionEndDate": { 18986 // "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.", 18987 // "location": "query", 18988 // "type": "string" 18989 // }, 18990 // "transactionStartDate": { 18991 // "description": "The first date in which transaction occurred. In ISO 8601 format.", 18992 // "location": "query", 18993 // "type": "string" 18994 // } 18995 // }, 18996 // "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", 18997 // "response": { 18998 // "$ref": "OrderreportsListTransactionsResponse" 18999 // }, 19000 // "scopes": [ 19001 // "https://www.googleapis.com/auth/content" 19002 // ] 19003 // } 19004 19005} 19006 19007// Pages invokes f for each page of results. 19008// A non-nil error returned from f will halt the iteration. 19009// The provided context supersedes any context provided to the Context method. 19010func (c *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) error) error { 19011 c.ctx_ = ctx 19012 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19013 for { 19014 x, err := c.Do() 19015 if err != nil { 19016 return err 19017 } 19018 if err := f(x); err != nil { 19019 return err 19020 } 19021 if x.NextPageToken == "" { 19022 return nil 19023 } 19024 c.PageToken(x.NextPageToken) 19025 } 19026} 19027 19028// method id "content.orderreturns.get": 19029 19030type OrderreturnsGetCall struct { 19031 s *APIService 19032 merchantId uint64 19033 returnId string 19034 urlParams_ gensupport.URLParams 19035 ifNoneMatch_ string 19036 ctx_ context.Context 19037 header_ http.Header 19038} 19039 19040// Get: Retrieves an order return from your Merchant Center account. 19041// 19042// - merchantId: The ID of the account that manages the order. This 19043// cannot be a multi-client account. 19044// - returnId: Merchant order return ID generated by Google. 19045func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { 19046 c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19047 c.merchantId = merchantId 19048 c.returnId = returnId 19049 return c 19050} 19051 19052// Fields allows partial responses to be retrieved. See 19053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19054// for more information. 19055func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { 19056 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19057 return c 19058} 19059 19060// IfNoneMatch sets the optional parameter which makes the operation 19061// fail if the object's ETag matches the given value. This is useful for 19062// getting updates only after the object has changed since the last 19063// request. Use googleapi.IsNotModified to check whether the response 19064// error from Do is the result of In-None-Match. 19065func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { 19066 c.ifNoneMatch_ = entityTag 19067 return c 19068} 19069 19070// Context sets the context to be used in this call's Do method. Any 19071// pending HTTP request will be aborted if the provided context is 19072// canceled. 19073func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { 19074 c.ctx_ = ctx 19075 return c 19076} 19077 19078// Header returns an http.Header that can be modified by the caller to 19079// add HTTP headers to the request. 19080func (c *OrderreturnsGetCall) Header() http.Header { 19081 if c.header_ == nil { 19082 c.header_ = make(http.Header) 19083 } 19084 return c.header_ 19085} 19086 19087func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) { 19088 reqHeaders := make(http.Header) 19089 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19090 for k, v := range c.header_ { 19091 reqHeaders[k] = v 19092 } 19093 reqHeaders.Set("User-Agent", c.s.userAgent()) 19094 if c.ifNoneMatch_ != "" { 19095 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19096 } 19097 var body io.Reader = nil 19098 c.urlParams_.Set("alt", alt) 19099 c.urlParams_.Set("prettyPrint", "false") 19100 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") 19101 urls += "?" + c.urlParams_.Encode() 19102 req, err := http.NewRequest("GET", urls, body) 19103 if err != nil { 19104 return nil, err 19105 } 19106 req.Header = reqHeaders 19107 googleapi.Expand(req.URL, map[string]string{ 19108 "merchantId": strconv.FormatUint(c.merchantId, 10), 19109 "returnId": c.returnId, 19110 }) 19111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19112} 19113 19114// Do executes the "content.orderreturns.get" call. 19115// Exactly one of *MerchantOrderReturn or error will be non-nil. Any 19116// non-2xx status code is an error. Response headers are in either 19117// *MerchantOrderReturn.ServerResponse.Header or (if a response was 19118// returned at all) in error.(*googleapi.Error).Header. Use 19119// googleapi.IsNotModified to check whether the returned error was 19120// because http.StatusNotModified was returned. 19121func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { 19122 gensupport.SetOptions(c.urlParams_, opts...) 19123 res, err := c.doRequest("json") 19124 if res != nil && res.StatusCode == http.StatusNotModified { 19125 if res.Body != nil { 19126 res.Body.Close() 19127 } 19128 return nil, &googleapi.Error{ 19129 Code: res.StatusCode, 19130 Header: res.Header, 19131 } 19132 } 19133 if err != nil { 19134 return nil, err 19135 } 19136 defer googleapi.CloseBody(res) 19137 if err := googleapi.CheckResponse(res); err != nil { 19138 return nil, err 19139 } 19140 ret := &MerchantOrderReturn{ 19141 ServerResponse: googleapi.ServerResponse{ 19142 Header: res.Header, 19143 HTTPStatusCode: res.StatusCode, 19144 }, 19145 } 19146 target := &ret 19147 if err := gensupport.DecodeResponse(target, res); err != nil { 19148 return nil, err 19149 } 19150 return ret, nil 19151 // { 19152 // "description": "Retrieves an order return from your Merchant Center account.", 19153 // "flatPath": "{merchantId}/orderreturns/{returnId}", 19154 // "httpMethod": "GET", 19155 // "id": "content.orderreturns.get", 19156 // "parameterOrder": [ 19157 // "merchantId", 19158 // "returnId" 19159 // ], 19160 // "parameters": { 19161 // "merchantId": { 19162 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19163 // "format": "uint64", 19164 // "location": "path", 19165 // "required": true, 19166 // "type": "string" 19167 // }, 19168 // "returnId": { 19169 // "description": "Merchant order return ID generated by Google.", 19170 // "location": "path", 19171 // "required": true, 19172 // "type": "string" 19173 // } 19174 // }, 19175 // "path": "{merchantId}/orderreturns/{returnId}", 19176 // "response": { 19177 // "$ref": "MerchantOrderReturn" 19178 // }, 19179 // "scopes": [ 19180 // "https://www.googleapis.com/auth/content" 19181 // ] 19182 // } 19183 19184} 19185 19186// method id "content.orderreturns.list": 19187 19188type OrderreturnsListCall struct { 19189 s *APIService 19190 merchantId uint64 19191 urlParams_ gensupport.URLParams 19192 ifNoneMatch_ string 19193 ctx_ context.Context 19194 header_ http.Header 19195} 19196 19197// List: Lists order returns in your Merchant Center account. 19198// 19199// - merchantId: The ID of the account that manages the order. This 19200// cannot be a multi-client account. 19201func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { 19202 c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19203 c.merchantId = merchantId 19204 return c 19205} 19206 19207// CreatedEndDate sets the optional parameter "createdEndDate": Obtains 19208// order returns created before this date (inclusively), in ISO 8601 19209// format. 19210func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { 19211 c.urlParams_.Set("createdEndDate", createdEndDate) 19212 return c 19213} 19214 19215// CreatedStartDate sets the optional parameter "createdStartDate": 19216// Obtains order returns created after this date (inclusively), in ISO 19217// 8601 format. 19218func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { 19219 c.urlParams_.Set("createdStartDate", createdStartDate) 19220 return c 19221} 19222 19223// MaxResults sets the optional parameter "maxResults": The maximum 19224// number of order returns to return in the response, used for paging. 19225// The default value is 25 returns per page, and the maximum allowed 19226// value is 250 returns per page. 19227func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { 19228 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19229 return c 19230} 19231 19232// OrderBy sets the optional parameter "orderBy": Return the results in 19233// the specified order. 19234// 19235// Possible values: 19236// "RETURN_CREATION_TIME_DESC" 19237// "RETURN_CREATION_TIME_ASC" 19238func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { 19239 c.urlParams_.Set("orderBy", orderBy) 19240 return c 19241} 19242 19243// PageToken sets the optional parameter "pageToken": The token returned 19244// by the previous request. 19245func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { 19246 c.urlParams_.Set("pageToken", pageToken) 19247 return c 19248} 19249 19250// Fields allows partial responses to be retrieved. See 19251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19252// for more information. 19253func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { 19254 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19255 return c 19256} 19257 19258// IfNoneMatch sets the optional parameter which makes the operation 19259// fail if the object's ETag matches the given value. This is useful for 19260// getting updates only after the object has changed since the last 19261// request. Use googleapi.IsNotModified to check whether the response 19262// error from Do is the result of In-None-Match. 19263func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { 19264 c.ifNoneMatch_ = entityTag 19265 return c 19266} 19267 19268// Context sets the context to be used in this call's Do method. Any 19269// pending HTTP request will be aborted if the provided context is 19270// canceled. 19271func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { 19272 c.ctx_ = ctx 19273 return c 19274} 19275 19276// Header returns an http.Header that can be modified by the caller to 19277// add HTTP headers to the request. 19278func (c *OrderreturnsListCall) Header() http.Header { 19279 if c.header_ == nil { 19280 c.header_ = make(http.Header) 19281 } 19282 return c.header_ 19283} 19284 19285func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { 19286 reqHeaders := make(http.Header) 19287 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19288 for k, v := range c.header_ { 19289 reqHeaders[k] = v 19290 } 19291 reqHeaders.Set("User-Agent", c.s.userAgent()) 19292 if c.ifNoneMatch_ != "" { 19293 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19294 } 19295 var body io.Reader = nil 19296 c.urlParams_.Set("alt", alt) 19297 c.urlParams_.Set("prettyPrint", "false") 19298 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") 19299 urls += "?" + c.urlParams_.Encode() 19300 req, err := http.NewRequest("GET", urls, body) 19301 if err != nil { 19302 return nil, err 19303 } 19304 req.Header = reqHeaders 19305 googleapi.Expand(req.URL, map[string]string{ 19306 "merchantId": strconv.FormatUint(c.merchantId, 10), 19307 }) 19308 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19309} 19310 19311// Do executes the "content.orderreturns.list" call. 19312// Exactly one of *OrderreturnsListResponse or error will be non-nil. 19313// Any non-2xx status code is an error. Response headers are in either 19314// *OrderreturnsListResponse.ServerResponse.Header or (if a response was 19315// returned at all) in error.(*googleapi.Error).Header. Use 19316// googleapi.IsNotModified to check whether the returned error was 19317// because http.StatusNotModified was returned. 19318func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { 19319 gensupport.SetOptions(c.urlParams_, opts...) 19320 res, err := c.doRequest("json") 19321 if res != nil && res.StatusCode == http.StatusNotModified { 19322 if res.Body != nil { 19323 res.Body.Close() 19324 } 19325 return nil, &googleapi.Error{ 19326 Code: res.StatusCode, 19327 Header: res.Header, 19328 } 19329 } 19330 if err != nil { 19331 return nil, err 19332 } 19333 defer googleapi.CloseBody(res) 19334 if err := googleapi.CheckResponse(res); err != nil { 19335 return nil, err 19336 } 19337 ret := &OrderreturnsListResponse{ 19338 ServerResponse: googleapi.ServerResponse{ 19339 Header: res.Header, 19340 HTTPStatusCode: res.StatusCode, 19341 }, 19342 } 19343 target := &ret 19344 if err := gensupport.DecodeResponse(target, res); err != nil { 19345 return nil, err 19346 } 19347 return ret, nil 19348 // { 19349 // "description": "Lists order returns in your Merchant Center account.", 19350 // "flatPath": "{merchantId}/orderreturns", 19351 // "httpMethod": "GET", 19352 // "id": "content.orderreturns.list", 19353 // "parameterOrder": [ 19354 // "merchantId" 19355 // ], 19356 // "parameters": { 19357 // "createdEndDate": { 19358 // "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", 19359 // "location": "query", 19360 // "type": "string" 19361 // }, 19362 // "createdStartDate": { 19363 // "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", 19364 // "location": "query", 19365 // "type": "string" 19366 // }, 19367 // "maxResults": { 19368 // "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.", 19369 // "format": "uint32", 19370 // "location": "query", 19371 // "type": "integer" 19372 // }, 19373 // "merchantId": { 19374 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19375 // "format": "uint64", 19376 // "location": "path", 19377 // "required": true, 19378 // "type": "string" 19379 // }, 19380 // "orderBy": { 19381 // "description": "Return the results in the specified order.", 19382 // "enum": [ 19383 // "RETURN_CREATION_TIME_DESC", 19384 // "RETURN_CREATION_TIME_ASC" 19385 // ], 19386 // "enumDescriptions": [ 19387 // "", 19388 // "" 19389 // ], 19390 // "location": "query", 19391 // "type": "string" 19392 // }, 19393 // "pageToken": { 19394 // "description": "The token returned by the previous request.", 19395 // "location": "query", 19396 // "type": "string" 19397 // } 19398 // }, 19399 // "path": "{merchantId}/orderreturns", 19400 // "response": { 19401 // "$ref": "OrderreturnsListResponse" 19402 // }, 19403 // "scopes": [ 19404 // "https://www.googleapis.com/auth/content" 19405 // ] 19406 // } 19407 19408} 19409 19410// Pages invokes f for each page of results. 19411// A non-nil error returned from f will halt the iteration. 19412// The provided context supersedes any context provided to the Context method. 19413func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { 19414 c.ctx_ = ctx 19415 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19416 for { 19417 x, err := c.Do() 19418 if err != nil { 19419 return err 19420 } 19421 if err := f(x); err != nil { 19422 return err 19423 } 19424 if x.NextPageToken == "" { 19425 return nil 19426 } 19427 c.PageToken(x.NextPageToken) 19428 } 19429} 19430 19431// method id "content.orders.acknowledge": 19432 19433type OrdersAcknowledgeCall struct { 19434 s *APIService 19435 merchantId uint64 19436 orderId string 19437 ordersacknowledgerequest *OrdersAcknowledgeRequest 19438 urlParams_ gensupport.URLParams 19439 ctx_ context.Context 19440 header_ http.Header 19441} 19442 19443// Acknowledge: Marks an order as acknowledged. 19444// 19445// - merchantId: The ID of the account that manages the order. This 19446// cannot be a multi-client account. 19447// - orderId: The ID of the order. 19448func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { 19449 c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19450 c.merchantId = merchantId 19451 c.orderId = orderId 19452 c.ordersacknowledgerequest = ordersacknowledgerequest 19453 return c 19454} 19455 19456// Fields allows partial responses to be retrieved. See 19457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19458// for more information. 19459func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { 19460 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19461 return c 19462} 19463 19464// Context sets the context to be used in this call's Do method. Any 19465// pending HTTP request will be aborted if the provided context is 19466// canceled. 19467func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { 19468 c.ctx_ = ctx 19469 return c 19470} 19471 19472// Header returns an http.Header that can be modified by the caller to 19473// add HTTP headers to the request. 19474func (c *OrdersAcknowledgeCall) Header() http.Header { 19475 if c.header_ == nil { 19476 c.header_ = make(http.Header) 19477 } 19478 return c.header_ 19479} 19480 19481func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { 19482 reqHeaders := make(http.Header) 19483 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19484 for k, v := range c.header_ { 19485 reqHeaders[k] = v 19486 } 19487 reqHeaders.Set("User-Agent", c.s.userAgent()) 19488 var body io.Reader = nil 19489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) 19490 if err != nil { 19491 return nil, err 19492 } 19493 reqHeaders.Set("Content-Type", "application/json") 19494 c.urlParams_.Set("alt", alt) 19495 c.urlParams_.Set("prettyPrint", "false") 19496 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") 19497 urls += "?" + c.urlParams_.Encode() 19498 req, err := http.NewRequest("POST", urls, body) 19499 if err != nil { 19500 return nil, err 19501 } 19502 req.Header = reqHeaders 19503 googleapi.Expand(req.URL, map[string]string{ 19504 "merchantId": strconv.FormatUint(c.merchantId, 10), 19505 "orderId": c.orderId, 19506 }) 19507 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19508} 19509 19510// Do executes the "content.orders.acknowledge" call. 19511// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil. 19512// Any non-2xx status code is an error. Response headers are in either 19513// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response 19514// was returned at all) in error.(*googleapi.Error).Header. Use 19515// googleapi.IsNotModified to check whether the returned error was 19516// because http.StatusNotModified was returned. 19517func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { 19518 gensupport.SetOptions(c.urlParams_, opts...) 19519 res, err := c.doRequest("json") 19520 if res != nil && res.StatusCode == http.StatusNotModified { 19521 if res.Body != nil { 19522 res.Body.Close() 19523 } 19524 return nil, &googleapi.Error{ 19525 Code: res.StatusCode, 19526 Header: res.Header, 19527 } 19528 } 19529 if err != nil { 19530 return nil, err 19531 } 19532 defer googleapi.CloseBody(res) 19533 if err := googleapi.CheckResponse(res); err != nil { 19534 return nil, err 19535 } 19536 ret := &OrdersAcknowledgeResponse{ 19537 ServerResponse: googleapi.ServerResponse{ 19538 Header: res.Header, 19539 HTTPStatusCode: res.StatusCode, 19540 }, 19541 } 19542 target := &ret 19543 if err := gensupport.DecodeResponse(target, res); err != nil { 19544 return nil, err 19545 } 19546 return ret, nil 19547 // { 19548 // "description": "Marks an order as acknowledged.", 19549 // "flatPath": "{merchantId}/orders/{orderId}/acknowledge", 19550 // "httpMethod": "POST", 19551 // "id": "content.orders.acknowledge", 19552 // "parameterOrder": [ 19553 // "merchantId", 19554 // "orderId" 19555 // ], 19556 // "parameters": { 19557 // "merchantId": { 19558 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19559 // "format": "uint64", 19560 // "location": "path", 19561 // "required": true, 19562 // "type": "string" 19563 // }, 19564 // "orderId": { 19565 // "description": "The ID of the order.", 19566 // "location": "path", 19567 // "required": true, 19568 // "type": "string" 19569 // } 19570 // }, 19571 // "path": "{merchantId}/orders/{orderId}/acknowledge", 19572 // "request": { 19573 // "$ref": "OrdersAcknowledgeRequest" 19574 // }, 19575 // "response": { 19576 // "$ref": "OrdersAcknowledgeResponse" 19577 // }, 19578 // "scopes": [ 19579 // "https://www.googleapis.com/auth/content" 19580 // ] 19581 // } 19582 19583} 19584 19585// method id "content.orders.advancetestorder": 19586 19587type OrdersAdvancetestorderCall struct { 19588 s *APIService 19589 merchantId uint64 19590 orderId string 19591 urlParams_ gensupport.URLParams 19592 ctx_ context.Context 19593 header_ http.Header 19594} 19595 19596// Advancetestorder: Sandbox only. Moves a test order from state 19597// "inProgress" to state "pendingShipment". 19598// 19599// - merchantId: The ID of the account that manages the order. This 19600// cannot be a multi-client account. 19601// - orderId: The ID of the test order to modify. 19602func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { 19603 c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19604 c.merchantId = merchantId 19605 c.orderId = orderId 19606 return c 19607} 19608 19609// Fields allows partial responses to be retrieved. See 19610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19611// for more information. 19612func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { 19613 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19614 return c 19615} 19616 19617// Context sets the context to be used in this call's Do method. Any 19618// pending HTTP request will be aborted if the provided context is 19619// canceled. 19620func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { 19621 c.ctx_ = ctx 19622 return c 19623} 19624 19625// Header returns an http.Header that can be modified by the caller to 19626// add HTTP headers to the request. 19627func (c *OrdersAdvancetestorderCall) Header() http.Header { 19628 if c.header_ == nil { 19629 c.header_ = make(http.Header) 19630 } 19631 return c.header_ 19632} 19633 19634func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { 19635 reqHeaders := make(http.Header) 19636 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19637 for k, v := range c.header_ { 19638 reqHeaders[k] = v 19639 } 19640 reqHeaders.Set("User-Agent", c.s.userAgent()) 19641 var body io.Reader = nil 19642 c.urlParams_.Set("alt", alt) 19643 c.urlParams_.Set("prettyPrint", "false") 19644 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") 19645 urls += "?" + c.urlParams_.Encode() 19646 req, err := http.NewRequest("POST", urls, body) 19647 if err != nil { 19648 return nil, err 19649 } 19650 req.Header = reqHeaders 19651 googleapi.Expand(req.URL, map[string]string{ 19652 "merchantId": strconv.FormatUint(c.merchantId, 10), 19653 "orderId": c.orderId, 19654 }) 19655 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19656} 19657 19658// Do executes the "content.orders.advancetestorder" call. 19659// Exactly one of *OrdersAdvanceTestOrderResponse or error will be 19660// non-nil. Any non-2xx status code is an error. Response headers are in 19661// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a 19662// response was returned at all) in error.(*googleapi.Error).Header. Use 19663// googleapi.IsNotModified to check whether the returned error was 19664// because http.StatusNotModified was returned. 19665func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { 19666 gensupport.SetOptions(c.urlParams_, opts...) 19667 res, err := c.doRequest("json") 19668 if res != nil && res.StatusCode == http.StatusNotModified { 19669 if res.Body != nil { 19670 res.Body.Close() 19671 } 19672 return nil, &googleapi.Error{ 19673 Code: res.StatusCode, 19674 Header: res.Header, 19675 } 19676 } 19677 if err != nil { 19678 return nil, err 19679 } 19680 defer googleapi.CloseBody(res) 19681 if err := googleapi.CheckResponse(res); err != nil { 19682 return nil, err 19683 } 19684 ret := &OrdersAdvanceTestOrderResponse{ 19685 ServerResponse: googleapi.ServerResponse{ 19686 Header: res.Header, 19687 HTTPStatusCode: res.StatusCode, 19688 }, 19689 } 19690 target := &ret 19691 if err := gensupport.DecodeResponse(target, res); err != nil { 19692 return nil, err 19693 } 19694 return ret, nil 19695 // { 19696 // "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", 19697 // "flatPath": "{merchantId}/testorders/{orderId}/advance", 19698 // "httpMethod": "POST", 19699 // "id": "content.orders.advancetestorder", 19700 // "parameterOrder": [ 19701 // "merchantId", 19702 // "orderId" 19703 // ], 19704 // "parameters": { 19705 // "merchantId": { 19706 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19707 // "format": "uint64", 19708 // "location": "path", 19709 // "required": true, 19710 // "type": "string" 19711 // }, 19712 // "orderId": { 19713 // "description": "The ID of the test order to modify.", 19714 // "location": "path", 19715 // "required": true, 19716 // "type": "string" 19717 // } 19718 // }, 19719 // "path": "{merchantId}/testorders/{orderId}/advance", 19720 // "response": { 19721 // "$ref": "OrdersAdvanceTestOrderResponse" 19722 // }, 19723 // "scopes": [ 19724 // "https://www.googleapis.com/auth/content" 19725 // ] 19726 // } 19727 19728} 19729 19730// method id "content.orders.cancel": 19731 19732type OrdersCancelCall struct { 19733 s *APIService 19734 merchantId uint64 19735 orderId string 19736 orderscancelrequest *OrdersCancelRequest 19737 urlParams_ gensupport.URLParams 19738 ctx_ context.Context 19739 header_ http.Header 19740} 19741 19742// Cancel: Cancels all line items in an order, making a full refund. 19743// 19744// - merchantId: The ID of the account that manages the order. This 19745// cannot be a multi-client account. 19746// - orderId: The ID of the order to cancel. 19747func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { 19748 c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19749 c.merchantId = merchantId 19750 c.orderId = orderId 19751 c.orderscancelrequest = orderscancelrequest 19752 return c 19753} 19754 19755// Fields allows partial responses to be retrieved. See 19756// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19757// for more information. 19758func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { 19759 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19760 return c 19761} 19762 19763// Context sets the context to be used in this call's Do method. Any 19764// pending HTTP request will be aborted if the provided context is 19765// canceled. 19766func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { 19767 c.ctx_ = ctx 19768 return c 19769} 19770 19771// Header returns an http.Header that can be modified by the caller to 19772// add HTTP headers to the request. 19773func (c *OrdersCancelCall) Header() http.Header { 19774 if c.header_ == nil { 19775 c.header_ = make(http.Header) 19776 } 19777 return c.header_ 19778} 19779 19780func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { 19781 reqHeaders := make(http.Header) 19782 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19783 for k, v := range c.header_ { 19784 reqHeaders[k] = v 19785 } 19786 reqHeaders.Set("User-Agent", c.s.userAgent()) 19787 var body io.Reader = nil 19788 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) 19789 if err != nil { 19790 return nil, err 19791 } 19792 reqHeaders.Set("Content-Type", "application/json") 19793 c.urlParams_.Set("alt", alt) 19794 c.urlParams_.Set("prettyPrint", "false") 19795 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") 19796 urls += "?" + c.urlParams_.Encode() 19797 req, err := http.NewRequest("POST", urls, body) 19798 if err != nil { 19799 return nil, err 19800 } 19801 req.Header = reqHeaders 19802 googleapi.Expand(req.URL, map[string]string{ 19803 "merchantId": strconv.FormatUint(c.merchantId, 10), 19804 "orderId": c.orderId, 19805 }) 19806 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19807} 19808 19809// Do executes the "content.orders.cancel" call. 19810// Exactly one of *OrdersCancelResponse or error will be non-nil. Any 19811// non-2xx status code is an error. Response headers are in either 19812// *OrdersCancelResponse.ServerResponse.Header or (if a response was 19813// returned at all) in error.(*googleapi.Error).Header. Use 19814// googleapi.IsNotModified to check whether the returned error was 19815// because http.StatusNotModified was returned. 19816func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { 19817 gensupport.SetOptions(c.urlParams_, opts...) 19818 res, err := c.doRequest("json") 19819 if res != nil && res.StatusCode == http.StatusNotModified { 19820 if res.Body != nil { 19821 res.Body.Close() 19822 } 19823 return nil, &googleapi.Error{ 19824 Code: res.StatusCode, 19825 Header: res.Header, 19826 } 19827 } 19828 if err != nil { 19829 return nil, err 19830 } 19831 defer googleapi.CloseBody(res) 19832 if err := googleapi.CheckResponse(res); err != nil { 19833 return nil, err 19834 } 19835 ret := &OrdersCancelResponse{ 19836 ServerResponse: googleapi.ServerResponse{ 19837 Header: res.Header, 19838 HTTPStatusCode: res.StatusCode, 19839 }, 19840 } 19841 target := &ret 19842 if err := gensupport.DecodeResponse(target, res); err != nil { 19843 return nil, err 19844 } 19845 return ret, nil 19846 // { 19847 // "description": "Cancels all line items in an order, making a full refund.", 19848 // "flatPath": "{merchantId}/orders/{orderId}/cancel", 19849 // "httpMethod": "POST", 19850 // "id": "content.orders.cancel", 19851 // "parameterOrder": [ 19852 // "merchantId", 19853 // "orderId" 19854 // ], 19855 // "parameters": { 19856 // "merchantId": { 19857 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19858 // "format": "uint64", 19859 // "location": "path", 19860 // "required": true, 19861 // "type": "string" 19862 // }, 19863 // "orderId": { 19864 // "description": "The ID of the order to cancel.", 19865 // "location": "path", 19866 // "required": true, 19867 // "type": "string" 19868 // } 19869 // }, 19870 // "path": "{merchantId}/orders/{orderId}/cancel", 19871 // "request": { 19872 // "$ref": "OrdersCancelRequest" 19873 // }, 19874 // "response": { 19875 // "$ref": "OrdersCancelResponse" 19876 // }, 19877 // "scopes": [ 19878 // "https://www.googleapis.com/auth/content" 19879 // ] 19880 // } 19881 19882} 19883 19884// method id "content.orders.cancellineitem": 19885 19886type OrdersCancellineitemCall struct { 19887 s *APIService 19888 merchantId uint64 19889 orderId string 19890 orderscancellineitemrequest *OrdersCancelLineItemRequest 19891 urlParams_ gensupport.URLParams 19892 ctx_ context.Context 19893 header_ http.Header 19894} 19895 19896// Cancellineitem: Cancels a line item, making a full refund. 19897// 19898// - merchantId: The ID of the account that manages the order. This 19899// cannot be a multi-client account. 19900// - orderId: The ID of the order. 19901func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { 19902 c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19903 c.merchantId = merchantId 19904 c.orderId = orderId 19905 c.orderscancellineitemrequest = orderscancellineitemrequest 19906 return c 19907} 19908 19909// Fields allows partial responses to be retrieved. See 19910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19911// for more information. 19912func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { 19913 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19914 return c 19915} 19916 19917// Context sets the context to be used in this call's Do method. Any 19918// pending HTTP request will be aborted if the provided context is 19919// canceled. 19920func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { 19921 c.ctx_ = ctx 19922 return c 19923} 19924 19925// Header returns an http.Header that can be modified by the caller to 19926// add HTTP headers to the request. 19927func (c *OrdersCancellineitemCall) Header() http.Header { 19928 if c.header_ == nil { 19929 c.header_ = make(http.Header) 19930 } 19931 return c.header_ 19932} 19933 19934func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { 19935 reqHeaders := make(http.Header) 19936 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 19937 for k, v := range c.header_ { 19938 reqHeaders[k] = v 19939 } 19940 reqHeaders.Set("User-Agent", c.s.userAgent()) 19941 var body io.Reader = nil 19942 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) 19943 if err != nil { 19944 return nil, err 19945 } 19946 reqHeaders.Set("Content-Type", "application/json") 19947 c.urlParams_.Set("alt", alt) 19948 c.urlParams_.Set("prettyPrint", "false") 19949 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") 19950 urls += "?" + c.urlParams_.Encode() 19951 req, err := http.NewRequest("POST", urls, body) 19952 if err != nil { 19953 return nil, err 19954 } 19955 req.Header = reqHeaders 19956 googleapi.Expand(req.URL, map[string]string{ 19957 "merchantId": strconv.FormatUint(c.merchantId, 10), 19958 "orderId": c.orderId, 19959 }) 19960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19961} 19962 19963// Do executes the "content.orders.cancellineitem" call. 19964// Exactly one of *OrdersCancelLineItemResponse or error will be 19965// non-nil. Any non-2xx status code is an error. Response headers are in 19966// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a 19967// response was returned at all) in error.(*googleapi.Error).Header. Use 19968// googleapi.IsNotModified to check whether the returned error was 19969// because http.StatusNotModified was returned. 19970func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { 19971 gensupport.SetOptions(c.urlParams_, opts...) 19972 res, err := c.doRequest("json") 19973 if res != nil && res.StatusCode == http.StatusNotModified { 19974 if res.Body != nil { 19975 res.Body.Close() 19976 } 19977 return nil, &googleapi.Error{ 19978 Code: res.StatusCode, 19979 Header: res.Header, 19980 } 19981 } 19982 if err != nil { 19983 return nil, err 19984 } 19985 defer googleapi.CloseBody(res) 19986 if err := googleapi.CheckResponse(res); err != nil { 19987 return nil, err 19988 } 19989 ret := &OrdersCancelLineItemResponse{ 19990 ServerResponse: googleapi.ServerResponse{ 19991 Header: res.Header, 19992 HTTPStatusCode: res.StatusCode, 19993 }, 19994 } 19995 target := &ret 19996 if err := gensupport.DecodeResponse(target, res); err != nil { 19997 return nil, err 19998 } 19999 return ret, nil 20000 // { 20001 // "description": "Cancels a line item, making a full refund.", 20002 // "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", 20003 // "httpMethod": "POST", 20004 // "id": "content.orders.cancellineitem", 20005 // "parameterOrder": [ 20006 // "merchantId", 20007 // "orderId" 20008 // ], 20009 // "parameters": { 20010 // "merchantId": { 20011 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20012 // "format": "uint64", 20013 // "location": "path", 20014 // "required": true, 20015 // "type": "string" 20016 // }, 20017 // "orderId": { 20018 // "description": "The ID of the order.", 20019 // "location": "path", 20020 // "required": true, 20021 // "type": "string" 20022 // } 20023 // }, 20024 // "path": "{merchantId}/orders/{orderId}/cancelLineItem", 20025 // "request": { 20026 // "$ref": "OrdersCancelLineItemRequest" 20027 // }, 20028 // "response": { 20029 // "$ref": "OrdersCancelLineItemResponse" 20030 // }, 20031 // "scopes": [ 20032 // "https://www.googleapis.com/auth/content" 20033 // ] 20034 // } 20035 20036} 20037 20038// method id "content.orders.canceltestorderbycustomer": 20039 20040type OrdersCanceltestorderbycustomerCall struct { 20041 s *APIService 20042 merchantId uint64 20043 orderId string 20044 orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest 20045 urlParams_ gensupport.URLParams 20046 ctx_ context.Context 20047 header_ http.Header 20048} 20049 20050// Canceltestorderbycustomer: Sandbox only. Cancels a test order for 20051// customer-initiated cancellation. 20052// 20053// - merchantId: The ID of the account that manages the order. This 20054// cannot be a multi-client account. 20055// - orderId: The ID of the test order to cancel. 20056func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { 20057 c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20058 c.merchantId = merchantId 20059 c.orderId = orderId 20060 c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest 20061 return c 20062} 20063 20064// Fields allows partial responses to be retrieved. See 20065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20066// for more information. 20067func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { 20068 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20069 return c 20070} 20071 20072// Context sets the context to be used in this call's Do method. Any 20073// pending HTTP request will be aborted if the provided context is 20074// canceled. 20075func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { 20076 c.ctx_ = ctx 20077 return c 20078} 20079 20080// Header returns an http.Header that can be modified by the caller to 20081// add HTTP headers to the request. 20082func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header { 20083 if c.header_ == nil { 20084 c.header_ = make(http.Header) 20085 } 20086 return c.header_ 20087} 20088 20089func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { 20090 reqHeaders := make(http.Header) 20091 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20092 for k, v := range c.header_ { 20093 reqHeaders[k] = v 20094 } 20095 reqHeaders.Set("User-Agent", c.s.userAgent()) 20096 var body io.Reader = nil 20097 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) 20098 if err != nil { 20099 return nil, err 20100 } 20101 reqHeaders.Set("Content-Type", "application/json") 20102 c.urlParams_.Set("alt", alt) 20103 c.urlParams_.Set("prettyPrint", "false") 20104 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") 20105 urls += "?" + c.urlParams_.Encode() 20106 req, err := http.NewRequest("POST", urls, body) 20107 if err != nil { 20108 return nil, err 20109 } 20110 req.Header = reqHeaders 20111 googleapi.Expand(req.URL, map[string]string{ 20112 "merchantId": strconv.FormatUint(c.merchantId, 10), 20113 "orderId": c.orderId, 20114 }) 20115 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20116} 20117 20118// Do executes the "content.orders.canceltestorderbycustomer" call. 20119// Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will 20120// be non-nil. Any non-2xx status code is an error. Response headers are 20121// in either 20122// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if 20123// a response was returned at all) in error.(*googleapi.Error).Header. 20124// Use googleapi.IsNotModified to check whether the returned error was 20125// because http.StatusNotModified was returned. 20126func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { 20127 gensupport.SetOptions(c.urlParams_, opts...) 20128 res, err := c.doRequest("json") 20129 if res != nil && res.StatusCode == http.StatusNotModified { 20130 if res.Body != nil { 20131 res.Body.Close() 20132 } 20133 return nil, &googleapi.Error{ 20134 Code: res.StatusCode, 20135 Header: res.Header, 20136 } 20137 } 20138 if err != nil { 20139 return nil, err 20140 } 20141 defer googleapi.CloseBody(res) 20142 if err := googleapi.CheckResponse(res); err != nil { 20143 return nil, err 20144 } 20145 ret := &OrdersCancelTestOrderByCustomerResponse{ 20146 ServerResponse: googleapi.ServerResponse{ 20147 Header: res.Header, 20148 HTTPStatusCode: res.StatusCode, 20149 }, 20150 } 20151 target := &ret 20152 if err := gensupport.DecodeResponse(target, res); err != nil { 20153 return nil, err 20154 } 20155 return ret, nil 20156 // { 20157 // "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", 20158 // "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", 20159 // "httpMethod": "POST", 20160 // "id": "content.orders.canceltestorderbycustomer", 20161 // "parameterOrder": [ 20162 // "merchantId", 20163 // "orderId" 20164 // ], 20165 // "parameters": { 20166 // "merchantId": { 20167 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20168 // "format": "uint64", 20169 // "location": "path", 20170 // "required": true, 20171 // "type": "string" 20172 // }, 20173 // "orderId": { 20174 // "description": "The ID of the test order to cancel.", 20175 // "location": "path", 20176 // "required": true, 20177 // "type": "string" 20178 // } 20179 // }, 20180 // "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", 20181 // "request": { 20182 // "$ref": "OrdersCancelTestOrderByCustomerRequest" 20183 // }, 20184 // "response": { 20185 // "$ref": "OrdersCancelTestOrderByCustomerResponse" 20186 // }, 20187 // "scopes": [ 20188 // "https://www.googleapis.com/auth/content" 20189 // ] 20190 // } 20191 20192} 20193 20194// method id "content.orders.createtestorder": 20195 20196type OrdersCreatetestorderCall struct { 20197 s *APIService 20198 merchantId uint64 20199 orderscreatetestorderrequest *OrdersCreateTestOrderRequest 20200 urlParams_ gensupport.URLParams 20201 ctx_ context.Context 20202 header_ http.Header 20203} 20204 20205// Createtestorder: Sandbox only. Creates a test order. 20206// 20207// - merchantId: The ID of the account that should manage the order. 20208// This cannot be a multi-client account. 20209func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { 20210 c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20211 c.merchantId = merchantId 20212 c.orderscreatetestorderrequest = orderscreatetestorderrequest 20213 return c 20214} 20215 20216// Fields allows partial responses to be retrieved. See 20217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20218// for more information. 20219func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { 20220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20221 return c 20222} 20223 20224// Context sets the context to be used in this call's Do method. Any 20225// pending HTTP request will be aborted if the provided context is 20226// canceled. 20227func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { 20228 c.ctx_ = ctx 20229 return c 20230} 20231 20232// Header returns an http.Header that can be modified by the caller to 20233// add HTTP headers to the request. 20234func (c *OrdersCreatetestorderCall) Header() http.Header { 20235 if c.header_ == nil { 20236 c.header_ = make(http.Header) 20237 } 20238 return c.header_ 20239} 20240 20241func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { 20242 reqHeaders := make(http.Header) 20243 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20244 for k, v := range c.header_ { 20245 reqHeaders[k] = v 20246 } 20247 reqHeaders.Set("User-Agent", c.s.userAgent()) 20248 var body io.Reader = nil 20249 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) 20250 if err != nil { 20251 return nil, err 20252 } 20253 reqHeaders.Set("Content-Type", "application/json") 20254 c.urlParams_.Set("alt", alt) 20255 c.urlParams_.Set("prettyPrint", "false") 20256 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") 20257 urls += "?" + c.urlParams_.Encode() 20258 req, err := http.NewRequest("POST", urls, body) 20259 if err != nil { 20260 return nil, err 20261 } 20262 req.Header = reqHeaders 20263 googleapi.Expand(req.URL, map[string]string{ 20264 "merchantId": strconv.FormatUint(c.merchantId, 10), 20265 }) 20266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20267} 20268 20269// Do executes the "content.orders.createtestorder" call. 20270// Exactly one of *OrdersCreateTestOrderResponse or error will be 20271// non-nil. Any non-2xx status code is an error. Response headers are in 20272// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a 20273// response was returned at all) in error.(*googleapi.Error).Header. Use 20274// googleapi.IsNotModified to check whether the returned error was 20275// because http.StatusNotModified was returned. 20276func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { 20277 gensupport.SetOptions(c.urlParams_, opts...) 20278 res, err := c.doRequest("json") 20279 if res != nil && res.StatusCode == http.StatusNotModified { 20280 if res.Body != nil { 20281 res.Body.Close() 20282 } 20283 return nil, &googleapi.Error{ 20284 Code: res.StatusCode, 20285 Header: res.Header, 20286 } 20287 } 20288 if err != nil { 20289 return nil, err 20290 } 20291 defer googleapi.CloseBody(res) 20292 if err := googleapi.CheckResponse(res); err != nil { 20293 return nil, err 20294 } 20295 ret := &OrdersCreateTestOrderResponse{ 20296 ServerResponse: googleapi.ServerResponse{ 20297 Header: res.Header, 20298 HTTPStatusCode: res.StatusCode, 20299 }, 20300 } 20301 target := &ret 20302 if err := gensupport.DecodeResponse(target, res); err != nil { 20303 return nil, err 20304 } 20305 return ret, nil 20306 // { 20307 // "description": "Sandbox only. Creates a test order.", 20308 // "flatPath": "{merchantId}/testorders", 20309 // "httpMethod": "POST", 20310 // "id": "content.orders.createtestorder", 20311 // "parameterOrder": [ 20312 // "merchantId" 20313 // ], 20314 // "parameters": { 20315 // "merchantId": { 20316 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 20317 // "format": "uint64", 20318 // "location": "path", 20319 // "required": true, 20320 // "type": "string" 20321 // } 20322 // }, 20323 // "path": "{merchantId}/testorders", 20324 // "request": { 20325 // "$ref": "OrdersCreateTestOrderRequest" 20326 // }, 20327 // "response": { 20328 // "$ref": "OrdersCreateTestOrderResponse" 20329 // }, 20330 // "scopes": [ 20331 // "https://www.googleapis.com/auth/content" 20332 // ] 20333 // } 20334 20335} 20336 20337// method id "content.orders.createtestreturn": 20338 20339type OrdersCreatetestreturnCall struct { 20340 s *APIService 20341 merchantId uint64 20342 orderId string 20343 orderscreatetestreturnrequest *OrdersCreateTestReturnRequest 20344 urlParams_ gensupport.URLParams 20345 ctx_ context.Context 20346 header_ http.Header 20347} 20348 20349// Createtestreturn: Sandbox only. Creates a test return. 20350// 20351// - merchantId: The ID of the account that manages the order. This 20352// cannot be a multi-client account. 20353// - orderId: The ID of the order. 20354func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { 20355 c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20356 c.merchantId = merchantId 20357 c.orderId = orderId 20358 c.orderscreatetestreturnrequest = orderscreatetestreturnrequest 20359 return c 20360} 20361 20362// Fields allows partial responses to be retrieved. See 20363// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20364// for more information. 20365func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { 20366 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20367 return c 20368} 20369 20370// Context sets the context to be used in this call's Do method. Any 20371// pending HTTP request will be aborted if the provided context is 20372// canceled. 20373func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { 20374 c.ctx_ = ctx 20375 return c 20376} 20377 20378// Header returns an http.Header that can be modified by the caller to 20379// add HTTP headers to the request. 20380func (c *OrdersCreatetestreturnCall) Header() http.Header { 20381 if c.header_ == nil { 20382 c.header_ = make(http.Header) 20383 } 20384 return c.header_ 20385} 20386 20387func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { 20388 reqHeaders := make(http.Header) 20389 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20390 for k, v := range c.header_ { 20391 reqHeaders[k] = v 20392 } 20393 reqHeaders.Set("User-Agent", c.s.userAgent()) 20394 var body io.Reader = nil 20395 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest) 20396 if err != nil { 20397 return nil, err 20398 } 20399 reqHeaders.Set("Content-Type", "application/json") 20400 c.urlParams_.Set("alt", alt) 20401 c.urlParams_.Set("prettyPrint", "false") 20402 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") 20403 urls += "?" + c.urlParams_.Encode() 20404 req, err := http.NewRequest("POST", urls, body) 20405 if err != nil { 20406 return nil, err 20407 } 20408 req.Header = reqHeaders 20409 googleapi.Expand(req.URL, map[string]string{ 20410 "merchantId": strconv.FormatUint(c.merchantId, 10), 20411 "orderId": c.orderId, 20412 }) 20413 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20414} 20415 20416// Do executes the "content.orders.createtestreturn" call. 20417// Exactly one of *OrdersCreateTestReturnResponse or error will be 20418// non-nil. Any non-2xx status code is an error. Response headers are in 20419// either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a 20420// response was returned at all) in error.(*googleapi.Error).Header. Use 20421// googleapi.IsNotModified to check whether the returned error was 20422// because http.StatusNotModified was returned. 20423func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { 20424 gensupport.SetOptions(c.urlParams_, opts...) 20425 res, err := c.doRequest("json") 20426 if res != nil && res.StatusCode == http.StatusNotModified { 20427 if res.Body != nil { 20428 res.Body.Close() 20429 } 20430 return nil, &googleapi.Error{ 20431 Code: res.StatusCode, 20432 Header: res.Header, 20433 } 20434 } 20435 if err != nil { 20436 return nil, err 20437 } 20438 defer googleapi.CloseBody(res) 20439 if err := googleapi.CheckResponse(res); err != nil { 20440 return nil, err 20441 } 20442 ret := &OrdersCreateTestReturnResponse{ 20443 ServerResponse: googleapi.ServerResponse{ 20444 Header: res.Header, 20445 HTTPStatusCode: res.StatusCode, 20446 }, 20447 } 20448 target := &ret 20449 if err := gensupport.DecodeResponse(target, res); err != nil { 20450 return nil, err 20451 } 20452 return ret, nil 20453 // { 20454 // "description": "Sandbox only. Creates a test return.", 20455 // "flatPath": "{merchantId}/orders/{orderId}/testreturn", 20456 // "httpMethod": "POST", 20457 // "id": "content.orders.createtestreturn", 20458 // "parameterOrder": [ 20459 // "merchantId", 20460 // "orderId" 20461 // ], 20462 // "parameters": { 20463 // "merchantId": { 20464 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20465 // "format": "uint64", 20466 // "location": "path", 20467 // "required": true, 20468 // "type": "string" 20469 // }, 20470 // "orderId": { 20471 // "description": "The ID of the order.", 20472 // "location": "path", 20473 // "required": true, 20474 // "type": "string" 20475 // } 20476 // }, 20477 // "path": "{merchantId}/orders/{orderId}/testreturn", 20478 // "request": { 20479 // "$ref": "OrdersCreateTestReturnRequest" 20480 // }, 20481 // "response": { 20482 // "$ref": "OrdersCreateTestReturnResponse" 20483 // }, 20484 // "scopes": [ 20485 // "https://www.googleapis.com/auth/content" 20486 // ] 20487 // } 20488 20489} 20490 20491// method id "content.orders.custombatch": 20492 20493type OrdersCustombatchCall struct { 20494 s *APIService 20495 orderscustombatchrequest *OrdersCustomBatchRequest 20496 urlParams_ gensupport.URLParams 20497 ctx_ context.Context 20498 header_ http.Header 20499} 20500 20501// Custombatch: Retrieves or modifies multiple orders in a single 20502// request. 20503func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall { 20504 c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20505 c.orderscustombatchrequest = orderscustombatchrequest 20506 return c 20507} 20508 20509// Fields allows partial responses to be retrieved. See 20510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20511// for more information. 20512func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall { 20513 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20514 return c 20515} 20516 20517// Context sets the context to be used in this call's Do method. Any 20518// pending HTTP request will be aborted if the provided context is 20519// canceled. 20520func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall { 20521 c.ctx_ = ctx 20522 return c 20523} 20524 20525// Header returns an http.Header that can be modified by the caller to 20526// add HTTP headers to the request. 20527func (c *OrdersCustombatchCall) Header() http.Header { 20528 if c.header_ == nil { 20529 c.header_ = make(http.Header) 20530 } 20531 return c.header_ 20532} 20533 20534func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) { 20535 reqHeaders := make(http.Header) 20536 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20537 for k, v := range c.header_ { 20538 reqHeaders[k] = v 20539 } 20540 reqHeaders.Set("User-Agent", c.s.userAgent()) 20541 var body io.Reader = nil 20542 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest) 20543 if err != nil { 20544 return nil, err 20545 } 20546 reqHeaders.Set("Content-Type", "application/json") 20547 c.urlParams_.Set("alt", alt) 20548 c.urlParams_.Set("prettyPrint", "false") 20549 urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch") 20550 urls += "?" + c.urlParams_.Encode() 20551 req, err := http.NewRequest("POST", urls, body) 20552 if err != nil { 20553 return nil, err 20554 } 20555 req.Header = reqHeaders 20556 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20557} 20558 20559// Do executes the "content.orders.custombatch" call. 20560// Exactly one of *OrdersCustomBatchResponse or error will be non-nil. 20561// Any non-2xx status code is an error. Response headers are in either 20562// *OrdersCustomBatchResponse.ServerResponse.Header or (if a response 20563// was returned at all) in error.(*googleapi.Error).Header. Use 20564// googleapi.IsNotModified to check whether the returned error was 20565// because http.StatusNotModified was returned. 20566func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) { 20567 gensupport.SetOptions(c.urlParams_, opts...) 20568 res, err := c.doRequest("json") 20569 if res != nil && res.StatusCode == http.StatusNotModified { 20570 if res.Body != nil { 20571 res.Body.Close() 20572 } 20573 return nil, &googleapi.Error{ 20574 Code: res.StatusCode, 20575 Header: res.Header, 20576 } 20577 } 20578 if err != nil { 20579 return nil, err 20580 } 20581 defer googleapi.CloseBody(res) 20582 if err := googleapi.CheckResponse(res); err != nil { 20583 return nil, err 20584 } 20585 ret := &OrdersCustomBatchResponse{ 20586 ServerResponse: googleapi.ServerResponse{ 20587 Header: res.Header, 20588 HTTPStatusCode: res.StatusCode, 20589 }, 20590 } 20591 target := &ret 20592 if err := gensupport.DecodeResponse(target, res); err != nil { 20593 return nil, err 20594 } 20595 return ret, nil 20596 // { 20597 // "description": "Retrieves or modifies multiple orders in a single request.", 20598 // "flatPath": "orders/batch", 20599 // "httpMethod": "POST", 20600 // "id": "content.orders.custombatch", 20601 // "parameterOrder": [], 20602 // "parameters": {}, 20603 // "path": "orders/batch", 20604 // "request": { 20605 // "$ref": "OrdersCustomBatchRequest" 20606 // }, 20607 // "response": { 20608 // "$ref": "OrdersCustomBatchResponse" 20609 // }, 20610 // "scopes": [ 20611 // "https://www.googleapis.com/auth/content" 20612 // ] 20613 // } 20614 20615} 20616 20617// method id "content.orders.get": 20618 20619type OrdersGetCall struct { 20620 s *APIService 20621 merchantId uint64 20622 orderId string 20623 urlParams_ gensupport.URLParams 20624 ifNoneMatch_ string 20625 ctx_ context.Context 20626 header_ http.Header 20627} 20628 20629// Get: Retrieves an order from your Merchant Center account. 20630// 20631// - merchantId: The ID of the account that manages the order. This 20632// cannot be a multi-client account. 20633// - orderId: The ID of the order. 20634func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { 20635 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20636 c.merchantId = merchantId 20637 c.orderId = orderId 20638 return c 20639} 20640 20641// Fields allows partial responses to be retrieved. See 20642// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20643// for more information. 20644func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { 20645 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20646 return c 20647} 20648 20649// IfNoneMatch sets the optional parameter which makes the operation 20650// fail if the object's ETag matches the given value. This is useful for 20651// getting updates only after the object has changed since the last 20652// request. Use googleapi.IsNotModified to check whether the response 20653// error from Do is the result of In-None-Match. 20654func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { 20655 c.ifNoneMatch_ = entityTag 20656 return c 20657} 20658 20659// Context sets the context to be used in this call's Do method. Any 20660// pending HTTP request will be aborted if the provided context is 20661// canceled. 20662func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { 20663 c.ctx_ = ctx 20664 return c 20665} 20666 20667// Header returns an http.Header that can be modified by the caller to 20668// add HTTP headers to the request. 20669func (c *OrdersGetCall) Header() http.Header { 20670 if c.header_ == nil { 20671 c.header_ = make(http.Header) 20672 } 20673 return c.header_ 20674} 20675 20676func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { 20677 reqHeaders := make(http.Header) 20678 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20679 for k, v := range c.header_ { 20680 reqHeaders[k] = v 20681 } 20682 reqHeaders.Set("User-Agent", c.s.userAgent()) 20683 if c.ifNoneMatch_ != "" { 20684 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20685 } 20686 var body io.Reader = nil 20687 c.urlParams_.Set("alt", alt) 20688 c.urlParams_.Set("prettyPrint", "false") 20689 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") 20690 urls += "?" + c.urlParams_.Encode() 20691 req, err := http.NewRequest("GET", urls, body) 20692 if err != nil { 20693 return nil, err 20694 } 20695 req.Header = reqHeaders 20696 googleapi.Expand(req.URL, map[string]string{ 20697 "merchantId": strconv.FormatUint(c.merchantId, 10), 20698 "orderId": c.orderId, 20699 }) 20700 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20701} 20702 20703// Do executes the "content.orders.get" call. 20704// Exactly one of *Order or error will be non-nil. Any non-2xx status 20705// code is an error. Response headers are in either 20706// *Order.ServerResponse.Header or (if a response was returned at all) 20707// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 20708// check whether the returned error was because http.StatusNotModified 20709// was returned. 20710func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { 20711 gensupport.SetOptions(c.urlParams_, opts...) 20712 res, err := c.doRequest("json") 20713 if res != nil && res.StatusCode == http.StatusNotModified { 20714 if res.Body != nil { 20715 res.Body.Close() 20716 } 20717 return nil, &googleapi.Error{ 20718 Code: res.StatusCode, 20719 Header: res.Header, 20720 } 20721 } 20722 if err != nil { 20723 return nil, err 20724 } 20725 defer googleapi.CloseBody(res) 20726 if err := googleapi.CheckResponse(res); err != nil { 20727 return nil, err 20728 } 20729 ret := &Order{ 20730 ServerResponse: googleapi.ServerResponse{ 20731 Header: res.Header, 20732 HTTPStatusCode: res.StatusCode, 20733 }, 20734 } 20735 target := &ret 20736 if err := gensupport.DecodeResponse(target, res); err != nil { 20737 return nil, err 20738 } 20739 return ret, nil 20740 // { 20741 // "description": "Retrieves an order from your Merchant Center account.", 20742 // "flatPath": "{merchantId}/orders/{orderId}", 20743 // "httpMethod": "GET", 20744 // "id": "content.orders.get", 20745 // "parameterOrder": [ 20746 // "merchantId", 20747 // "orderId" 20748 // ], 20749 // "parameters": { 20750 // "merchantId": { 20751 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20752 // "format": "uint64", 20753 // "location": "path", 20754 // "required": true, 20755 // "type": "string" 20756 // }, 20757 // "orderId": { 20758 // "description": "The ID of the order.", 20759 // "location": "path", 20760 // "required": true, 20761 // "type": "string" 20762 // } 20763 // }, 20764 // "path": "{merchantId}/orders/{orderId}", 20765 // "response": { 20766 // "$ref": "Order" 20767 // }, 20768 // "scopes": [ 20769 // "https://www.googleapis.com/auth/content" 20770 // ] 20771 // } 20772 20773} 20774 20775// method id "content.orders.getbymerchantorderid": 20776 20777type OrdersGetbymerchantorderidCall struct { 20778 s *APIService 20779 merchantId uint64 20780 merchantOrderId string 20781 urlParams_ gensupport.URLParams 20782 ifNoneMatch_ string 20783 ctx_ context.Context 20784 header_ http.Header 20785} 20786 20787// Getbymerchantorderid: Retrieves an order using merchant order ID. 20788// 20789// - merchantId: The ID of the account that manages the order. This 20790// cannot be a multi-client account. 20791// - merchantOrderId: The merchant order ID to be looked for. 20792func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { 20793 c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20794 c.merchantId = merchantId 20795 c.merchantOrderId = merchantOrderId 20796 return c 20797} 20798 20799// Fields allows partial responses to be retrieved. See 20800// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20801// for more information. 20802func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { 20803 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20804 return c 20805} 20806 20807// IfNoneMatch sets the optional parameter which makes the operation 20808// fail if the object's ETag matches the given value. This is useful for 20809// getting updates only after the object has changed since the last 20810// request. Use googleapi.IsNotModified to check whether the response 20811// error from Do is the result of In-None-Match. 20812func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { 20813 c.ifNoneMatch_ = entityTag 20814 return c 20815} 20816 20817// Context sets the context to be used in this call's Do method. Any 20818// pending HTTP request will be aborted if the provided context is 20819// canceled. 20820func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { 20821 c.ctx_ = ctx 20822 return c 20823} 20824 20825// Header returns an http.Header that can be modified by the caller to 20826// add HTTP headers to the request. 20827func (c *OrdersGetbymerchantorderidCall) Header() http.Header { 20828 if c.header_ == nil { 20829 c.header_ = make(http.Header) 20830 } 20831 return c.header_ 20832} 20833 20834func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { 20835 reqHeaders := make(http.Header) 20836 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 20837 for k, v := range c.header_ { 20838 reqHeaders[k] = v 20839 } 20840 reqHeaders.Set("User-Agent", c.s.userAgent()) 20841 if c.ifNoneMatch_ != "" { 20842 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20843 } 20844 var body io.Reader = nil 20845 c.urlParams_.Set("alt", alt) 20846 c.urlParams_.Set("prettyPrint", "false") 20847 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") 20848 urls += "?" + c.urlParams_.Encode() 20849 req, err := http.NewRequest("GET", urls, body) 20850 if err != nil { 20851 return nil, err 20852 } 20853 req.Header = reqHeaders 20854 googleapi.Expand(req.URL, map[string]string{ 20855 "merchantId": strconv.FormatUint(c.merchantId, 10), 20856 "merchantOrderId": c.merchantOrderId, 20857 }) 20858 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20859} 20860 20861// Do executes the "content.orders.getbymerchantorderid" call. 20862// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be 20863// non-nil. Any non-2xx status code is an error. Response headers are in 20864// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or 20865// (if a response was returned at all) in 20866// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20867// whether the returned error was because http.StatusNotModified was 20868// returned. 20869func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { 20870 gensupport.SetOptions(c.urlParams_, opts...) 20871 res, err := c.doRequest("json") 20872 if res != nil && res.StatusCode == http.StatusNotModified { 20873 if res.Body != nil { 20874 res.Body.Close() 20875 } 20876 return nil, &googleapi.Error{ 20877 Code: res.StatusCode, 20878 Header: res.Header, 20879 } 20880 } 20881 if err != nil { 20882 return nil, err 20883 } 20884 defer googleapi.CloseBody(res) 20885 if err := googleapi.CheckResponse(res); err != nil { 20886 return nil, err 20887 } 20888 ret := &OrdersGetByMerchantOrderIdResponse{ 20889 ServerResponse: googleapi.ServerResponse{ 20890 Header: res.Header, 20891 HTTPStatusCode: res.StatusCode, 20892 }, 20893 } 20894 target := &ret 20895 if err := gensupport.DecodeResponse(target, res); err != nil { 20896 return nil, err 20897 } 20898 return ret, nil 20899 // { 20900 // "description": "Retrieves an order using merchant order ID.", 20901 // "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 20902 // "httpMethod": "GET", 20903 // "id": "content.orders.getbymerchantorderid", 20904 // "parameterOrder": [ 20905 // "merchantId", 20906 // "merchantOrderId" 20907 // ], 20908 // "parameters": { 20909 // "merchantId": { 20910 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20911 // "format": "uint64", 20912 // "location": "path", 20913 // "required": true, 20914 // "type": "string" 20915 // }, 20916 // "merchantOrderId": { 20917 // "description": "The merchant order ID to be looked for.", 20918 // "location": "path", 20919 // "required": true, 20920 // "type": "string" 20921 // } 20922 // }, 20923 // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 20924 // "response": { 20925 // "$ref": "OrdersGetByMerchantOrderIdResponse" 20926 // }, 20927 // "scopes": [ 20928 // "https://www.googleapis.com/auth/content" 20929 // ] 20930 // } 20931 20932} 20933 20934// method id "content.orders.gettestordertemplate": 20935 20936type OrdersGettestordertemplateCall struct { 20937 s *APIService 20938 merchantId uint64 20939 templateName string 20940 urlParams_ gensupport.URLParams 20941 ifNoneMatch_ string 20942 ctx_ context.Context 20943 header_ http.Header 20944} 20945 20946// Gettestordertemplate: Sandbox only. Retrieves an order template that 20947// can be used to quickly create a new order in sandbox. 20948// 20949// - merchantId: The ID of the account that should manage the order. 20950// This cannot be a multi-client account. 20951// - templateName: The name of the template to retrieve. 20952func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { 20953 c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20954 c.merchantId = merchantId 20955 c.templateName = templateName 20956 return c 20957} 20958 20959// Country sets the optional parameter "country": The country of the 20960// template to retrieve. Defaults to `US`. 20961func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { 20962 c.urlParams_.Set("country", country) 20963 return c 20964} 20965 20966// Fields allows partial responses to be retrieved. See 20967// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20968// for more information. 20969func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { 20970 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20971 return c 20972} 20973 20974// IfNoneMatch sets the optional parameter which makes the operation 20975// fail if the object's ETag matches the given value. This is useful for 20976// getting updates only after the object has changed since the last 20977// request. Use googleapi.IsNotModified to check whether the response 20978// error from Do is the result of In-None-Match. 20979func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { 20980 c.ifNoneMatch_ = entityTag 20981 return c 20982} 20983 20984// Context sets the context to be used in this call's Do method. Any 20985// pending HTTP request will be aborted if the provided context is 20986// canceled. 20987func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { 20988 c.ctx_ = ctx 20989 return c 20990} 20991 20992// Header returns an http.Header that can be modified by the caller to 20993// add HTTP headers to the request. 20994func (c *OrdersGettestordertemplateCall) Header() http.Header { 20995 if c.header_ == nil { 20996 c.header_ = make(http.Header) 20997 } 20998 return c.header_ 20999} 21000 21001func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { 21002 reqHeaders := make(http.Header) 21003 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21004 for k, v := range c.header_ { 21005 reqHeaders[k] = v 21006 } 21007 reqHeaders.Set("User-Agent", c.s.userAgent()) 21008 if c.ifNoneMatch_ != "" { 21009 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21010 } 21011 var body io.Reader = nil 21012 c.urlParams_.Set("alt", alt) 21013 c.urlParams_.Set("prettyPrint", "false") 21014 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") 21015 urls += "?" + c.urlParams_.Encode() 21016 req, err := http.NewRequest("GET", urls, body) 21017 if err != nil { 21018 return nil, err 21019 } 21020 req.Header = reqHeaders 21021 googleapi.Expand(req.URL, map[string]string{ 21022 "merchantId": strconv.FormatUint(c.merchantId, 10), 21023 "templateName": c.templateName, 21024 }) 21025 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21026} 21027 21028// Do executes the "content.orders.gettestordertemplate" call. 21029// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be 21030// non-nil. Any non-2xx status code is an error. Response headers are in 21031// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or 21032// (if a response was returned at all) in 21033// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21034// whether the returned error was because http.StatusNotModified was 21035// returned. 21036func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { 21037 gensupport.SetOptions(c.urlParams_, opts...) 21038 res, err := c.doRequest("json") 21039 if res != nil && res.StatusCode == http.StatusNotModified { 21040 if res.Body != nil { 21041 res.Body.Close() 21042 } 21043 return nil, &googleapi.Error{ 21044 Code: res.StatusCode, 21045 Header: res.Header, 21046 } 21047 } 21048 if err != nil { 21049 return nil, err 21050 } 21051 defer googleapi.CloseBody(res) 21052 if err := googleapi.CheckResponse(res); err != nil { 21053 return nil, err 21054 } 21055 ret := &OrdersGetTestOrderTemplateResponse{ 21056 ServerResponse: googleapi.ServerResponse{ 21057 Header: res.Header, 21058 HTTPStatusCode: res.StatusCode, 21059 }, 21060 } 21061 target := &ret 21062 if err := gensupport.DecodeResponse(target, res); err != nil { 21063 return nil, err 21064 } 21065 return ret, nil 21066 // { 21067 // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", 21068 // "flatPath": "{merchantId}/testordertemplates/{templateName}", 21069 // "httpMethod": "GET", 21070 // "id": "content.orders.gettestordertemplate", 21071 // "parameterOrder": [ 21072 // "merchantId", 21073 // "templateName" 21074 // ], 21075 // "parameters": { 21076 // "country": { 21077 // "description": "The country of the template to retrieve. Defaults to `US`.", 21078 // "location": "query", 21079 // "type": "string" 21080 // }, 21081 // "merchantId": { 21082 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 21083 // "format": "uint64", 21084 // "location": "path", 21085 // "required": true, 21086 // "type": "string" 21087 // }, 21088 // "templateName": { 21089 // "description": "The name of the template to retrieve.", 21090 // "enum": [ 21091 // "TEMPLATE1", 21092 // "TEMPLATE2", 21093 // "TEMPLATE1A", 21094 // "TEMPLATE1B", 21095 // "TEMPLATE3" 21096 // ], 21097 // "enumDescriptions": [ 21098 // "", 21099 // "", 21100 // "", 21101 // "", 21102 // "" 21103 // ], 21104 // "location": "path", 21105 // "required": true, 21106 // "type": "string" 21107 // } 21108 // }, 21109 // "path": "{merchantId}/testordertemplates/{templateName}", 21110 // "response": { 21111 // "$ref": "OrdersGetTestOrderTemplateResponse" 21112 // }, 21113 // "scopes": [ 21114 // "https://www.googleapis.com/auth/content" 21115 // ] 21116 // } 21117 21118} 21119 21120// method id "content.orders.instorerefundlineitem": 21121 21122type OrdersInstorerefundlineitemCall struct { 21123 s *APIService 21124 merchantId uint64 21125 orderId string 21126 ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest 21127 urlParams_ gensupport.URLParams 21128 ctx_ context.Context 21129 header_ http.Header 21130} 21131 21132// Instorerefundlineitem: Deprecated. Notifies that item return and 21133// refund was handled directly by merchant outside of Google payments 21134// processing (e.g. cash refund done in store). Note: We recommend 21135// calling the returnrefundlineitem method to refund in-store returns. 21136// We will issue the refund directly to the customer. This helps to 21137// prevent possible differences arising between merchant and Google 21138// transaction records. We also recommend having the point of sale 21139// system communicate with Google to ensure that customers do not 21140// receive a double refund by first refunding via Google then via an 21141// in-store return. 21142// 21143// - merchantId: The ID of the account that manages the order. This 21144// cannot be a multi-client account. 21145// - orderId: The ID of the order. 21146func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { 21147 c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21148 c.merchantId = merchantId 21149 c.orderId = orderId 21150 c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest 21151 return c 21152} 21153 21154// Fields allows partial responses to be retrieved. See 21155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21156// for more information. 21157func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { 21158 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21159 return c 21160} 21161 21162// Context sets the context to be used in this call's Do method. Any 21163// pending HTTP request will be aborted if the provided context is 21164// canceled. 21165func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { 21166 c.ctx_ = ctx 21167 return c 21168} 21169 21170// Header returns an http.Header that can be modified by the caller to 21171// add HTTP headers to the request. 21172func (c *OrdersInstorerefundlineitemCall) Header() http.Header { 21173 if c.header_ == nil { 21174 c.header_ = make(http.Header) 21175 } 21176 return c.header_ 21177} 21178 21179func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { 21180 reqHeaders := make(http.Header) 21181 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21182 for k, v := range c.header_ { 21183 reqHeaders[k] = v 21184 } 21185 reqHeaders.Set("User-Agent", c.s.userAgent()) 21186 var body io.Reader = nil 21187 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) 21188 if err != nil { 21189 return nil, err 21190 } 21191 reqHeaders.Set("Content-Type", "application/json") 21192 c.urlParams_.Set("alt", alt) 21193 c.urlParams_.Set("prettyPrint", "false") 21194 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") 21195 urls += "?" + c.urlParams_.Encode() 21196 req, err := http.NewRequest("POST", urls, body) 21197 if err != nil { 21198 return nil, err 21199 } 21200 req.Header = reqHeaders 21201 googleapi.Expand(req.URL, map[string]string{ 21202 "merchantId": strconv.FormatUint(c.merchantId, 10), 21203 "orderId": c.orderId, 21204 }) 21205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21206} 21207 21208// Do executes the "content.orders.instorerefundlineitem" call. 21209// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be 21210// non-nil. Any non-2xx status code is an error. Response headers are in 21211// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or 21212// (if a response was returned at all) in 21213// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21214// whether the returned error was because http.StatusNotModified was 21215// returned. 21216func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { 21217 gensupport.SetOptions(c.urlParams_, opts...) 21218 res, err := c.doRequest("json") 21219 if res != nil && res.StatusCode == http.StatusNotModified { 21220 if res.Body != nil { 21221 res.Body.Close() 21222 } 21223 return nil, &googleapi.Error{ 21224 Code: res.StatusCode, 21225 Header: res.Header, 21226 } 21227 } 21228 if err != nil { 21229 return nil, err 21230 } 21231 defer googleapi.CloseBody(res) 21232 if err := googleapi.CheckResponse(res); err != nil { 21233 return nil, err 21234 } 21235 ret := &OrdersInStoreRefundLineItemResponse{ 21236 ServerResponse: googleapi.ServerResponse{ 21237 Header: res.Header, 21238 HTTPStatusCode: res.StatusCode, 21239 }, 21240 } 21241 target := &ret 21242 if err := gensupport.DecodeResponse(target, res); err != nil { 21243 return nil, err 21244 } 21245 return ret, nil 21246 // { 21247 // "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). Note: 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.", 21248 // "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 21249 // "httpMethod": "POST", 21250 // "id": "content.orders.instorerefundlineitem", 21251 // "parameterOrder": [ 21252 // "merchantId", 21253 // "orderId" 21254 // ], 21255 // "parameters": { 21256 // "merchantId": { 21257 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21258 // "format": "uint64", 21259 // "location": "path", 21260 // "required": true, 21261 // "type": "string" 21262 // }, 21263 // "orderId": { 21264 // "description": "The ID of the order.", 21265 // "location": "path", 21266 // "required": true, 21267 // "type": "string" 21268 // } 21269 // }, 21270 // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 21271 // "request": { 21272 // "$ref": "OrdersInStoreRefundLineItemRequest" 21273 // }, 21274 // "response": { 21275 // "$ref": "OrdersInStoreRefundLineItemResponse" 21276 // }, 21277 // "scopes": [ 21278 // "https://www.googleapis.com/auth/content" 21279 // ] 21280 // } 21281 21282} 21283 21284// method id "content.orders.list": 21285 21286type OrdersListCall struct { 21287 s *APIService 21288 merchantId uint64 21289 urlParams_ gensupport.URLParams 21290 ifNoneMatch_ string 21291 ctx_ context.Context 21292 header_ http.Header 21293} 21294 21295// List: Lists the orders in your Merchant Center account. 21296// 21297// - merchantId: The ID of the account that manages the order. This 21298// cannot be a multi-client account. 21299func (r *OrdersService) List(merchantId uint64) *OrdersListCall { 21300 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21301 c.merchantId = merchantId 21302 return c 21303} 21304 21305// Acknowledged sets the optional parameter "acknowledged": Obtains 21306// orders that match the acknowledgement status. When set to true, 21307// obtains orders that have been acknowledged. When false, obtains 21308// orders that have not been acknowledged. We recommend using this 21309// filter set to `false`, in conjunction with the `acknowledge` call, 21310// such that only un-acknowledged orders are returned. 21311func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { 21312 c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) 21313 return c 21314} 21315 21316// MaxResults sets the optional parameter "maxResults": The maximum 21317// number of orders to return in the response, used for paging. The 21318// default value is 25 orders per page, and the maximum allowed value is 21319// 250 orders per page. 21320func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { 21321 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 21322 return c 21323} 21324 21325// OrderBy sets the optional parameter "orderBy": Order results by 21326// placement date in descending or ascending order. Acceptable values 21327// are: - placedDateAsc - placedDateDesc 21328func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { 21329 c.urlParams_.Set("orderBy", orderBy) 21330 return c 21331} 21332 21333// PageToken sets the optional parameter "pageToken": The token returned 21334// by the previous request. 21335func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { 21336 c.urlParams_.Set("pageToken", pageToken) 21337 return c 21338} 21339 21340// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains 21341// orders placed before this date (exclusively), in ISO 8601 format. 21342func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { 21343 c.urlParams_.Set("placedDateEnd", placedDateEnd) 21344 return c 21345} 21346 21347// PlacedDateStart sets the optional parameter "placedDateStart": 21348// Obtains orders placed after this date (inclusively), in ISO 8601 21349// format. 21350func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { 21351 c.urlParams_.Set("placedDateStart", placedDateStart) 21352 return c 21353} 21354 21355// Statuses sets the optional parameter "statuses": Obtains orders that 21356// match any of the specified statuses. Please note that `active` is a 21357// shortcut for `pendingShipment` and `partiallyShipped`, and 21358// `completed` is a shortcut for `shipped`, `partiallyDelivered`, 21359// `delivered`, `partiallyReturned`, `returned`, and `canceled`. 21360// 21361// Possible values: 21362// "ACTIVE" 21363// "COMPLETED" 21364// "CANCELED" 21365// "IN_PROGRESS" 21366// "PENDING_SHIPMENT" 21367// "PARTIALLY_SHIPPED" 21368// "SHIPPED" 21369// "PARTIALLY_DELIVERED" 21370// "DELIVERED" 21371// "PARTIALLY_RETURNED" 21372// "RETURNED" 21373func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { 21374 c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) 21375 return c 21376} 21377 21378// Fields allows partial responses to be retrieved. See 21379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21380// for more information. 21381func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { 21382 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21383 return c 21384} 21385 21386// IfNoneMatch sets the optional parameter which makes the operation 21387// fail if the object's ETag matches the given value. This is useful for 21388// getting updates only after the object has changed since the last 21389// request. Use googleapi.IsNotModified to check whether the response 21390// error from Do is the result of In-None-Match. 21391func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { 21392 c.ifNoneMatch_ = entityTag 21393 return c 21394} 21395 21396// Context sets the context to be used in this call's Do method. Any 21397// pending HTTP request will be aborted if the provided context is 21398// canceled. 21399func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { 21400 c.ctx_ = ctx 21401 return c 21402} 21403 21404// Header returns an http.Header that can be modified by the caller to 21405// add HTTP headers to the request. 21406func (c *OrdersListCall) Header() http.Header { 21407 if c.header_ == nil { 21408 c.header_ = make(http.Header) 21409 } 21410 return c.header_ 21411} 21412 21413func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { 21414 reqHeaders := make(http.Header) 21415 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21416 for k, v := range c.header_ { 21417 reqHeaders[k] = v 21418 } 21419 reqHeaders.Set("User-Agent", c.s.userAgent()) 21420 if c.ifNoneMatch_ != "" { 21421 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21422 } 21423 var body io.Reader = nil 21424 c.urlParams_.Set("alt", alt) 21425 c.urlParams_.Set("prettyPrint", "false") 21426 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") 21427 urls += "?" + c.urlParams_.Encode() 21428 req, err := http.NewRequest("GET", urls, body) 21429 if err != nil { 21430 return nil, err 21431 } 21432 req.Header = reqHeaders 21433 googleapi.Expand(req.URL, map[string]string{ 21434 "merchantId": strconv.FormatUint(c.merchantId, 10), 21435 }) 21436 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21437} 21438 21439// Do executes the "content.orders.list" call. 21440// Exactly one of *OrdersListResponse or error will be non-nil. Any 21441// non-2xx status code is an error. Response headers are in either 21442// *OrdersListResponse.ServerResponse.Header or (if a response was 21443// returned at all) in error.(*googleapi.Error).Header. Use 21444// googleapi.IsNotModified to check whether the returned error was 21445// because http.StatusNotModified was returned. 21446func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { 21447 gensupport.SetOptions(c.urlParams_, opts...) 21448 res, err := c.doRequest("json") 21449 if res != nil && res.StatusCode == http.StatusNotModified { 21450 if res.Body != nil { 21451 res.Body.Close() 21452 } 21453 return nil, &googleapi.Error{ 21454 Code: res.StatusCode, 21455 Header: res.Header, 21456 } 21457 } 21458 if err != nil { 21459 return nil, err 21460 } 21461 defer googleapi.CloseBody(res) 21462 if err := googleapi.CheckResponse(res); err != nil { 21463 return nil, err 21464 } 21465 ret := &OrdersListResponse{ 21466 ServerResponse: googleapi.ServerResponse{ 21467 Header: res.Header, 21468 HTTPStatusCode: res.StatusCode, 21469 }, 21470 } 21471 target := &ret 21472 if err := gensupport.DecodeResponse(target, res); err != nil { 21473 return nil, err 21474 } 21475 return ret, nil 21476 // { 21477 // "description": "Lists the orders in your Merchant Center account.", 21478 // "flatPath": "{merchantId}/orders", 21479 // "httpMethod": "GET", 21480 // "id": "content.orders.list", 21481 // "parameterOrder": [ 21482 // "merchantId" 21483 // ], 21484 // "parameters": { 21485 // "acknowledged": { 21486 // "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. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned. ", 21487 // "location": "query", 21488 // "type": "boolean" 21489 // }, 21490 // "maxResults": { 21491 // "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.", 21492 // "format": "uint32", 21493 // "location": "query", 21494 // "type": "integer" 21495 // }, 21496 // "merchantId": { 21497 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21498 // "format": "uint64", 21499 // "location": "path", 21500 // "required": true, 21501 // "type": "string" 21502 // }, 21503 // "orderBy": { 21504 // "description": "Order results by placement date in descending or ascending order. Acceptable values are: - placedDateAsc - placedDateDesc ", 21505 // "location": "query", 21506 // "type": "string" 21507 // }, 21508 // "pageToken": { 21509 // "description": "The token returned by the previous request.", 21510 // "location": "query", 21511 // "type": "string" 21512 // }, 21513 // "placedDateEnd": { 21514 // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", 21515 // "location": "query", 21516 // "type": "string" 21517 // }, 21518 // "placedDateStart": { 21519 // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", 21520 // "location": "query", 21521 // "type": "string" 21522 // }, 21523 // "statuses": { 21524 // "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`.", 21525 // "enum": [ 21526 // "ACTIVE", 21527 // "COMPLETED", 21528 // "CANCELED", 21529 // "IN_PROGRESS", 21530 // "PENDING_SHIPMENT", 21531 // "PARTIALLY_SHIPPED", 21532 // "SHIPPED", 21533 // "PARTIALLY_DELIVERED", 21534 // "DELIVERED", 21535 // "PARTIALLY_RETURNED", 21536 // "RETURNED" 21537 // ], 21538 // "enumDescriptions": [ 21539 // "", 21540 // "", 21541 // "", 21542 // "", 21543 // "", 21544 // "", 21545 // "", 21546 // "", 21547 // "", 21548 // "", 21549 // "" 21550 // ], 21551 // "location": "query", 21552 // "repeated": true, 21553 // "type": "string" 21554 // } 21555 // }, 21556 // "path": "{merchantId}/orders", 21557 // "response": { 21558 // "$ref": "OrdersListResponse" 21559 // }, 21560 // "scopes": [ 21561 // "https://www.googleapis.com/auth/content" 21562 // ] 21563 // } 21564 21565} 21566 21567// Pages invokes f for each page of results. 21568// A non-nil error returned from f will halt the iteration. 21569// The provided context supersedes any context provided to the Context method. 21570func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { 21571 c.ctx_ = ctx 21572 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21573 for { 21574 x, err := c.Do() 21575 if err != nil { 21576 return err 21577 } 21578 if err := f(x); err != nil { 21579 return err 21580 } 21581 if x.NextPageToken == "" { 21582 return nil 21583 } 21584 c.PageToken(x.NextPageToken) 21585 } 21586} 21587 21588// method id "content.orders.refund": 21589 21590type OrdersRefundCall struct { 21591 s *APIService 21592 merchantId uint64 21593 orderId string 21594 ordersrefundrequest *OrdersRefundRequest 21595 urlParams_ gensupport.URLParams 21596 ctx_ context.Context 21597 header_ http.Header 21598} 21599 21600// Refund: Deprecated, please use returnRefundLineItem instead. 21601// 21602// - merchantId: The ID of the account that manages the order. This 21603// cannot be a multi-client account. 21604// - orderId: The ID of the order to refund. 21605func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall { 21606 c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21607 c.merchantId = merchantId 21608 c.orderId = orderId 21609 c.ordersrefundrequest = ordersrefundrequest 21610 return c 21611} 21612 21613// Fields allows partial responses to be retrieved. See 21614// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21615// for more information. 21616func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall { 21617 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21618 return c 21619} 21620 21621// Context sets the context to be used in this call's Do method. Any 21622// pending HTTP request will be aborted if the provided context is 21623// canceled. 21624func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall { 21625 c.ctx_ = ctx 21626 return c 21627} 21628 21629// Header returns an http.Header that can be modified by the caller to 21630// add HTTP headers to the request. 21631func (c *OrdersRefundCall) Header() http.Header { 21632 if c.header_ == nil { 21633 c.header_ = make(http.Header) 21634 } 21635 return c.header_ 21636} 21637 21638func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) { 21639 reqHeaders := make(http.Header) 21640 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21641 for k, v := range c.header_ { 21642 reqHeaders[k] = v 21643 } 21644 reqHeaders.Set("User-Agent", c.s.userAgent()) 21645 var body io.Reader = nil 21646 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest) 21647 if err != nil { 21648 return nil, err 21649 } 21650 reqHeaders.Set("Content-Type", "application/json") 21651 c.urlParams_.Set("alt", alt) 21652 c.urlParams_.Set("prettyPrint", "false") 21653 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund") 21654 urls += "?" + c.urlParams_.Encode() 21655 req, err := http.NewRequest("POST", urls, body) 21656 if err != nil { 21657 return nil, err 21658 } 21659 req.Header = reqHeaders 21660 googleapi.Expand(req.URL, map[string]string{ 21661 "merchantId": strconv.FormatUint(c.merchantId, 10), 21662 "orderId": c.orderId, 21663 }) 21664 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21665} 21666 21667// Do executes the "content.orders.refund" call. 21668// Exactly one of *OrdersRefundResponse or error will be non-nil. Any 21669// non-2xx status code is an error. Response headers are in either 21670// *OrdersRefundResponse.ServerResponse.Header or (if a response was 21671// returned at all) in error.(*googleapi.Error).Header. Use 21672// googleapi.IsNotModified to check whether the returned error was 21673// because http.StatusNotModified was returned. 21674func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) { 21675 gensupport.SetOptions(c.urlParams_, opts...) 21676 res, err := c.doRequest("json") 21677 if res != nil && res.StatusCode == http.StatusNotModified { 21678 if res.Body != nil { 21679 res.Body.Close() 21680 } 21681 return nil, &googleapi.Error{ 21682 Code: res.StatusCode, 21683 Header: res.Header, 21684 } 21685 } 21686 if err != nil { 21687 return nil, err 21688 } 21689 defer googleapi.CloseBody(res) 21690 if err := googleapi.CheckResponse(res); err != nil { 21691 return nil, err 21692 } 21693 ret := &OrdersRefundResponse{ 21694 ServerResponse: googleapi.ServerResponse{ 21695 Header: res.Header, 21696 HTTPStatusCode: res.StatusCode, 21697 }, 21698 } 21699 target := &ret 21700 if err := gensupport.DecodeResponse(target, res); err != nil { 21701 return nil, err 21702 } 21703 return ret, nil 21704 // { 21705 // "description": "Deprecated, please use returnRefundLineItem instead.", 21706 // "flatPath": "{merchantId}/orders/{orderId}/refund", 21707 // "httpMethod": "POST", 21708 // "id": "content.orders.refund", 21709 // "parameterOrder": [ 21710 // "merchantId", 21711 // "orderId" 21712 // ], 21713 // "parameters": { 21714 // "merchantId": { 21715 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21716 // "format": "uint64", 21717 // "location": "path", 21718 // "required": true, 21719 // "type": "string" 21720 // }, 21721 // "orderId": { 21722 // "description": "The ID of the order to refund.", 21723 // "location": "path", 21724 // "required": true, 21725 // "type": "string" 21726 // } 21727 // }, 21728 // "path": "{merchantId}/orders/{orderId}/refund", 21729 // "request": { 21730 // "$ref": "OrdersRefundRequest" 21731 // }, 21732 // "response": { 21733 // "$ref": "OrdersRefundResponse" 21734 // }, 21735 // "scopes": [ 21736 // "https://www.googleapis.com/auth/content" 21737 // ] 21738 // } 21739 21740} 21741 21742// method id "content.orders.rejectreturnlineitem": 21743 21744type OrdersRejectreturnlineitemCall struct { 21745 s *APIService 21746 merchantId uint64 21747 orderId string 21748 ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest 21749 urlParams_ gensupport.URLParams 21750 ctx_ context.Context 21751 header_ http.Header 21752} 21753 21754// Rejectreturnlineitem: Rejects return on an line item. 21755// 21756// - merchantId: The ID of the account that manages the order. This 21757// cannot be a multi-client account. 21758// - orderId: The ID of the order. 21759func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { 21760 c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21761 c.merchantId = merchantId 21762 c.orderId = orderId 21763 c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest 21764 return c 21765} 21766 21767// Fields allows partial responses to be retrieved. See 21768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21769// for more information. 21770func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { 21771 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21772 return c 21773} 21774 21775// Context sets the context to be used in this call's Do method. Any 21776// pending HTTP request will be aborted if the provided context is 21777// canceled. 21778func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { 21779 c.ctx_ = ctx 21780 return c 21781} 21782 21783// Header returns an http.Header that can be modified by the caller to 21784// add HTTP headers to the request. 21785func (c *OrdersRejectreturnlineitemCall) Header() http.Header { 21786 if c.header_ == nil { 21787 c.header_ = make(http.Header) 21788 } 21789 return c.header_ 21790} 21791 21792func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { 21793 reqHeaders := make(http.Header) 21794 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21795 for k, v := range c.header_ { 21796 reqHeaders[k] = v 21797 } 21798 reqHeaders.Set("User-Agent", c.s.userAgent()) 21799 var body io.Reader = nil 21800 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) 21801 if err != nil { 21802 return nil, err 21803 } 21804 reqHeaders.Set("Content-Type", "application/json") 21805 c.urlParams_.Set("alt", alt) 21806 c.urlParams_.Set("prettyPrint", "false") 21807 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") 21808 urls += "?" + c.urlParams_.Encode() 21809 req, err := http.NewRequest("POST", urls, body) 21810 if err != nil { 21811 return nil, err 21812 } 21813 req.Header = reqHeaders 21814 googleapi.Expand(req.URL, map[string]string{ 21815 "merchantId": strconv.FormatUint(c.merchantId, 10), 21816 "orderId": c.orderId, 21817 }) 21818 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21819} 21820 21821// Do executes the "content.orders.rejectreturnlineitem" call. 21822// Exactly one of *OrdersRejectReturnLineItemResponse or error will be 21823// non-nil. Any non-2xx status code is an error. Response headers are in 21824// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or 21825// (if a response was returned at all) in 21826// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21827// whether the returned error was because http.StatusNotModified was 21828// returned. 21829func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { 21830 gensupport.SetOptions(c.urlParams_, opts...) 21831 res, err := c.doRequest("json") 21832 if res != nil && res.StatusCode == http.StatusNotModified { 21833 if res.Body != nil { 21834 res.Body.Close() 21835 } 21836 return nil, &googleapi.Error{ 21837 Code: res.StatusCode, 21838 Header: res.Header, 21839 } 21840 } 21841 if err != nil { 21842 return nil, err 21843 } 21844 defer googleapi.CloseBody(res) 21845 if err := googleapi.CheckResponse(res); err != nil { 21846 return nil, err 21847 } 21848 ret := &OrdersRejectReturnLineItemResponse{ 21849 ServerResponse: googleapi.ServerResponse{ 21850 Header: res.Header, 21851 HTTPStatusCode: res.StatusCode, 21852 }, 21853 } 21854 target := &ret 21855 if err := gensupport.DecodeResponse(target, res); err != nil { 21856 return nil, err 21857 } 21858 return ret, nil 21859 // { 21860 // "description": "Rejects return on an line item.", 21861 // "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 21862 // "httpMethod": "POST", 21863 // "id": "content.orders.rejectreturnlineitem", 21864 // "parameterOrder": [ 21865 // "merchantId", 21866 // "orderId" 21867 // ], 21868 // "parameters": { 21869 // "merchantId": { 21870 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21871 // "format": "uint64", 21872 // "location": "path", 21873 // "required": true, 21874 // "type": "string" 21875 // }, 21876 // "orderId": { 21877 // "description": "The ID of the order.", 21878 // "location": "path", 21879 // "required": true, 21880 // "type": "string" 21881 // } 21882 // }, 21883 // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 21884 // "request": { 21885 // "$ref": "OrdersRejectReturnLineItemRequest" 21886 // }, 21887 // "response": { 21888 // "$ref": "OrdersRejectReturnLineItemResponse" 21889 // }, 21890 // "scopes": [ 21891 // "https://www.googleapis.com/auth/content" 21892 // ] 21893 // } 21894 21895} 21896 21897// method id "content.orders.returnlineitem": 21898 21899type OrdersReturnlineitemCall struct { 21900 s *APIService 21901 merchantId uint64 21902 orderId string 21903 ordersreturnlineitemrequest *OrdersReturnLineItemRequest 21904 urlParams_ gensupport.URLParams 21905 ctx_ context.Context 21906 header_ http.Header 21907} 21908 21909// Returnlineitem: Returns a line item. 21910// 21911// - merchantId: The ID of the account that manages the order. This 21912// cannot be a multi-client account. 21913// - orderId: The ID of the order. 21914func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall { 21915 c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21916 c.merchantId = merchantId 21917 c.orderId = orderId 21918 c.ordersreturnlineitemrequest = ordersreturnlineitemrequest 21919 return c 21920} 21921 21922// Fields allows partial responses to be retrieved. See 21923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21924// for more information. 21925func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall { 21926 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21927 return c 21928} 21929 21930// Context sets the context to be used in this call's Do method. Any 21931// pending HTTP request will be aborted if the provided context is 21932// canceled. 21933func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall { 21934 c.ctx_ = ctx 21935 return c 21936} 21937 21938// Header returns an http.Header that can be modified by the caller to 21939// add HTTP headers to the request. 21940func (c *OrdersReturnlineitemCall) Header() http.Header { 21941 if c.header_ == nil { 21942 c.header_ = make(http.Header) 21943 } 21944 return c.header_ 21945} 21946 21947func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) { 21948 reqHeaders := make(http.Header) 21949 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 21950 for k, v := range c.header_ { 21951 reqHeaders[k] = v 21952 } 21953 reqHeaders.Set("User-Agent", c.s.userAgent()) 21954 var body io.Reader = nil 21955 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest) 21956 if err != nil { 21957 return nil, err 21958 } 21959 reqHeaders.Set("Content-Type", "application/json") 21960 c.urlParams_.Set("alt", alt) 21961 c.urlParams_.Set("prettyPrint", "false") 21962 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem") 21963 urls += "?" + c.urlParams_.Encode() 21964 req, err := http.NewRequest("POST", urls, body) 21965 if err != nil { 21966 return nil, err 21967 } 21968 req.Header = reqHeaders 21969 googleapi.Expand(req.URL, map[string]string{ 21970 "merchantId": strconv.FormatUint(c.merchantId, 10), 21971 "orderId": c.orderId, 21972 }) 21973 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21974} 21975 21976// Do executes the "content.orders.returnlineitem" call. 21977// Exactly one of *OrdersReturnLineItemResponse or error will be 21978// non-nil. Any non-2xx status code is an error. Response headers are in 21979// either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a 21980// response was returned at all) in error.(*googleapi.Error).Header. Use 21981// googleapi.IsNotModified to check whether the returned error was 21982// because http.StatusNotModified was returned. 21983func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) { 21984 gensupport.SetOptions(c.urlParams_, opts...) 21985 res, err := c.doRequest("json") 21986 if res != nil && res.StatusCode == http.StatusNotModified { 21987 if res.Body != nil { 21988 res.Body.Close() 21989 } 21990 return nil, &googleapi.Error{ 21991 Code: res.StatusCode, 21992 Header: res.Header, 21993 } 21994 } 21995 if err != nil { 21996 return nil, err 21997 } 21998 defer googleapi.CloseBody(res) 21999 if err := googleapi.CheckResponse(res); err != nil { 22000 return nil, err 22001 } 22002 ret := &OrdersReturnLineItemResponse{ 22003 ServerResponse: googleapi.ServerResponse{ 22004 Header: res.Header, 22005 HTTPStatusCode: res.StatusCode, 22006 }, 22007 } 22008 target := &ret 22009 if err := gensupport.DecodeResponse(target, res); err != nil { 22010 return nil, err 22011 } 22012 return ret, nil 22013 // { 22014 // "description": "Returns a line item.", 22015 // "flatPath": "{merchantId}/orders/{orderId}/returnLineItem", 22016 // "httpMethod": "POST", 22017 // "id": "content.orders.returnlineitem", 22018 // "parameterOrder": [ 22019 // "merchantId", 22020 // "orderId" 22021 // ], 22022 // "parameters": { 22023 // "merchantId": { 22024 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22025 // "format": "uint64", 22026 // "location": "path", 22027 // "required": true, 22028 // "type": "string" 22029 // }, 22030 // "orderId": { 22031 // "description": "The ID of the order.", 22032 // "location": "path", 22033 // "required": true, 22034 // "type": "string" 22035 // } 22036 // }, 22037 // "path": "{merchantId}/orders/{orderId}/returnLineItem", 22038 // "request": { 22039 // "$ref": "OrdersReturnLineItemRequest" 22040 // }, 22041 // "response": { 22042 // "$ref": "OrdersReturnLineItemResponse" 22043 // }, 22044 // "scopes": [ 22045 // "https://www.googleapis.com/auth/content" 22046 // ] 22047 // } 22048 22049} 22050 22051// method id "content.orders.returnrefundlineitem": 22052 22053type OrdersReturnrefundlineitemCall struct { 22054 s *APIService 22055 merchantId uint64 22056 orderId string 22057 ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest 22058 urlParams_ gensupport.URLParams 22059 ctx_ context.Context 22060 header_ http.Header 22061} 22062 22063// Returnrefundlineitem: Returns and refunds a line item. Note that this 22064// method can only be called on fully shipped orders. Please also note 22065// that the Orderreturns API is the preferred way to handle returns 22066// after you receive a return from a customer. You can use 22067// Orderreturns.list or Orderreturns.get to search for the return, and 22068// then use Orderreturns.processreturn to issue the refund. If the 22069// return cannot be found, then we recommend using this API to issue a 22070// refund. 22071// 22072// - merchantId: The ID of the account that manages the order. This 22073// cannot be a multi-client account. 22074// - orderId: The ID of the order. 22075func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { 22076 c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22077 c.merchantId = merchantId 22078 c.orderId = orderId 22079 c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest 22080 return c 22081} 22082 22083// Fields allows partial responses to be retrieved. See 22084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22085// for more information. 22086func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { 22087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22088 return c 22089} 22090 22091// Context sets the context to be used in this call's Do method. Any 22092// pending HTTP request will be aborted if the provided context is 22093// canceled. 22094func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { 22095 c.ctx_ = ctx 22096 return c 22097} 22098 22099// Header returns an http.Header that can be modified by the caller to 22100// add HTTP headers to the request. 22101func (c *OrdersReturnrefundlineitemCall) Header() http.Header { 22102 if c.header_ == nil { 22103 c.header_ = make(http.Header) 22104 } 22105 return c.header_ 22106} 22107 22108func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { 22109 reqHeaders := make(http.Header) 22110 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22111 for k, v := range c.header_ { 22112 reqHeaders[k] = v 22113 } 22114 reqHeaders.Set("User-Agent", c.s.userAgent()) 22115 var body io.Reader = nil 22116 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) 22117 if err != nil { 22118 return nil, err 22119 } 22120 reqHeaders.Set("Content-Type", "application/json") 22121 c.urlParams_.Set("alt", alt) 22122 c.urlParams_.Set("prettyPrint", "false") 22123 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") 22124 urls += "?" + c.urlParams_.Encode() 22125 req, err := http.NewRequest("POST", urls, body) 22126 if err != nil { 22127 return nil, err 22128 } 22129 req.Header = reqHeaders 22130 googleapi.Expand(req.URL, map[string]string{ 22131 "merchantId": strconv.FormatUint(c.merchantId, 10), 22132 "orderId": c.orderId, 22133 }) 22134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22135} 22136 22137// Do executes the "content.orders.returnrefundlineitem" call. 22138// Exactly one of *OrdersReturnRefundLineItemResponse or error will be 22139// non-nil. Any non-2xx status code is an error. Response headers are in 22140// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or 22141// (if a response was returned at all) in 22142// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22143// whether the returned error was because http.StatusNotModified was 22144// returned. 22145func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { 22146 gensupport.SetOptions(c.urlParams_, opts...) 22147 res, err := c.doRequest("json") 22148 if res != nil && res.StatusCode == http.StatusNotModified { 22149 if res.Body != nil { 22150 res.Body.Close() 22151 } 22152 return nil, &googleapi.Error{ 22153 Code: res.StatusCode, 22154 Header: res.Header, 22155 } 22156 } 22157 if err != nil { 22158 return nil, err 22159 } 22160 defer googleapi.CloseBody(res) 22161 if err := googleapi.CheckResponse(res); err != nil { 22162 return nil, err 22163 } 22164 ret := &OrdersReturnRefundLineItemResponse{ 22165 ServerResponse: googleapi.ServerResponse{ 22166 Header: res.Header, 22167 HTTPStatusCode: res.StatusCode, 22168 }, 22169 } 22170 target := &ret 22171 if err := gensupport.DecodeResponse(target, res); err != nil { 22172 return nil, err 22173 } 22174 return ret, nil 22175 // { 22176 // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.", 22177 // "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", 22178 // "httpMethod": "POST", 22179 // "id": "content.orders.returnrefundlineitem", 22180 // "parameterOrder": [ 22181 // "merchantId", 22182 // "orderId" 22183 // ], 22184 // "parameters": { 22185 // "merchantId": { 22186 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22187 // "format": "uint64", 22188 // "location": "path", 22189 // "required": true, 22190 // "type": "string" 22191 // }, 22192 // "orderId": { 22193 // "description": "The ID of the order.", 22194 // "location": "path", 22195 // "required": true, 22196 // "type": "string" 22197 // } 22198 // }, 22199 // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", 22200 // "request": { 22201 // "$ref": "OrdersReturnRefundLineItemRequest" 22202 // }, 22203 // "response": { 22204 // "$ref": "OrdersReturnRefundLineItemResponse" 22205 // }, 22206 // "scopes": [ 22207 // "https://www.googleapis.com/auth/content" 22208 // ] 22209 // } 22210 22211} 22212 22213// method id "content.orders.setlineitemmetadata": 22214 22215type OrdersSetlineitemmetadataCall struct { 22216 s *APIService 22217 merchantId uint64 22218 orderId string 22219 orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest 22220 urlParams_ gensupport.URLParams 22221 ctx_ context.Context 22222 header_ http.Header 22223} 22224 22225// Setlineitemmetadata: Sets (or overrides if it already exists) 22226// merchant provided annotations in the form of key-value pairs. A 22227// common use case would be to supply us with additional structured 22228// information about a line item that cannot be provided via other 22229// methods. Submitted key-value pairs can be retrieved as part of the 22230// orders resource. 22231// 22232// - merchantId: The ID of the account that manages the order. This 22233// cannot be a multi-client account. 22234// - orderId: The ID of the order. 22235func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { 22236 c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22237 c.merchantId = merchantId 22238 c.orderId = orderId 22239 c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest 22240 return c 22241} 22242 22243// Fields allows partial responses to be retrieved. See 22244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22245// for more information. 22246func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { 22247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22248 return c 22249} 22250 22251// Context sets the context to be used in this call's Do method. Any 22252// pending HTTP request will be aborted if the provided context is 22253// canceled. 22254func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { 22255 c.ctx_ = ctx 22256 return c 22257} 22258 22259// Header returns an http.Header that can be modified by the caller to 22260// add HTTP headers to the request. 22261func (c *OrdersSetlineitemmetadataCall) Header() http.Header { 22262 if c.header_ == nil { 22263 c.header_ = make(http.Header) 22264 } 22265 return c.header_ 22266} 22267 22268func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { 22269 reqHeaders := make(http.Header) 22270 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22271 for k, v := range c.header_ { 22272 reqHeaders[k] = v 22273 } 22274 reqHeaders.Set("User-Agent", c.s.userAgent()) 22275 var body io.Reader = nil 22276 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) 22277 if err != nil { 22278 return nil, err 22279 } 22280 reqHeaders.Set("Content-Type", "application/json") 22281 c.urlParams_.Set("alt", alt) 22282 c.urlParams_.Set("prettyPrint", "false") 22283 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") 22284 urls += "?" + c.urlParams_.Encode() 22285 req, err := http.NewRequest("POST", urls, body) 22286 if err != nil { 22287 return nil, err 22288 } 22289 req.Header = reqHeaders 22290 googleapi.Expand(req.URL, map[string]string{ 22291 "merchantId": strconv.FormatUint(c.merchantId, 10), 22292 "orderId": c.orderId, 22293 }) 22294 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22295} 22296 22297// Do executes the "content.orders.setlineitemmetadata" call. 22298// Exactly one of *OrdersSetLineItemMetadataResponse or error will be 22299// non-nil. Any non-2xx status code is an error. Response headers are in 22300// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or 22301// (if a response was returned at all) in 22302// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22303// whether the returned error was because http.StatusNotModified was 22304// returned. 22305func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { 22306 gensupport.SetOptions(c.urlParams_, opts...) 22307 res, err := c.doRequest("json") 22308 if res != nil && res.StatusCode == http.StatusNotModified { 22309 if res.Body != nil { 22310 res.Body.Close() 22311 } 22312 return nil, &googleapi.Error{ 22313 Code: res.StatusCode, 22314 Header: res.Header, 22315 } 22316 } 22317 if err != nil { 22318 return nil, err 22319 } 22320 defer googleapi.CloseBody(res) 22321 if err := googleapi.CheckResponse(res); err != nil { 22322 return nil, err 22323 } 22324 ret := &OrdersSetLineItemMetadataResponse{ 22325 ServerResponse: googleapi.ServerResponse{ 22326 Header: res.Header, 22327 HTTPStatusCode: res.StatusCode, 22328 }, 22329 } 22330 target := &ret 22331 if err := gensupport.DecodeResponse(target, res); err != nil { 22332 return nil, err 22333 } 22334 return ret, nil 22335 // { 22336 // "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.", 22337 // "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", 22338 // "httpMethod": "POST", 22339 // "id": "content.orders.setlineitemmetadata", 22340 // "parameterOrder": [ 22341 // "merchantId", 22342 // "orderId" 22343 // ], 22344 // "parameters": { 22345 // "merchantId": { 22346 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22347 // "format": "uint64", 22348 // "location": "path", 22349 // "required": true, 22350 // "type": "string" 22351 // }, 22352 // "orderId": { 22353 // "description": "The ID of the order.", 22354 // "location": "path", 22355 // "required": true, 22356 // "type": "string" 22357 // } 22358 // }, 22359 // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", 22360 // "request": { 22361 // "$ref": "OrdersSetLineItemMetadataRequest" 22362 // }, 22363 // "response": { 22364 // "$ref": "OrdersSetLineItemMetadataResponse" 22365 // }, 22366 // "scopes": [ 22367 // "https://www.googleapis.com/auth/content" 22368 // ] 22369 // } 22370 22371} 22372 22373// method id "content.orders.shiplineitems": 22374 22375type OrdersShiplineitemsCall struct { 22376 s *APIService 22377 merchantId uint64 22378 orderId string 22379 ordersshiplineitemsrequest *OrdersShipLineItemsRequest 22380 urlParams_ gensupport.URLParams 22381 ctx_ context.Context 22382 header_ http.Header 22383} 22384 22385// Shiplineitems: Marks line item(s) as shipped. 22386// 22387// - merchantId: The ID of the account that manages the order. This 22388// cannot be a multi-client account. 22389// - orderId: The ID of the order. 22390func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { 22391 c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22392 c.merchantId = merchantId 22393 c.orderId = orderId 22394 c.ordersshiplineitemsrequest = ordersshiplineitemsrequest 22395 return c 22396} 22397 22398// Fields allows partial responses to be retrieved. See 22399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22400// for more information. 22401func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { 22402 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22403 return c 22404} 22405 22406// Context sets the context to be used in this call's Do method. Any 22407// pending HTTP request will be aborted if the provided context is 22408// canceled. 22409func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { 22410 c.ctx_ = ctx 22411 return c 22412} 22413 22414// Header returns an http.Header that can be modified by the caller to 22415// add HTTP headers to the request. 22416func (c *OrdersShiplineitemsCall) Header() http.Header { 22417 if c.header_ == nil { 22418 c.header_ = make(http.Header) 22419 } 22420 return c.header_ 22421} 22422 22423func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { 22424 reqHeaders := make(http.Header) 22425 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22426 for k, v := range c.header_ { 22427 reqHeaders[k] = v 22428 } 22429 reqHeaders.Set("User-Agent", c.s.userAgent()) 22430 var body io.Reader = nil 22431 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) 22432 if err != nil { 22433 return nil, err 22434 } 22435 reqHeaders.Set("Content-Type", "application/json") 22436 c.urlParams_.Set("alt", alt) 22437 c.urlParams_.Set("prettyPrint", "false") 22438 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") 22439 urls += "?" + c.urlParams_.Encode() 22440 req, err := http.NewRequest("POST", urls, body) 22441 if err != nil { 22442 return nil, err 22443 } 22444 req.Header = reqHeaders 22445 googleapi.Expand(req.URL, map[string]string{ 22446 "merchantId": strconv.FormatUint(c.merchantId, 10), 22447 "orderId": c.orderId, 22448 }) 22449 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22450} 22451 22452// Do executes the "content.orders.shiplineitems" call. 22453// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil. 22454// Any non-2xx status code is an error. Response headers are in either 22455// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response 22456// was returned at all) in error.(*googleapi.Error).Header. Use 22457// googleapi.IsNotModified to check whether the returned error was 22458// because http.StatusNotModified was returned. 22459func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { 22460 gensupport.SetOptions(c.urlParams_, opts...) 22461 res, err := c.doRequest("json") 22462 if res != nil && res.StatusCode == http.StatusNotModified { 22463 if res.Body != nil { 22464 res.Body.Close() 22465 } 22466 return nil, &googleapi.Error{ 22467 Code: res.StatusCode, 22468 Header: res.Header, 22469 } 22470 } 22471 if err != nil { 22472 return nil, err 22473 } 22474 defer googleapi.CloseBody(res) 22475 if err := googleapi.CheckResponse(res); err != nil { 22476 return nil, err 22477 } 22478 ret := &OrdersShipLineItemsResponse{ 22479 ServerResponse: googleapi.ServerResponse{ 22480 Header: res.Header, 22481 HTTPStatusCode: res.StatusCode, 22482 }, 22483 } 22484 target := &ret 22485 if err := gensupport.DecodeResponse(target, res); err != nil { 22486 return nil, err 22487 } 22488 return ret, nil 22489 // { 22490 // "description": "Marks line item(s) as shipped.", 22491 // "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", 22492 // "httpMethod": "POST", 22493 // "id": "content.orders.shiplineitems", 22494 // "parameterOrder": [ 22495 // "merchantId", 22496 // "orderId" 22497 // ], 22498 // "parameters": { 22499 // "merchantId": { 22500 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22501 // "format": "uint64", 22502 // "location": "path", 22503 // "required": true, 22504 // "type": "string" 22505 // }, 22506 // "orderId": { 22507 // "description": "The ID of the order.", 22508 // "location": "path", 22509 // "required": true, 22510 // "type": "string" 22511 // } 22512 // }, 22513 // "path": "{merchantId}/orders/{orderId}/shipLineItems", 22514 // "request": { 22515 // "$ref": "OrdersShipLineItemsRequest" 22516 // }, 22517 // "response": { 22518 // "$ref": "OrdersShipLineItemsResponse" 22519 // }, 22520 // "scopes": [ 22521 // "https://www.googleapis.com/auth/content" 22522 // ] 22523 // } 22524 22525} 22526 22527// method id "content.orders.updatelineitemshippingdetails": 22528 22529type OrdersUpdatelineitemshippingdetailsCall struct { 22530 s *APIService 22531 merchantId uint64 22532 orderId string 22533 ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest 22534 urlParams_ gensupport.URLParams 22535 ctx_ context.Context 22536 header_ http.Header 22537} 22538 22539// Updatelineitemshippingdetails: Updates ship by and delivery by dates 22540// for a line item. 22541// 22542// - merchantId: The ID of the account that manages the order. This 22543// cannot be a multi-client account. 22544// - orderId: The ID of the order. 22545func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { 22546 c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22547 c.merchantId = merchantId 22548 c.orderId = orderId 22549 c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest 22550 return c 22551} 22552 22553// Fields allows partial responses to be retrieved. See 22554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22555// for more information. 22556func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { 22557 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22558 return c 22559} 22560 22561// Context sets the context to be used in this call's Do method. Any 22562// pending HTTP request will be aborted if the provided context is 22563// canceled. 22564func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { 22565 c.ctx_ = ctx 22566 return c 22567} 22568 22569// Header returns an http.Header that can be modified by the caller to 22570// add HTTP headers to the request. 22571func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { 22572 if c.header_ == nil { 22573 c.header_ = make(http.Header) 22574 } 22575 return c.header_ 22576} 22577 22578func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { 22579 reqHeaders := make(http.Header) 22580 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22581 for k, v := range c.header_ { 22582 reqHeaders[k] = v 22583 } 22584 reqHeaders.Set("User-Agent", c.s.userAgent()) 22585 var body io.Reader = nil 22586 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) 22587 if err != nil { 22588 return nil, err 22589 } 22590 reqHeaders.Set("Content-Type", "application/json") 22591 c.urlParams_.Set("alt", alt) 22592 c.urlParams_.Set("prettyPrint", "false") 22593 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") 22594 urls += "?" + c.urlParams_.Encode() 22595 req, err := http.NewRequest("POST", urls, body) 22596 if err != nil { 22597 return nil, err 22598 } 22599 req.Header = reqHeaders 22600 googleapi.Expand(req.URL, map[string]string{ 22601 "merchantId": strconv.FormatUint(c.merchantId, 10), 22602 "orderId": c.orderId, 22603 }) 22604 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22605} 22606 22607// Do executes the "content.orders.updatelineitemshippingdetails" call. 22608// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error 22609// will be non-nil. Any non-2xx status code is an error. Response 22610// headers are in either 22611// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or 22612// (if a response was returned at all) in 22613// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22614// whether the returned error was because http.StatusNotModified was 22615// returned. 22616func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { 22617 gensupport.SetOptions(c.urlParams_, opts...) 22618 res, err := c.doRequest("json") 22619 if res != nil && res.StatusCode == http.StatusNotModified { 22620 if res.Body != nil { 22621 res.Body.Close() 22622 } 22623 return nil, &googleapi.Error{ 22624 Code: res.StatusCode, 22625 Header: res.Header, 22626 } 22627 } 22628 if err != nil { 22629 return nil, err 22630 } 22631 defer googleapi.CloseBody(res) 22632 if err := googleapi.CheckResponse(res); err != nil { 22633 return nil, err 22634 } 22635 ret := &OrdersUpdateLineItemShippingDetailsResponse{ 22636 ServerResponse: googleapi.ServerResponse{ 22637 Header: res.Header, 22638 HTTPStatusCode: res.StatusCode, 22639 }, 22640 } 22641 target := &ret 22642 if err := gensupport.DecodeResponse(target, res); err != nil { 22643 return nil, err 22644 } 22645 return ret, nil 22646 // { 22647 // "description": "Updates ship by and delivery by dates for a line item.", 22648 // "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 22649 // "httpMethod": "POST", 22650 // "id": "content.orders.updatelineitemshippingdetails", 22651 // "parameterOrder": [ 22652 // "merchantId", 22653 // "orderId" 22654 // ], 22655 // "parameters": { 22656 // "merchantId": { 22657 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22658 // "format": "uint64", 22659 // "location": "path", 22660 // "required": true, 22661 // "type": "string" 22662 // }, 22663 // "orderId": { 22664 // "description": "The ID of the order.", 22665 // "location": "path", 22666 // "required": true, 22667 // "type": "string" 22668 // } 22669 // }, 22670 // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 22671 // "request": { 22672 // "$ref": "OrdersUpdateLineItemShippingDetailsRequest" 22673 // }, 22674 // "response": { 22675 // "$ref": "OrdersUpdateLineItemShippingDetailsResponse" 22676 // }, 22677 // "scopes": [ 22678 // "https://www.googleapis.com/auth/content" 22679 // ] 22680 // } 22681 22682} 22683 22684// method id "content.orders.updatemerchantorderid": 22685 22686type OrdersUpdatemerchantorderidCall struct { 22687 s *APIService 22688 merchantId uint64 22689 orderId string 22690 ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest 22691 urlParams_ gensupport.URLParams 22692 ctx_ context.Context 22693 header_ http.Header 22694} 22695 22696// Updatemerchantorderid: Updates the merchant order ID for a given 22697// order. 22698// 22699// - merchantId: The ID of the account that manages the order. This 22700// cannot be a multi-client account. 22701// - orderId: The ID of the order. 22702func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { 22703 c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22704 c.merchantId = merchantId 22705 c.orderId = orderId 22706 c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest 22707 return c 22708} 22709 22710// Fields allows partial responses to be retrieved. See 22711// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22712// for more information. 22713func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { 22714 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22715 return c 22716} 22717 22718// Context sets the context to be used in this call's Do method. Any 22719// pending HTTP request will be aborted if the provided context is 22720// canceled. 22721func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { 22722 c.ctx_ = ctx 22723 return c 22724} 22725 22726// Header returns an http.Header that can be modified by the caller to 22727// add HTTP headers to the request. 22728func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { 22729 if c.header_ == nil { 22730 c.header_ = make(http.Header) 22731 } 22732 return c.header_ 22733} 22734 22735func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { 22736 reqHeaders := make(http.Header) 22737 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22738 for k, v := range c.header_ { 22739 reqHeaders[k] = v 22740 } 22741 reqHeaders.Set("User-Agent", c.s.userAgent()) 22742 var body io.Reader = nil 22743 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) 22744 if err != nil { 22745 return nil, err 22746 } 22747 reqHeaders.Set("Content-Type", "application/json") 22748 c.urlParams_.Set("alt", alt) 22749 c.urlParams_.Set("prettyPrint", "false") 22750 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") 22751 urls += "?" + c.urlParams_.Encode() 22752 req, err := http.NewRequest("POST", urls, body) 22753 if err != nil { 22754 return nil, err 22755 } 22756 req.Header = reqHeaders 22757 googleapi.Expand(req.URL, map[string]string{ 22758 "merchantId": strconv.FormatUint(c.merchantId, 10), 22759 "orderId": c.orderId, 22760 }) 22761 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22762} 22763 22764// Do executes the "content.orders.updatemerchantorderid" call. 22765// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be 22766// non-nil. Any non-2xx status code is an error. Response headers are in 22767// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or 22768// (if a response was returned at all) in 22769// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22770// whether the returned error was because http.StatusNotModified was 22771// returned. 22772func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { 22773 gensupport.SetOptions(c.urlParams_, opts...) 22774 res, err := c.doRequest("json") 22775 if res != nil && res.StatusCode == http.StatusNotModified { 22776 if res.Body != nil { 22777 res.Body.Close() 22778 } 22779 return nil, &googleapi.Error{ 22780 Code: res.StatusCode, 22781 Header: res.Header, 22782 } 22783 } 22784 if err != nil { 22785 return nil, err 22786 } 22787 defer googleapi.CloseBody(res) 22788 if err := googleapi.CheckResponse(res); err != nil { 22789 return nil, err 22790 } 22791 ret := &OrdersUpdateMerchantOrderIdResponse{ 22792 ServerResponse: googleapi.ServerResponse{ 22793 Header: res.Header, 22794 HTTPStatusCode: res.StatusCode, 22795 }, 22796 } 22797 target := &ret 22798 if err := gensupport.DecodeResponse(target, res); err != nil { 22799 return nil, err 22800 } 22801 return ret, nil 22802 // { 22803 // "description": "Updates the merchant order ID for a given order.", 22804 // "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 22805 // "httpMethod": "POST", 22806 // "id": "content.orders.updatemerchantorderid", 22807 // "parameterOrder": [ 22808 // "merchantId", 22809 // "orderId" 22810 // ], 22811 // "parameters": { 22812 // "merchantId": { 22813 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22814 // "format": "uint64", 22815 // "location": "path", 22816 // "required": true, 22817 // "type": "string" 22818 // }, 22819 // "orderId": { 22820 // "description": "The ID of the order.", 22821 // "location": "path", 22822 // "required": true, 22823 // "type": "string" 22824 // } 22825 // }, 22826 // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 22827 // "request": { 22828 // "$ref": "OrdersUpdateMerchantOrderIdRequest" 22829 // }, 22830 // "response": { 22831 // "$ref": "OrdersUpdateMerchantOrderIdResponse" 22832 // }, 22833 // "scopes": [ 22834 // "https://www.googleapis.com/auth/content" 22835 // ] 22836 // } 22837 22838} 22839 22840// method id "content.orders.updateshipment": 22841 22842type OrdersUpdateshipmentCall struct { 22843 s *APIService 22844 merchantId uint64 22845 orderId string 22846 ordersupdateshipmentrequest *OrdersUpdateShipmentRequest 22847 urlParams_ gensupport.URLParams 22848 ctx_ context.Context 22849 header_ http.Header 22850} 22851 22852// Updateshipment: Updates a shipment's status, carrier, and/or tracking 22853// ID. 22854// 22855// - merchantId: The ID of the account that manages the order. This 22856// cannot be a multi-client account. 22857// - orderId: The ID of the order. 22858func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { 22859 c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22860 c.merchantId = merchantId 22861 c.orderId = orderId 22862 c.ordersupdateshipmentrequest = ordersupdateshipmentrequest 22863 return c 22864} 22865 22866// Fields allows partial responses to be retrieved. See 22867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22868// for more information. 22869func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { 22870 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22871 return c 22872} 22873 22874// Context sets the context to be used in this call's Do method. Any 22875// pending HTTP request will be aborted if the provided context is 22876// canceled. 22877func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { 22878 c.ctx_ = ctx 22879 return c 22880} 22881 22882// Header returns an http.Header that can be modified by the caller to 22883// add HTTP headers to the request. 22884func (c *OrdersUpdateshipmentCall) Header() http.Header { 22885 if c.header_ == nil { 22886 c.header_ = make(http.Header) 22887 } 22888 return c.header_ 22889} 22890 22891func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { 22892 reqHeaders := make(http.Header) 22893 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 22894 for k, v := range c.header_ { 22895 reqHeaders[k] = v 22896 } 22897 reqHeaders.Set("User-Agent", c.s.userAgent()) 22898 var body io.Reader = nil 22899 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) 22900 if err != nil { 22901 return nil, err 22902 } 22903 reqHeaders.Set("Content-Type", "application/json") 22904 c.urlParams_.Set("alt", alt) 22905 c.urlParams_.Set("prettyPrint", "false") 22906 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") 22907 urls += "?" + c.urlParams_.Encode() 22908 req, err := http.NewRequest("POST", urls, body) 22909 if err != nil { 22910 return nil, err 22911 } 22912 req.Header = reqHeaders 22913 googleapi.Expand(req.URL, map[string]string{ 22914 "merchantId": strconv.FormatUint(c.merchantId, 10), 22915 "orderId": c.orderId, 22916 }) 22917 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22918} 22919 22920// Do executes the "content.orders.updateshipment" call. 22921// Exactly one of *OrdersUpdateShipmentResponse or error will be 22922// non-nil. Any non-2xx status code is an error. Response headers are in 22923// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a 22924// response was returned at all) in error.(*googleapi.Error).Header. Use 22925// googleapi.IsNotModified to check whether the returned error was 22926// because http.StatusNotModified was returned. 22927func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { 22928 gensupport.SetOptions(c.urlParams_, opts...) 22929 res, err := c.doRequest("json") 22930 if res != nil && res.StatusCode == http.StatusNotModified { 22931 if res.Body != nil { 22932 res.Body.Close() 22933 } 22934 return nil, &googleapi.Error{ 22935 Code: res.StatusCode, 22936 Header: res.Header, 22937 } 22938 } 22939 if err != nil { 22940 return nil, err 22941 } 22942 defer googleapi.CloseBody(res) 22943 if err := googleapi.CheckResponse(res); err != nil { 22944 return nil, err 22945 } 22946 ret := &OrdersUpdateShipmentResponse{ 22947 ServerResponse: googleapi.ServerResponse{ 22948 Header: res.Header, 22949 HTTPStatusCode: res.StatusCode, 22950 }, 22951 } 22952 target := &ret 22953 if err := gensupport.DecodeResponse(target, res); err != nil { 22954 return nil, err 22955 } 22956 return ret, nil 22957 // { 22958 // "description": "Updates a shipment's status, carrier, and/or tracking ID.", 22959 // "flatPath": "{merchantId}/orders/{orderId}/updateShipment", 22960 // "httpMethod": "POST", 22961 // "id": "content.orders.updateshipment", 22962 // "parameterOrder": [ 22963 // "merchantId", 22964 // "orderId" 22965 // ], 22966 // "parameters": { 22967 // "merchantId": { 22968 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22969 // "format": "uint64", 22970 // "location": "path", 22971 // "required": true, 22972 // "type": "string" 22973 // }, 22974 // "orderId": { 22975 // "description": "The ID of the order.", 22976 // "location": "path", 22977 // "required": true, 22978 // "type": "string" 22979 // } 22980 // }, 22981 // "path": "{merchantId}/orders/{orderId}/updateShipment", 22982 // "request": { 22983 // "$ref": "OrdersUpdateShipmentRequest" 22984 // }, 22985 // "response": { 22986 // "$ref": "OrdersUpdateShipmentResponse" 22987 // }, 22988 // "scopes": [ 22989 // "https://www.googleapis.com/auth/content" 22990 // ] 22991 // } 22992 22993} 22994 22995// method id "content.pos.custombatch": 22996 22997type PosCustombatchCall struct { 22998 s *APIService 22999 poscustombatchrequest *PosCustomBatchRequest 23000 urlParams_ gensupport.URLParams 23001 ctx_ context.Context 23002 header_ http.Header 23003} 23004 23005// Custombatch: Batches multiple POS-related calls in a single request. 23006func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { 23007 c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23008 c.poscustombatchrequest = poscustombatchrequest 23009 return c 23010} 23011 23012// DryRun sets the optional parameter "dryRun": Flag to simulate a 23013// request like in a live environment. If set to true, dry-run mode 23014// checks the validity of the request and returns errors (if any). 23015func (c *PosCustombatchCall) DryRun(dryRun bool) *PosCustombatchCall { 23016 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23017 return c 23018} 23019 23020// Fields allows partial responses to be retrieved. See 23021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23022// for more information. 23023func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { 23024 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23025 return c 23026} 23027 23028// Context sets the context to be used in this call's Do method. Any 23029// pending HTTP request will be aborted if the provided context is 23030// canceled. 23031func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { 23032 c.ctx_ = ctx 23033 return c 23034} 23035 23036// Header returns an http.Header that can be modified by the caller to 23037// add HTTP headers to the request. 23038func (c *PosCustombatchCall) Header() http.Header { 23039 if c.header_ == nil { 23040 c.header_ = make(http.Header) 23041 } 23042 return c.header_ 23043} 23044 23045func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { 23046 reqHeaders := make(http.Header) 23047 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23048 for k, v := range c.header_ { 23049 reqHeaders[k] = v 23050 } 23051 reqHeaders.Set("User-Agent", c.s.userAgent()) 23052 var body io.Reader = nil 23053 body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest) 23054 if err != nil { 23055 return nil, err 23056 } 23057 reqHeaders.Set("Content-Type", "application/json") 23058 c.urlParams_.Set("alt", alt) 23059 c.urlParams_.Set("prettyPrint", "false") 23060 urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") 23061 urls += "?" + c.urlParams_.Encode() 23062 req, err := http.NewRequest("POST", urls, body) 23063 if err != nil { 23064 return nil, err 23065 } 23066 req.Header = reqHeaders 23067 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23068} 23069 23070// Do executes the "content.pos.custombatch" call. 23071// Exactly one of *PosCustomBatchResponse or error will be non-nil. Any 23072// non-2xx status code is an error. Response headers are in either 23073// *PosCustomBatchResponse.ServerResponse.Header or (if a response was 23074// returned at all) in error.(*googleapi.Error).Header. Use 23075// googleapi.IsNotModified to check whether the returned error was 23076// because http.StatusNotModified was returned. 23077func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { 23078 gensupport.SetOptions(c.urlParams_, opts...) 23079 res, err := c.doRequest("json") 23080 if res != nil && res.StatusCode == http.StatusNotModified { 23081 if res.Body != nil { 23082 res.Body.Close() 23083 } 23084 return nil, &googleapi.Error{ 23085 Code: res.StatusCode, 23086 Header: res.Header, 23087 } 23088 } 23089 if err != nil { 23090 return nil, err 23091 } 23092 defer googleapi.CloseBody(res) 23093 if err := googleapi.CheckResponse(res); err != nil { 23094 return nil, err 23095 } 23096 ret := &PosCustomBatchResponse{ 23097 ServerResponse: googleapi.ServerResponse{ 23098 Header: res.Header, 23099 HTTPStatusCode: res.StatusCode, 23100 }, 23101 } 23102 target := &ret 23103 if err := gensupport.DecodeResponse(target, res); err != nil { 23104 return nil, err 23105 } 23106 return ret, nil 23107 // { 23108 // "description": "Batches multiple POS-related calls in a single request.", 23109 // "flatPath": "pos/batch", 23110 // "httpMethod": "POST", 23111 // "id": "content.pos.custombatch", 23112 // "parameterOrder": [], 23113 // "parameters": { 23114 // "dryRun": { 23115 // "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).", 23116 // "location": "query", 23117 // "type": "boolean" 23118 // } 23119 // }, 23120 // "path": "pos/batch", 23121 // "request": { 23122 // "$ref": "PosCustomBatchRequest" 23123 // }, 23124 // "response": { 23125 // "$ref": "PosCustomBatchResponse" 23126 // }, 23127 // "scopes": [ 23128 // "https://www.googleapis.com/auth/content" 23129 // ] 23130 // } 23131 23132} 23133 23134// method id "content.pos.delete": 23135 23136type PosDeleteCall struct { 23137 s *APIService 23138 merchantId uint64 23139 targetMerchantId uint64 23140 storeCode string 23141 urlParams_ gensupport.URLParams 23142 ctx_ context.Context 23143 header_ http.Header 23144} 23145 23146// Delete: Deletes a store for the given merchant. 23147// 23148// - merchantId: The ID of the POS or inventory data provider. 23149// - storeCode: A store code that is unique per merchant. 23150// - targetMerchantId: The ID of the target merchant. 23151func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { 23152 c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23153 c.merchantId = merchantId 23154 c.targetMerchantId = targetMerchantId 23155 c.storeCode = storeCode 23156 return c 23157} 23158 23159// DryRun sets the optional parameter "dryRun": Flag to simulate a 23160// request like in a live environment. If set to true, dry-run mode 23161// checks the validity of the request and returns errors (if any). 23162func (c *PosDeleteCall) DryRun(dryRun bool) *PosDeleteCall { 23163 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23164 return c 23165} 23166 23167// Fields allows partial responses to be retrieved. See 23168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23169// for more information. 23170func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { 23171 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23172 return c 23173} 23174 23175// Context sets the context to be used in this call's Do method. Any 23176// pending HTTP request will be aborted if the provided context is 23177// canceled. 23178func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { 23179 c.ctx_ = ctx 23180 return c 23181} 23182 23183// Header returns an http.Header that can be modified by the caller to 23184// add HTTP headers to the request. 23185func (c *PosDeleteCall) Header() http.Header { 23186 if c.header_ == nil { 23187 c.header_ = make(http.Header) 23188 } 23189 return c.header_ 23190} 23191 23192func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { 23193 reqHeaders := make(http.Header) 23194 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23195 for k, v := range c.header_ { 23196 reqHeaders[k] = v 23197 } 23198 reqHeaders.Set("User-Agent", c.s.userAgent()) 23199 var body io.Reader = nil 23200 c.urlParams_.Set("alt", alt) 23201 c.urlParams_.Set("prettyPrint", "false") 23202 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23203 urls += "?" + c.urlParams_.Encode() 23204 req, err := http.NewRequest("DELETE", urls, body) 23205 if err != nil { 23206 return nil, err 23207 } 23208 req.Header = reqHeaders 23209 googleapi.Expand(req.URL, map[string]string{ 23210 "merchantId": strconv.FormatUint(c.merchantId, 10), 23211 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23212 "storeCode": c.storeCode, 23213 }) 23214 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23215} 23216 23217// Do executes the "content.pos.delete" call. 23218func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { 23219 gensupport.SetOptions(c.urlParams_, opts...) 23220 res, err := c.doRequest("json") 23221 if err != nil { 23222 return err 23223 } 23224 defer googleapi.CloseBody(res) 23225 if err := googleapi.CheckResponse(res); err != nil { 23226 return err 23227 } 23228 return nil 23229 // { 23230 // "description": "Deletes a store for the given merchant.", 23231 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23232 // "httpMethod": "DELETE", 23233 // "id": "content.pos.delete", 23234 // "parameterOrder": [ 23235 // "merchantId", 23236 // "targetMerchantId", 23237 // "storeCode" 23238 // ], 23239 // "parameters": { 23240 // "dryRun": { 23241 // "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).", 23242 // "location": "query", 23243 // "type": "boolean" 23244 // }, 23245 // "merchantId": { 23246 // "description": "The ID of the POS or inventory data provider.", 23247 // "format": "uint64", 23248 // "location": "path", 23249 // "required": true, 23250 // "type": "string" 23251 // }, 23252 // "storeCode": { 23253 // "description": "A store code that is unique per merchant.", 23254 // "location": "path", 23255 // "required": true, 23256 // "type": "string" 23257 // }, 23258 // "targetMerchantId": { 23259 // "description": "The ID of the target merchant.", 23260 // "format": "uint64", 23261 // "location": "path", 23262 // "required": true, 23263 // "type": "string" 23264 // } 23265 // }, 23266 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23267 // "scopes": [ 23268 // "https://www.googleapis.com/auth/content" 23269 // ] 23270 // } 23271 23272} 23273 23274// method id "content.pos.get": 23275 23276type PosGetCall struct { 23277 s *APIService 23278 merchantId uint64 23279 targetMerchantId uint64 23280 storeCode string 23281 urlParams_ gensupport.URLParams 23282 ifNoneMatch_ string 23283 ctx_ context.Context 23284 header_ http.Header 23285} 23286 23287// Get: Retrieves information about the given store. 23288// 23289// - merchantId: The ID of the POS or inventory data provider. 23290// - storeCode: A store code that is unique per merchant. 23291// - targetMerchantId: The ID of the target merchant. 23292func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { 23293 c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23294 c.merchantId = merchantId 23295 c.targetMerchantId = targetMerchantId 23296 c.storeCode = storeCode 23297 return c 23298} 23299 23300// Fields allows partial responses to be retrieved. See 23301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23302// for more information. 23303func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { 23304 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23305 return c 23306} 23307 23308// IfNoneMatch sets the optional parameter which makes the operation 23309// fail if the object's ETag matches the given value. This is useful for 23310// getting updates only after the object has changed since the last 23311// request. Use googleapi.IsNotModified to check whether the response 23312// error from Do is the result of In-None-Match. 23313func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { 23314 c.ifNoneMatch_ = entityTag 23315 return c 23316} 23317 23318// Context sets the context to be used in this call's Do method. Any 23319// pending HTTP request will be aborted if the provided context is 23320// canceled. 23321func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { 23322 c.ctx_ = ctx 23323 return c 23324} 23325 23326// Header returns an http.Header that can be modified by the caller to 23327// add HTTP headers to the request. 23328func (c *PosGetCall) Header() http.Header { 23329 if c.header_ == nil { 23330 c.header_ = make(http.Header) 23331 } 23332 return c.header_ 23333} 23334 23335func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { 23336 reqHeaders := make(http.Header) 23337 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23338 for k, v := range c.header_ { 23339 reqHeaders[k] = v 23340 } 23341 reqHeaders.Set("User-Agent", c.s.userAgent()) 23342 if c.ifNoneMatch_ != "" { 23343 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23344 } 23345 var body io.Reader = nil 23346 c.urlParams_.Set("alt", alt) 23347 c.urlParams_.Set("prettyPrint", "false") 23348 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23349 urls += "?" + c.urlParams_.Encode() 23350 req, err := http.NewRequest("GET", urls, body) 23351 if err != nil { 23352 return nil, err 23353 } 23354 req.Header = reqHeaders 23355 googleapi.Expand(req.URL, map[string]string{ 23356 "merchantId": strconv.FormatUint(c.merchantId, 10), 23357 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23358 "storeCode": c.storeCode, 23359 }) 23360 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23361} 23362 23363// Do executes the "content.pos.get" call. 23364// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23365// code is an error. Response headers are in either 23366// *PosStore.ServerResponse.Header or (if a response was returned at 23367// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23368// to check whether the returned error was because 23369// http.StatusNotModified was returned. 23370func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23371 gensupport.SetOptions(c.urlParams_, opts...) 23372 res, err := c.doRequest("json") 23373 if res != nil && res.StatusCode == http.StatusNotModified { 23374 if res.Body != nil { 23375 res.Body.Close() 23376 } 23377 return nil, &googleapi.Error{ 23378 Code: res.StatusCode, 23379 Header: res.Header, 23380 } 23381 } 23382 if err != nil { 23383 return nil, err 23384 } 23385 defer googleapi.CloseBody(res) 23386 if err := googleapi.CheckResponse(res); err != nil { 23387 return nil, err 23388 } 23389 ret := &PosStore{ 23390 ServerResponse: googleapi.ServerResponse{ 23391 Header: res.Header, 23392 HTTPStatusCode: res.StatusCode, 23393 }, 23394 } 23395 target := &ret 23396 if err := gensupport.DecodeResponse(target, res); err != nil { 23397 return nil, err 23398 } 23399 return ret, nil 23400 // { 23401 // "description": "Retrieves information about the given store.", 23402 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23403 // "httpMethod": "GET", 23404 // "id": "content.pos.get", 23405 // "parameterOrder": [ 23406 // "merchantId", 23407 // "targetMerchantId", 23408 // "storeCode" 23409 // ], 23410 // "parameters": { 23411 // "merchantId": { 23412 // "description": "The ID of the POS or inventory data provider.", 23413 // "format": "uint64", 23414 // "location": "path", 23415 // "required": true, 23416 // "type": "string" 23417 // }, 23418 // "storeCode": { 23419 // "description": "A store code that is unique per merchant.", 23420 // "location": "path", 23421 // "required": true, 23422 // "type": "string" 23423 // }, 23424 // "targetMerchantId": { 23425 // "description": "The ID of the target merchant.", 23426 // "format": "uint64", 23427 // "location": "path", 23428 // "required": true, 23429 // "type": "string" 23430 // } 23431 // }, 23432 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23433 // "response": { 23434 // "$ref": "PosStore" 23435 // }, 23436 // "scopes": [ 23437 // "https://www.googleapis.com/auth/content" 23438 // ] 23439 // } 23440 23441} 23442 23443// method id "content.pos.insert": 23444 23445type PosInsertCall struct { 23446 s *APIService 23447 merchantId uint64 23448 targetMerchantId uint64 23449 posstore *PosStore 23450 urlParams_ gensupport.URLParams 23451 ctx_ context.Context 23452 header_ http.Header 23453} 23454 23455// Insert: Creates a store for the given merchant. 23456// 23457// - merchantId: The ID of the POS or inventory data provider. 23458// - targetMerchantId: The ID of the target merchant. 23459func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { 23460 c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23461 c.merchantId = merchantId 23462 c.targetMerchantId = targetMerchantId 23463 c.posstore = posstore 23464 return c 23465} 23466 23467// DryRun sets the optional parameter "dryRun": Flag to simulate a 23468// request like in a live environment. If set to true, dry-run mode 23469// checks the validity of the request and returns errors (if any). 23470func (c *PosInsertCall) DryRun(dryRun bool) *PosInsertCall { 23471 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23472 return c 23473} 23474 23475// Fields allows partial responses to be retrieved. See 23476// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23477// for more information. 23478func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { 23479 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23480 return c 23481} 23482 23483// Context sets the context to be used in this call's Do method. Any 23484// pending HTTP request will be aborted if the provided context is 23485// canceled. 23486func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { 23487 c.ctx_ = ctx 23488 return c 23489} 23490 23491// Header returns an http.Header that can be modified by the caller to 23492// add HTTP headers to the request. 23493func (c *PosInsertCall) Header() http.Header { 23494 if c.header_ == nil { 23495 c.header_ = make(http.Header) 23496 } 23497 return c.header_ 23498} 23499 23500func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { 23501 reqHeaders := make(http.Header) 23502 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23503 for k, v := range c.header_ { 23504 reqHeaders[k] = v 23505 } 23506 reqHeaders.Set("User-Agent", c.s.userAgent()) 23507 var body io.Reader = nil 23508 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore) 23509 if err != nil { 23510 return nil, err 23511 } 23512 reqHeaders.Set("Content-Type", "application/json") 23513 c.urlParams_.Set("alt", alt) 23514 c.urlParams_.Set("prettyPrint", "false") 23515 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 23516 urls += "?" + c.urlParams_.Encode() 23517 req, err := http.NewRequest("POST", urls, body) 23518 if err != nil { 23519 return nil, err 23520 } 23521 req.Header = reqHeaders 23522 googleapi.Expand(req.URL, map[string]string{ 23523 "merchantId": strconv.FormatUint(c.merchantId, 10), 23524 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23525 }) 23526 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23527} 23528 23529// Do executes the "content.pos.insert" call. 23530// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23531// code is an error. Response headers are in either 23532// *PosStore.ServerResponse.Header or (if a response was returned at 23533// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23534// to check whether the returned error was because 23535// http.StatusNotModified was returned. 23536func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23537 gensupport.SetOptions(c.urlParams_, opts...) 23538 res, err := c.doRequest("json") 23539 if res != nil && res.StatusCode == http.StatusNotModified { 23540 if res.Body != nil { 23541 res.Body.Close() 23542 } 23543 return nil, &googleapi.Error{ 23544 Code: res.StatusCode, 23545 Header: res.Header, 23546 } 23547 } 23548 if err != nil { 23549 return nil, err 23550 } 23551 defer googleapi.CloseBody(res) 23552 if err := googleapi.CheckResponse(res); err != nil { 23553 return nil, err 23554 } 23555 ret := &PosStore{ 23556 ServerResponse: googleapi.ServerResponse{ 23557 Header: res.Header, 23558 HTTPStatusCode: res.StatusCode, 23559 }, 23560 } 23561 target := &ret 23562 if err := gensupport.DecodeResponse(target, res); err != nil { 23563 return nil, err 23564 } 23565 return ret, nil 23566 // { 23567 // "description": "Creates a store for the given merchant.", 23568 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store", 23569 // "httpMethod": "POST", 23570 // "id": "content.pos.insert", 23571 // "parameterOrder": [ 23572 // "merchantId", 23573 // "targetMerchantId" 23574 // ], 23575 // "parameters": { 23576 // "dryRun": { 23577 // "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).", 23578 // "location": "query", 23579 // "type": "boolean" 23580 // }, 23581 // "merchantId": { 23582 // "description": "The ID of the POS or inventory data provider.", 23583 // "format": "uint64", 23584 // "location": "path", 23585 // "required": true, 23586 // "type": "string" 23587 // }, 23588 // "targetMerchantId": { 23589 // "description": "The ID of the target merchant.", 23590 // "format": "uint64", 23591 // "location": "path", 23592 // "required": true, 23593 // "type": "string" 23594 // } 23595 // }, 23596 // "path": "{merchantId}/pos/{targetMerchantId}/store", 23597 // "request": { 23598 // "$ref": "PosStore" 23599 // }, 23600 // "response": { 23601 // "$ref": "PosStore" 23602 // }, 23603 // "scopes": [ 23604 // "https://www.googleapis.com/auth/content" 23605 // ] 23606 // } 23607 23608} 23609 23610// method id "content.pos.inventory": 23611 23612type PosInventoryCall struct { 23613 s *APIService 23614 merchantId uint64 23615 targetMerchantId uint64 23616 posinventoryrequest *PosInventoryRequest 23617 urlParams_ gensupport.URLParams 23618 ctx_ context.Context 23619 header_ http.Header 23620} 23621 23622// Inventory: Submit inventory for the given merchant. 23623// 23624// - merchantId: The ID of the POS or inventory data provider. 23625// - targetMerchantId: The ID of the target merchant. 23626func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { 23627 c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23628 c.merchantId = merchantId 23629 c.targetMerchantId = targetMerchantId 23630 c.posinventoryrequest = posinventoryrequest 23631 return c 23632} 23633 23634// DryRun sets the optional parameter "dryRun": Flag to simulate a 23635// request like in a live environment. If set to true, dry-run mode 23636// checks the validity of the request and returns errors (if any). 23637func (c *PosInventoryCall) DryRun(dryRun bool) *PosInventoryCall { 23638 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23639 return c 23640} 23641 23642// Fields allows partial responses to be retrieved. See 23643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23644// for more information. 23645func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { 23646 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23647 return c 23648} 23649 23650// Context sets the context to be used in this call's Do method. Any 23651// pending HTTP request will be aborted if the provided context is 23652// canceled. 23653func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { 23654 c.ctx_ = ctx 23655 return c 23656} 23657 23658// Header returns an http.Header that can be modified by the caller to 23659// add HTTP headers to the request. 23660func (c *PosInventoryCall) Header() http.Header { 23661 if c.header_ == nil { 23662 c.header_ = make(http.Header) 23663 } 23664 return c.header_ 23665} 23666 23667func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { 23668 reqHeaders := make(http.Header) 23669 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23670 for k, v := range c.header_ { 23671 reqHeaders[k] = v 23672 } 23673 reqHeaders.Set("User-Agent", c.s.userAgent()) 23674 var body io.Reader = nil 23675 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest) 23676 if err != nil { 23677 return nil, err 23678 } 23679 reqHeaders.Set("Content-Type", "application/json") 23680 c.urlParams_.Set("alt", alt) 23681 c.urlParams_.Set("prettyPrint", "false") 23682 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") 23683 urls += "?" + c.urlParams_.Encode() 23684 req, err := http.NewRequest("POST", urls, body) 23685 if err != nil { 23686 return nil, err 23687 } 23688 req.Header = reqHeaders 23689 googleapi.Expand(req.URL, map[string]string{ 23690 "merchantId": strconv.FormatUint(c.merchantId, 10), 23691 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23692 }) 23693 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23694} 23695 23696// Do executes the "content.pos.inventory" call. 23697// Exactly one of *PosInventoryResponse or error will be non-nil. Any 23698// non-2xx status code is an error. Response headers are in either 23699// *PosInventoryResponse.ServerResponse.Header or (if a response was 23700// returned at all) in error.(*googleapi.Error).Header. Use 23701// googleapi.IsNotModified to check whether the returned error was 23702// because http.StatusNotModified was returned. 23703func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { 23704 gensupport.SetOptions(c.urlParams_, opts...) 23705 res, err := c.doRequest("json") 23706 if res != nil && res.StatusCode == http.StatusNotModified { 23707 if res.Body != nil { 23708 res.Body.Close() 23709 } 23710 return nil, &googleapi.Error{ 23711 Code: res.StatusCode, 23712 Header: res.Header, 23713 } 23714 } 23715 if err != nil { 23716 return nil, err 23717 } 23718 defer googleapi.CloseBody(res) 23719 if err := googleapi.CheckResponse(res); err != nil { 23720 return nil, err 23721 } 23722 ret := &PosInventoryResponse{ 23723 ServerResponse: googleapi.ServerResponse{ 23724 Header: res.Header, 23725 HTTPStatusCode: res.StatusCode, 23726 }, 23727 } 23728 target := &ret 23729 if err := gensupport.DecodeResponse(target, res); err != nil { 23730 return nil, err 23731 } 23732 return ret, nil 23733 // { 23734 // "description": "Submit inventory for the given merchant.", 23735 // "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", 23736 // "httpMethod": "POST", 23737 // "id": "content.pos.inventory", 23738 // "parameterOrder": [ 23739 // "merchantId", 23740 // "targetMerchantId" 23741 // ], 23742 // "parameters": { 23743 // "dryRun": { 23744 // "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).", 23745 // "location": "query", 23746 // "type": "boolean" 23747 // }, 23748 // "merchantId": { 23749 // "description": "The ID of the POS or inventory data provider.", 23750 // "format": "uint64", 23751 // "location": "path", 23752 // "required": true, 23753 // "type": "string" 23754 // }, 23755 // "targetMerchantId": { 23756 // "description": "The ID of the target merchant.", 23757 // "format": "uint64", 23758 // "location": "path", 23759 // "required": true, 23760 // "type": "string" 23761 // } 23762 // }, 23763 // "path": "{merchantId}/pos/{targetMerchantId}/inventory", 23764 // "request": { 23765 // "$ref": "PosInventoryRequest" 23766 // }, 23767 // "response": { 23768 // "$ref": "PosInventoryResponse" 23769 // }, 23770 // "scopes": [ 23771 // "https://www.googleapis.com/auth/content" 23772 // ] 23773 // } 23774 23775} 23776 23777// method id "content.pos.list": 23778 23779type PosListCall struct { 23780 s *APIService 23781 merchantId uint64 23782 targetMerchantId uint64 23783 urlParams_ gensupport.URLParams 23784 ifNoneMatch_ string 23785 ctx_ context.Context 23786 header_ http.Header 23787} 23788 23789// List: Lists the stores of the target merchant. 23790// 23791// - merchantId: The ID of the POS or inventory data provider. 23792// - targetMerchantId: The ID of the target merchant. 23793func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { 23794 c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23795 c.merchantId = merchantId 23796 c.targetMerchantId = targetMerchantId 23797 return c 23798} 23799 23800// Fields allows partial responses to be retrieved. See 23801// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23802// for more information. 23803func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { 23804 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23805 return c 23806} 23807 23808// IfNoneMatch sets the optional parameter which makes the operation 23809// fail if the object's ETag matches the given value. This is useful for 23810// getting updates only after the object has changed since the last 23811// request. Use googleapi.IsNotModified to check whether the response 23812// error from Do is the result of In-None-Match. 23813func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { 23814 c.ifNoneMatch_ = entityTag 23815 return c 23816} 23817 23818// Context sets the context to be used in this call's Do method. Any 23819// pending HTTP request will be aborted if the provided context is 23820// canceled. 23821func (c *PosListCall) Context(ctx context.Context) *PosListCall { 23822 c.ctx_ = ctx 23823 return c 23824} 23825 23826// Header returns an http.Header that can be modified by the caller to 23827// add HTTP headers to the request. 23828func (c *PosListCall) Header() http.Header { 23829 if c.header_ == nil { 23830 c.header_ = make(http.Header) 23831 } 23832 return c.header_ 23833} 23834 23835func (c *PosListCall) doRequest(alt string) (*http.Response, error) { 23836 reqHeaders := make(http.Header) 23837 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23838 for k, v := range c.header_ { 23839 reqHeaders[k] = v 23840 } 23841 reqHeaders.Set("User-Agent", c.s.userAgent()) 23842 if c.ifNoneMatch_ != "" { 23843 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23844 } 23845 var body io.Reader = nil 23846 c.urlParams_.Set("alt", alt) 23847 c.urlParams_.Set("prettyPrint", "false") 23848 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 23849 urls += "?" + c.urlParams_.Encode() 23850 req, err := http.NewRequest("GET", urls, body) 23851 if err != nil { 23852 return nil, err 23853 } 23854 req.Header = reqHeaders 23855 googleapi.Expand(req.URL, map[string]string{ 23856 "merchantId": strconv.FormatUint(c.merchantId, 10), 23857 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23858 }) 23859 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23860} 23861 23862// Do executes the "content.pos.list" call. 23863// Exactly one of *PosListResponse or error will be non-nil. Any non-2xx 23864// status code is an error. Response headers are in either 23865// *PosListResponse.ServerResponse.Header or (if a response was returned 23866// at all) in error.(*googleapi.Error).Header. Use 23867// googleapi.IsNotModified to check whether the returned error was 23868// because http.StatusNotModified was returned. 23869func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { 23870 gensupport.SetOptions(c.urlParams_, opts...) 23871 res, err := c.doRequest("json") 23872 if res != nil && res.StatusCode == http.StatusNotModified { 23873 if res.Body != nil { 23874 res.Body.Close() 23875 } 23876 return nil, &googleapi.Error{ 23877 Code: res.StatusCode, 23878 Header: res.Header, 23879 } 23880 } 23881 if err != nil { 23882 return nil, err 23883 } 23884 defer googleapi.CloseBody(res) 23885 if err := googleapi.CheckResponse(res); err != nil { 23886 return nil, err 23887 } 23888 ret := &PosListResponse{ 23889 ServerResponse: googleapi.ServerResponse{ 23890 Header: res.Header, 23891 HTTPStatusCode: res.StatusCode, 23892 }, 23893 } 23894 target := &ret 23895 if err := gensupport.DecodeResponse(target, res); err != nil { 23896 return nil, err 23897 } 23898 return ret, nil 23899 // { 23900 // "description": "Lists the stores of the target merchant.", 23901 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store", 23902 // "httpMethod": "GET", 23903 // "id": "content.pos.list", 23904 // "parameterOrder": [ 23905 // "merchantId", 23906 // "targetMerchantId" 23907 // ], 23908 // "parameters": { 23909 // "merchantId": { 23910 // "description": "The ID of the POS or inventory data provider.", 23911 // "format": "uint64", 23912 // "location": "path", 23913 // "required": true, 23914 // "type": "string" 23915 // }, 23916 // "targetMerchantId": { 23917 // "description": "The ID of the target merchant.", 23918 // "format": "uint64", 23919 // "location": "path", 23920 // "required": true, 23921 // "type": "string" 23922 // } 23923 // }, 23924 // "path": "{merchantId}/pos/{targetMerchantId}/store", 23925 // "response": { 23926 // "$ref": "PosListResponse" 23927 // }, 23928 // "scopes": [ 23929 // "https://www.googleapis.com/auth/content" 23930 // ] 23931 // } 23932 23933} 23934 23935// method id "content.pos.sale": 23936 23937type PosSaleCall struct { 23938 s *APIService 23939 merchantId uint64 23940 targetMerchantId uint64 23941 possalerequest *PosSaleRequest 23942 urlParams_ gensupport.URLParams 23943 ctx_ context.Context 23944 header_ http.Header 23945} 23946 23947// Sale: Submit a sale event for the given merchant. 23948// 23949// - merchantId: The ID of the POS or inventory data provider. 23950// - targetMerchantId: The ID of the target merchant. 23951func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { 23952 c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23953 c.merchantId = merchantId 23954 c.targetMerchantId = targetMerchantId 23955 c.possalerequest = possalerequest 23956 return c 23957} 23958 23959// DryRun sets the optional parameter "dryRun": Flag to simulate a 23960// request like in a live environment. If set to true, dry-run mode 23961// checks the validity of the request and returns errors (if any). 23962func (c *PosSaleCall) DryRun(dryRun bool) *PosSaleCall { 23963 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23964 return c 23965} 23966 23967// Fields allows partial responses to be retrieved. See 23968// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23969// for more information. 23970func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { 23971 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23972 return c 23973} 23974 23975// Context sets the context to be used in this call's Do method. Any 23976// pending HTTP request will be aborted if the provided context is 23977// canceled. 23978func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { 23979 c.ctx_ = ctx 23980 return c 23981} 23982 23983// Header returns an http.Header that can be modified by the caller to 23984// add HTTP headers to the request. 23985func (c *PosSaleCall) Header() http.Header { 23986 if c.header_ == nil { 23987 c.header_ = make(http.Header) 23988 } 23989 return c.header_ 23990} 23991 23992func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { 23993 reqHeaders := make(http.Header) 23994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 23995 for k, v := range c.header_ { 23996 reqHeaders[k] = v 23997 } 23998 reqHeaders.Set("User-Agent", c.s.userAgent()) 23999 var body io.Reader = nil 24000 body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest) 24001 if err != nil { 24002 return nil, err 24003 } 24004 reqHeaders.Set("Content-Type", "application/json") 24005 c.urlParams_.Set("alt", alt) 24006 c.urlParams_.Set("prettyPrint", "false") 24007 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") 24008 urls += "?" + c.urlParams_.Encode() 24009 req, err := http.NewRequest("POST", urls, body) 24010 if err != nil { 24011 return nil, err 24012 } 24013 req.Header = reqHeaders 24014 googleapi.Expand(req.URL, map[string]string{ 24015 "merchantId": strconv.FormatUint(c.merchantId, 10), 24016 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 24017 }) 24018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24019} 24020 24021// Do executes the "content.pos.sale" call. 24022// Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx 24023// status code is an error. Response headers are in either 24024// *PosSaleResponse.ServerResponse.Header or (if a response was returned 24025// at all) in error.(*googleapi.Error).Header. Use 24026// googleapi.IsNotModified to check whether the returned error was 24027// because http.StatusNotModified was returned. 24028func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { 24029 gensupport.SetOptions(c.urlParams_, opts...) 24030 res, err := c.doRequest("json") 24031 if res != nil && res.StatusCode == http.StatusNotModified { 24032 if res.Body != nil { 24033 res.Body.Close() 24034 } 24035 return nil, &googleapi.Error{ 24036 Code: res.StatusCode, 24037 Header: res.Header, 24038 } 24039 } 24040 if err != nil { 24041 return nil, err 24042 } 24043 defer googleapi.CloseBody(res) 24044 if err := googleapi.CheckResponse(res); err != nil { 24045 return nil, err 24046 } 24047 ret := &PosSaleResponse{ 24048 ServerResponse: googleapi.ServerResponse{ 24049 Header: res.Header, 24050 HTTPStatusCode: res.StatusCode, 24051 }, 24052 } 24053 target := &ret 24054 if err := gensupport.DecodeResponse(target, res); err != nil { 24055 return nil, err 24056 } 24057 return ret, nil 24058 // { 24059 // "description": "Submit a sale event for the given merchant.", 24060 // "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", 24061 // "httpMethod": "POST", 24062 // "id": "content.pos.sale", 24063 // "parameterOrder": [ 24064 // "merchantId", 24065 // "targetMerchantId" 24066 // ], 24067 // "parameters": { 24068 // "dryRun": { 24069 // "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).", 24070 // "location": "query", 24071 // "type": "boolean" 24072 // }, 24073 // "merchantId": { 24074 // "description": "The ID of the POS or inventory data provider.", 24075 // "format": "uint64", 24076 // "location": "path", 24077 // "required": true, 24078 // "type": "string" 24079 // }, 24080 // "targetMerchantId": { 24081 // "description": "The ID of the target merchant.", 24082 // "format": "uint64", 24083 // "location": "path", 24084 // "required": true, 24085 // "type": "string" 24086 // } 24087 // }, 24088 // "path": "{merchantId}/pos/{targetMerchantId}/sale", 24089 // "request": { 24090 // "$ref": "PosSaleRequest" 24091 // }, 24092 // "response": { 24093 // "$ref": "PosSaleResponse" 24094 // }, 24095 // "scopes": [ 24096 // "https://www.googleapis.com/auth/content" 24097 // ] 24098 // } 24099 24100} 24101 24102// method id "content.products.custombatch": 24103 24104type ProductsCustombatchCall struct { 24105 s *APIService 24106 productscustombatchrequest *ProductsCustomBatchRequest 24107 urlParams_ gensupport.URLParams 24108 ctx_ context.Context 24109 header_ http.Header 24110} 24111 24112// Custombatch: Retrieves, inserts, and deletes multiple products in a 24113// single request. 24114func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { 24115 c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24116 c.productscustombatchrequest = productscustombatchrequest 24117 return c 24118} 24119 24120// DryRun sets the optional parameter "dryRun": Flag to simulate a 24121// request like in a live environment. If set to true, dry-run mode 24122// checks the validity of the request and returns errors (if any). 24123func (c *ProductsCustombatchCall) DryRun(dryRun bool) *ProductsCustombatchCall { 24124 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24125 return c 24126} 24127 24128// Fields allows partial responses to be retrieved. See 24129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24130// for more information. 24131func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { 24132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24133 return c 24134} 24135 24136// Context sets the context to be used in this call's Do method. Any 24137// pending HTTP request will be aborted if the provided context is 24138// canceled. 24139func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { 24140 c.ctx_ = ctx 24141 return c 24142} 24143 24144// Header returns an http.Header that can be modified by the caller to 24145// add HTTP headers to the request. 24146func (c *ProductsCustombatchCall) Header() http.Header { 24147 if c.header_ == nil { 24148 c.header_ = make(http.Header) 24149 } 24150 return c.header_ 24151} 24152 24153func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { 24154 reqHeaders := make(http.Header) 24155 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24156 for k, v := range c.header_ { 24157 reqHeaders[k] = v 24158 } 24159 reqHeaders.Set("User-Agent", c.s.userAgent()) 24160 var body io.Reader = nil 24161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest) 24162 if err != nil { 24163 return nil, err 24164 } 24165 reqHeaders.Set("Content-Type", "application/json") 24166 c.urlParams_.Set("alt", alt) 24167 c.urlParams_.Set("prettyPrint", "false") 24168 urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") 24169 urls += "?" + c.urlParams_.Encode() 24170 req, err := http.NewRequest("POST", urls, body) 24171 if err != nil { 24172 return nil, err 24173 } 24174 req.Header = reqHeaders 24175 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24176} 24177 24178// Do executes the "content.products.custombatch" call. 24179// Exactly one of *ProductsCustomBatchResponse or error will be non-nil. 24180// Any non-2xx status code is an error. Response headers are in either 24181// *ProductsCustomBatchResponse.ServerResponse.Header or (if a response 24182// was returned at all) in error.(*googleapi.Error).Header. Use 24183// googleapi.IsNotModified to check whether the returned error was 24184// because http.StatusNotModified was returned. 24185func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { 24186 gensupport.SetOptions(c.urlParams_, opts...) 24187 res, err := c.doRequest("json") 24188 if res != nil && res.StatusCode == http.StatusNotModified { 24189 if res.Body != nil { 24190 res.Body.Close() 24191 } 24192 return nil, &googleapi.Error{ 24193 Code: res.StatusCode, 24194 Header: res.Header, 24195 } 24196 } 24197 if err != nil { 24198 return nil, err 24199 } 24200 defer googleapi.CloseBody(res) 24201 if err := googleapi.CheckResponse(res); err != nil { 24202 return nil, err 24203 } 24204 ret := &ProductsCustomBatchResponse{ 24205 ServerResponse: googleapi.ServerResponse{ 24206 Header: res.Header, 24207 HTTPStatusCode: res.StatusCode, 24208 }, 24209 } 24210 target := &ret 24211 if err := gensupport.DecodeResponse(target, res); err != nil { 24212 return nil, err 24213 } 24214 return ret, nil 24215 // { 24216 // "description": "Retrieves, inserts, and deletes multiple products in a single request.", 24217 // "flatPath": "products/batch", 24218 // "httpMethod": "POST", 24219 // "id": "content.products.custombatch", 24220 // "parameterOrder": [], 24221 // "parameters": { 24222 // "dryRun": { 24223 // "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).", 24224 // "location": "query", 24225 // "type": "boolean" 24226 // } 24227 // }, 24228 // "path": "products/batch", 24229 // "request": { 24230 // "$ref": "ProductsCustomBatchRequest" 24231 // }, 24232 // "response": { 24233 // "$ref": "ProductsCustomBatchResponse" 24234 // }, 24235 // "scopes": [ 24236 // "https://www.googleapis.com/auth/content" 24237 // ] 24238 // } 24239 24240} 24241 24242// method id "content.products.delete": 24243 24244type ProductsDeleteCall struct { 24245 s *APIService 24246 merchantId uint64 24247 productId string 24248 urlParams_ gensupport.URLParams 24249 ctx_ context.Context 24250 header_ http.Header 24251} 24252 24253// Delete: Deletes a product from your Merchant Center account. 24254// 24255// - merchantId: The ID of the account that contains the product. This 24256// account cannot be a multi-client account. 24257// - productId: The REST ID of the product. 24258func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { 24259 c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24260 c.merchantId = merchantId 24261 c.productId = productId 24262 return c 24263} 24264 24265// DryRun sets the optional parameter "dryRun": Flag to simulate a 24266// request like in a live environment. If set to true, dry-run mode 24267// checks the validity of the request and returns errors (if any). 24268func (c *ProductsDeleteCall) DryRun(dryRun bool) *ProductsDeleteCall { 24269 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24270 return c 24271} 24272 24273// Fields allows partial responses to be retrieved. See 24274// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24275// for more information. 24276func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { 24277 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24278 return c 24279} 24280 24281// Context sets the context to be used in this call's Do method. Any 24282// pending HTTP request will be aborted if the provided context is 24283// canceled. 24284func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { 24285 c.ctx_ = ctx 24286 return c 24287} 24288 24289// Header returns an http.Header that can be modified by the caller to 24290// add HTTP headers to the request. 24291func (c *ProductsDeleteCall) Header() http.Header { 24292 if c.header_ == nil { 24293 c.header_ = make(http.Header) 24294 } 24295 return c.header_ 24296} 24297 24298func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { 24299 reqHeaders := make(http.Header) 24300 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24301 for k, v := range c.header_ { 24302 reqHeaders[k] = v 24303 } 24304 reqHeaders.Set("User-Agent", c.s.userAgent()) 24305 var body io.Reader = nil 24306 c.urlParams_.Set("alt", alt) 24307 c.urlParams_.Set("prettyPrint", "false") 24308 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24309 urls += "?" + c.urlParams_.Encode() 24310 req, err := http.NewRequest("DELETE", urls, body) 24311 if err != nil { 24312 return nil, err 24313 } 24314 req.Header = reqHeaders 24315 googleapi.Expand(req.URL, map[string]string{ 24316 "merchantId": strconv.FormatUint(c.merchantId, 10), 24317 "productId": c.productId, 24318 }) 24319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24320} 24321 24322// Do executes the "content.products.delete" call. 24323func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { 24324 gensupport.SetOptions(c.urlParams_, opts...) 24325 res, err := c.doRequest("json") 24326 if err != nil { 24327 return err 24328 } 24329 defer googleapi.CloseBody(res) 24330 if err := googleapi.CheckResponse(res); err != nil { 24331 return err 24332 } 24333 return nil 24334 // { 24335 // "description": "Deletes a product from your Merchant Center account.", 24336 // "flatPath": "{merchantId}/products/{productId}", 24337 // "httpMethod": "DELETE", 24338 // "id": "content.products.delete", 24339 // "parameterOrder": [ 24340 // "merchantId", 24341 // "productId" 24342 // ], 24343 // "parameters": { 24344 // "dryRun": { 24345 // "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).", 24346 // "location": "query", 24347 // "type": "boolean" 24348 // }, 24349 // "merchantId": { 24350 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24351 // "format": "uint64", 24352 // "location": "path", 24353 // "required": true, 24354 // "type": "string" 24355 // }, 24356 // "productId": { 24357 // "description": "The REST ID of the product.", 24358 // "location": "path", 24359 // "required": true, 24360 // "type": "string" 24361 // } 24362 // }, 24363 // "path": "{merchantId}/products/{productId}", 24364 // "scopes": [ 24365 // "https://www.googleapis.com/auth/content" 24366 // ] 24367 // } 24368 24369} 24370 24371// method id "content.products.get": 24372 24373type ProductsGetCall struct { 24374 s *APIService 24375 merchantId uint64 24376 productId string 24377 urlParams_ gensupport.URLParams 24378 ifNoneMatch_ string 24379 ctx_ context.Context 24380 header_ http.Header 24381} 24382 24383// Get: Retrieves a product from your Merchant Center account. 24384// 24385// - merchantId: The ID of the account that contains the product. This 24386// account cannot be a multi-client account. 24387// - productId: The REST ID of the product. 24388func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { 24389 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24390 c.merchantId = merchantId 24391 c.productId = productId 24392 return c 24393} 24394 24395// Fields allows partial responses to be retrieved. See 24396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24397// for more information. 24398func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { 24399 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24400 return c 24401} 24402 24403// IfNoneMatch sets the optional parameter which makes the operation 24404// fail if the object's ETag matches the given value. This is useful for 24405// getting updates only after the object has changed since the last 24406// request. Use googleapi.IsNotModified to check whether the response 24407// error from Do is the result of In-None-Match. 24408func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { 24409 c.ifNoneMatch_ = entityTag 24410 return c 24411} 24412 24413// Context sets the context to be used in this call's Do method. Any 24414// pending HTTP request will be aborted if the provided context is 24415// canceled. 24416func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { 24417 c.ctx_ = ctx 24418 return c 24419} 24420 24421// Header returns an http.Header that can be modified by the caller to 24422// add HTTP headers to the request. 24423func (c *ProductsGetCall) Header() http.Header { 24424 if c.header_ == nil { 24425 c.header_ = make(http.Header) 24426 } 24427 return c.header_ 24428} 24429 24430func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { 24431 reqHeaders := make(http.Header) 24432 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24433 for k, v := range c.header_ { 24434 reqHeaders[k] = v 24435 } 24436 reqHeaders.Set("User-Agent", c.s.userAgent()) 24437 if c.ifNoneMatch_ != "" { 24438 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24439 } 24440 var body io.Reader = nil 24441 c.urlParams_.Set("alt", alt) 24442 c.urlParams_.Set("prettyPrint", "false") 24443 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24444 urls += "?" + c.urlParams_.Encode() 24445 req, err := http.NewRequest("GET", urls, body) 24446 if err != nil { 24447 return nil, err 24448 } 24449 req.Header = reqHeaders 24450 googleapi.Expand(req.URL, map[string]string{ 24451 "merchantId": strconv.FormatUint(c.merchantId, 10), 24452 "productId": c.productId, 24453 }) 24454 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24455} 24456 24457// Do executes the "content.products.get" call. 24458// Exactly one of *Product or error will be non-nil. Any non-2xx status 24459// code is an error. Response headers are in either 24460// *Product.ServerResponse.Header or (if a response was returned at all) 24461// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24462// check whether the returned error was because http.StatusNotModified 24463// was returned. 24464func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, 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 := &Product{ 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 a product from your Merchant Center account.", 24496 // "flatPath": "{merchantId}/products/{productId}", 24497 // "httpMethod": "GET", 24498 // "id": "content.products.get", 24499 // "parameterOrder": [ 24500 // "merchantId", 24501 // "productId" 24502 // ], 24503 // "parameters": { 24504 // "merchantId": { 24505 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24506 // "format": "uint64", 24507 // "location": "path", 24508 // "required": true, 24509 // "type": "string" 24510 // }, 24511 // "productId": { 24512 // "description": "The REST ID of the product.", 24513 // "location": "path", 24514 // "required": true, 24515 // "type": "string" 24516 // } 24517 // }, 24518 // "path": "{merchantId}/products/{productId}", 24519 // "response": { 24520 // "$ref": "Product" 24521 // }, 24522 // "scopes": [ 24523 // "https://www.googleapis.com/auth/content" 24524 // ] 24525 // } 24526 24527} 24528 24529// method id "content.products.insert": 24530 24531type ProductsInsertCall struct { 24532 s *APIService 24533 merchantId uint64 24534 product *Product 24535 urlParams_ gensupport.URLParams 24536 ctx_ context.Context 24537 header_ http.Header 24538} 24539 24540// Insert: Uploads a product to your Merchant Center account. If an item 24541// with the same channel, contentLanguage, offerId, and targetCountry 24542// already exists, this method updates that entry. 24543// 24544// - merchantId: The ID of the account that contains the product. This 24545// account cannot be a multi-client account. 24546func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { 24547 c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24548 c.merchantId = merchantId 24549 c.product = product 24550 return c 24551} 24552 24553// DryRun sets the optional parameter "dryRun": Flag to simulate a 24554// request like in a live environment. If set to true, dry-run mode 24555// checks the validity of the request and returns errors (if any). 24556func (c *ProductsInsertCall) DryRun(dryRun bool) *ProductsInsertCall { 24557 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24558 return c 24559} 24560 24561// Fields allows partial responses to be retrieved. See 24562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24563// for more information. 24564func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { 24565 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24566 return c 24567} 24568 24569// Context sets the context to be used in this call's Do method. Any 24570// pending HTTP request will be aborted if the provided context is 24571// canceled. 24572func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { 24573 c.ctx_ = ctx 24574 return c 24575} 24576 24577// Header returns an http.Header that can be modified by the caller to 24578// add HTTP headers to the request. 24579func (c *ProductsInsertCall) Header() http.Header { 24580 if c.header_ == nil { 24581 c.header_ = make(http.Header) 24582 } 24583 return c.header_ 24584} 24585 24586func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { 24587 reqHeaders := make(http.Header) 24588 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24589 for k, v := range c.header_ { 24590 reqHeaders[k] = v 24591 } 24592 reqHeaders.Set("User-Agent", c.s.userAgent()) 24593 var body io.Reader = nil 24594 body, err := googleapi.WithoutDataWrapper.JSONReader(c.product) 24595 if err != nil { 24596 return nil, err 24597 } 24598 reqHeaders.Set("Content-Type", "application/json") 24599 c.urlParams_.Set("alt", alt) 24600 c.urlParams_.Set("prettyPrint", "false") 24601 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 24602 urls += "?" + c.urlParams_.Encode() 24603 req, err := http.NewRequest("POST", urls, body) 24604 if err != nil { 24605 return nil, err 24606 } 24607 req.Header = reqHeaders 24608 googleapi.Expand(req.URL, map[string]string{ 24609 "merchantId": strconv.FormatUint(c.merchantId, 10), 24610 }) 24611 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24612} 24613 24614// Do executes the "content.products.insert" call. 24615// Exactly one of *Product or error will be non-nil. Any non-2xx status 24616// code is an error. Response headers are in either 24617// *Product.ServerResponse.Header or (if a response was returned at all) 24618// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24619// check whether the returned error was because http.StatusNotModified 24620// was returned. 24621func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { 24622 gensupport.SetOptions(c.urlParams_, opts...) 24623 res, err := c.doRequest("json") 24624 if res != nil && res.StatusCode == http.StatusNotModified { 24625 if res.Body != nil { 24626 res.Body.Close() 24627 } 24628 return nil, &googleapi.Error{ 24629 Code: res.StatusCode, 24630 Header: res.Header, 24631 } 24632 } 24633 if err != nil { 24634 return nil, err 24635 } 24636 defer googleapi.CloseBody(res) 24637 if err := googleapi.CheckResponse(res); err != nil { 24638 return nil, err 24639 } 24640 ret := &Product{ 24641 ServerResponse: googleapi.ServerResponse{ 24642 Header: res.Header, 24643 HTTPStatusCode: res.StatusCode, 24644 }, 24645 } 24646 target := &ret 24647 if err := gensupport.DecodeResponse(target, res); err != nil { 24648 return nil, err 24649 } 24650 return ret, nil 24651 // { 24652 // "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.", 24653 // "flatPath": "{merchantId}/products", 24654 // "httpMethod": "POST", 24655 // "id": "content.products.insert", 24656 // "parameterOrder": [ 24657 // "merchantId" 24658 // ], 24659 // "parameters": { 24660 // "dryRun": { 24661 // "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).", 24662 // "location": "query", 24663 // "type": "boolean" 24664 // }, 24665 // "merchantId": { 24666 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24667 // "format": "uint64", 24668 // "location": "path", 24669 // "required": true, 24670 // "type": "string" 24671 // } 24672 // }, 24673 // "path": "{merchantId}/products", 24674 // "request": { 24675 // "$ref": "Product" 24676 // }, 24677 // "response": { 24678 // "$ref": "Product" 24679 // }, 24680 // "scopes": [ 24681 // "https://www.googleapis.com/auth/content" 24682 // ] 24683 // } 24684 24685} 24686 24687// method id "content.products.list": 24688 24689type ProductsListCall struct { 24690 s *APIService 24691 merchantId uint64 24692 urlParams_ gensupport.URLParams 24693 ifNoneMatch_ string 24694 ctx_ context.Context 24695 header_ http.Header 24696} 24697 24698// List: Lists the products in your Merchant Center account. The 24699// response might contain fewer items than specified by maxResults. Rely 24700// on nextPageToken to determine if there are more items to be 24701// requested. 24702// 24703// - merchantId: The ID of the account that contains the products. This 24704// account cannot be a multi-client account. 24705func (r *ProductsService) List(merchantId uint64) *ProductsListCall { 24706 c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24707 c.merchantId = merchantId 24708 return c 24709} 24710 24711// IncludeInvalidInsertedItems sets the optional parameter 24712// "includeInvalidInsertedItems": Flag to include the invalid inserted 24713// items in the result of the list request. By default the invalid items 24714// are not shown (the default value is false). 24715func (c *ProductsListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductsListCall { 24716 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 24717 return c 24718} 24719 24720// MaxResults sets the optional parameter "maxResults": The maximum 24721// number of products to return in the response, used for paging. 24722func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { 24723 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 24724 return c 24725} 24726 24727// PageToken sets the optional parameter "pageToken": The token returned 24728// by the previous request. 24729func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { 24730 c.urlParams_.Set("pageToken", pageToken) 24731 return c 24732} 24733 24734// Fields allows partial responses to be retrieved. See 24735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24736// for more information. 24737func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { 24738 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24739 return c 24740} 24741 24742// IfNoneMatch sets the optional parameter which makes the operation 24743// fail if the object's ETag matches the given value. This is useful for 24744// getting updates only after the object has changed since the last 24745// request. Use googleapi.IsNotModified to check whether the response 24746// error from Do is the result of In-None-Match. 24747func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { 24748 c.ifNoneMatch_ = entityTag 24749 return c 24750} 24751 24752// Context sets the context to be used in this call's Do method. Any 24753// pending HTTP request will be aborted if the provided context is 24754// canceled. 24755func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { 24756 c.ctx_ = ctx 24757 return c 24758} 24759 24760// Header returns an http.Header that can be modified by the caller to 24761// add HTTP headers to the request. 24762func (c *ProductsListCall) Header() http.Header { 24763 if c.header_ == nil { 24764 c.header_ = make(http.Header) 24765 } 24766 return c.header_ 24767} 24768 24769func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { 24770 reqHeaders := make(http.Header) 24771 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24772 for k, v := range c.header_ { 24773 reqHeaders[k] = v 24774 } 24775 reqHeaders.Set("User-Agent", c.s.userAgent()) 24776 if c.ifNoneMatch_ != "" { 24777 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24778 } 24779 var body io.Reader = nil 24780 c.urlParams_.Set("alt", alt) 24781 c.urlParams_.Set("prettyPrint", "false") 24782 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 24783 urls += "?" + c.urlParams_.Encode() 24784 req, err := http.NewRequest("GET", urls, body) 24785 if err != nil { 24786 return nil, err 24787 } 24788 req.Header = reqHeaders 24789 googleapi.Expand(req.URL, map[string]string{ 24790 "merchantId": strconv.FormatUint(c.merchantId, 10), 24791 }) 24792 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24793} 24794 24795// Do executes the "content.products.list" call. 24796// Exactly one of *ProductsListResponse or error will be non-nil. Any 24797// non-2xx status code is an error. Response headers are in either 24798// *ProductsListResponse.ServerResponse.Header or (if a response was 24799// returned at all) in error.(*googleapi.Error).Header. Use 24800// googleapi.IsNotModified to check whether the returned error was 24801// because http.StatusNotModified was returned. 24802func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { 24803 gensupport.SetOptions(c.urlParams_, opts...) 24804 res, err := c.doRequest("json") 24805 if res != nil && res.StatusCode == http.StatusNotModified { 24806 if res.Body != nil { 24807 res.Body.Close() 24808 } 24809 return nil, &googleapi.Error{ 24810 Code: res.StatusCode, 24811 Header: res.Header, 24812 } 24813 } 24814 if err != nil { 24815 return nil, err 24816 } 24817 defer googleapi.CloseBody(res) 24818 if err := googleapi.CheckResponse(res); err != nil { 24819 return nil, err 24820 } 24821 ret := &ProductsListResponse{ 24822 ServerResponse: googleapi.ServerResponse{ 24823 Header: res.Header, 24824 HTTPStatusCode: res.StatusCode, 24825 }, 24826 } 24827 target := &ret 24828 if err := gensupport.DecodeResponse(target, res); err != nil { 24829 return nil, err 24830 } 24831 return ret, nil 24832 // { 24833 // "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.", 24834 // "flatPath": "{merchantId}/products", 24835 // "httpMethod": "GET", 24836 // "id": "content.products.list", 24837 // "parameterOrder": [ 24838 // "merchantId" 24839 // ], 24840 // "parameters": { 24841 // "includeInvalidInsertedItems": { 24842 // "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).", 24843 // "location": "query", 24844 // "type": "boolean" 24845 // }, 24846 // "maxResults": { 24847 // "description": "The maximum number of products to return in the response, used for paging.", 24848 // "format": "uint32", 24849 // "location": "query", 24850 // "type": "integer" 24851 // }, 24852 // "merchantId": { 24853 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 24854 // "format": "uint64", 24855 // "location": "path", 24856 // "required": true, 24857 // "type": "string" 24858 // }, 24859 // "pageToken": { 24860 // "description": "The token returned by the previous request.", 24861 // "location": "query", 24862 // "type": "string" 24863 // } 24864 // }, 24865 // "path": "{merchantId}/products", 24866 // "response": { 24867 // "$ref": "ProductsListResponse" 24868 // }, 24869 // "scopes": [ 24870 // "https://www.googleapis.com/auth/content" 24871 // ] 24872 // } 24873 24874} 24875 24876// Pages invokes f for each page of results. 24877// A non-nil error returned from f will halt the iteration. 24878// The provided context supersedes any context provided to the Context method. 24879func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { 24880 c.ctx_ = ctx 24881 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24882 for { 24883 x, err := c.Do() 24884 if err != nil { 24885 return err 24886 } 24887 if err := f(x); err != nil { 24888 return err 24889 } 24890 if x.NextPageToken == "" { 24891 return nil 24892 } 24893 c.PageToken(x.NextPageToken) 24894 } 24895} 24896 24897// method id "content.productstatuses.custombatch": 24898 24899type ProductstatusesCustombatchCall struct { 24900 s *APIService 24901 productstatusescustombatchrequest *ProductstatusesCustomBatchRequest 24902 urlParams_ gensupport.URLParams 24903 ctx_ context.Context 24904 header_ http.Header 24905} 24906 24907// Custombatch: Gets the statuses of multiple products in a single 24908// request. 24909func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { 24910 c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24911 c.productstatusescustombatchrequest = productstatusescustombatchrequest 24912 return c 24913} 24914 24915// IncludeAttributes sets the optional parameter "includeAttributes": 24916// Flag to include full product data in the results of this request. The 24917// default value is false. 24918func (c *ProductstatusesCustombatchCall) IncludeAttributes(includeAttributes bool) *ProductstatusesCustombatchCall { 24919 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 24920 return c 24921} 24922 24923// Fields allows partial responses to be retrieved. See 24924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24925// for more information. 24926func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { 24927 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24928 return c 24929} 24930 24931// Context sets the context to be used in this call's Do method. Any 24932// pending HTTP request will be aborted if the provided context is 24933// canceled. 24934func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { 24935 c.ctx_ = ctx 24936 return c 24937} 24938 24939// Header returns an http.Header that can be modified by the caller to 24940// add HTTP headers to the request. 24941func (c *ProductstatusesCustombatchCall) Header() http.Header { 24942 if c.header_ == nil { 24943 c.header_ = make(http.Header) 24944 } 24945 return c.header_ 24946} 24947 24948func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 24949 reqHeaders := make(http.Header) 24950 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 24951 for k, v := range c.header_ { 24952 reqHeaders[k] = v 24953 } 24954 reqHeaders.Set("User-Agent", c.s.userAgent()) 24955 var body io.Reader = nil 24956 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest) 24957 if err != nil { 24958 return nil, err 24959 } 24960 reqHeaders.Set("Content-Type", "application/json") 24961 c.urlParams_.Set("alt", alt) 24962 c.urlParams_.Set("prettyPrint", "false") 24963 urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") 24964 urls += "?" + c.urlParams_.Encode() 24965 req, err := http.NewRequest("POST", urls, body) 24966 if err != nil { 24967 return nil, err 24968 } 24969 req.Header = reqHeaders 24970 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24971} 24972 24973// Do executes the "content.productstatuses.custombatch" call. 24974// Exactly one of *ProductstatusesCustomBatchResponse or error will be 24975// non-nil. Any non-2xx status code is an error. Response headers are in 24976// either *ProductstatusesCustomBatchResponse.ServerResponse.Header or 24977// (if a response was returned at all) in 24978// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 24979// whether the returned error was because http.StatusNotModified was 24980// returned. 24981func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { 24982 gensupport.SetOptions(c.urlParams_, opts...) 24983 res, err := c.doRequest("json") 24984 if res != nil && res.StatusCode == http.StatusNotModified { 24985 if res.Body != nil { 24986 res.Body.Close() 24987 } 24988 return nil, &googleapi.Error{ 24989 Code: res.StatusCode, 24990 Header: res.Header, 24991 } 24992 } 24993 if err != nil { 24994 return nil, err 24995 } 24996 defer googleapi.CloseBody(res) 24997 if err := googleapi.CheckResponse(res); err != nil { 24998 return nil, err 24999 } 25000 ret := &ProductstatusesCustomBatchResponse{ 25001 ServerResponse: googleapi.ServerResponse{ 25002 Header: res.Header, 25003 HTTPStatusCode: res.StatusCode, 25004 }, 25005 } 25006 target := &ret 25007 if err := gensupport.DecodeResponse(target, res); err != nil { 25008 return nil, err 25009 } 25010 return ret, nil 25011 // { 25012 // "description": "Gets the statuses of multiple products in a single request.", 25013 // "flatPath": "productstatuses/batch", 25014 // "httpMethod": "POST", 25015 // "id": "content.productstatuses.custombatch", 25016 // "parameterOrder": [], 25017 // "parameters": { 25018 // "includeAttributes": { 25019 // "description": "Flag to include full product data in the results of this request. The default value is false.", 25020 // "location": "query", 25021 // "type": "boolean" 25022 // } 25023 // }, 25024 // "path": "productstatuses/batch", 25025 // "request": { 25026 // "$ref": "ProductstatusesCustomBatchRequest" 25027 // }, 25028 // "response": { 25029 // "$ref": "ProductstatusesCustomBatchResponse" 25030 // }, 25031 // "scopes": [ 25032 // "https://www.googleapis.com/auth/content" 25033 // ] 25034 // } 25035 25036} 25037 25038// method id "content.productstatuses.get": 25039 25040type ProductstatusesGetCall struct { 25041 s *APIService 25042 merchantId uint64 25043 productId string 25044 urlParams_ gensupport.URLParams 25045 ifNoneMatch_ string 25046 ctx_ context.Context 25047 header_ http.Header 25048} 25049 25050// Get: Gets the status of a product from your Merchant Center account. 25051// 25052// - merchantId: The ID of the account that contains the product. This 25053// account cannot be a multi-client account. 25054// - productId: The REST ID of the product. 25055func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { 25056 c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25057 c.merchantId = merchantId 25058 c.productId = productId 25059 return c 25060} 25061 25062// Destinations sets the optional parameter "destinations": If set, only 25063// issues for the specified destinations are returned, otherwise only 25064// issues for the Shopping destination. 25065func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { 25066 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25067 return c 25068} 25069 25070// IncludeAttributes sets the optional parameter "includeAttributes": 25071// Flag to include full product data in the result of this get request. 25072// The default value is false. 25073func (c *ProductstatusesGetCall) IncludeAttributes(includeAttributes bool) *ProductstatusesGetCall { 25074 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25075 return c 25076} 25077 25078// Fields allows partial responses to be retrieved. See 25079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25080// for more information. 25081func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { 25082 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25083 return c 25084} 25085 25086// IfNoneMatch sets the optional parameter which makes the operation 25087// fail if the object's ETag matches the given value. This is useful for 25088// getting updates only after the object has changed since the last 25089// request. Use googleapi.IsNotModified to check whether the response 25090// error from Do is the result of In-None-Match. 25091func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { 25092 c.ifNoneMatch_ = entityTag 25093 return c 25094} 25095 25096// Context sets the context to be used in this call's Do method. Any 25097// pending HTTP request will be aborted if the provided context is 25098// canceled. 25099func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { 25100 c.ctx_ = ctx 25101 return c 25102} 25103 25104// Header returns an http.Header that can be modified by the caller to 25105// add HTTP headers to the request. 25106func (c *ProductstatusesGetCall) Header() http.Header { 25107 if c.header_ == nil { 25108 c.header_ = make(http.Header) 25109 } 25110 return c.header_ 25111} 25112 25113func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { 25114 reqHeaders := make(http.Header) 25115 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25116 for k, v := range c.header_ { 25117 reqHeaders[k] = v 25118 } 25119 reqHeaders.Set("User-Agent", c.s.userAgent()) 25120 if c.ifNoneMatch_ != "" { 25121 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25122 } 25123 var body io.Reader = nil 25124 c.urlParams_.Set("alt", alt) 25125 c.urlParams_.Set("prettyPrint", "false") 25126 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") 25127 urls += "?" + c.urlParams_.Encode() 25128 req, err := http.NewRequest("GET", urls, body) 25129 if err != nil { 25130 return nil, err 25131 } 25132 req.Header = reqHeaders 25133 googleapi.Expand(req.URL, map[string]string{ 25134 "merchantId": strconv.FormatUint(c.merchantId, 10), 25135 "productId": c.productId, 25136 }) 25137 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25138} 25139 25140// Do executes the "content.productstatuses.get" call. 25141// Exactly one of *ProductStatus or error will be non-nil. Any non-2xx 25142// status code is an error. Response headers are in either 25143// *ProductStatus.ServerResponse.Header or (if a response was returned 25144// at all) in error.(*googleapi.Error).Header. Use 25145// googleapi.IsNotModified to check whether the returned error was 25146// because http.StatusNotModified was returned. 25147func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { 25148 gensupport.SetOptions(c.urlParams_, opts...) 25149 res, err := c.doRequest("json") 25150 if res != nil && res.StatusCode == http.StatusNotModified { 25151 if res.Body != nil { 25152 res.Body.Close() 25153 } 25154 return nil, &googleapi.Error{ 25155 Code: res.StatusCode, 25156 Header: res.Header, 25157 } 25158 } 25159 if err != nil { 25160 return nil, err 25161 } 25162 defer googleapi.CloseBody(res) 25163 if err := googleapi.CheckResponse(res); err != nil { 25164 return nil, err 25165 } 25166 ret := &ProductStatus{ 25167 ServerResponse: googleapi.ServerResponse{ 25168 Header: res.Header, 25169 HTTPStatusCode: res.StatusCode, 25170 }, 25171 } 25172 target := &ret 25173 if err := gensupport.DecodeResponse(target, res); err != nil { 25174 return nil, err 25175 } 25176 return ret, nil 25177 // { 25178 // "description": "Gets the status of a product from your Merchant Center account.", 25179 // "flatPath": "{merchantId}/productstatuses/{productId}", 25180 // "httpMethod": "GET", 25181 // "id": "content.productstatuses.get", 25182 // "parameterOrder": [ 25183 // "merchantId", 25184 // "productId" 25185 // ], 25186 // "parameters": { 25187 // "destinations": { 25188 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25189 // "location": "query", 25190 // "repeated": true, 25191 // "type": "string" 25192 // }, 25193 // "includeAttributes": { 25194 // "description": "Flag to include full product data in the result of this get request. The default value is false.", 25195 // "location": "query", 25196 // "type": "boolean" 25197 // }, 25198 // "merchantId": { 25199 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 25200 // "format": "uint64", 25201 // "location": "path", 25202 // "required": true, 25203 // "type": "string" 25204 // }, 25205 // "productId": { 25206 // "description": "The REST ID of the product.", 25207 // "location": "path", 25208 // "required": true, 25209 // "type": "string" 25210 // } 25211 // }, 25212 // "path": "{merchantId}/productstatuses/{productId}", 25213 // "response": { 25214 // "$ref": "ProductStatus" 25215 // }, 25216 // "scopes": [ 25217 // "https://www.googleapis.com/auth/content" 25218 // ] 25219 // } 25220 25221} 25222 25223// method id "content.productstatuses.list": 25224 25225type ProductstatusesListCall struct { 25226 s *APIService 25227 merchantId uint64 25228 urlParams_ gensupport.URLParams 25229 ifNoneMatch_ string 25230 ctx_ context.Context 25231 header_ http.Header 25232} 25233 25234// List: Lists the statuses of the products in your Merchant Center 25235// account. 25236// 25237// - merchantId: The ID of the account that contains the products. This 25238// account cannot be a multi-client account. 25239func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { 25240 c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25241 c.merchantId = merchantId 25242 return c 25243} 25244 25245// Destinations sets the optional parameter "destinations": If set, only 25246// issues for the specified destinations are returned, otherwise only 25247// issues for the Shopping destination. 25248func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { 25249 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25250 return c 25251} 25252 25253// IncludeAttributes sets the optional parameter "includeAttributes": 25254// Flag to include full product data in the results of the list request. 25255// The default value is false. 25256func (c *ProductstatusesListCall) IncludeAttributes(includeAttributes bool) *ProductstatusesListCall { 25257 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25258 return c 25259} 25260 25261// IncludeInvalidInsertedItems sets the optional parameter 25262// "includeInvalidInsertedItems": Flag to include the invalid inserted 25263// items in the result of the list request. By default the invalid items 25264// are not shown (the default value is false). 25265func (c *ProductstatusesListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductstatusesListCall { 25266 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 25267 return c 25268} 25269 25270// MaxResults sets the optional parameter "maxResults": The maximum 25271// number of product statuses to return in the response, used for 25272// paging. 25273func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { 25274 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 25275 return c 25276} 25277 25278// PageToken sets the optional parameter "pageToken": The token returned 25279// by the previous request. 25280func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { 25281 c.urlParams_.Set("pageToken", pageToken) 25282 return c 25283} 25284 25285// Fields allows partial responses to be retrieved. See 25286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25287// for more information. 25288func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { 25289 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25290 return c 25291} 25292 25293// IfNoneMatch sets the optional parameter which makes the operation 25294// fail if the object's ETag matches the given value. This is useful for 25295// getting updates only after the object has changed since the last 25296// request. Use googleapi.IsNotModified to check whether the response 25297// error from Do is the result of In-None-Match. 25298func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { 25299 c.ifNoneMatch_ = entityTag 25300 return c 25301} 25302 25303// Context sets the context to be used in this call's Do method. Any 25304// pending HTTP request will be aborted if the provided context is 25305// canceled. 25306func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { 25307 c.ctx_ = ctx 25308 return c 25309} 25310 25311// Header returns an http.Header that can be modified by the caller to 25312// add HTTP headers to the request. 25313func (c *ProductstatusesListCall) Header() http.Header { 25314 if c.header_ == nil { 25315 c.header_ = make(http.Header) 25316 } 25317 return c.header_ 25318} 25319 25320func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { 25321 reqHeaders := make(http.Header) 25322 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25323 for k, v := range c.header_ { 25324 reqHeaders[k] = v 25325 } 25326 reqHeaders.Set("User-Agent", c.s.userAgent()) 25327 if c.ifNoneMatch_ != "" { 25328 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25329 } 25330 var body io.Reader = nil 25331 c.urlParams_.Set("alt", alt) 25332 c.urlParams_.Set("prettyPrint", "false") 25333 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") 25334 urls += "?" + c.urlParams_.Encode() 25335 req, err := http.NewRequest("GET", urls, body) 25336 if err != nil { 25337 return nil, err 25338 } 25339 req.Header = reqHeaders 25340 googleapi.Expand(req.URL, map[string]string{ 25341 "merchantId": strconv.FormatUint(c.merchantId, 10), 25342 }) 25343 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25344} 25345 25346// Do executes the "content.productstatuses.list" call. 25347// Exactly one of *ProductstatusesListResponse or error will be non-nil. 25348// Any non-2xx status code is an error. Response headers are in either 25349// *ProductstatusesListResponse.ServerResponse.Header or (if a response 25350// was returned at all) in error.(*googleapi.Error).Header. Use 25351// googleapi.IsNotModified to check whether the returned error was 25352// because http.StatusNotModified was returned. 25353func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { 25354 gensupport.SetOptions(c.urlParams_, opts...) 25355 res, err := c.doRequest("json") 25356 if res != nil && res.StatusCode == http.StatusNotModified { 25357 if res.Body != nil { 25358 res.Body.Close() 25359 } 25360 return nil, &googleapi.Error{ 25361 Code: res.StatusCode, 25362 Header: res.Header, 25363 } 25364 } 25365 if err != nil { 25366 return nil, err 25367 } 25368 defer googleapi.CloseBody(res) 25369 if err := googleapi.CheckResponse(res); err != nil { 25370 return nil, err 25371 } 25372 ret := &ProductstatusesListResponse{ 25373 ServerResponse: googleapi.ServerResponse{ 25374 Header: res.Header, 25375 HTTPStatusCode: res.StatusCode, 25376 }, 25377 } 25378 target := &ret 25379 if err := gensupport.DecodeResponse(target, res); err != nil { 25380 return nil, err 25381 } 25382 return ret, nil 25383 // { 25384 // "description": "Lists the statuses of the products in your Merchant Center account.", 25385 // "flatPath": "{merchantId}/productstatuses", 25386 // "httpMethod": "GET", 25387 // "id": "content.productstatuses.list", 25388 // "parameterOrder": [ 25389 // "merchantId" 25390 // ], 25391 // "parameters": { 25392 // "destinations": { 25393 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25394 // "location": "query", 25395 // "repeated": true, 25396 // "type": "string" 25397 // }, 25398 // "includeAttributes": { 25399 // "description": "Flag to include full product data in the results of the list request. The default value is false.", 25400 // "location": "query", 25401 // "type": "boolean" 25402 // }, 25403 // "includeInvalidInsertedItems": { 25404 // "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).", 25405 // "location": "query", 25406 // "type": "boolean" 25407 // }, 25408 // "maxResults": { 25409 // "description": "The maximum number of product statuses to return in the response, used for paging.", 25410 // "format": "uint32", 25411 // "location": "query", 25412 // "type": "integer" 25413 // }, 25414 // "merchantId": { 25415 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 25416 // "format": "uint64", 25417 // "location": "path", 25418 // "required": true, 25419 // "type": "string" 25420 // }, 25421 // "pageToken": { 25422 // "description": "The token returned by the previous request.", 25423 // "location": "query", 25424 // "type": "string" 25425 // } 25426 // }, 25427 // "path": "{merchantId}/productstatuses", 25428 // "response": { 25429 // "$ref": "ProductstatusesListResponse" 25430 // }, 25431 // "scopes": [ 25432 // "https://www.googleapis.com/auth/content" 25433 // ] 25434 // } 25435 25436} 25437 25438// Pages invokes f for each page of results. 25439// A non-nil error returned from f will halt the iteration. 25440// The provided context supersedes any context provided to the Context method. 25441func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { 25442 c.ctx_ = ctx 25443 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25444 for { 25445 x, err := c.Do() 25446 if err != nil { 25447 return err 25448 } 25449 if err := f(x); err != nil { 25450 return err 25451 } 25452 if x.NextPageToken == "" { 25453 return nil 25454 } 25455 c.PageToken(x.NextPageToken) 25456 } 25457} 25458 25459// method id "content.shippingsettings.custombatch": 25460 25461type ShippingsettingsCustombatchCall struct { 25462 s *APIService 25463 shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest 25464 urlParams_ gensupport.URLParams 25465 ctx_ context.Context 25466 header_ http.Header 25467} 25468 25469// Custombatch: Retrieves and updates the shipping settings of multiple 25470// accounts in a single request. 25471func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall { 25472 c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25473 c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest 25474 return c 25475} 25476 25477// DryRun sets the optional parameter "dryRun": Flag to simulate a 25478// request like in a live environment. If set to true, dry-run mode 25479// checks the validity of the request and returns errors (if any). 25480func (c *ShippingsettingsCustombatchCall) DryRun(dryRun bool) *ShippingsettingsCustombatchCall { 25481 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 25482 return c 25483} 25484 25485// Fields allows partial responses to be retrieved. See 25486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25487// for more information. 25488func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall { 25489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25490 return c 25491} 25492 25493// Context sets the context to be used in this call's Do method. Any 25494// pending HTTP request will be aborted if the provided context is 25495// canceled. 25496func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall { 25497 c.ctx_ = ctx 25498 return c 25499} 25500 25501// Header returns an http.Header that can be modified by the caller to 25502// add HTTP headers to the request. 25503func (c *ShippingsettingsCustombatchCall) Header() http.Header { 25504 if c.header_ == nil { 25505 c.header_ = make(http.Header) 25506 } 25507 return c.header_ 25508} 25509 25510func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 25511 reqHeaders := make(http.Header) 25512 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25513 for k, v := range c.header_ { 25514 reqHeaders[k] = v 25515 } 25516 reqHeaders.Set("User-Agent", c.s.userAgent()) 25517 var body io.Reader = nil 25518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest) 25519 if err != nil { 25520 return nil, err 25521 } 25522 reqHeaders.Set("Content-Type", "application/json") 25523 c.urlParams_.Set("alt", alt) 25524 c.urlParams_.Set("prettyPrint", "false") 25525 urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch") 25526 urls += "?" + c.urlParams_.Encode() 25527 req, err := http.NewRequest("POST", urls, body) 25528 if err != nil { 25529 return nil, err 25530 } 25531 req.Header = reqHeaders 25532 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25533} 25534 25535// Do executes the "content.shippingsettings.custombatch" call. 25536// Exactly one of *ShippingsettingsCustomBatchResponse or error will be 25537// non-nil. Any non-2xx status code is an error. Response headers are in 25538// either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or 25539// (if a response was returned at all) in 25540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25541// whether the returned error was because http.StatusNotModified was 25542// returned. 25543func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) { 25544 gensupport.SetOptions(c.urlParams_, opts...) 25545 res, err := c.doRequest("json") 25546 if res != nil && res.StatusCode == http.StatusNotModified { 25547 if res.Body != nil { 25548 res.Body.Close() 25549 } 25550 return nil, &googleapi.Error{ 25551 Code: res.StatusCode, 25552 Header: res.Header, 25553 } 25554 } 25555 if err != nil { 25556 return nil, err 25557 } 25558 defer googleapi.CloseBody(res) 25559 if err := googleapi.CheckResponse(res); err != nil { 25560 return nil, err 25561 } 25562 ret := &ShippingsettingsCustomBatchResponse{ 25563 ServerResponse: googleapi.ServerResponse{ 25564 Header: res.Header, 25565 HTTPStatusCode: res.StatusCode, 25566 }, 25567 } 25568 target := &ret 25569 if err := gensupport.DecodeResponse(target, res); err != nil { 25570 return nil, err 25571 } 25572 return ret, nil 25573 // { 25574 // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", 25575 // "flatPath": "shippingsettings/batch", 25576 // "httpMethod": "POST", 25577 // "id": "content.shippingsettings.custombatch", 25578 // "parameterOrder": [], 25579 // "parameters": { 25580 // "dryRun": { 25581 // "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).", 25582 // "location": "query", 25583 // "type": "boolean" 25584 // } 25585 // }, 25586 // "path": "shippingsettings/batch", 25587 // "request": { 25588 // "$ref": "ShippingsettingsCustomBatchRequest" 25589 // }, 25590 // "response": { 25591 // "$ref": "ShippingsettingsCustomBatchResponse" 25592 // }, 25593 // "scopes": [ 25594 // "https://www.googleapis.com/auth/content" 25595 // ] 25596 // } 25597 25598} 25599 25600// method id "content.shippingsettings.get": 25601 25602type ShippingsettingsGetCall struct { 25603 s *APIService 25604 merchantId uint64 25605 accountId uint64 25606 urlParams_ gensupport.URLParams 25607 ifNoneMatch_ string 25608 ctx_ context.Context 25609 header_ http.Header 25610} 25611 25612// Get: Retrieves the shipping settings of the account. 25613// 25614// - accountId: The ID of the account for which to get/update shipping 25615// settings. 25616// - merchantId: The ID of the managing account. If this parameter is 25617// not the same as accountId, then this account must be a multi-client 25618// account and `accountId` must be the ID of a sub-account of this 25619// account. 25620func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall { 25621 c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25622 c.merchantId = merchantId 25623 c.accountId = accountId 25624 return c 25625} 25626 25627// Fields allows partial responses to be retrieved. See 25628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25629// for more information. 25630func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall { 25631 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25632 return c 25633} 25634 25635// IfNoneMatch sets the optional parameter which makes the operation 25636// fail if the object's ETag matches the given value. This is useful for 25637// getting updates only after the object has changed since the last 25638// request. Use googleapi.IsNotModified to check whether the response 25639// error from Do is the result of In-None-Match. 25640func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall { 25641 c.ifNoneMatch_ = entityTag 25642 return c 25643} 25644 25645// Context sets the context to be used in this call's Do method. Any 25646// pending HTTP request will be aborted if the provided context is 25647// canceled. 25648func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall { 25649 c.ctx_ = ctx 25650 return c 25651} 25652 25653// Header returns an http.Header that can be modified by the caller to 25654// add HTTP headers to the request. 25655func (c *ShippingsettingsGetCall) Header() http.Header { 25656 if c.header_ == nil { 25657 c.header_ = make(http.Header) 25658 } 25659 return c.header_ 25660} 25661 25662func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) { 25663 reqHeaders := make(http.Header) 25664 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25665 for k, v := range c.header_ { 25666 reqHeaders[k] = v 25667 } 25668 reqHeaders.Set("User-Agent", c.s.userAgent()) 25669 if c.ifNoneMatch_ != "" { 25670 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25671 } 25672 var body io.Reader = nil 25673 c.urlParams_.Set("alt", alt) 25674 c.urlParams_.Set("prettyPrint", "false") 25675 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 25676 urls += "?" + c.urlParams_.Encode() 25677 req, err := http.NewRequest("GET", urls, body) 25678 if err != nil { 25679 return nil, err 25680 } 25681 req.Header = reqHeaders 25682 googleapi.Expand(req.URL, map[string]string{ 25683 "merchantId": strconv.FormatUint(c.merchantId, 10), 25684 "accountId": strconv.FormatUint(c.accountId, 10), 25685 }) 25686 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25687} 25688 25689// Do executes the "content.shippingsettings.get" call. 25690// Exactly one of *ShippingSettings or error will be non-nil. Any 25691// non-2xx status code is an error. Response headers are in either 25692// *ShippingSettings.ServerResponse.Header or (if a response was 25693// returned at all) in error.(*googleapi.Error).Header. Use 25694// googleapi.IsNotModified to check whether the returned error was 25695// because http.StatusNotModified was returned. 25696func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 25697 gensupport.SetOptions(c.urlParams_, opts...) 25698 res, err := c.doRequest("json") 25699 if res != nil && res.StatusCode == http.StatusNotModified { 25700 if res.Body != nil { 25701 res.Body.Close() 25702 } 25703 return nil, &googleapi.Error{ 25704 Code: res.StatusCode, 25705 Header: res.Header, 25706 } 25707 } 25708 if err != nil { 25709 return nil, err 25710 } 25711 defer googleapi.CloseBody(res) 25712 if err := googleapi.CheckResponse(res); err != nil { 25713 return nil, err 25714 } 25715 ret := &ShippingSettings{ 25716 ServerResponse: googleapi.ServerResponse{ 25717 Header: res.Header, 25718 HTTPStatusCode: res.StatusCode, 25719 }, 25720 } 25721 target := &ret 25722 if err := gensupport.DecodeResponse(target, res); err != nil { 25723 return nil, err 25724 } 25725 return ret, nil 25726 // { 25727 // "description": "Retrieves the shipping settings of the account.", 25728 // "flatPath": "{merchantId}/shippingsettings/{accountId}", 25729 // "httpMethod": "GET", 25730 // "id": "content.shippingsettings.get", 25731 // "parameterOrder": [ 25732 // "merchantId", 25733 // "accountId" 25734 // ], 25735 // "parameters": { 25736 // "accountId": { 25737 // "description": "The ID of the account for which to get/update shipping settings.", 25738 // "format": "uint64", 25739 // "location": "path", 25740 // "required": true, 25741 // "type": "string" 25742 // }, 25743 // "merchantId": { 25744 // "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.", 25745 // "format": "uint64", 25746 // "location": "path", 25747 // "required": true, 25748 // "type": "string" 25749 // } 25750 // }, 25751 // "path": "{merchantId}/shippingsettings/{accountId}", 25752 // "response": { 25753 // "$ref": "ShippingSettings" 25754 // }, 25755 // "scopes": [ 25756 // "https://www.googleapis.com/auth/content" 25757 // ] 25758 // } 25759 25760} 25761 25762// method id "content.shippingsettings.getsupportedcarriers": 25763 25764type ShippingsettingsGetsupportedcarriersCall struct { 25765 s *APIService 25766 merchantId uint64 25767 urlParams_ gensupport.URLParams 25768 ifNoneMatch_ string 25769 ctx_ context.Context 25770 header_ http.Header 25771} 25772 25773// Getsupportedcarriers: Retrieves supported carriers and carrier 25774// services for an account. 25775// 25776// - merchantId: The ID of the account for which to retrieve the 25777// supported carriers. 25778func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall { 25779 c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25780 c.merchantId = merchantId 25781 return c 25782} 25783 25784// Fields allows partial responses to be retrieved. See 25785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25786// for more information. 25787func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall { 25788 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25789 return c 25790} 25791 25792// IfNoneMatch sets the optional parameter which makes the operation 25793// fail if the object's ETag matches the given value. This is useful for 25794// getting updates only after the object has changed since the last 25795// request. Use googleapi.IsNotModified to check whether the response 25796// error from Do is the result of In-None-Match. 25797func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall { 25798 c.ifNoneMatch_ = entityTag 25799 return c 25800} 25801 25802// Context sets the context to be used in this call's Do method. Any 25803// pending HTTP request will be aborted if the provided context is 25804// canceled. 25805func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall { 25806 c.ctx_ = ctx 25807 return c 25808} 25809 25810// Header returns an http.Header that can be modified by the caller to 25811// add HTTP headers to the request. 25812func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header { 25813 if c.header_ == nil { 25814 c.header_ = make(http.Header) 25815 } 25816 return c.header_ 25817} 25818 25819func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) { 25820 reqHeaders := make(http.Header) 25821 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25822 for k, v := range c.header_ { 25823 reqHeaders[k] = v 25824 } 25825 reqHeaders.Set("User-Agent", c.s.userAgent()) 25826 if c.ifNoneMatch_ != "" { 25827 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25828 } 25829 var body io.Reader = nil 25830 c.urlParams_.Set("alt", alt) 25831 c.urlParams_.Set("prettyPrint", "false") 25832 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers") 25833 urls += "?" + c.urlParams_.Encode() 25834 req, err := http.NewRequest("GET", urls, body) 25835 if err != nil { 25836 return nil, err 25837 } 25838 req.Header = reqHeaders 25839 googleapi.Expand(req.URL, map[string]string{ 25840 "merchantId": strconv.FormatUint(c.merchantId, 10), 25841 }) 25842 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25843} 25844 25845// Do executes the "content.shippingsettings.getsupportedcarriers" call. 25846// Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error 25847// will be non-nil. Any non-2xx status code is an error. Response 25848// headers are in either 25849// *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header 25850// or (if a response was returned at all) in 25851// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25852// whether the returned error was because http.StatusNotModified was 25853// returned. 25854func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) { 25855 gensupport.SetOptions(c.urlParams_, opts...) 25856 res, err := c.doRequest("json") 25857 if res != nil && res.StatusCode == http.StatusNotModified { 25858 if res.Body != nil { 25859 res.Body.Close() 25860 } 25861 return nil, &googleapi.Error{ 25862 Code: res.StatusCode, 25863 Header: res.Header, 25864 } 25865 } 25866 if err != nil { 25867 return nil, err 25868 } 25869 defer googleapi.CloseBody(res) 25870 if err := googleapi.CheckResponse(res); err != nil { 25871 return nil, err 25872 } 25873 ret := &ShippingsettingsGetSupportedCarriersResponse{ 25874 ServerResponse: googleapi.ServerResponse{ 25875 Header: res.Header, 25876 HTTPStatusCode: res.StatusCode, 25877 }, 25878 } 25879 target := &ret 25880 if err := gensupport.DecodeResponse(target, res); err != nil { 25881 return nil, err 25882 } 25883 return ret, nil 25884 // { 25885 // "description": "Retrieves supported carriers and carrier services for an account.", 25886 // "flatPath": "{merchantId}/supportedCarriers", 25887 // "httpMethod": "GET", 25888 // "id": "content.shippingsettings.getsupportedcarriers", 25889 // "parameterOrder": [ 25890 // "merchantId" 25891 // ], 25892 // "parameters": { 25893 // "merchantId": { 25894 // "description": "The ID of the account for which to retrieve the supported carriers.", 25895 // "format": "uint64", 25896 // "location": "path", 25897 // "required": true, 25898 // "type": "string" 25899 // } 25900 // }, 25901 // "path": "{merchantId}/supportedCarriers", 25902 // "response": { 25903 // "$ref": "ShippingsettingsGetSupportedCarriersResponse" 25904 // }, 25905 // "scopes": [ 25906 // "https://www.googleapis.com/auth/content" 25907 // ] 25908 // } 25909 25910} 25911 25912// method id "content.shippingsettings.getsupportedholidays": 25913 25914type ShippingsettingsGetsupportedholidaysCall struct { 25915 s *APIService 25916 merchantId uint64 25917 urlParams_ gensupport.URLParams 25918 ifNoneMatch_ string 25919 ctx_ context.Context 25920 header_ http.Header 25921} 25922 25923// Getsupportedholidays: Retrieves supported holidays for an account. 25924// 25925// - merchantId: The ID of the account for which to retrieve the 25926// supported holidays. 25927func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall { 25928 c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25929 c.merchantId = merchantId 25930 return c 25931} 25932 25933// Fields allows partial responses to be retrieved. See 25934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25935// for more information. 25936func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall { 25937 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25938 return c 25939} 25940 25941// IfNoneMatch sets the optional parameter which makes the operation 25942// fail if the object's ETag matches the given value. This is useful for 25943// getting updates only after the object has changed since the last 25944// request. Use googleapi.IsNotModified to check whether the response 25945// error from Do is the result of In-None-Match. 25946func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall { 25947 c.ifNoneMatch_ = entityTag 25948 return c 25949} 25950 25951// Context sets the context to be used in this call's Do method. Any 25952// pending HTTP request will be aborted if the provided context is 25953// canceled. 25954func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall { 25955 c.ctx_ = ctx 25956 return c 25957} 25958 25959// Header returns an http.Header that can be modified by the caller to 25960// add HTTP headers to the request. 25961func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header { 25962 if c.header_ == nil { 25963 c.header_ = make(http.Header) 25964 } 25965 return c.header_ 25966} 25967 25968func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) { 25969 reqHeaders := make(http.Header) 25970 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 25971 for k, v := range c.header_ { 25972 reqHeaders[k] = v 25973 } 25974 reqHeaders.Set("User-Agent", c.s.userAgent()) 25975 if c.ifNoneMatch_ != "" { 25976 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25977 } 25978 var body io.Reader = nil 25979 c.urlParams_.Set("alt", alt) 25980 c.urlParams_.Set("prettyPrint", "false") 25981 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays") 25982 urls += "?" + c.urlParams_.Encode() 25983 req, err := http.NewRequest("GET", urls, body) 25984 if err != nil { 25985 return nil, err 25986 } 25987 req.Header = reqHeaders 25988 googleapi.Expand(req.URL, map[string]string{ 25989 "merchantId": strconv.FormatUint(c.merchantId, 10), 25990 }) 25991 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25992} 25993 25994// Do executes the "content.shippingsettings.getsupportedholidays" call. 25995// Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error 25996// will be non-nil. Any non-2xx status code is an error. Response 25997// headers are in either 25998// *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header 25999// or (if a response was returned at all) in 26000// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26001// whether the returned error was because http.StatusNotModified was 26002// returned. 26003func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) { 26004 gensupport.SetOptions(c.urlParams_, opts...) 26005 res, err := c.doRequest("json") 26006 if res != nil && res.StatusCode == http.StatusNotModified { 26007 if res.Body != nil { 26008 res.Body.Close() 26009 } 26010 return nil, &googleapi.Error{ 26011 Code: res.StatusCode, 26012 Header: res.Header, 26013 } 26014 } 26015 if err != nil { 26016 return nil, err 26017 } 26018 defer googleapi.CloseBody(res) 26019 if err := googleapi.CheckResponse(res); err != nil { 26020 return nil, err 26021 } 26022 ret := &ShippingsettingsGetSupportedHolidaysResponse{ 26023 ServerResponse: googleapi.ServerResponse{ 26024 Header: res.Header, 26025 HTTPStatusCode: res.StatusCode, 26026 }, 26027 } 26028 target := &ret 26029 if err := gensupport.DecodeResponse(target, res); err != nil { 26030 return nil, err 26031 } 26032 return ret, nil 26033 // { 26034 // "description": "Retrieves supported holidays for an account.", 26035 // "flatPath": "{merchantId}/supportedHolidays", 26036 // "httpMethod": "GET", 26037 // "id": "content.shippingsettings.getsupportedholidays", 26038 // "parameterOrder": [ 26039 // "merchantId" 26040 // ], 26041 // "parameters": { 26042 // "merchantId": { 26043 // "description": "The ID of the account for which to retrieve the supported holidays.", 26044 // "format": "uint64", 26045 // "location": "path", 26046 // "required": true, 26047 // "type": "string" 26048 // } 26049 // }, 26050 // "path": "{merchantId}/supportedHolidays", 26051 // "response": { 26052 // "$ref": "ShippingsettingsGetSupportedHolidaysResponse" 26053 // }, 26054 // "scopes": [ 26055 // "https://www.googleapis.com/auth/content" 26056 // ] 26057 // } 26058 26059} 26060 26061// method id "content.shippingsettings.getsupportedpickupservices": 26062 26063type ShippingsettingsGetsupportedpickupservicesCall struct { 26064 s *APIService 26065 merchantId uint64 26066 urlParams_ gensupport.URLParams 26067 ifNoneMatch_ string 26068 ctx_ context.Context 26069 header_ http.Header 26070} 26071 26072// Getsupportedpickupservices: Retrieves supported pickup services for 26073// an account. 26074// 26075// - merchantId: The ID of the account for which to retrieve the 26076// supported pickup services. 26077func (r *ShippingsettingsService) Getsupportedpickupservices(merchantId uint64) *ShippingsettingsGetsupportedpickupservicesCall { 26078 c := &ShippingsettingsGetsupportedpickupservicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26079 c.merchantId = merchantId 26080 return c 26081} 26082 26083// Fields allows partial responses to be retrieved. See 26084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26085// for more information. 26086func (c *ShippingsettingsGetsupportedpickupservicesCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedpickupservicesCall { 26087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26088 return c 26089} 26090 26091// IfNoneMatch sets the optional parameter which makes the operation 26092// fail if the object's ETag matches the given value. This is useful for 26093// getting updates only after the object has changed since the last 26094// request. Use googleapi.IsNotModified to check whether the response 26095// error from Do is the result of In-None-Match. 26096func (c *ShippingsettingsGetsupportedpickupservicesCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedpickupservicesCall { 26097 c.ifNoneMatch_ = entityTag 26098 return c 26099} 26100 26101// Context sets the context to be used in this call's Do method. Any 26102// pending HTTP request will be aborted if the provided context is 26103// canceled. 26104func (c *ShippingsettingsGetsupportedpickupservicesCall) Context(ctx context.Context) *ShippingsettingsGetsupportedpickupservicesCall { 26105 c.ctx_ = ctx 26106 return c 26107} 26108 26109// Header returns an http.Header that can be modified by the caller to 26110// add HTTP headers to the request. 26111func (c *ShippingsettingsGetsupportedpickupservicesCall) Header() http.Header { 26112 if c.header_ == nil { 26113 c.header_ = make(http.Header) 26114 } 26115 return c.header_ 26116} 26117 26118func (c *ShippingsettingsGetsupportedpickupservicesCall) doRequest(alt string) (*http.Response, error) { 26119 reqHeaders := make(http.Header) 26120 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 26121 for k, v := range c.header_ { 26122 reqHeaders[k] = v 26123 } 26124 reqHeaders.Set("User-Agent", c.s.userAgent()) 26125 if c.ifNoneMatch_ != "" { 26126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26127 } 26128 var body io.Reader = nil 26129 c.urlParams_.Set("alt", alt) 26130 c.urlParams_.Set("prettyPrint", "false") 26131 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedPickupServices") 26132 urls += "?" + c.urlParams_.Encode() 26133 req, err := http.NewRequest("GET", urls, body) 26134 if err != nil { 26135 return nil, err 26136 } 26137 req.Header = reqHeaders 26138 googleapi.Expand(req.URL, map[string]string{ 26139 "merchantId": strconv.FormatUint(c.merchantId, 10), 26140 }) 26141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26142} 26143 26144// Do executes the "content.shippingsettings.getsupportedpickupservices" call. 26145// Exactly one of *ShippingsettingsGetSupportedPickupServicesResponse or 26146// error will be non-nil. Any non-2xx status code is an error. Response 26147// headers are in either 26148// *ShippingsettingsGetSupportedPickupServicesResponse.ServerResponse.Hea 26149// der or (if a response was returned at all) in 26150// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26151// whether the returned error was because http.StatusNotModified was 26152// returned. 26153func (c *ShippingsettingsGetsupportedpickupservicesCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedPickupServicesResponse, error) { 26154 gensupport.SetOptions(c.urlParams_, opts...) 26155 res, err := c.doRequest("json") 26156 if res != nil && res.StatusCode == http.StatusNotModified { 26157 if res.Body != nil { 26158 res.Body.Close() 26159 } 26160 return nil, &googleapi.Error{ 26161 Code: res.StatusCode, 26162 Header: res.Header, 26163 } 26164 } 26165 if err != nil { 26166 return nil, err 26167 } 26168 defer googleapi.CloseBody(res) 26169 if err := googleapi.CheckResponse(res); err != nil { 26170 return nil, err 26171 } 26172 ret := &ShippingsettingsGetSupportedPickupServicesResponse{ 26173 ServerResponse: googleapi.ServerResponse{ 26174 Header: res.Header, 26175 HTTPStatusCode: res.StatusCode, 26176 }, 26177 } 26178 target := &ret 26179 if err := gensupport.DecodeResponse(target, res); err != nil { 26180 return nil, err 26181 } 26182 return ret, nil 26183 // { 26184 // "description": "Retrieves supported pickup services for an account.", 26185 // "flatPath": "{merchantId}/supportedPickupServices", 26186 // "httpMethod": "GET", 26187 // "id": "content.shippingsettings.getsupportedpickupservices", 26188 // "parameterOrder": [ 26189 // "merchantId" 26190 // ], 26191 // "parameters": { 26192 // "merchantId": { 26193 // "description": "The ID of the account for which to retrieve the supported pickup services.", 26194 // "format": "uint64", 26195 // "location": "path", 26196 // "required": true, 26197 // "type": "string" 26198 // } 26199 // }, 26200 // "path": "{merchantId}/supportedPickupServices", 26201 // "response": { 26202 // "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" 26203 // }, 26204 // "scopes": [ 26205 // "https://www.googleapis.com/auth/content" 26206 // ] 26207 // } 26208 26209} 26210 26211// method id "content.shippingsettings.list": 26212 26213type ShippingsettingsListCall struct { 26214 s *APIService 26215 merchantId uint64 26216 urlParams_ gensupport.URLParams 26217 ifNoneMatch_ string 26218 ctx_ context.Context 26219 header_ http.Header 26220} 26221 26222// List: Lists the shipping settings of the sub-accounts in your 26223// Merchant Center account. 26224// 26225// - merchantId: The ID of the managing account. This must be a 26226// multi-client account. 26227func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall { 26228 c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26229 c.merchantId = merchantId 26230 return c 26231} 26232 26233// MaxResults sets the optional parameter "maxResults": The maximum 26234// number of shipping settings to return in the response, used for 26235// paging. 26236func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall { 26237 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 26238 return c 26239} 26240 26241// PageToken sets the optional parameter "pageToken": The token returned 26242// by the previous request. 26243func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall { 26244 c.urlParams_.Set("pageToken", pageToken) 26245 return c 26246} 26247 26248// Fields allows partial responses to be retrieved. See 26249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26250// for more information. 26251func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall { 26252 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26253 return c 26254} 26255 26256// IfNoneMatch sets the optional parameter which makes the operation 26257// fail if the object's ETag matches the given value. This is useful for 26258// getting updates only after the object has changed since the last 26259// request. Use googleapi.IsNotModified to check whether the response 26260// error from Do is the result of In-None-Match. 26261func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall { 26262 c.ifNoneMatch_ = entityTag 26263 return c 26264} 26265 26266// Context sets the context to be used in this call's Do method. Any 26267// pending HTTP request will be aborted if the provided context is 26268// canceled. 26269func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall { 26270 c.ctx_ = ctx 26271 return c 26272} 26273 26274// Header returns an http.Header that can be modified by the caller to 26275// add HTTP headers to the request. 26276func (c *ShippingsettingsListCall) Header() http.Header { 26277 if c.header_ == nil { 26278 c.header_ = make(http.Header) 26279 } 26280 return c.header_ 26281} 26282 26283func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) { 26284 reqHeaders := make(http.Header) 26285 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 26286 for k, v := range c.header_ { 26287 reqHeaders[k] = v 26288 } 26289 reqHeaders.Set("User-Agent", c.s.userAgent()) 26290 if c.ifNoneMatch_ != "" { 26291 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26292 } 26293 var body io.Reader = nil 26294 c.urlParams_.Set("alt", alt) 26295 c.urlParams_.Set("prettyPrint", "false") 26296 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings") 26297 urls += "?" + c.urlParams_.Encode() 26298 req, err := http.NewRequest("GET", urls, body) 26299 if err != nil { 26300 return nil, err 26301 } 26302 req.Header = reqHeaders 26303 googleapi.Expand(req.URL, map[string]string{ 26304 "merchantId": strconv.FormatUint(c.merchantId, 10), 26305 }) 26306 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26307} 26308 26309// Do executes the "content.shippingsettings.list" call. 26310// Exactly one of *ShippingsettingsListResponse or error will be 26311// non-nil. Any non-2xx status code is an error. Response headers are in 26312// either *ShippingsettingsListResponse.ServerResponse.Header or (if a 26313// response was returned at all) in error.(*googleapi.Error).Header. Use 26314// googleapi.IsNotModified to check whether the returned error was 26315// because http.StatusNotModified was returned. 26316func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) { 26317 gensupport.SetOptions(c.urlParams_, opts...) 26318 res, err := c.doRequest("json") 26319 if res != nil && res.StatusCode == http.StatusNotModified { 26320 if res.Body != nil { 26321 res.Body.Close() 26322 } 26323 return nil, &googleapi.Error{ 26324 Code: res.StatusCode, 26325 Header: res.Header, 26326 } 26327 } 26328 if err != nil { 26329 return nil, err 26330 } 26331 defer googleapi.CloseBody(res) 26332 if err := googleapi.CheckResponse(res); err != nil { 26333 return nil, err 26334 } 26335 ret := &ShippingsettingsListResponse{ 26336 ServerResponse: googleapi.ServerResponse{ 26337 Header: res.Header, 26338 HTTPStatusCode: res.StatusCode, 26339 }, 26340 } 26341 target := &ret 26342 if err := gensupport.DecodeResponse(target, res); err != nil { 26343 return nil, err 26344 } 26345 return ret, nil 26346 // { 26347 // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", 26348 // "flatPath": "{merchantId}/shippingsettings", 26349 // "httpMethod": "GET", 26350 // "id": "content.shippingsettings.list", 26351 // "parameterOrder": [ 26352 // "merchantId" 26353 // ], 26354 // "parameters": { 26355 // "maxResults": { 26356 // "description": "The maximum number of shipping settings to return in the response, used for paging.", 26357 // "format": "uint32", 26358 // "location": "query", 26359 // "type": "integer" 26360 // }, 26361 // "merchantId": { 26362 // "description": "The ID of the managing account. This must be a multi-client account.", 26363 // "format": "uint64", 26364 // "location": "path", 26365 // "required": true, 26366 // "type": "string" 26367 // }, 26368 // "pageToken": { 26369 // "description": "The token returned by the previous request.", 26370 // "location": "query", 26371 // "type": "string" 26372 // } 26373 // }, 26374 // "path": "{merchantId}/shippingsettings", 26375 // "response": { 26376 // "$ref": "ShippingsettingsListResponse" 26377 // }, 26378 // "scopes": [ 26379 // "https://www.googleapis.com/auth/content" 26380 // ] 26381 // } 26382 26383} 26384 26385// Pages invokes f for each page of results. 26386// A non-nil error returned from f will halt the iteration. 26387// The provided context supersedes any context provided to the Context method. 26388func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error { 26389 c.ctx_ = ctx 26390 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 26391 for { 26392 x, err := c.Do() 26393 if err != nil { 26394 return err 26395 } 26396 if err := f(x); err != nil { 26397 return err 26398 } 26399 if x.NextPageToken == "" { 26400 return nil 26401 } 26402 c.PageToken(x.NextPageToken) 26403 } 26404} 26405 26406// method id "content.shippingsettings.update": 26407 26408type ShippingsettingsUpdateCall struct { 26409 s *APIService 26410 merchantId uint64 26411 accountId uint64 26412 shippingsettings *ShippingSettings 26413 urlParams_ gensupport.URLParams 26414 ctx_ context.Context 26415 header_ http.Header 26416} 26417 26418// Update: Updates the shipping settings of the account. Any fields that 26419// are not provided are deleted from the resource. 26420// 26421// - accountId: The ID of the account for which to get/update shipping 26422// settings. 26423// - merchantId: The ID of the managing account. If this parameter is 26424// not the same as accountId, then this account must be a multi-client 26425// account and `accountId` must be the ID of a sub-account of this 26426// account. 26427func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall { 26428 c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26429 c.merchantId = merchantId 26430 c.accountId = accountId 26431 c.shippingsettings = shippingsettings 26432 return c 26433} 26434 26435// DryRun sets the optional parameter "dryRun": Flag to simulate a 26436// request like in a live environment. If set to true, dry-run mode 26437// checks the validity of the request and returns errors (if any). 26438func (c *ShippingsettingsUpdateCall) DryRun(dryRun bool) *ShippingsettingsUpdateCall { 26439 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 26440 return c 26441} 26442 26443// Fields allows partial responses to be retrieved. See 26444// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26445// for more information. 26446func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall { 26447 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26448 return c 26449} 26450 26451// Context sets the context to be used in this call's Do method. Any 26452// pending HTTP request will be aborted if the provided context is 26453// canceled. 26454func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall { 26455 c.ctx_ = ctx 26456 return c 26457} 26458 26459// Header returns an http.Header that can be modified by the caller to 26460// add HTTP headers to the request. 26461func (c *ShippingsettingsUpdateCall) Header() http.Header { 26462 if c.header_ == nil { 26463 c.header_ = make(http.Header) 26464 } 26465 return c.header_ 26466} 26467 26468func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 26469 reqHeaders := make(http.Header) 26470 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 26471 for k, v := range c.header_ { 26472 reqHeaders[k] = v 26473 } 26474 reqHeaders.Set("User-Agent", c.s.userAgent()) 26475 var body io.Reader = nil 26476 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings) 26477 if err != nil { 26478 return nil, err 26479 } 26480 reqHeaders.Set("Content-Type", "application/json") 26481 c.urlParams_.Set("alt", alt) 26482 c.urlParams_.Set("prettyPrint", "false") 26483 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 26484 urls += "?" + c.urlParams_.Encode() 26485 req, err := http.NewRequest("PUT", urls, body) 26486 if err != nil { 26487 return nil, err 26488 } 26489 req.Header = reqHeaders 26490 googleapi.Expand(req.URL, map[string]string{ 26491 "merchantId": strconv.FormatUint(c.merchantId, 10), 26492 "accountId": strconv.FormatUint(c.accountId, 10), 26493 }) 26494 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26495} 26496 26497// Do executes the "content.shippingsettings.update" call. 26498// Exactly one of *ShippingSettings or error will be non-nil. Any 26499// non-2xx status code is an error. Response headers are in either 26500// *ShippingSettings.ServerResponse.Header or (if a response was 26501// returned at all) in error.(*googleapi.Error).Header. Use 26502// googleapi.IsNotModified to check whether the returned error was 26503// because http.StatusNotModified was returned. 26504func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 26505 gensupport.SetOptions(c.urlParams_, opts...) 26506 res, err := c.doRequest("json") 26507 if res != nil && res.StatusCode == http.StatusNotModified { 26508 if res.Body != nil { 26509 res.Body.Close() 26510 } 26511 return nil, &googleapi.Error{ 26512 Code: res.StatusCode, 26513 Header: res.Header, 26514 } 26515 } 26516 if err != nil { 26517 return nil, err 26518 } 26519 defer googleapi.CloseBody(res) 26520 if err := googleapi.CheckResponse(res); err != nil { 26521 return nil, err 26522 } 26523 ret := &ShippingSettings{ 26524 ServerResponse: googleapi.ServerResponse{ 26525 Header: res.Header, 26526 HTTPStatusCode: res.StatusCode, 26527 }, 26528 } 26529 target := &ret 26530 if err := gensupport.DecodeResponse(target, res); err != nil { 26531 return nil, err 26532 } 26533 return ret, nil 26534 // { 26535 // "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", 26536 // "flatPath": "{merchantId}/shippingsettings/{accountId}", 26537 // "httpMethod": "PUT", 26538 // "id": "content.shippingsettings.update", 26539 // "parameterOrder": [ 26540 // "merchantId", 26541 // "accountId" 26542 // ], 26543 // "parameters": { 26544 // "accountId": { 26545 // "description": "The ID of the account for which to get/update shipping settings.", 26546 // "format": "uint64", 26547 // "location": "path", 26548 // "required": true, 26549 // "type": "string" 26550 // }, 26551 // "dryRun": { 26552 // "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).", 26553 // "location": "query", 26554 // "type": "boolean" 26555 // }, 26556 // "merchantId": { 26557 // "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.", 26558 // "format": "uint64", 26559 // "location": "path", 26560 // "required": true, 26561 // "type": "string" 26562 // } 26563 // }, 26564 // "path": "{merchantId}/shippingsettings/{accountId}", 26565 // "request": { 26566 // "$ref": "ShippingSettings" 26567 // }, 26568 // "response": { 26569 // "$ref": "ShippingSettings" 26570 // }, 26571 // "scopes": [ 26572 // "https://www.googleapis.com/auth/content" 26573 // ] 26574 // } 26575 26576} 26577